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 INCLUDED_SW_INC_UNOTXDOC_HXX
20 #define INCLUDED_SW_INC_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/implbase.hxx>
69 #include <vcl/ITiledRenderable.hxx>
70 #include <com/sun/star/tiledrendering/XTiledRenderable.hpp>
72 #include <unobaseclass.hxx>
73 #include <viewopt.hxx>
79 class UnoActionContext
;
83 class SwXDocumentPropertyHelper
;
85 class SwPrintUIOptions
;
90 typedef std::deque
<UnoActionContext
*> ActionContextArr
;
92 typedef cppu::WeakImplHelper
94 css::text::XTextDocument
,
95 css::text::XLineNumberingProperties
,
96 css::text::XChapterNumberingSupplier
,
97 css::text::XNumberingRulesSupplier
,
98 css::text::XFootnotesSupplier
,
99 css::text::XEndnotesSupplier
,
100 css::util::XReplaceable
,
101 css::text::XPagePrintable
,
102 css::text::XReferenceMarksSupplier
,
103 css::text::XTextTablesSupplier
,
104 css::text::XTextFramesSupplier
,
105 css::text::XBookmarksSupplier
,
106 css::text::XTextSectionsSupplier
,
107 css::text::XTextGraphicObjectsSupplier
,
108 css::text::XTextEmbeddedObjectsSupplier
,
109 css::text::XTextFieldsSupplier
,
110 css::style::XStyleFamiliesSupplier
,
111 css::style::XAutoStylesSupplier
,
112 css::lang::XServiceInfo
,
113 css::drawing::XDrawPageSupplier
,
114 css::text::XDocumentIndexesSupplier
,
115 css::beans::XPropertySet
,
116 css::beans::XPropertyState
,
117 css::document::XLinkTargetSupplier
,
118 css::document::XRedlinesSupplier
,
119 css::util::XRefreshable
,
120 css::util::XLinkUpdate
,
121 css::view::XRenderable
,
122 css::xforms::XFormsSupplier
,
123 css::text::XFlatParagraphIteratorProvider
,
124 css::document::XDocumentLanguages
,
125 css::util::XCloneable
127 SwXTextDocumentBaseClass
;
129 class SW_DLLPUBLIC SwXTextDocument
: public SwXTextDocumentBaseClass
,
130 public SvxFmMSFactory
,
132 public vcl::ITiledRenderable
,
133 public ::com::sun::star::tiledrendering::XTiledRenderable
137 ::sw::UnoImplPtr
<Impl
> m_pImpl
;
139 ActionContextArr aActionArr
;
141 const SfxItemPropertySet
* pPropSet
;
143 SwDocShell
* pDocShell
;
146 SwXDrawPage
* pDrawPage
;
147 css::uno::Reference
< css::drawing::XDrawPage
> * pxXDrawPage
;
149 css::uno::Reference
< css::text::XText
> xBodyText
;
150 SwXBodyText
* pBodyText
;
151 css::uno::Reference
< css::uno::XAggregation
> xNumFormatAgg
;
153 css::uno::Reference
< css::container::XIndexAccess
> * pxXNumberingRules
;
154 css::uno::Reference
< css::container::XIndexAccess
> * pxXFootnotes
;
155 css::uno::Reference
< css::beans::XPropertySet
> * pxXFootnoteSettings
;
156 css::uno::Reference
< css::container::XIndexAccess
> * pxXEndnotes
;
157 css::uno::Reference
< css::beans::XPropertySet
> * pxXEndnoteSettings
;
158 css::uno::Reference
< css::container::XNameAccess
> * pxXReferenceMarks
;
159 css::uno::Reference
< css::container::XEnumerationAccess
> * pxXTextFieldTypes
;
160 css::uno::Reference
< css::container::XNameAccess
> * pxXTextFieldMasters
;
161 css::uno::Reference
< css::container::XNameAccess
> * pxXTextSections
;
162 css::uno::Reference
< css::container::XNameAccess
> * pxXBookmarks
;
163 css::uno::Reference
< css::container::XNameAccess
> * pxXTextTables
;
164 css::uno::Reference
< css::container::XNameAccess
> * pxXTextFrames
;
165 css::uno::Reference
< css::container::XNameAccess
> * pxXGraphicObjects
;
166 css::uno::Reference
< css::container::XNameAccess
> * pxXEmbeddedObjects
;
167 css::uno::Reference
< css::container::XNameAccess
> * pxXStyleFamilies
;
168 mutable css::uno::Reference
< css::style::XAutoStyles
> * pxXAutoStyles
;
169 css::uno::Reference
< css::container::XIndexReplace
> * pxXChapterNumbering
;
170 css::uno::Reference
< css::container::XIndexAccess
> * pxXDocumentIndexes
;
172 css::uno::Reference
< css::beans::XPropertySet
> * pxXLineNumberingProperties
;
173 css::uno::Reference
< css::container::XNameAccess
> * pxLinkTargetSupplier
;
174 css::uno::Reference
< css::container::XEnumerationAccess
>* pxXRedlines
;
175 css::uno::Reference
< css::container::XNameContainer
> xXFormsContainer
;
177 //temporary frame to enable PDF export if no valid view is available
178 SfxViewFrame
* m_pHiddenViewFrame
;
179 css::uno::Reference
< css::uno::XInterface
> xPropertyHelper
;
180 SwXDocumentPropertyHelper
* pPropertyHelper
;
182 SwPrintUIOptions
* m_pPrintUIOptions
;
183 SwRenderData
* m_pRenderData
;
186 void GetNumberFormatter();
188 css::uno::Reference
<css::uno::XInterface
> create(
189 OUString
const & rServiceName
,
190 css::uno::Sequence
<css::uno::Any
> const * arguments
);
192 // used for XRenderable implementation
193 SfxViewShell
* GuessViewShell( /* out */ bool &rbIsSwSrcView
, const css::uno::Reference
< css::frame::XController
>& rController
= css::uno::Reference
< css::frame::XController
>() );
194 SwDoc
* GetRenderDoc( SfxViewShell
*&rpView
, const css::uno::Any
& rSelection
, bool bIsPDFExport
);
195 SfxViewShell
* GetRenderView( bool &rbIsSwSrcView
, const css::uno::Sequence
< css::beans::PropertyValue
>& rxOptions
, bool bIsPDFExport
);
199 // boolean for XPagePrintable
200 // set in XPagePrintable::printPages(..) to indicate that the PagePrintSettings
201 // has to be applied in XRenderable::getRenderer(..) through which the printing
203 bool bApplyPagePrintSettingsFromXPagePrintable
;
205 using SfxBaseModel::addEventListener
;
206 using SfxBaseModel::removeEventListener
;
209 virtual ~SwXTextDocument();
211 SwXTextDocument(SwDocShell
* pShell
);
213 void NotifyRefreshListeners();
214 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& aType
) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
215 virtual void SAL_CALL
acquire( ) throw() SAL_OVERRIDE
;
216 virtual void SAL_CALL
release( ) throw() SAL_OVERRIDE
;
219 virtual css::uno::Reference
< css::uno::XAdapter
> SAL_CALL
queryAdapter( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
221 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
223 static const css::uno::Sequence
< sal_Int8
> & getUnoTunnelId();
226 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& aIdentifier
) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
229 virtual css::uno::Reference
< css::text::XText
> SAL_CALL
getText() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
230 virtual void SAL_CALL
reformat() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
233 virtual sal_Bool SAL_CALL
attachResource( const OUString
& aURL
, const css::uno::Sequence
< css::beans::PropertyValue
>& aArgs
) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
234 virtual OUString SAL_CALL
getURL( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
235 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getArgs( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
236 virtual void SAL_CALL
connectController( const css::uno::Reference
< css::frame::XController
>& xController
) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
237 virtual void SAL_CALL
disconnectController( const css::uno::Reference
< css::frame::XController
>& xController
) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
238 virtual void SAL_CALL
lockControllers( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
239 virtual void SAL_CALL
unlockControllers( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
240 virtual sal_Bool SAL_CALL
hasControllersLocked( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
241 virtual css::uno::Reference
< css::frame::XController
> SAL_CALL
getCurrentController( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
242 virtual void SAL_CALL
setCurrentController( const css::uno::Reference
< css::frame::XController
>& xController
) throw(css::container::NoSuchElementException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
243 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
getCurrentSelection( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
246 virtual void SAL_CALL
dispose() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
247 virtual void SAL_CALL
addEventListener(const css::uno::Reference
< css::lang::XEventListener
> & aListener
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
248 virtual void SAL_CALL
removeEventListener(const css::uno::Reference
< css::lang::XEventListener
> & aListener
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
251 virtual void SAL_CALL
close( sal_Bool bDeliverOwnership
) throw (css::util::CloseVetoException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
253 //XLineNumberingProperties
254 virtual css::uno::Reference
< css::beans::XPropertySet
> SAL_CALL
getLineNumberingProperties() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
256 //XChapterNumberingSupplier
257 virtual css::uno::Reference
< css::container::XIndexReplace
> SAL_CALL
getChapterNumberingRules() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
259 //XNumberingRulesSupplier
260 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
getNumberingRules() throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
263 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
getFootnotes() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
264 virtual css::uno::Reference
< css::beans::XPropertySet
> SAL_CALL
getFootnoteSettings() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
267 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
getEndnotes() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
268 virtual css::uno::Reference
< css::beans::XPropertySet
> SAL_CALL
getEndnoteSettings() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
271 virtual css::uno::Reference
< css::util::XReplaceDescriptor
> SAL_CALL
createReplaceDescriptor() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
272 virtual sal_Int32 SAL_CALL
replaceAll(const css::uno::Reference
< css::util::XSearchDescriptor
> & xDesc
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
275 virtual css::uno::Reference
< css::util::XSearchDescriptor
> SAL_CALL
createSearchDescriptor() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
276 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
findAll(const css::uno::Reference
< css::util::XSearchDescriptor
> & xDesc
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
277 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
findFirst(const css::uno::Reference
< css::util::XSearchDescriptor
> & xDesc
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
278 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
, std::exception
) SAL_OVERRIDE
;
281 virtual css::uno::Sequence
< css::beans::PropertyValue
> SAL_CALL
getPagePrintSettings() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
282 virtual void SAL_CALL
setPagePrintSettings(const css::uno::Sequence
< css::beans::PropertyValue
>& aSettings
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
283 virtual void SAL_CALL
printPages(const css::uno::Sequence
< css::beans::PropertyValue
>& xOptions
) throw( css::lang::IllegalArgumentException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
285 //XReferenceMarksSupplier
286 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getReferenceMarks() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
288 // css::text::XTextFieldsSupplier
289 virtual css::uno::Reference
< css::container::XEnumerationAccess
> SAL_CALL
getTextFields() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
290 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getTextFieldMasters() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
292 // css::text::XTextEmbeddedObjectsSupplier
293 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getEmbeddedObjects() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
295 // css::text::XBookmarksSupplier
296 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getBookmarks() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
298 // css::text::XTextSectionsSupplier
299 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getTextSections() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
301 // css::text::XTextTablesSupplier
302 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getTextTables() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
304 // css::text::XTextGraphicObjectsSupplier
305 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getGraphicObjects() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
307 // css::text::XTextFramesSupplier
308 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getTextFrames() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
310 //XStyleFamiliesSupplier
311 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getStyleFamilies() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
313 //XAutoStylesSupplier
314 virtual css::uno::Reference
< css::style::XAutoStyles
> SAL_CALL
getAutoStyles( ) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
316 //XMultiServiceFactory
317 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
createInstance(const OUString
& ServiceSpecifier
)
318 throw( css::uno::Exception
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
319 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
createInstanceWithArguments(const OUString
& ServiceSpecifier
,
320 const css::uno::Sequence
< css::uno::Any
>& Arguments
)
321 throw( css::uno::Exception
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
322 virtual css::uno::Sequence
< OUString
> SAL_CALL
getAvailableServiceNames()
323 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
326 virtual OUString SAL_CALL
getImplementationName() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
327 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
328 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
330 // css::drawing::XDrawPageSupplier
331 virtual css::uno::Reference
< css::drawing::XDrawPage
> SAL_CALL
getDrawPage() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
333 // css::text::XDocumentIndexesSupplier
334 virtual css::uno::Reference
< css::container::XIndexAccess
> SAL_CALL
getDocumentIndexes() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
337 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
338 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
)
339 throw (css::beans::UnknownPropertyException
,
340 css::beans::PropertyVetoException
,
341 css::lang::IllegalArgumentException
,
342 css::lang::WrappedTargetException
,
343 css::uno::RuntimeException
,
344 std::exception
) SAL_OVERRIDE
;
345 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
346 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
, std::exception
) SAL_OVERRIDE
;
347 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
, std::exception
) SAL_OVERRIDE
;
348 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
, std::exception
) SAL_OVERRIDE
;
349 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
, std::exception
) SAL_OVERRIDE
;
352 virtual css::beans::PropertyState SAL_CALL
getPropertyState( const OUString
& rPropertyName
) throw (css::beans::UnknownPropertyException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
353 virtual css::uno::Sequence
< css::beans::PropertyState
> SAL_CALL
getPropertyStates( const css::uno::Sequence
< OUString
>& rPropertyNames
) throw (css::beans::UnknownPropertyException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
354 virtual void SAL_CALL
setPropertyToDefault( const OUString
& rPropertyName
) throw (css::beans::UnknownPropertyException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
355 virtual css::uno::Any SAL_CALL
getPropertyDefault( const OUString
& rPropertyName
) throw (css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
357 //XLinkTargetSupplier
358 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getLinks() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
361 virtual css::uno::Reference
< css::container::XEnumerationAccess
> SAL_CALL
getRedlines( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
363 // css::util::XRefreshable
364 virtual void SAL_CALL
refresh() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
365 virtual void SAL_CALL
addRefreshListener(const css::uno::Reference
< css::util::XRefreshListener
> & l
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
366 virtual void SAL_CALL
removeRefreshListener(const css::uno::Reference
< css::util::XRefreshListener
> & l
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
368 // css::util::XLinkUpdate,
369 virtual void SAL_CALL
updateLinks( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
371 // css::view::XRenderable
372 virtual sal_Int32 SAL_CALL
getRendererCount( const css::uno::Any
& aSelection
, const css::uno::Sequence
< css::beans::PropertyValue
>& xOptions
)
373 throw (css::lang::IllegalArgumentException
,
374 css::uno::RuntimeException
,
375 std::exception
) SAL_OVERRIDE
;
376 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
)
377 throw (css::lang::IllegalArgumentException
,
378 css::uno::RuntimeException
,
379 std::exception
) SAL_OVERRIDE
;
380 virtual void SAL_CALL
render( sal_Int32 nRenderer
, const css::uno::Any
& aSelection
, const css::uno::Sequence
< css::beans::PropertyValue
>& xOptions
)
381 throw (css::lang::IllegalArgumentException
,
382 css::uno::RuntimeException
,
383 std::exception
) SAL_OVERRIDE
;
385 // css::xforms::XFormsSupplier
386 virtual css::uno::Reference
< css::container::XNameContainer
> SAL_CALL
getXForms( ) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
388 // css::document::XDocumentLanguages
389 virtual css::uno::Sequence
< css::lang::Locale
> SAL_CALL
getDocumentLanguages( ::sal_Int16 nScriptTypes
, ::sal_Int16 nCount
)
390 throw (css::lang::IllegalArgumentException
,
391 css::uno::RuntimeException
,
392 std::exception
) SAL_OVERRIDE
;
394 // css::text::XFlatParagraphIteratorProvider:
395 virtual css::uno::Reference
< css::text::XFlatParagraphIterator
> SAL_CALL
getFlatParagraphIterator(::sal_Int32 nTextMarkupType
, sal_Bool bAutomatic
) throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
397 // ::com::sun::star::util::XCloneable
398 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone( ) throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
400 /// @see vcl::ITiledRenderable::paintTile().
401 virtual void paintTile( VirtualDevice
&rDevice
,
407 long nTileHeight
) SAL_OVERRIDE
;
408 /// @see vcl::ITiledRenderable::getDocumentSize().
409 virtual Size
getDocumentSize() SAL_OVERRIDE
;
410 /// @see vcl::ITiledRenderable::initializeForTiledRendering().
411 virtual void initializeForTiledRendering() SAL_OVERRIDE
;
412 /// @see vcl::ITiledRenderable::registerCallback().
413 virtual void registerCallback(LibreOfficeKitCallback pCallback
, void* pData
) SAL_OVERRIDE
;
414 /// @see vcl::ITiledRenderable::postKeyEvent().
415 virtual void postKeyEvent(int nType
, int nCharCode
, int nKeyCode
) SAL_OVERRIDE
;
416 /// @see vcl::ITiledRenderable::postMouseEvent().
417 virtual void postMouseEvent(int nType
, int nX
, int nY
, int nCount
) SAL_OVERRIDE
;
418 /// @see vcl::ITiledRenderable::setTextSelection().
419 virtual void setTextSelection(int nType
, int nX
, int nY
) SAL_OVERRIDE
;
420 /// @see vcl::ITiledRenderable::getTextSelection().
421 virtual OString
getTextSelection(const char* pMimeType
, OString
& rUsedMimeType
) SAL_OVERRIDE
;
422 /// @see vcl::ITiledRenderable::setGraphicSelection().
423 virtual void setGraphicSelection(int nType
, int nX
, int nY
) SAL_OVERRIDE
;
424 /// @see vcl::ITiledRenderable::resetSelection().
425 virtual void resetSelection() SAL_OVERRIDE
;
427 // ::com::sun::star::tiledrendering::XTiledRenderable
428 virtual void SAL_CALL
paintTile( const ::css::uno::Any
& Parent
, ::sal_Int32 nOutputWidth
, ::sal_Int32 nOutputHeight
, ::sal_Int32 nTilePosX
, ::sal_Int32 nTilePosY
, ::sal_Int32 nTileWidth
, ::sal_Int32 nTileHeight
) throw (::css::uno::RuntimeException
, ::std::exception
) SAL_OVERRIDE
;
431 void Reactivate(SwDocShell
* pNewDocShell
);
432 SwXDocumentPropertyHelper
* GetPropertyHelper ();
433 bool IsValid() const {return bObjectValid
;}
437 SwUnoCrsr
* CreateCursorForSearch(css::uno::Reference
< css::text::XTextCursor
> & xCrsr
);
438 SwUnoCrsr
* FindAny(const css::uno::Reference
< css::util::XSearchDescriptor
> & xDesc
,
439 css::uno::Reference
< css::text::XTextCursor
> & xCrsr
, bool bAll
,
441 css::uno::Reference
< css::uno::XInterface
> xLastResult
);
443 SwDocShell
* GetDocShell() {return pDocShell
;}
445 void * SAL_CALL
operator new( size_t ) throw();
446 void SAL_CALL
operator delete( void * ) throw();
450 class SwXLinkTargetSupplier
: public cppu::WeakImplHelper
452 css::container::XNameAccess
,
453 css::lang::XServiceInfo
456 SwXTextDocument
* pxDoc
;
466 SwXLinkTargetSupplier(SwXTextDocument
& rxDoc
);
467 virtual ~SwXLinkTargetSupplier();
470 virtual css::uno::Any SAL_CALL
getByName(const OUString
& Name
) throw( css::container::NoSuchElementException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
471 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
472 virtual sal_Bool SAL_CALL
hasByName(const OUString
& Name
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
475 virtual css::uno::Type SAL_CALL
getElementType( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
476 virtual sal_Bool SAL_CALL
hasElements( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
479 virtual OUString SAL_CALL
getImplementationName() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
480 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
481 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
483 void Invalidate() {pxDoc
= 0;}
486 class SwXLinkNameAccessWrapper
: public cppu::WeakImplHelper
488 css::beans::XPropertySet
,
489 css::container::XNameAccess
,
490 css::lang::XServiceInfo
,
491 css::document::XLinkTargetSupplier
494 css::uno::Reference
< css::container::XNameAccess
> xRealAccess
;
495 const SfxItemPropertySet
* pPropSet
;
496 const OUString sLinkSuffix
;
497 const OUString sLinkDisplayName
;
498 css::uno::Reference
< css::text::XTextDocument
> xDoc
;
499 SwXTextDocument
* pxDoc
;
502 SwXLinkNameAccessWrapper(css::uno::Reference
< css::container::XNameAccess
> xAccess
,
503 const OUString
& rLinkDisplayName
, const OUString
& sSuffix
);
504 SwXLinkNameAccessWrapper(SwXTextDocument
& rxDoc
,
505 const OUString
& rLinkDisplayName
, const OUString
& sSuffix
);
506 virtual ~SwXLinkNameAccessWrapper();
509 virtual css::uno::Any SAL_CALL
getByName(const OUString
& Name
) throw( css::container::NoSuchElementException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
510 virtual css::uno::Sequence
< OUString
> SAL_CALL
getElementNames() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
511 virtual sal_Bool SAL_CALL
hasByName(const OUString
& Name
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
514 virtual css::uno::Type SAL_CALL
getElementType( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
515 virtual sal_Bool SAL_CALL
hasElements( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
518 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
519 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
, std::exception
) SAL_OVERRIDE
;
520 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
521 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
, std::exception
) SAL_OVERRIDE
;
522 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
, std::exception
) SAL_OVERRIDE
;
523 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
, std::exception
) SAL_OVERRIDE
;
524 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
, std::exception
) SAL_OVERRIDE
;
526 //XLinkTargetSupplier
527 virtual css::uno::Reference
< css::container::XNameAccess
> SAL_CALL
getLinks() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
530 virtual OUString SAL_CALL
getImplementationName() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
531 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
532 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
536 class SwXOutlineTarget
: public cppu::WeakImplHelper
538 css::beans::XPropertySet
,
539 css::lang::XServiceInfo
542 const SfxItemPropertySet
* pPropSet
;
543 OUString sOutlineText
;
546 SwXOutlineTarget(const OUString
& rOutlineText
);
547 virtual ~SwXOutlineTarget();
550 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) throw(css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
551 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
, std::exception
) SAL_OVERRIDE
;
552 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) throw(css::beans::UnknownPropertyException
, css::lang::WrappedTargetException
, css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
553 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
, std::exception
) SAL_OVERRIDE
;
554 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
, std::exception
) SAL_OVERRIDE
;
555 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
, std::exception
) SAL_OVERRIDE
;
556 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
, std::exception
) SAL_OVERRIDE
;
559 virtual OUString SAL_CALL
getImplementationName() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
560 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
) throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
561 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
564 class SwXDocumentPropertyHelper
: public SvxUnoForbiddenCharsTable
566 css::uno::Reference
< css::uno::XInterface
> xDashTable
;
567 css::uno::Reference
< css::uno::XInterface
> xGradientTable
;
568 css::uno::Reference
< css::uno::XInterface
> xHatchTable
;
569 css::uno::Reference
< css::uno::XInterface
> xBitmapTable
;
570 css::uno::Reference
< css::uno::XInterface
> xTransGradientTable
;
571 css::uno::Reference
< css::uno::XInterface
> xMarkerTable
;
572 css::uno::Reference
< css::uno::XInterface
> xDrawDefaults
;
576 SwXDocumentPropertyHelper(SwDoc
& rDoc
);
577 virtual ~SwXDocumentPropertyHelper();
578 css::uno::Reference
<css::uno::XInterface
> GetDrawTable(short nWhich
);
581 virtual void onChange() SAL_OVERRIDE
;
584 // The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of
585 // the current SwViewShell so that fields are not printed as commands and
586 // hidden characters are always invisible. Hidden text and place holders
587 // should be printed according to the current print options.
588 // After printing the view options are restored
589 class SwViewOptionAdjust_Impl
591 SwViewShell
* m_pShell
;
592 SwViewOption m_aOldViewOptions
;
594 SwViewOptionAdjust_Impl( SwViewShell
& rSh
, const SwViewOption
&rViewOptions
);
595 ~SwViewOptionAdjust_Impl();
596 void AdjustViewOptions( SwPrintData
const* const pPrtOptions
);
597 bool checkShell( const SwViewShell
& rCompare
) const
598 { return &rCompare
== m_pShell
; }
599 void DontTouchThatViewShellItSmellsFunny() { m_pShell
= 0; }
604 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */