Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef UNOMODEL_HXX
20 : #define UNOMODEL_HXX
21 :
22 : #include <com/sun/star/beans/XPropertySet.hpp>
23 : #include <com/sun/star/beans/XMultiPropertySet.hpp>
24 : #include <com/sun/star/beans/XPropertyState.hpp>
25 : #include <com/sun/star/lang/XServiceInfo.hpp>
26 : #include <com/sun/star/view/XRenderable.hpp>
27 :
28 : #include <sfx2/sfxbasemodel.hxx>
29 : #include <comphelper/propertysethelper.hxx>
30 : #include <vcl/print.hxx>
31 : #include <oox/mathml/export.hxx>
32 : #include <oox/mathml/import.hxx>
33 :
34 : ////////////////////////////////////////////////////////////
35 :
36 : #define PRTUIOPT_TITLE_ROW "TitleRow"
37 : #define PRTUIOPT_FORMULA_TEXT "FormulaText"
38 : #define PRTUIOPT_BORDER "Border"
39 : #define PRTUIOPT_PRINT_FORMAT "PrintFormat"
40 : #define PRTUIOPT_PRINT_SCALE "PrintScale"
41 :
42 0 : class SmPrintUIOptions : public vcl::PrinterOptionsHelper
43 : {
44 : public:
45 : SmPrintUIOptions();
46 : };
47 :
48 :
49 : ////////////////////////////////////////////////////////////
50 :
51 : //-----------------------------------------------------------------------------
52 : class SmModel : public SfxBaseModel,
53 : public comphelper::PropertySetHelper,
54 : public com::sun::star::lang::XServiceInfo,
55 : public com::sun::star::view::XRenderable,
56 : public oox::FormulaExportBase,
57 : public oox::FormulaImportBase
58 : {
59 : SmPrintUIOptions* m_pPrintUIOptions;
60 : protected:
61 : virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const ::com::sun::star::uno::Any* pValues )
62 : throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
63 : virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, ::com::sun::star::uno::Any* pValue )
64 : throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
65 : public:
66 : SmModel( SfxObjectShell *pObjSh = 0 );
67 : virtual ~SmModel() throw ();
68 :
69 : //XInterface
70 : virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
71 : virtual void SAL_CALL acquire( ) throw();
72 : virtual void SAL_CALL release( ) throw();
73 :
74 : //XTypeProvider
75 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
76 :
77 : static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
78 :
79 : //XUnoTunnel
80 : virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
81 :
82 : //XRenderable
83 : virtual sal_Int32 SAL_CALL getRendererCount( const ::com::sun::star::uno::Any& rSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rxOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
84 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRenderer( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& rSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rxOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
85 : virtual void SAL_CALL render( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& rSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rxOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
86 :
87 : //XServiceInfo
88 : virtual OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
89 : virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
90 : virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
91 :
92 : virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xParent ) throw( ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException );
93 :
94 : // oox::FormulaExportBase
95 : virtual void writeFormulaOoxml( ::sax_fastparser::FSHelperPtr m_pSerializer, oox::core::OoxmlVersion version );
96 : virtual void writeFormulaRtf(OStringBuffer& rBuffer, rtl_TextEncoding nEncoding);
97 : // oox::FormulaImportBase
98 : virtual void readFormulaOoxml( oox::formulaimport::XmlStream& stream );
99 : virtual Size getFormulaSize() const;
100 :
101 : static ::com::sun::star::uno::Sequence< OUString > getSupportedServiceNames_Static();
102 : static OUString getImplementationName_Static();
103 : };
104 :
105 : ////////////////////////////////////////////////////////////
106 :
107 : #endif
108 :
109 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|