1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef SW_UNOTXDOC_HXX
20 #define SW_UNOTXDOC_HXX
23 #include <sfx2/sfxbasemodel.hxx>
25 #include <com/sun/star/beans/PropertyValues.hpp>
26 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
27 #include <com/sun/star/style/XAutoStylesSupplier.hpp>
28 #include <com/sun/star/document/XLinkTargetSupplier.hpp>
29 #include <com/sun/star/document/XRedlinesSupplier.hpp>
30 #include <com/sun/star/text/XNumberingRulesSupplier.hpp>
31 #include <com/sun/star/text/XFootnotesSupplier.hpp>
32 #include <com/sun/star/text/XEndnotesSupplier.hpp>
33 #include <com/sun/star/text/XEndnotesSettingsSupplier.hpp>
34 #include <com/sun/star/text/XTextSectionsSupplier.hpp>
35 #include <com/sun/star/text/XLineNumberingProperties.hpp>
36 #include <com/sun/star/text/XChapterNumberingSupplier.hpp>
37 #include <com/sun/star/text/XPagePrintable.hpp>
38 #include <com/sun/star/text/XTextFieldsSupplier.hpp>
39 #include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
40 #include <com/sun/star/text/XTextTablesSupplier.hpp>
41 #include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
42 #include <com/sun/star/text/XBookmarksSupplier.hpp>
43 #include <com/sun/star/text/XTextDocument.hpp>
44 #include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
45 #include <com/sun/star/text/XReferenceMarksSupplier.hpp>
46 #include <com/sun/star/text/XTextFramesSupplier.hpp>
47 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
48 #include <com/sun/star/util/XReplaceable.hpp>
49 #include <com/sun/star/util/XReplaceDescriptor.hpp>
50 #include <com/sun/star/util/XRefreshable.hpp>
51 #include <com/sun/star/util/XLinkUpdate.hpp>
52 #include <com/sun/star/view/XRenderable.hpp>
53 #include <com/sun/star/lang/XServiceInfo.hpp>
54 #include <com/sun/star/frame/XController.hpp>
55 #include <com/sun/star/beans/XPropertySet.hpp>
56 #include <com/sun/star/beans/XPropertyState.hpp>
57 #include <com/sun/star/i18n/XForbiddenCharacters.hpp>
58 #include <com/sun/star/lang/Locale.hpp>
59 #include <com/sun/star/xforms/XFormsSupplier.hpp>
60 #include <com/sun/star/container/XNameContainer.hpp>
61 #include <com/sun/star/text/XFlatParagraphIteratorProvider.hpp>
62 #include <com/sun/star/document/XDocumentLanguages.hpp>
63 #include <com/sun/star/util/XCloneable.hpp>
64 #include <svl/itemprop.hxx>
65 #include <svx/fmdmod.hxx>
66 #include <editeng/UnoForbiddenCharsTable.hxx>
67 #include <cppuhelper/weak.hxx>
68 #include <cppuhelper/implbase2.hxx> // helper for implementations
69 #include <cppuhelper/implbase4.hxx> // helper for implementations
71 #include <unobaseclass.hxx>
72 #include <viewopt.hxx>
74 #define __IFC32 Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13, Ifc14, Ifc15, Ifc16, \
75 Ifc17, Ifc18, Ifc19, Ifc20, Ifc21, Ifc22, Ifc23, Ifc24, Ifc25, Ifc26, Ifc27, Ifc28, Ifc29, Ifc30, Ifc31, Ifc32
77 #define __CLASS_IFC32 class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, \
78 class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12, class Ifc13, class Ifc14, class Ifc15, class Ifc16, \
79 class Ifc17, class Ifc18, class Ifc19, class Ifc20, class Ifc21, class Ifc22, class Ifc23, class Ifc24,\
80 class Ifc25, class Ifc26, class Ifc27, class Ifc28, class Ifc29, class Ifc30, class Ifc31 , class Ifc32
82 #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, \
83 public Ifc13, public Ifc14, public Ifc15, public Ifc16, public Ifc17, public Ifc18, \
84 public Ifc19, public Ifc20, public Ifc21, public Ifc22, public Ifc23, public Ifc24, \
85 public Ifc25, public Ifc26, public Ifc27, public Ifc28, public Ifc29, public Ifc30, \
86 public Ifc31, public Ifc32
87 #include <cppuhelper/implbase_ex.hxx>
88 #include <cppuhelper/implbase_ex_pre.hxx>
89 #define __IFC_EX_TYPE_INIT32( class_cast ) \
90 __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \
91 __IFC_EX_TYPE_INIT( class_cast, 3 ), __IFC_EX_TYPE_INIT( class_cast, 4 ), \
92 __IFC_EX_TYPE_INIT( class_cast, 5 ), __IFC_EX_TYPE_INIT( class_cast, 6 ), \
93 __IFC_EX_TYPE_INIT( class_cast, 7 ), __IFC_EX_TYPE_INIT( class_cast, 8 ), \
94 __IFC_EX_TYPE_INIT( class_cast, 9 ), __IFC_EX_TYPE_INIT( class_cast, 10 ), \
95 __IFC_EX_TYPE_INIT( class_cast, 11 ), __IFC_EX_TYPE_INIT( class_cast, 12 ), \
96 __IFC_EX_TYPE_INIT( class_cast, 13 ), __IFC_EX_TYPE_INIT( class_cast, 14 ), \
97 __IFC_EX_TYPE_INIT( class_cast, 15 ), __IFC_EX_TYPE_INIT( class_cast, 16 ), \
98 __IFC_EX_TYPE_INIT( class_cast, 17 ), __IFC_EX_TYPE_INIT( class_cast, 18 ), \
99 __IFC_EX_TYPE_INIT( class_cast, 19 ), __IFC_EX_TYPE_INIT( class_cast, 20 ), \
100 __IFC_EX_TYPE_INIT( class_cast, 21 ), __IFC_EX_TYPE_INIT( class_cast, 22 ), \
101 __IFC_EX_TYPE_INIT( class_cast, 23 ), __IFC_EX_TYPE_INIT( class_cast, 24 ), \
102 __IFC_EX_TYPE_INIT( class_cast, 25 ), __IFC_EX_TYPE_INIT( class_cast, 26 ), \
103 __IFC_EX_TYPE_INIT( class_cast, 27 ), __IFC_EX_TYPE_INIT( class_cast, 28 ), \
104 __IFC_EX_TYPE_INIT( class_cast, 29 ), __IFC_EX_TYPE_INIT( class_cast, 30 ), \
105 __IFC_EX_TYPE_INIT( class_cast, 31 ), __IFC_EX_TYPE_INIT( class_cast, 32)
106 #include <cppuhelper/implbase_ex_post.hxx>
108 __DEF_IMPLHELPER_EX( 32 )
112 class UnoActionContext
;
116 class SwXDocumentPropertyHelper
;
118 class SwPrintUIOptions
;
123 typedef std::deque
<UnoActionContext
*> ActionContextArr
;
125 typedef cppu::WeakImplHelper32
127 css::text::XTextDocument
,
128 css::text::XLineNumberingProperties
,
129 css::text::XChapterNumberingSupplier
,
130 css::text::XNumberingRulesSupplier
,
131 css::text::XFootnotesSupplier
,
132 css::text::XEndnotesSupplier
,
133 css::util::XReplaceable
,
134 css::text::XPagePrintable
,
135 css::text::XReferenceMarksSupplier
,
136 css::text::XTextTablesSupplier
,
137 css::text::XTextFramesSupplier
,
138 css::text::XBookmarksSupplier
,
139 css::text::XTextSectionsSupplier
,
140 css::text::XTextGraphicObjectsSupplier
,
141 css::text::XTextEmbeddedObjectsSupplier
,
142 css::text::XTextFieldsSupplier
,
143 css::style::XStyleFamiliesSupplier
,
144 css::style::XAutoStylesSupplier
,
145 css::lang::XServiceInfo
,
146 css::drawing::XDrawPageSupplier
,
147 css::text::XDocumentIndexesSupplier
,
148 css::beans::XPropertySet
,
149 css::beans::XPropertyState
,
150 css::document::XLinkTargetSupplier
,
151 css::document::XRedlinesSupplier
,
152 css::util::XRefreshable
,
153 css::util::XLinkUpdate
,
154 css::view::XRenderable
,
155 css::xforms::XFormsSupplier
,
156 css::text::XFlatParagraphIteratorProvider
,
157 css::document::XDocumentLanguages
,
158 css::util::XCloneable
160 SwXTextDocumentBaseClass
;
162 class SW_DLLPUBLIC SwXTextDocument
: public SwXTextDocumentBaseClass
,
163 public SvxFmMSFactory
,
168 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
170 ActionContextArr aActionArr
;
172 const SfxItemPropertySet
* pPropSet
;
174 SwDocShell
* pDocShell
;
175 sal_Bool bObjectValid
;
177 SwXDrawPage
* pDrawPage
;
178 css::uno::Reference
< css::drawing::XDrawPage
> * pxXDrawPage
;
180 css::uno::Reference
< css::text::XText
> xBodyText
;
181 SwXBodyText
* pBodyText
;
182 css::uno::Reference
< css::uno::XAggregation
> xNumFmtAgg
;
184 css::uno::Reference
< css::container::XIndexAccess
> * pxXNumberingRules
;
185 css::uno::Reference
< css::container::XIndexAccess
> * pxXFootnotes
;
186 css::uno::Reference
< css::beans::XPropertySet
> * pxXFootnoteSettings
;
187 css::uno::Reference
< css::container::XIndexAccess
> * pxXEndnotes
;
188 css::uno::Reference
< css::beans::XPropertySet
> * pxXEndnoteSettings
;
189 css::uno::Reference
< css::container::XNameAccess
> * pxXReferenceMarks
;
190 css::uno::Reference
< css::container::XEnumerationAccess
> * pxXTextFieldTypes
;
191 css::uno::Reference
< css::container::XNameAccess
> * pxXTextFieldMasters
;
192 css::uno::Reference
< css::container::XNameAccess
> * pxXTextSections
;
193 css::uno::Reference
< css::container::XNameAccess
> * pxXBookmarks
;
194 css::uno::Reference
< css::container::XNameAccess
> * pxXTextTables
;
195 css::uno::Reference
< css::container::XNameAccess
> * pxXTextFrames
;
196 css::uno::Reference
< css::container::XNameAccess
> * pxXGraphicObjects
;
197 css::uno::Reference
< css::container::XNameAccess
> * pxXEmbeddedObjects
;
198 css::uno::Reference
< css::container::XNameAccess
> * pxXStyleFamilies
;
199 mutable css::uno::Reference
< css::style::XAutoStyles
> * pxXAutoStyles
;
200 css::uno::Reference
< css::container::XIndexReplace
> * pxXChapterNumbering
;
201 css::uno::Reference
< css::container::XIndexAccess
> * pxXDocumentIndexes
;
203 css::uno::Reference
< css::beans::XPropertySet
> * pxXLineNumberingProperties
;
204 css::uno::Reference
< css::container::XNameAccess
> * pxLinkTargetSupplier
;
205 css::uno::Reference
< css::container::XEnumerationAccess
>* pxXRedlines
;
206 css::uno::Reference
< css::container::XNameContainer
> xXFormsContainer
;
208 //temporary frame to enable PDF export if no valid view is available
209 SfxViewFrame
* m_pHiddenViewFrame
;
210 css::uno::Reference
< css::uno::XInterface
> xPropertyHelper
;
211 SwXDocumentPropertyHelper
* pPropertyHelper
;
213 SwPrintUIOptions
* m_pPrintUIOptions
;
214 SwRenderData
* m_pRenderData
;
217 void GetNumberFormatter();
219 // used for XRenderable implementation
220 SfxViewShell
* GuessViewShell( /* out */ bool &rbIsSwSrcView
, const css::uno::Reference
< css::frame::XController
> xController
= css::uno::Reference
< css::frame::XController
>() );
221 SwDoc
* GetRenderDoc( SfxViewShell
*&rpView
, const css::uno::Any
& rSelection
, bool bIsPDFExport
);
222 SfxViewShell
* GetRenderView( bool &rbIsSwSrcView
, const css::uno::Sequence
< css::beans::PropertyValue
>& rxOptions
, bool bIsPDFExport
);
226 // boolean for XPagePrintable
227 // set in XPagePrintable::printPages(..) to indicate that the PagePrintSettings
228 // has to be applied in XRenderable::getRenderer(..) through which the printing
230 sal_Bool bApplyPagePrintSettingsFromXPagePrintable
;
232 using SfxBaseModel::addEventListener
;
233 using SfxBaseModel::removeEventListener
;
236 virtual ~SwXTextDocument();
238 SwXTextDocument(SwDocShell
* pShell
);
240 void NotifyRefreshListeners();
241 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& aType
) throw(css::uno::RuntimeException
);
242 virtual void SAL_CALL
acquire( ) throw();
243 virtual void SAL_CALL
release( ) throw();
246 virtual css::uno::Reference
< css::uno::XAdapter
> SAL_CALL
queryAdapter( ) throw(css::uno::RuntimeException
);
248 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) throw(css::uno::RuntimeException
);
250 static const css::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
253 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(css::uno::RuntimeException
);
256 virtual css::uno::Reference
< css::text::XText
> SAL_CALL
getText(void) throw( css::uno::RuntimeException
);
257 virtual void SAL_CALL
reformat(void) throw( css::uno::RuntimeException
);
260 virtual sal_Bool SAL_CALL
attachResource( const OUString
& aURL
, const css::uno::Sequence
< css::beans::PropertyValue
>& aArgs
) throw(css::uno::RuntimeException
);
261 virtual OUString SAL_CALL
getURL( ) throw(css::uno::RuntimeException
);
262 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getArgs( ) throw(css::uno::RuntimeException
);
263 virtual void SAL_CALL
connectController( const css::uno::Reference
< css::frame::XController
>& xController
) throw(css::uno::RuntimeException
);
264 virtual void SAL_CALL
disconnectController( const css::uno::Reference
< css::frame::XController
>& xController
) throw(css::uno::RuntimeException
);
265 virtual void SAL_CALL
lockControllers( ) throw(css::uno::RuntimeException
);
266 virtual void SAL_CALL
unlockControllers( ) throw(css::uno::RuntimeException
);
267 virtual sal_Bool SAL_CALL
hasControllersLocked( ) throw(css::uno::RuntimeException
);
268 virtual css::uno::Reference
< css::frame::XController
> SAL_CALL
getCurrentController( ) throw(css::uno::RuntimeException
);
269 virtual void SAL_CALL
setCurrentController( const css::uno::Reference
< css::frame::XController
>& xController
) throw(css::container::NoSuchElementException
, css::uno::RuntimeException
);
270 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
getCurrentSelection( ) throw(css::uno::RuntimeException
);
273 virtual void SAL_CALL
dispose(void) throw( css::uno::RuntimeException
);
274 virtual void SAL_CALL
addEventListener(const css::uno::Reference
< css::lang::XEventListener
> & aListener
) throw( css::uno::RuntimeException
);
275 virtual void SAL_CALL
removeEventListener(const css::uno::Reference
< css::lang::XEventListener
> & aListener
) throw( css::uno::RuntimeException
);
278 virtual void SAL_CALL
close( sal_Bool bDeliverOwnership
) throw (css::util::CloseVetoException
, css::uno::RuntimeException
);
280 //XLineNumberingProperties
281 virtual css::uno::Reference
< css::beans::XPropertySet
> SAL_CALL
getLineNumberingProperties(void) throw( css::uno::RuntimeException
);
283 //XChapterNumberingSupplier
284 virtual css::uno::Reference
< css::container::XIndexReplace
> SAL_CALL
getChapterNumberingRules(void) throw( css::uno::RuntimeException
);
286 //XNumberingRulesSupplier
287 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
getNumberingRules() throw (css::uno::RuntimeException
);
290 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
getFootnotes(void) throw( css::uno::RuntimeException
);
291 virtual css::uno::Reference
< css::beans::XPropertySet
> SAL_CALL
getFootnoteSettings(void) throw( css::uno::RuntimeException
);
294 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
getEndnotes(void) throw( css::uno::RuntimeException
);
295 virtual css::uno::Reference
< css::beans::XPropertySet
> SAL_CALL
getEndnoteSettings(void) throw( css::uno::RuntimeException
);
298 virtual css::uno::Reference
< css::util::XReplaceDescriptor
> SAL_CALL
createReplaceDescriptor(void) throw( css::uno::RuntimeException
);
299 virtual sal_Int32 SAL_CALL
replaceAll(const css::uno::Reference
< css::util::XSearchDescriptor
> & xDesc
) throw( css::uno::RuntimeException
);
302 virtual css::uno::Reference
< css::util::XSearchDescriptor
> SAL_CALL
createSearchDescriptor(void) throw( css::uno::RuntimeException
);
303 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
findAll(const css::uno::Reference
< css::util::XSearchDescriptor
> & xDesc
) throw( css::uno::RuntimeException
);
304 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
findFirst(const css::uno::Reference
< css::util::XSearchDescriptor
> & xDesc
) throw( css::uno::RuntimeException
);
305 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
findNext(const css::uno::Reference
< css::uno::XInterface
> & xStartAt
, const css::uno::Reference
< css::util::XSearchDescriptor
> & xDesc
) throw( css::uno::RuntimeException
);
308 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getPagePrintSettings(void) throw( css::uno::RuntimeException
);
309 virtual void SAL_CALL
setPagePrintSettings(const css::uno::Sequence
< css::beans::PropertyValue
>& aSettings
) throw( css::uno::RuntimeException
);
310 virtual void SAL_CALL
printPages(const css::uno::Sequence
< css::beans::PropertyValue
>& xOptions
) throw( css::lang::IllegalArgumentException
, css::uno::RuntimeException
);
312 //XReferenceMarksSupplier
313 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getReferenceMarks(void) throw( css::uno::RuntimeException
);
315 // css::text::XTextFieldsSupplier
316 virtual css::uno::Reference
< css::container::XEnumerationAccess
> SAL_CALL
getTextFields(void) throw( css::uno::RuntimeException
);
317 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getTextFieldMasters(void) throw( css::uno::RuntimeException
);
319 // css::text::XTextEmbeddedObjectsSupplier
320 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getEmbeddedObjects(void) throw( css::uno::RuntimeException
);
322 // css::text::XBookmarksSupplier
323 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getBookmarks(void) throw( css::uno::RuntimeException
);
325 // css::text::XTextSectionsSupplier
326 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getTextSections(void) throw( css::uno::RuntimeException
);
328 // css::text::XTextTablesSupplier
329 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getTextTables(void) throw( css::uno::RuntimeException
);
331 // css::text::XTextGraphicObjectsSupplier
332 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getGraphicObjects(void) throw( css::uno::RuntimeException
);
334 // css::text::XTextFramesSupplier
335 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getTextFrames(void) throw( css::uno::RuntimeException
);
337 //XStyleFamiliesSupplier
338 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getStyleFamilies(void) throw( css::uno::RuntimeException
);
340 //XAutoStylesSupplier
341 virtual css::uno::Reference
< css::style::XAutoStyles
> SAL_CALL
getAutoStyles( ) throw (css::uno::RuntimeException
);
343 //XMultiServiceFactory
344 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
createInstance(const OUString
& ServiceSpecifier
)
345 throw( css::uno::Exception
, css::uno::RuntimeException
);
346 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
createInstanceWithArguments(const OUString
& ServiceSpecifier
,
347 const css::uno::Sequence
< css::uno::Any
>& Arguments
)
348 throw( css::uno::Exception
, css::uno::RuntimeException
);
349 virtual css::uno::Sequence
< OUString
> SAL_CALL
getAvailableServiceNames(void)
350 throw( css::uno::RuntimeException
);
353 virtual OUString SAL_CALL
getImplementationName(void) throw( css::uno::RuntimeException
);
354 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( css::uno::RuntimeException
);
355 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames(void) throw( css::uno::RuntimeException
);
357 // css::drawing::XDrawPageSupplier
358 virtual css::uno::Reference
< css::drawing::XDrawPage
> SAL_CALL
getDrawPage(void) throw( css::uno::RuntimeException
);
360 // css::text::XDocumentIndexesSupplier
361 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
getDocumentIndexes(void) throw( css::uno::RuntimeException
);
364 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(css::uno::RuntimeException
);
365 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) throw(css::beans::UnknownPropertyException
, css::beans::PropertyVetoException
, css::lang::IllegalArgumentException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
366 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
367 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
368 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
369 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
370 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
373 virtual css::beans::PropertyState SAL_CALL
getPropertyState( const OUString
& rPropertyName
) throw (css::beans::UnknownPropertyException
, css::uno::RuntimeException
);
374 virtual css::uno::Sequence
< css::beans::PropertyState
> SAL_CALL
getPropertyStates( const css::uno::Sequence
< OUString
>& rPropertyNames
) throw (css::beans::UnknownPropertyException
, css::uno::RuntimeException
);
375 virtual void SAL_CALL
setPropertyToDefault( const OUString
& rPropertyName
) throw (css::beans::UnknownPropertyException
, css::uno::RuntimeException
);
376 virtual css::uno::Any SAL_CALL
getPropertyDefault( const OUString
& rPropertyName
) throw (css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
378 //XLinkTargetSupplier
379 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getLinks(void) throw( css::uno::RuntimeException
);
382 virtual css::uno::Reference
< css::container::XEnumerationAccess
> SAL_CALL
getRedlines( ) throw(css::uno::RuntimeException
);
384 // css::util::XRefreshable
385 virtual void SAL_CALL
refresh(void) throw( css::uno::RuntimeException
);
386 virtual void SAL_CALL
addRefreshListener(const css::uno::Reference
< css::util::XRefreshListener
> & l
) throw( css::uno::RuntimeException
);
387 virtual void SAL_CALL
removeRefreshListener(const css::uno::Reference
< css::util::XRefreshListener
> & l
) throw( css::uno::RuntimeException
);
389 // css::util::XLinkUpdate,
390 virtual void SAL_CALL
updateLinks( ) throw(css::uno::RuntimeException
);
392 // css::view::XRenderable
393 virtual sal_Int32 SAL_CALL
getRendererCount( const css::uno::Any
& aSelection
, const css::uno::Sequence
< css::beans::PropertyValue
>& xOptions
) throw (css::lang::IllegalArgumentException
, css::uno::RuntimeException
);
394 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getRenderer( sal_Int32 nRenderer
, const css::uno::Any
& aSelection
, const css::uno::Sequence
< css::beans::PropertyValue
>& xOptions
) throw (css::lang::IllegalArgumentException
, css::uno::RuntimeException
);
395 virtual void SAL_CALL
render( sal_Int32 nRenderer
, const css::uno::Any
& aSelection
, const css::uno::Sequence
< css::beans::PropertyValue
>& xOptions
) throw (css::lang::IllegalArgumentException
, css::uno::RuntimeException
);
397 // css::xforms::XFormsSupplier
398 virtual css::uno::Reference
< css::container::XNameContainer
> SAL_CALL
getXForms( ) throw (css::uno::RuntimeException
);
400 // css::document::XDocumentLanguages
401 virtual css::uno::Sequence
< css::lang::Locale
> SAL_CALL
getDocumentLanguages( ::sal_Int16 nScriptTypes
, ::sal_Int16 nCount
) throw (css::lang::IllegalArgumentException
, css::uno::RuntimeException
);
403 // css::text::XFlatParagraphIteratorProvider:
404 virtual css::uno::Reference
< css::text::XFlatParagraphIterator
> SAL_CALL
getFlatParagraphIterator(::sal_Int32 nTextMarkupType
, sal_Bool bAutomatic
) throw (css::uno::RuntimeException
);
406 // ::com::sun::star::util::XCloneable
407 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone( ) throw (::com::sun::star::uno::RuntimeException
);
412 void Reactivate(SwDocShell
* pNewDocShell
);
413 SwXDocumentPropertyHelper
* GetPropertyHelper ();
414 sal_Bool
IsValid() const {return bObjectValid
;}
418 SwUnoCrsr
* CreateCursorForSearch(css::uno::Reference
< css::text::XTextCursor
> & xCrsr
);
419 SwUnoCrsr
* FindAny(const css::uno::Reference
< css::util::XSearchDescriptor
> & xDesc
,
420 css::uno::Reference
< css::text::XTextCursor
> & xCrsr
, sal_Bool bAll
,
422 css::uno::Reference
< css::uno::XInterface
> xLastResult
);
424 SwXDrawPage
* GetDrawPage();
425 SwDocShell
* GetDocShell() {return pDocShell
;}
428 void * SAL_CALL
operator new( size_t ) throw();
429 void SAL_CALL
operator delete( void * ) throw();
433 class SwXLinkTargetSupplier
: public cppu::WeakImplHelper2
435 css::container::XNameAccess
,
436 css::lang::XServiceInfo
439 SwXTextDocument
* pxDoc
;
449 SwXLinkTargetSupplier(SwXTextDocument
& rxDoc
);
450 ~SwXLinkTargetSupplier();
453 virtual css::uno::Any SAL_CALL
getByName(const OUString
& Name
) throw( css::container::NoSuchElementException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
454 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames(void) throw( css::uno::RuntimeException
);
455 virtual sal_Bool SAL_CALL
hasByName(const OUString
& Name
) throw( css::uno::RuntimeException
);
458 virtual css::uno::Type SAL_CALL
getElementType( ) throw(css::uno::RuntimeException
);
459 virtual sal_Bool SAL_CALL
hasElements( ) throw(css::uno::RuntimeException
);
462 virtual OUString SAL_CALL
getImplementationName(void) throw( css::uno::RuntimeException
);
463 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( css::uno::RuntimeException
);
464 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames(void) throw( css::uno::RuntimeException
);
467 void Invalidate() {pxDoc
= 0;}
470 class SwXLinkNameAccessWrapper
: public cppu::WeakImplHelper4
472 css::beans::XPropertySet
,
473 css::container::XNameAccess
,
474 css::lang::XServiceInfo
,
475 css::document::XLinkTargetSupplier
478 css::uno::Reference
< css::container::XNameAccess
> xRealAccess
;
479 const SfxItemPropertySet
* pPropSet
;
480 const String sLinkSuffix
;
481 const String sLinkDisplayName
;
482 css::uno::Reference
< css::text::XTextDocument
> xDoc
;
483 SwXTextDocument
* pxDoc
;
487 SwXLinkNameAccessWrapper(css::uno::Reference
< css::container::XNameAccess
> xAccess
,
488 const String
& rLinkDisplayName
, String sSuffix
);
489 SwXLinkNameAccessWrapper(SwXTextDocument
& rxDoc
,
490 const String
& rLinkDisplayName
, String sSuffix
);
491 ~SwXLinkNameAccessWrapper();
494 virtual css::uno::Any SAL_CALL
getByName(const OUString
& Name
) throw( css::container::NoSuchElementException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
495 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames(void) throw( css::uno::RuntimeException
);
496 virtual sal_Bool SAL_CALL
hasByName(const OUString
& Name
) throw( css::uno::RuntimeException
);
499 virtual css::uno::Type SAL_CALL
getElementType( ) throw(css::uno::RuntimeException
);
500 virtual sal_Bool SAL_CALL
hasElements( ) throw(css::uno::RuntimeException
);
503 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(css::uno::RuntimeException
);
504 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) throw(css::beans::UnknownPropertyException
, css::beans::PropertyVetoException
, css::lang::IllegalArgumentException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
505 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
506 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
507 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
508 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
509 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
511 //XLinkTargetSupplier
512 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getLinks(void) throw( css::uno::RuntimeException
);
515 virtual OUString SAL_CALL
getImplementationName(void) throw( css::uno::RuntimeException
);
516 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( css::uno::RuntimeException
);
517 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames(void) throw( css::uno::RuntimeException
);
521 class SwXOutlineTarget
: public cppu::WeakImplHelper2
523 css::beans::XPropertySet
,
524 css::lang::XServiceInfo
527 const SfxItemPropertySet
* pPropSet
;
531 SwXOutlineTarget(const String
& rOutlineText
);
535 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(css::uno::RuntimeException
);
536 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) throw(css::beans::UnknownPropertyException
, css::beans::PropertyVetoException
, css::lang::IllegalArgumentException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
537 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
538 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
539 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
540 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
541 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
);
544 virtual OUString SAL_CALL
getImplementationName(void) throw( css::uno::RuntimeException
);
545 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( css::uno::RuntimeException
);
546 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames(void) throw( css::uno::RuntimeException
);
549 class SwXDocumentPropertyHelper
: public SvxUnoForbiddenCharsTable
551 css::uno::Reference
< css::uno::XInterface
> xDashTable
;
552 css::uno::Reference
< css::uno::XInterface
> xGradientTable
;
553 css::uno::Reference
< css::uno::XInterface
> xHatchTable
;
554 css::uno::Reference
< css::uno::XInterface
> xBitmapTable
;
555 css::uno::Reference
< css::uno::XInterface
> xTransGradientTable
;
556 css::uno::Reference
< css::uno::XInterface
> xMarkerTable
;
557 css::uno::Reference
< css::uno::XInterface
> xDrawDefaults
;
561 SwXDocumentPropertyHelper(SwDoc
& rDoc
);
562 ~SwXDocumentPropertyHelper();
563 css::uno::Reference
<css::uno::XInterface
> GetDrawTable(short nWhich
);
566 virtual void onChange();
570 /* The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of
571 the current ViewShell so that fields are not printed as commands and
572 hidden characters are always invisible. Hidden text and place holders
573 should be printed according to the current print options.
574 After printing the view options are restored
575 -----------------------------------------------------------------------*/
576 class SwViewOptionAdjust_Impl
578 ViewShell
* m_pShell
;
579 SwViewOption m_aOldViewOptions
;
582 SwViewOptionAdjust_Impl( ViewShell
& rSh
, const SwViewOption
&rViewOptions
);
583 ~SwViewOptionAdjust_Impl();
584 void AdjustViewOptions( SwPrintData
const* const pPrtOptions
);
585 bool checkShell( const ViewShell
& rCompare
) const
586 { return &rCompare
== m_pShell
; }
587 void DontTouchThatViewShellItSmellsFunny() { m_pShell
= 0; }
592 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */