1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: unotxdoc.hxx,v $
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 ************************************************************************/
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 #include <com/sun/star/document/XDocumentLanguages.hpp>
72 #include <com/sun/star/util/XCloneable.hpp>
73 #include <svtools/itemprop.hxx>
74 #include <svx/fmdmod.hxx>
75 #include <svx/UnoForbiddenCharsTable.hxx>
76 #include <cppuhelper/weak.hxx>
77 #include <cppuhelper/implbase2.hxx> // helper for implementations
78 #include <cppuhelper/implbase4.hxx> // helper for implementations
79 #include <RefreshListenerContainer.hxx>
81 #define __IFC32 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, Ifc14, Ifc15, Ifc16, \
82 Ifc17, Ifc18, Ifc19, Ifc20, Ifc21, Ifc22, Ifc23, Ifc24, Ifc25, Ifc26, Ifc27, Ifc28, Ifc29, Ifc30, Ifc31, Ifc32
84 #define __CLASS_IFC32 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, \
85 class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12, class Ifc13, class Ifc14, class Ifc15, class Ifc16, \
86 class Ifc17, class Ifc18, class Ifc19, class Ifc20, class Ifc21, class Ifc22, class Ifc23, class Ifc24,\
87 class Ifc25, class Ifc26, class Ifc27, class Ifc28, class Ifc29, class Ifc30, class Ifc31 , class Ifc32
89 #define __PUBLIC_IFC32 public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12, \
90 public Ifc13, public Ifc14, public Ifc15, public Ifc16, public Ifc17, public Ifc18, \
91 public Ifc19, public Ifc20, public Ifc21, public Ifc22, public Ifc23, public Ifc24, \
92 public Ifc25, public Ifc26, public Ifc27, public Ifc28, public Ifc29, public Ifc30, \
93 public Ifc31, public Ifc32
94 #include <cppuhelper/implbase_ex.hxx>
95 #include <cppuhelper/implbase_ex_pre.hxx>
96 #define __IFC_EX_TYPE_INIT32( class_cast ) \
97 __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
98 __IFC_EX_TYPE_INIT( class_cast, 3 ), __IFC_EX_TYPE_INIT( class_cast, 4 ), \
99 __IFC_EX_TYPE_INIT( class_cast, 5 ), __IFC_EX_TYPE_INIT( class_cast, 6 ), \
100 __IFC_EX_TYPE_INIT( class_cast, 7 ), __IFC_EX_TYPE_INIT( class_cast, 8 ), \
101 __IFC_EX_TYPE_INIT( class_cast, 9 ), __IFC_EX_TYPE_INIT( class_cast, 10 ), \
102 __IFC_EX_TYPE_INIT( class_cast, 11 ), __IFC_EX_TYPE_INIT( class_cast, 12 ), \
103 __IFC_EX_TYPE_INIT( class_cast, 13 ), __IFC_EX_TYPE_INIT( class_cast, 14 ), \
104 __IFC_EX_TYPE_INIT( class_cast, 15 ), __IFC_EX_TYPE_INIT( class_cast, 16 ), \
105 __IFC_EX_TYPE_INIT( class_cast, 17 ), __IFC_EX_TYPE_INIT( class_cast, 18 ), \
106 __IFC_EX_TYPE_INIT( class_cast, 19 ), __IFC_EX_TYPE_INIT( class_cast, 20 ), \
107 __IFC_EX_TYPE_INIT( class_cast, 21 ), __IFC_EX_TYPE_INIT( class_cast, 22 ), \
108 __IFC_EX_TYPE_INIT( class_cast, 23 ), __IFC_EX_TYPE_INIT( class_cast, 24 ), \
109 __IFC_EX_TYPE_INIT( class_cast, 25 ), __IFC_EX_TYPE_INIT( class_cast, 26 ), \
110 __IFC_EX_TYPE_INIT( class_cast, 27 ), __IFC_EX_TYPE_INIT( class_cast, 28 ), \
111 __IFC_EX_TYPE_INIT( class_cast, 29 ), __IFC_EX_TYPE_INIT( class_cast, 30 ), \
112 __IFC_EX_TYPE_INIT( class_cast, 31 ), __IFC_EX_TYPE_INIT( class_cast, 32)
113 #include <cppuhelper/implbase_ex_post.hxx>
115 __DEF_IMPLHELPER_EX( 32 )
119 class UnoActionContext
;
123 class SwXDocumentPropertyHelper
;
126 typedef UnoActionContext
* UnoActionContextPtr
;
127 SV_DECL_PTRARR(ActionContextArr
, UnoActionContextPtr
, 4, 4)
129 /******************************************************************************
131 ******************************************************************************/
134 typedef cppu::WeakImplHelper32
136 ::com::sun::star::text::XTextDocument
,
137 ::com::sun::star::text::XLineNumberingProperties
,
138 ::com::sun::star::text::XChapterNumberingSupplier
,
139 ::com::sun::star::text::XNumberingRulesSupplier
,
140 ::com::sun::star::text::XFootnotesSupplier
,
141 ::com::sun::star::text::XEndnotesSupplier
,
142 ::com::sun::star::util::XReplaceable
,
143 ::com::sun::star::text::XPagePrintable
,
144 ::com::sun::star::text::XReferenceMarksSupplier
,
145 ::com::sun::star::text::XTextTablesSupplier
,
146 ::com::sun::star::text::XTextFramesSupplier
,
147 ::com::sun::star::text::XBookmarksSupplier
,
148 ::com::sun::star::text::XTextSectionsSupplier
,
149 ::com::sun::star::text::XTextGraphicObjectsSupplier
,
150 ::com::sun::star::text::XTextEmbeddedObjectsSupplier
,
151 ::com::sun::star::text::XTextFieldsSupplier
,
152 ::com::sun::star::style::XStyleFamiliesSupplier
,
153 ::com::sun::star::style::XAutoStylesSupplier
,
154 ::com::sun::star::lang::XServiceInfo
,
155 ::com::sun::star::drawing::XDrawPageSupplier
,
156 ::com::sun::star::text::XDocumentIndexesSupplier
,
157 ::com::sun::star::beans::XPropertySet
,
158 ::com::sun::star::beans::XPropertyState
,
159 ::com::sun::star::document::XLinkTargetSupplier
,
160 ::com::sun::star::document::XRedlinesSupplier
,
161 ::com::sun::star::util::XRefreshable
,
162 ::com::sun::star::util::XLinkUpdate
,
163 ::com::sun::star::view::XRenderable
,
164 ::com::sun::star::xforms::XFormsSupplier
,
165 ::com::sun::star::text::XFlatParagraphIteratorProvider
,
166 ::com::sun::star::document::XDocumentLanguages
,
167 ::com::sun::star::util::XCloneable
169 SwXTextDocumentBaseClass
;
171 class SW_DLLPUBLIC SwXTextDocument
: public SwXTextDocumentBaseClass
,
172 public SvxFmMSFactory
,
175 ActionContextArr aActionArr
;
176 SwRefreshListenerContainer aRefreshCont
;
178 const SfxItemPropertySet
* pPropSet
;
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
;
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
;
232 virtual ~SwXTextDocument();
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();
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();
249 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(::com::sun::star::uno::RuntimeException
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
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
);
405 // ::com::sun::star::util::XCloneable
406 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone( ) throw (::com::sun::star::uno::RuntimeException
);
411 void Reactivate(SwDocShell
* pNewDocShell
);
412 SwXDocumentPropertyHelper
* GetPropertyHelper ();
413 sal_Bool
IsValid() const {return bObjectValid
;}
417 SwUnoCrsr
* CreateCursorForSearch(::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextCursor
> & xCrsr
);
418 SwUnoCrsr
* FindAny(const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XSearchDescriptor
> & xDesc
,
419 ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextCursor
> & xCrsr
, sal_Bool bAll
,
421 ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> xLastResult
);
423 SwXDrawPage
* GetDrawPage();
424 SwDocShell
* GetDocShell() {return pDocShell
;}
426 void * SAL_CALL
operator new( size_t ) throw();
427 void SAL_CALL
operator delete( void * ) throw();
430 /* -----------------25.10.99 11:02-------------------
432 --------------------------------------------------*/
433 class SwXLinkTargetSupplier
: public cppu::WeakImplHelper2
435 ::com::sun::star::container::XNameAccess
,
436 ::com::sun::star::lang::XServiceInfo
439 SwXTextDocument
* pxDoc
;
449 SwXLinkTargetSupplier(SwXTextDocument
& rxDoc
);
450 ~SwXLinkTargetSupplier();
453 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
);
454 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getElementNames(void) throw( ::com::sun::star::uno::RuntimeException
);
455 virtual sal_Bool SAL_CALL
hasByName(const rtl::OUString
& Name
) throw( ::com::sun::star::uno::RuntimeException
);
458 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
459 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
462 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
463 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
464 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
467 void Invalidate() {pxDoc
= 0;}
469 /* -----------------26.10.99 09:05-------------------
471 --------------------------------------------------*/
472 class SwXLinkNameAccessWrapper
: public cppu::WeakImplHelper4
474 ::com::sun::star::beans::XPropertySet
,
475 ::com::sun::star::container::XNameAccess
,
476 ::com::sun::star::lang::XServiceInfo
,
477 ::com::sun::star::document::XLinkTargetSupplier
480 ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> xRealAccess
;
481 const SfxItemPropertySet
* pPropSet
;
482 const String sLinkSuffix
;
483 const String sLinkDisplayName
;
484 ::com::sun::star::uno::Reference
< ::com::sun::star::text::XTextDocument
> xDoc
;
485 SwXTextDocument
* pxDoc
;
489 SwXLinkNameAccessWrapper(::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> xAccess
,
490 const String
& rLinkDisplayName
, String sSuffix
);
491 SwXLinkNameAccessWrapper(SwXTextDocument
& rxDoc
,
492 const String
& rLinkDisplayName
, String sSuffix
);
493 ~SwXLinkNameAccessWrapper();
496 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
);
497 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getElementNames(void) throw( ::com::sun::star::uno::RuntimeException
);
498 virtual sal_Bool SAL_CALL
hasByName(const rtl::OUString
& Name
) throw( ::com::sun::star::uno::RuntimeException
);
501 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw(::com::sun::star::uno::RuntimeException
);
502 virtual sal_Bool SAL_CALL
hasElements( ) throw(::com::sun::star::uno::RuntimeException
);
505 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
506 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
);
507 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
);
508 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
);
509 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
);
510 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
);
511 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
);
513 //XLinkTargetSupplier
514 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::container::XNameAccess
> SAL_CALL
getLinks(void) throw( ::com::sun::star::uno::RuntimeException
);
517 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
518 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
519 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
522 /* -----------------26.10.99 15:46-------------------
524 --------------------------------------------------*/
525 class SwXOutlineTarget
: public cppu::WeakImplHelper2
527 ::com::sun::star::beans::XPropertySet
,
528 ::com::sun::star::lang::XServiceInfo
531 const SfxItemPropertySet
* pPropSet
;
535 SwXOutlineTarget(const String
& rOutlineText
);
539 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException
);
540 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
);
541 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
);
542 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
);
543 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
);
544 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
);
545 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
);
548 virtual rtl::OUString SAL_CALL
getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException
);
549 virtual BOOL SAL_CALL
supportsService(const rtl::OUString
& ServiceName
) throw( ::com::sun::star::uno::RuntimeException
);
550 virtual ::com::sun::star::uno::Sequence
< rtl::OUString
> SAL_CALL
getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException
);
554 class SwXDocumentPropertyHelper
: public SvxUnoForbiddenCharsTable
556 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> xDashTable
;
557 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> xGradientTable
;
558 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> xHatchTable
;
559 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> xBitmapTable
;
560 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> xTransGradientTable
;
561 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> xMarkerTable
;
562 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> xDrawDefaults
;
566 SwXDocumentPropertyHelper(SwDoc
& rDoc
);
567 ~SwXDocumentPropertyHelper();
568 com::sun::star::uno::Reference
<com::sun::star::uno::XInterface
> GetDrawTable(short nWhich
);
571 virtual void onChange();