xref: /aoo41x/main/starmath/inc/unomodel.hxx (revision f6a9d5ca)
1*f6a9d5caSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*f6a9d5caSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*f6a9d5caSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*f6a9d5caSAndrew Rist  * distributed with this work for additional information
6*f6a9d5caSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*f6a9d5caSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*f6a9d5caSAndrew Rist  * "License"); you may not use this file except in compliance
9*f6a9d5caSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*f6a9d5caSAndrew Rist  *
11*f6a9d5caSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*f6a9d5caSAndrew Rist  *
13*f6a9d5caSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*f6a9d5caSAndrew Rist  * software distributed under the License is distributed on an
15*f6a9d5caSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*f6a9d5caSAndrew Rist  * KIND, either express or implied.  See the License for the
17*f6a9d5caSAndrew Rist  * specific language governing permissions and limitations
18*f6a9d5caSAndrew Rist  * under the License.
19*f6a9d5caSAndrew Rist  *
20*f6a9d5caSAndrew Rist  *************************************************************/
21*f6a9d5caSAndrew Rist 
22*f6a9d5caSAndrew Rist 
23cdf0e10cSrcweir #ifndef UNOMODEL_HXX
24cdf0e10cSrcweir #define UNOMODEL_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
27cdf0e10cSrcweir #include <com/sun/star/beans/XMultiPropertySet.hpp>
28cdf0e10cSrcweir #include <com/sun/star/beans/XPropertyState.hpp>
29cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
30cdf0e10cSrcweir #include <com/sun/star/view/XRenderable.hpp>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <sfx2/sfxbasemodel.hxx>
33cdf0e10cSrcweir #include <comphelper/propertysethelper.hxx>
34cdf0e10cSrcweir #include <vcl/print.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir class SmFormat;
37cdf0e10cSrcweir 
38cdf0e10cSrcweir ////////////////////////////////////////////////////////////
39cdf0e10cSrcweir 
40cdf0e10cSrcweir #define PRTUIOPT_TITLE_ROW          "TitleRow"
41cdf0e10cSrcweir #define PRTUIOPT_FORMULA_TEXT       "FormulaText"
42cdf0e10cSrcweir #define PRTUIOPT_BORDER             "Border"
43cdf0e10cSrcweir #define PRTUIOPT_PRINT_FORMAT       "PrintFormat"
44cdf0e10cSrcweir #define PRTUIOPT_PRINT_SCALE        "PrintScale"
45cdf0e10cSrcweir 
46cdf0e10cSrcweir class SmPrintUIOptions : public vcl::PrinterOptionsHelper
47cdf0e10cSrcweir {
48cdf0e10cSrcweir public:
49cdf0e10cSrcweir     SmPrintUIOptions();
50cdf0e10cSrcweir };
51cdf0e10cSrcweir 
52cdf0e10cSrcweir 
53cdf0e10cSrcweir ////////////////////////////////////////////////////////////
54cdf0e10cSrcweir 
55cdf0e10cSrcweir #define A2OU(pText)     rtl::OUString::createFromAscii(pText)
56cdf0e10cSrcweir 
57cdf0e10cSrcweir //-----------------------------------------------------------------------------
58cdf0e10cSrcweir class SmModel : public SfxBaseModel,
59cdf0e10cSrcweir 				public comphelper::PropertySetHelper,
60cdf0e10cSrcweir 				public com::sun::star::lang::XServiceInfo,
61cdf0e10cSrcweir                 public com::sun::star::view::XRenderable
62cdf0e10cSrcweir {
63cdf0e10cSrcweir     SmPrintUIOptions* m_pPrintUIOptions;
64cdf0e10cSrcweir protected:
65cdf0e10cSrcweir 	virtual void _setPropertyValues( const comphelper::PropertyMapEntry** ppEntries, const ::com::sun::star::uno::Any* pValues )
66cdf0e10cSrcweir 		throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
67cdf0e10cSrcweir 	virtual void _getPropertyValues( const comphelper::PropertyMapEntry** ppEntries, ::com::sun::star::uno::Any* pValue )
68cdf0e10cSrcweir 		throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
69cdf0e10cSrcweir public:
70cdf0e10cSrcweir 	SmModel( SfxObjectShell *pObjSh = 0 );
71cdf0e10cSrcweir 	virtual	~SmModel() throw ();
72cdf0e10cSrcweir 
73cdf0e10cSrcweir 	//XInterface
74cdf0e10cSrcweir 	virtual 	::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
75cdf0e10cSrcweir     virtual void SAL_CALL acquire(  ) throw();
76cdf0e10cSrcweir     virtual void SAL_CALL release(  ) throw();
77cdf0e10cSrcweir 
78cdf0e10cSrcweir 	//XTypeProvider
79cdf0e10cSrcweir 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 	static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
82cdf0e10cSrcweir 
83cdf0e10cSrcweir 	//XUnoTunnel
84cdf0e10cSrcweir 	virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
85cdf0e10cSrcweir 
86cdf0e10cSrcweir     //XRenderable
87cdf0e10cSrcweir     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);
88cdf0e10cSrcweir     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);
89cdf0e10cSrcweir     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);
90cdf0e10cSrcweir 
91cdf0e10cSrcweir     //XServiceInfo
92cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
93cdf0e10cSrcweir     virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
94cdf0e10cSrcweir     virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
95cdf0e10cSrcweir 
96cdf0e10cSrcweir     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 );
97cdf0e10cSrcweir 
98cdf0e10cSrcweir 	static ::com::sun::star::uno::Sequence< rtl::OUString > getSupportedServiceNames_Static();
99cdf0e10cSrcweir 	static ::rtl::OUString getImplementationName_Static();
100cdf0e10cSrcweir };
101cdf0e10cSrcweir 
102cdf0e10cSrcweir ////////////////////////////////////////////////////////////
103cdf0e10cSrcweir 
104cdf0e10cSrcweir #endif
105cdf0e10cSrcweir 
106