merge the formfield patch from ooo-build
[ooovba.git] / binfilter / inc / bf_sw / unomod.hxx
blobfe4e3bc0c6c2436521c0cc23831bfde9fa742571
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unomod.hxx,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _UNOMOD_HXX
31 #define _UNOMOD_HXX
33 #ifndef _COM_SUN_STAR_TEXT_XMODULE_HPP_
34 #include <com/sun/star/text/XModule.hpp>
35 #endif
36 #ifndef _COM_SUN_STAR_VIEW_XPRINTSETTINGSSUPPLIER_HPP_
37 #include <com/sun/star/view/XPrintSettingsSupplier.hpp>
38 #endif
39 #ifndef _COM_SUN_STAR_VIEW_XVIEWSETTINGSSUPPLIER_HPP_
40 #include <com/sun/star/view/XViewSettingsSupplier.hpp>
41 #endif
42 #ifndef _CPPUHELPER_IMPLBASE4_HXX_
43 #include <cppuhelper/implbase4.hxx> // helper for implementations
44 #endif
45 #ifndef _COMPHELPER_CHAINABLEPROPERTYSET_HXX_
46 #include <comphelper/ChainablePropertySet.hxx>
47 #endif
48 #ifndef _COMPHELPER_SETTINGSHELPER_HXX_
49 #include <comphelper/SettingsHelper.hxx>
50 #endif
51 namespace binfilter {
53 class SwView;
54 class SwViewOption;
55 struct SwPrintData;
56 class SwDoc;
58 /******************************************************************************
60 ******************************************************************************/
61 /*-----------------15.03.98 13:21-------------------
63 --------------------------------------------------*/
65 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SwXModule_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & );
67 class SwXModule : public cppu::WeakImplHelper4
69 ::com::sun::star::text::XModule,
70 ::com::sun::star::view::XViewSettingsSupplier,
71 ::com::sun::star::view::XPrintSettingsSupplier,
72 ::com::sun::star::lang::XServiceInfo
76 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxViewSettings;
77 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxPrintSettings;
79 protected:
80 virtual ~SwXModule();
81 public:
82 SwXModule();
85 //XViewSettings
86 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getViewSettings(void)
87 throw( ::com::sun::star::uno::RuntimeException );
89 //XPrintSettings
90 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getPrintSettings(void)
91 throw( ::com::sun::star::uno::RuntimeException );
93 //XServiceInfo
94 virtual ::rtl::OUString SAL_CALL getImplementationName(void)
95 throw( ::com::sun::star::uno::RuntimeException );
96 virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName)
97 throw( ::com::sun::star::uno::RuntimeException );
98 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void)
99 throw( ::com::sun::star::uno::RuntimeException );
102 enum SwXPrintSettingsType
104 PRINT_SETTINGS_MODULE,
105 PRINT_SETTINGS_WEB,
106 PRINT_SETTINGS_DOCUMENT
109 class SwXPrintSettings : public comphelper::ChainableHelperNoState
111 friend class SwXDocumentSettings;
112 protected:
113 SwXPrintSettingsType meType;
114 SwPrintData * mpPrtOpt;
115 SwDoc *mpDoc;
117 virtual void _preSetValues ()
118 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
119 virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue )
120 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
121 virtual void _postSetValues ()
122 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
124 virtual void _preGetValues ()
125 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
126 virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue )
127 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
128 virtual void _postGetValues ()
129 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
131 virtual ~SwXPrintSettings()
132 throw();
133 public:
134 SwXPrintSettings( SwXPrintSettingsType eType, SwDoc * pDoc = NULL );
137 //XServiceInfo
138 virtual ::rtl::OUString SAL_CALL getImplementationName(void)
139 throw( ::com::sun::star::uno::RuntimeException );
140 virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName)
141 throw( ::com::sun::star::uno::RuntimeException );
142 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void)
143 throw( ::com::sun::star::uno::RuntimeException );
145 /*-----------------15.03.98 13:21-------------------
147 --------------------------------------------------*/
148 class SwXViewSettings : public comphelper::ChainableHelperNoState
151 friend class SwXDocumentSettings;
152 protected:
153 SwView* pView;
154 SwViewOption* mpViewOption;
155 const SwViewOption* mpConstViewOption;
156 sal_Bool bObjectValid:1, bWeb:1, mbApplyZoom;
157 virtual void _preSetValues ()
158 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
159 virtual void _setSingleValue( const comphelper::PropertyInfo & rInfo, const ::com::sun::star::uno::Any &rValue )
160 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
161 virtual void _postSetValues ()
162 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
164 virtual void _preGetValues ()
165 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
166 virtual void _getSingleValue( const comphelper::PropertyInfo & rInfo, ::com::sun::star::uno::Any & rValue )
167 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException );
168 virtual void _postGetValues ()
169 throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException );
171 virtual ~SwXViewSettings()
172 throw();
173 public:
174 SwXViewSettings(sal_Bool bWeb, SwView* pView);
177 //XServiceInfo
178 virtual ::rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
179 virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
180 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
182 sal_Bool IsValid() const {return bObjectValid;}
183 void Invalidate() {bObjectValid = sal_False;}
185 /* -----------------24.09.98 10:47-------------------
187 * --------------------------------------------------*/
188 /*class SwXTerminateListener : public ::com::sun::star::frame::XTerminateListener,
189 public UsrObject
191 public:
192 SwXTerminateListener();
193 virtual ~SwXTerminateListener();
195 SMART_UNO_DECLARATION( SwXTerminateListener, UsrObject );
197 virtual UString getClassName();
198 // automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
199 // virtual ::com::sun::star::uno::XInterface * queryInterface( ::com::sun::star::uno::Uik aUik);
201 // automatisch auskommentiert - [getIdlClass or queryInterface] - Bitte XTypeProvider benutzen!
202 // virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::reflection::XIdlClass > > getIdlClasses(void);
205 //XTerminateListener
206 virtual void queryTermination(const ::com::sun::star::lang::EventObject& aEvent);
207 virtual void notifyTermination(const ::com::sun::star::lang::EventObject& aEvent);
209 //XEventListener
210 virtual void disposing(const ::com::sun::star::lang::EventObject& Source);
214 } //namespace binfilter
215 #endif