update ooo310-m15
[ooovba.git] / sw / inc / unotxdoc.hxx
blob099dc838d172237967babd08047a2fbc6de671b4
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: unotxdoc.hxx,v $
10 * $Revision: 1.29 $
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 _UNOTXDOC_HXX
31 #define _UNOTXDOC_HXX
32 #include "swdllapi.h"
33 #include <svtools/svarray.hxx>
34 #include <sfx2/sfxbasemodel.hxx>
35 #include <com/sun/star/beans/PropertyValues.hpp>
36 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
37 #include <com/sun/star/style/XAutoStylesSupplier.hpp>
38 #include <com/sun/star/document/XLinkTargetSupplier.hpp>
39 #include <com/sun/star/document/XRedlinesSupplier.hpp>
40 #include <com/sun/star/text/XNumberingRulesSupplier.hpp>
41 #include <com/sun/star/text/XFootnotesSupplier.hpp>
42 #include <com/sun/star/text/XEndnotesSupplier.hpp>
43 #include <com/sun/star/text/XEndnotesSettingsSupplier.hpp>
44 #include <com/sun/star/text/XTextSectionsSupplier.hpp>
45 #include <com/sun/star/text/XLineNumberingProperties.hpp>
46 #include <com/sun/star/text/XChapterNumberingSupplier.hpp>
47 #include <com/sun/star/text/XPagePrintable.hpp>
48 #include <com/sun/star/text/XTextFieldsSupplier.hpp>
49 #include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
50 #include <com/sun/star/text/XTextTablesSupplier.hpp>
51 #include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
52 #include <com/sun/star/text/XBookmarksSupplier.hpp>
53 #include <com/sun/star/text/XTextDocument.hpp>
54 #include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
55 #include <com/sun/star/text/XReferenceMarksSupplier.hpp>
56 #include <com/sun/star/text/XTextFramesSupplier.hpp>
57 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
58 #include <com/sun/star/util/XReplaceable.hpp>
59 #include <com/sun/star/util/XReplaceDescriptor.hpp>
60 #include <com/sun/star/util/XRefreshable.hpp>
61 #include <com/sun/star/util/XLinkUpdate.hpp>
62 #include <com/sun/star/view/XRenderable.hpp>
63 #include <com/sun/star/lang/XServiceInfo.hpp>
64 #include <com/sun/star/beans/XPropertySet.hpp>
65 #include <com/sun/star/beans/XPropertyState.hpp>
66 #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
67 #include <com/sun/star/lang/Locale.hpp>
68 #include <com/sun/star/xforms/XFormsSupplier.hpp>
69 #include <com/sun/star/container/XNameContainer.hpp>
70 #include <com/sun/star/text/XFlatParagraphIteratorProvider.hpp>
71 #ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTLANGUAGES_HPP
72 #include <com/sun/star/document/XDocumentLanguages.hpp>
73 #endif
74 #include <svtools/itemprop.hxx>
75 #include <svx/fmdmod.hxx>
76 #include <svx/UnoForbiddenCharsTable.hxx>
77 #include <cppuhelper/weak.hxx>
78 #include <cppuhelper/implbase2.hxx> // helper for implementations
79 #include <cppuhelper/implbase4.hxx> // helper for implementations
80 #include <RefreshListenerContainer.hxx>
82 #define __IFC31 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, Ifc14, Ifc15, Ifc16, \
83 Ifc17, Ifc18, Ifc19, Ifc20, Ifc21, Ifc22, Ifc23, Ifc24, Ifc25, Ifc26, Ifc27, Ifc28, Ifc29, Ifc30, Ifc31
85 #define __CLASS_IFC31 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, \
86 class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12, class Ifc13, class Ifc14, class Ifc15, class Ifc16, \
87 class Ifc17, class Ifc18, class Ifc19, class Ifc20, class Ifc21, class Ifc22, class Ifc23, class Ifc24,\
88 class Ifc25, class Ifc26, class Ifc27, class Ifc28, class Ifc29, class Ifc30, class Ifc31
90 #define __PUBLIC_IFC31 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, \
91 public Ifc13, public Ifc14, public Ifc15, public Ifc16, public Ifc17, public Ifc18, \
92 public Ifc19, public Ifc20, public Ifc21, public Ifc22, public Ifc23, public Ifc24, \
93 public Ifc25, public Ifc26, public Ifc27, public Ifc28, public Ifc29, public Ifc30, \
94 public Ifc31
95 #include <cppuhelper/implbase_ex.hxx>
96 #include <cppuhelper/implbase_ex_pre.hxx>
97 #define __IFC_EX_TYPE_INIT31( class_cast ) \
98 __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
99 __IFC_EX_TYPE_INIT( class_cast, 3 ), __IFC_EX_TYPE_INIT( class_cast, 4 ), \
100 __IFC_EX_TYPE_INIT( class_cast, 5 ), __IFC_EX_TYPE_INIT( class_cast, 6 ), \
101 __IFC_EX_TYPE_INIT( class_cast, 7 ), __IFC_EX_TYPE_INIT( class_cast, 8 ), \
102 __IFC_EX_TYPE_INIT( class_cast, 9 ), __IFC_EX_TYPE_INIT( class_cast, 10 ), \
103 __IFC_EX_TYPE_INIT( class_cast, 11 ), __IFC_EX_TYPE_INIT( class_cast, 12 ), \
104 __IFC_EX_TYPE_INIT( class_cast, 13 ), __IFC_EX_TYPE_INIT( class_cast, 14 ), \
105 __IFC_EX_TYPE_INIT( class_cast, 15 ), __IFC_EX_TYPE_INIT( class_cast, 16 ), \
106 __IFC_EX_TYPE_INIT( class_cast, 17 ), __IFC_EX_TYPE_INIT( class_cast, 18 ), \
107 __IFC_EX_TYPE_INIT( class_cast, 19 ), __IFC_EX_TYPE_INIT( class_cast, 20 ), \
108 __IFC_EX_TYPE_INIT( class_cast, 21 ), __IFC_EX_TYPE_INIT( class_cast, 22 ), \
109 __IFC_EX_TYPE_INIT( class_cast, 23 ), __IFC_EX_TYPE_INIT( class_cast, 24 ), \
110 __IFC_EX_TYPE_INIT( class_cast, 25 ), __IFC_EX_TYPE_INIT( class_cast, 26 ), \
111 __IFC_EX_TYPE_INIT( class_cast, 27 ), __IFC_EX_TYPE_INIT( class_cast, 28 ), \
112 __IFC_EX_TYPE_INIT( class_cast, 29 ), __IFC_EX_TYPE_INIT( class_cast, 30 ), \
113 __IFC_EX_TYPE_INIT( class_cast, 31)
114 #include <cppuhelper/implbase_ex_post.hxx>
116 __DEF_IMPLHELPER_EX( 31 )
118 class SwDoc;
119 class SwDocShell;
120 class UnoActionContext;
121 class SwXBodyText;
122 class SwXDrawPage;
123 class SwUnoCrsr;
124 class SwXDocumentPropertyHelper;
125 class SfxViewFrame;
127 typedef UnoActionContext* UnoActionContextPtr;
128 SV_DECL_PTRARR(ActionContextArr, UnoActionContextPtr, 4, 4)
130 /******************************************************************************
132 ******************************************************************************/
135 typedef cppu::WeakImplHelper31
137 ::com::sun::star::text::XTextDocument,
138 ::com::sun::star::text::XLineNumberingProperties,
139 ::com::sun::star::text::XChapterNumberingSupplier,
140 ::com::sun::star::text::XNumberingRulesSupplier,
141 ::com::sun::star::text::XFootnotesSupplier,
142 ::com::sun::star::text::XEndnotesSupplier,
143 ::com::sun::star::util::XReplaceable,
144 ::com::sun::star::text::XPagePrintable,
145 ::com::sun::star::text::XReferenceMarksSupplier,
146 ::com::sun::star::text::XTextTablesSupplier,
147 ::com::sun::star::text::XTextFramesSupplier,
148 ::com::sun::star::text::XBookmarksSupplier,
149 ::com::sun::star::text::XTextSectionsSupplier,
150 ::com::sun::star::text::XTextGraphicObjectsSupplier,
151 ::com::sun::star::text::XTextEmbeddedObjectsSupplier,
152 ::com::sun::star::text::XTextFieldsSupplier,
153 ::com::sun::star::style::XStyleFamiliesSupplier,
154 ::com::sun::star::style::XAutoStylesSupplier,
155 ::com::sun::star::lang::XServiceInfo,
156 ::com::sun::star::drawing::XDrawPageSupplier,
157 ::com::sun::star::text::XDocumentIndexesSupplier,
158 ::com::sun::star::beans::XPropertySet,
159 ::com::sun::star::beans::XPropertyState,
160 ::com::sun::star::document::XLinkTargetSupplier,
161 ::com::sun::star::document::XRedlinesSupplier,
162 ::com::sun::star::util::XRefreshable,
163 ::com::sun::star::util::XLinkUpdate,
164 ::com::sun::star::view::XRenderable,
165 ::com::sun::star::xforms::XFormsSupplier,
166 ::com::sun::star::text::XFlatParagraphIteratorProvider,
167 ::com::sun::star::document::XDocumentLanguages
169 SwXTextDocumentBaseClass;
171 class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass,
172 public SvxFmMSFactory,
173 public SfxBaseModel
175 ActionContextArr aActionArr;
176 SwRefreshListenerContainer aRefreshCont;
178 SfxItemPropertySet aPropSet;
180 SwDocShell* pDocShell;
181 sal_Bool bObjectValid;
183 SwXDrawPage* pDrawPage;
184 ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > * pxXDrawPage;
186 ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xBodyText;
187 SwXBodyText* pBodyText;
188 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > xNumFmtAgg;
190 ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXNumberingRules;
191 ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXFootnotes;
192 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxXFootnoteSettings;
193 ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXEndnotes;
194 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxXEndnoteSettings;
195 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXReferenceMarks;
196 ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > * pxXTextFieldTypes;
197 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextFieldMasters;
198 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextSections;
199 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXBookmarks;
200 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextTables;
201 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXTextFrames;
202 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXGraphicObjects;
203 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXEmbeddedObjects;
204 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxXStyleFamilies;
205 mutable ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyles > * pxXAutoStyles;
206 ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > * pxXChapterNumbering;
207 ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > * pxXDocumentIndexes;
209 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > * pxXLineNumberingProperties;
210 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > * pxLinkTargetSupplier;
211 ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess >* pxXRedlines;
212 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> xXFormsContainer;
214 //temporary frame to enable PDF export if no valid view is available
215 SfxViewFrame* m_pHiddenViewFrame;
216 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xPropertyHelper;
217 SwXDocumentPropertyHelper* pPropertyHelper;
219 void GetBodyText();
220 void GetNumberFormatter();
222 // used for XRenderable implementation
223 SfxViewShell * GuessViewShell();
224 SwDoc * GetRenderDoc( SfxViewShell *&rpView, const ::com::sun::star::uno::Any& rSelection );
226 rtl::OUString maBuildId;
228 using SfxBaseModel::addEventListener;
229 using SfxBaseModel::removeEventListener;
231 protected:
232 virtual ~SwXTextDocument();
233 public:
234 SwXTextDocument(SwDocShell* pShell);
236 inline void notifyRefreshListeners() { aRefreshCont.Refreshed(); }
237 virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw(::com::sun::star::uno::RuntimeException);
238 virtual void SAL_CALL acquire( ) throw();
239 virtual void SAL_CALL release( ) throw();
241 //XWeak
242 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAdapter > SAL_CALL queryAdapter( ) throw(::com::sun::star::uno::RuntimeException);
244 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
246 static const ::com::sun::star::uno::Sequence< sal_Int8 > & getUnoTunnelId();
248 //XUnoTunnel
249 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
251 //XTextDocument
252 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > SAL_CALL getText(void) throw( ::com::sun::star::uno::RuntimeException );
253 virtual void SAL_CALL reformat(void) throw( ::com::sun::star::uno::RuntimeException );
255 //XModel
256 virtual sal_Bool SAL_CALL attachResource( const ::rtl::OUString& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs ) throw(::com::sun::star::uno::RuntimeException);
257 virtual ::rtl::OUString SAL_CALL getURL( ) throw(::com::sun::star::uno::RuntimeException);
258 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getArgs( ) throw(::com::sun::star::uno::RuntimeException);
259 virtual void SAL_CALL connectController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController ) throw(::com::sun::star::uno::RuntimeException);
260 virtual void SAL_CALL disconnectController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController ) throw(::com::sun::star::uno::RuntimeException);
261 virtual void SAL_CALL lockControllers( ) throw(::com::sun::star::uno::RuntimeException);
262 virtual void SAL_CALL unlockControllers( ) throw(::com::sun::star::uno::RuntimeException);
263 virtual sal_Bool SAL_CALL hasControllersLocked( ) throw(::com::sun::star::uno::RuntimeException);
264 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > SAL_CALL getCurrentController( ) throw(::com::sun::star::uno::RuntimeException);
265 virtual void SAL_CALL setCurrentController( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >& xController ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException);
266 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getCurrentSelection( ) throw(::com::sun::star::uno::RuntimeException);
268 //XComponent
269 virtual void SAL_CALL dispose(void) throw( ::com::sun::star::uno::RuntimeException );
270 virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
271 virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw( ::com::sun::star::uno::RuntimeException );
273 //XCloseable
274 virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw (::com::sun::star::util::CloseVetoException, ::com::sun::star::uno::RuntimeException);
276 //XLineNumberingProperties
277 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getLineNumberingProperties(void) throw( ::com::sun::star::uno::RuntimeException );
279 //XChapterNumberingSupplier
280 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexReplace > SAL_CALL getChapterNumberingRules(void) throw( ::com::sun::star::uno::RuntimeException );
282 //XNumberingRulesSupplier
283 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getNumberingRules() throw (::com::sun::star::uno::RuntimeException);
285 //XFootnotesSupplier
286 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getFootnotes(void) throw( ::com::sun::star::uno::RuntimeException );
287 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getFootnoteSettings(void) throw( ::com::sun::star::uno::RuntimeException );
289 //XEndnotesSupplier
290 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getEndnotes(void) throw( ::com::sun::star::uno::RuntimeException );
291 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getEndnoteSettings(void) throw( ::com::sun::star::uno::RuntimeException );
293 //XReplaceable
294 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
295 virtual sal_Int32 SAL_CALL replaceAll(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
297 //XSearchable
298 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > SAL_CALL createSearchDescriptor(void) throw( ::com::sun::star::uno::RuntimeException );
299 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL findAll(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
300 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL findFirst(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
301 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL findNext(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xStartAt, const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc) throw( ::com::sun::star::uno::RuntimeException );
303 //XPagePrintable
304 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getPagePrintSettings(void) throw( ::com::sun::star::uno::RuntimeException );
305 virtual void SAL_CALL setPagePrintSettings(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aSettings) throw( ::com::sun::star::uno::RuntimeException );
306 virtual void SAL_CALL printPages(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
308 //XReferenceMarksSupplier
309 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getReferenceMarks(void) throw( ::com::sun::star::uno::RuntimeException );
311 // ::com::sun::star::text::XTextFieldsSupplier
312 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL getTextFields(void) throw( ::com::sun::star::uno::RuntimeException );
313 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextFieldMasters(void) throw( ::com::sun::star::uno::RuntimeException );
315 // ::com::sun::star::text::XTextEmbeddedObjectsSupplier
316 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getEmbeddedObjects(void) throw( ::com::sun::star::uno::RuntimeException );
318 // // ::com::sun::star::text::XTextShapesSupplier
319 // virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > getShapes(void) throw( ::com::sun::star::uno::RuntimeException );
321 // ::com::sun::star::text::XBookmarksSupplier
322 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getBookmarks(void) throw( ::com::sun::star::uno::RuntimeException );
324 // ::com::sun::star::text::XTextSectionsSupplier
325 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextSections(void) throw( ::com::sun::star::uno::RuntimeException );
327 // ::com::sun::star::text::XTextTablesSupplier
328 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextTables(void) throw( ::com::sun::star::uno::RuntimeException );
330 // ::com::sun::star::text::XTextGraphicObjectsSupplier
331 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getGraphicObjects(void) throw( ::com::sun::star::uno::RuntimeException );
333 // ::com::sun::star::text::XTextFramesSupplier
334 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getTextFrames(void) throw( ::com::sun::star::uno::RuntimeException );
336 //XStyleFamiliesSupplier
337 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getStyleFamilies(void) throw( ::com::sun::star::uno::RuntimeException );
339 //XAutoStylesSupplier
340 virtual ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyles > SAL_CALL getAutoStyles( ) throw (::com::sun::star::uno::RuntimeException);
342 //XMultiServiceFactory
343 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstance(const rtl::OUString& ServiceSpecifier)
344 throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
345 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments(const rtl::OUString& ServiceSpecifier,
346 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments)
347 throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
348 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames(void)
349 throw( ::com::sun::star::uno::RuntimeException );
351 //XServiceInfo
352 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
353 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
354 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
356 // ::com::sun::star::drawing::XDrawPageSupplier
357 virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL getDrawPage(void) throw( ::com::sun::star::uno::RuntimeException );
359 // ::com::sun::star::text::XDocumentIndexesSupplier
360 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XIndexAccess > SAL_CALL getDocumentIndexes(void) throw( ::com::sun::star::uno::RuntimeException );
362 //XPropertySet
363 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
364 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
365 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
366 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
367 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
368 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
369 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
371 //XPropertyState
372 virtual ::com::sun::star::beans::PropertyState SAL_CALL getPropertyState( const ::rtl::OUString& rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
373 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL getPropertyStates( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& rPropertyNames ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
374 virtual void SAL_CALL setPropertyToDefault( const ::rtl::OUString& rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
375 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyDefault( const ::rtl::OUString& rPropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
377 //XLinkTargetSupplier
378 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getLinks(void) throw( ::com::sun::star::uno::RuntimeException );
380 //XRedlinesSupplier
381 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumerationAccess > SAL_CALL getRedlines( ) throw(::com::sun::star::uno::RuntimeException);
383 // ::com::sun::star::util::XRefreshable
384 virtual void SAL_CALL refresh(void) throw( ::com::sun::star::uno::RuntimeException );
385 virtual void SAL_CALL addRefreshListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener > & l) throw( ::com::sun::star::uno::RuntimeException );
386 virtual void SAL_CALL removeRefreshListener(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshListener > & l) throw( ::com::sun::star::uno::RuntimeException );
388 // ::com::sun::star::util::XLinkUpdate,
389 virtual void SAL_CALL updateLinks( ) throw(::com::sun::star::uno::RuntimeException);
391 // ::com::sun::star::view::XRenderable
392 virtual sal_Int32 SAL_CALL getRendererCount( const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
393 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getRenderer( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
394 virtual void SAL_CALL render( sal_Int32 nRenderer, const ::com::sun::star::uno::Any& aSelection, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& xOptions ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
396 // ::com::sun::star::xforms::XFormsSupplier
397 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer > SAL_CALL getXForms( ) throw (::com::sun::star::uno::RuntimeException);
399 // ::com::sun::star::document::XDocumentLanguages
400 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > SAL_CALL getDocumentLanguages( ::sal_Int16 nScriptTypes, ::sal_Int16 nCount ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
402 // ::com::sun::star::text::XFlatParagraphIteratorProvider:
403 virtual ::com::sun::star::uno::Reference< ::com::sun::star::text::XFlatParagraphIterator > SAL_CALL getFlatParagraphIterator(::sal_Int32 nTextMarkupType, sal_Bool bAutomatic ) throw (::com::sun::star::uno::RuntimeException);
406 void Invalidate();
407 void Reactivate(SwDocShell* pNewDocShell);
408 SwXDocumentPropertyHelper * GetPropertyHelper ();
409 sal_Bool IsValid() const {return bObjectValid;}
411 void InitNewDoc();
413 SwUnoCrsr* CreateCursorForSearch(::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > & xCrsr);
414 SwUnoCrsr* FindAny(const ::com::sun::star::uno::Reference< ::com::sun::star::util::XSearchDescriptor > & xDesc,
415 ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor > & xCrsr, sal_Bool bAll,
416 sal_Int32& nResult,
417 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xLastResult);
419 SwXDrawPage* GetDrawPage();
420 SwDocShell* GetDocShell() {return pDocShell;}
422 void * SAL_CALL operator new( size_t ) throw();
423 void SAL_CALL operator delete( void * ) throw();
426 /* -----------------25.10.99 11:02-------------------
428 --------------------------------------------------*/
429 class SwXLinkTargetSupplier : public cppu::WeakImplHelper2
431 ::com::sun::star::container::XNameAccess,
432 ::com::sun::star::lang::XServiceInfo
435 SwXTextDocument* pxDoc;
436 String sTables;
437 String sFrames;
438 String sGraphics;
439 String sOLEs;
440 String sSections;
441 String sOutlines;
442 String sBookmarks;
444 public:
445 SwXLinkTargetSupplier(SwXTextDocument& rxDoc);
446 ~SwXLinkTargetSupplier();
448 //XNameAccess
449 virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
450 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
451 virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
453 //XElementAccess
454 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
455 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
457 //XServiceInfo
458 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
459 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
460 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
463 void Invalidate() {pxDoc = 0;}
465 /* -----------------26.10.99 09:05-------------------
467 --------------------------------------------------*/
468 class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper4
470 ::com::sun::star::beans::XPropertySet,
471 ::com::sun::star::container::XNameAccess,
472 ::com::sun::star::lang::XServiceInfo,
473 ::com::sun::star::document::XLinkTargetSupplier
476 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xRealAccess;
477 SfxItemPropertySet aPropSet;
478 const String sLinkSuffix;
479 const String sLinkDisplayName;
480 ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextDocument > xDoc;
481 SwXTextDocument* pxDoc;
484 public:
485 SwXLinkNameAccessWrapper(::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > xAccess,
486 const String& rLinkDisplayName, String sSuffix);
487 SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
488 const String& rLinkDisplayName, String sSuffix);
489 ~SwXLinkNameAccessWrapper();
491 //XNameAccess
492 virtual ::com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException );
493 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getElementNames(void) throw( ::com::sun::star::uno::RuntimeException );
494 virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& Name) throw( ::com::sun::star::uno::RuntimeException );
496 //XElementAccess
497 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
498 virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
500 //XPropertySet
501 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
502 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
503 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
504 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
505 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
506 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
507 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
509 //XLinkTargetSupplier
510 virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > SAL_CALL getLinks(void) throw( ::com::sun::star::uno::RuntimeException );
512 //XServiceInfo
513 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
514 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
515 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
518 /* -----------------26.10.99 15:46-------------------
520 --------------------------------------------------*/
521 class SwXOutlineTarget : public cppu::WeakImplHelper2
523 ::com::sun::star::beans::XPropertySet,
524 ::com::sun::star::lang::XServiceInfo
527 SfxItemPropertySet aPropSet;
528 String sOutlineText;
530 public:
531 SwXOutlineTarget(const String& rOutlineText);
532 ~SwXOutlineTarget();
534 //XPropertySet
535 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
536 virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
537 virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
538 virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
539 virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
540 virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
541 virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
543 //XServiceInfo
544 virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
545 virtual BOOL SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
546 virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
548 #endif
550 class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable
552 com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xDashTable;
553 com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xGradientTable;
554 com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xHatchTable;
555 com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xBitmapTable;
556 com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xTransGradientTable;
557 com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xMarkerTable;
558 com::sun::star::uno::Reference < com::sun::star::uno::XInterface > xDrawDefaults;
560 SwDoc* m_pDoc;
561 public:
562 SwXDocumentPropertyHelper(SwDoc& rDoc);
563 ~SwXDocumentPropertyHelper();
564 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> GetDrawTable(short nWhich);
565 void Invalidate();
567 virtual void onChange();