LibreOffice Module sw (master)  1
unotxdoc.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SW_INC_UNOTXDOC_HXX
20 #define INCLUDED_SW_INC_UNOTXDOC_HXX
21 
22 #include "swdllapi.h"
23 #include <sfx2/sfxbasemodel.hxx>
24 
25 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
26 #include <com/sun/star/style/XAutoStylesSupplier.hpp>
27 #include <com/sun/star/document/XLinkTargetSupplier.hpp>
28 #include <com/sun/star/document/XRedlinesSupplier.hpp>
29 #include <com/sun/star/text/XNumberingRulesSupplier.hpp>
30 #include <com/sun/star/text/XFootnotesSupplier.hpp>
31 #include <com/sun/star/text/XEndnotesSupplier.hpp>
32 #include <com/sun/star/text/XTextSectionsSupplier.hpp>
33 #include <com/sun/star/text/XLineNumberingProperties.hpp>
34 #include <com/sun/star/text/XChapterNumberingSupplier.hpp>
35 #include <com/sun/star/text/XPagePrintable.hpp>
36 #include <com/sun/star/text/XTextFieldsSupplier.hpp>
37 #include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
38 #include <com/sun/star/text/XTextTablesSupplier.hpp>
39 #include <com/sun/star/text/XDocumentIndexesSupplier.hpp>
40 #include <com/sun/star/text/XBookmarksSupplier.hpp>
41 #include <com/sun/star/text/XTextDocument.hpp>
42 #include <com/sun/star/text/XTextEmbeddedObjectsSupplier.hpp>
43 #include <com/sun/star/text/XReferenceMarksSupplier.hpp>
44 #include <com/sun/star/text/XTextFramesSupplier.hpp>
45 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
46 #include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
47 #include <com/sun/star/util/XReplaceable.hpp>
48 #include <com/sun/star/util/XRefreshable.hpp>
49 #include <com/sun/star/util/XLinkUpdate.hpp>
50 #include <com/sun/star/view/XRenderable.hpp>
51 #include <com/sun/star/lang/XServiceInfo.hpp>
52 #include <com/sun/star/beans/XPropertySet.hpp>
53 #include <com/sun/star/beans/XPropertyState.hpp>
54 #include <com/sun/star/xforms/XFormsSupplier.hpp>
55 #include <com/sun/star/text/XFlatParagraphIteratorProvider.hpp>
56 #include <com/sun/star/document/XDocumentLanguages.hpp>
57 #include <com/sun/star/util/XCloneable.hpp>
58 #include <o3tl/deleter.hxx>
59 #include <rtl/ref.hxx>
60 #include <svx/fmdmod.hxx>
62 #include <cppuhelper/implbase.hxx>
63 #include <vcl/ITiledRenderable.hxx>
64 #include <com/sun/star/tiledrendering/XTiledRenderable.hpp>
65 #include <com/sun/star/text/XPasteBroadcaster.hpp>
66 
67 #include "unobaseclass.hxx"
68 #include "viewopt.hxx"
69 
70 #include <deque>
71 
72 class SwDoc;
73 class SwDocShell;
74 class UnoActionContext;
75 class SwXBodyText;
76 class SwXDrawPage;
77 class SwUnoCursor;
79 class SfxViewFrame;
80 class SfxViewShell;
81 class SwPrintUIOptions;
82 class SwPrintData;
83 class SwRenderData;
84 class SwViewShell;
85 class SfxItemPropertySet;
86 namespace com { namespace sun { namespace star { namespace container { class XNameContainer; } } } }
87 namespace com { namespace sun { namespace star { namespace frame { class XController; } } } }
88 namespace com { namespace sun { namespace star { namespace lang { struct Locale; } } } }
89 namespace com { namespace sun { namespace star { namespace uno { class XAggregation; } } } }
90 
91 namespace com { namespace sun { namespace star { namespace util { class XReplaceDescriptor; } } } }
92 
93 typedef cppu::WeakImplHelper
94 <
95  css::text::XTextDocument,
96  css::text::XLineNumberingProperties,
97  css::text::XChapterNumberingSupplier,
98  css::text::XNumberingRulesSupplier,
99  css::text::XFootnotesSupplier,
100  css::text::XEndnotesSupplier,
101  css::util::XReplaceable,
102  css::text::XPagePrintable,
103  css::text::XReferenceMarksSupplier,
104  css::text::XTextTablesSupplier,
105  css::text::XTextFramesSupplier,
106  css::text::XBookmarksSupplier,
107  css::text::XTextSectionsSupplier,
108  css::text::XTextGraphicObjectsSupplier,
109  css::text::XTextEmbeddedObjectsSupplier,
110  css::text::XTextFieldsSupplier,
111  css::style::XStyleFamiliesSupplier,
112  css::style::XAutoStylesSupplier,
113  css::lang::XServiceInfo,
114  css::drawing::XDrawPageSupplier,
115  css::drawing::XDrawPagesSupplier,
116  css::text::XDocumentIndexesSupplier,
117  css::beans::XPropertySet,
118  css::beans::XPropertyState,
119  css::document::XLinkTargetSupplier,
120  css::document::XRedlinesSupplier,
121  css::util::XRefreshable,
122  css::util::XLinkUpdate,
123  css::view::XRenderable,
124  css::xforms::XFormsSupplier,
125  css::text::XFlatParagraphIteratorProvider,
126  css::document::XDocumentLanguages,
127  css::util::XCloneable,
128  css::text::XPasteBroadcaster
129 >
131 
133  public SvxFmMSFactory,
134  public SfxBaseModel,
135  public vcl::ITiledRenderable,
136  public css::tiledrendering::XTiledRenderable
137 {
138 private:
139  class Impl;
141 
142  std::deque<std::unique_ptr<UnoActionContext, o3tl::default_delete<UnoActionContext>>> maActionArr;
143 
145 
148 
150  css::uno::Reference< css::drawing::XDrawPage > mxXDrawPage;
151 
152  css::uno::Reference< css::text::XText > xBodyText;
154  css::uno::Reference< css::uno::XAggregation > xNumFormatAgg;
155 
156  css::uno::Reference< css::container::XIndexAccess > mxXNumberingRules;
157  css::uno::Reference< css::container::XIndexAccess > mxXFootnotes;
158  css::uno::Reference< css::beans::XPropertySet > mxXFootnoteSettings;
159  css::uno::Reference< css::container::XIndexAccess > mxXEndnotes;
160  css::uno::Reference< css::beans::XPropertySet > mxXEndnoteSettings;
161  css::uno::Reference< css::container::XNameAccess > mxXReferenceMarks;
162  css::uno::Reference< css::container::XEnumerationAccess > mxXTextFieldTypes;
163  css::uno::Reference< css::container::XNameAccess > mxXTextFieldMasters;
164  css::uno::Reference< css::container::XNameAccess > mxXTextSections;
165  css::uno::Reference< css::container::XNameAccess > mxXBookmarks;
166  css::uno::Reference< css::container::XNameAccess > mxXTextTables;
167  css::uno::Reference< css::container::XNameAccess > mxXTextFrames;
168  css::uno::Reference< css::container::XNameAccess > mxXGraphicObjects;
169  css::uno::Reference< css::container::XNameAccess > mxXEmbeddedObjects;
170  css::uno::Reference< css::container::XNameAccess > mxXStyleFamilies;
171  mutable css::uno::Reference< css::style::XAutoStyles > mxXAutoStyles;
172  css::uno::Reference< css::container::XIndexReplace > mxXChapterNumbering;
173  css::uno::Reference< css::container::XIndexAccess > mxXDocumentIndexes;
174 
175  css::uno::Reference< css::beans::XPropertySet > mxXLineNumberingProperties;
176  css::uno::Reference< css::container::XNameAccess > mxLinkTargetSupplier;
177  css::uno::Reference< css::container::XEnumerationAccess > mxXRedlines;
178 
179  //temporary frame to enable PDF export if no valid view is available
182 
183  std::unique_ptr<SwPrintUIOptions> m_pPrintUIOptions;
184  std::unique_ptr<SwRenderData> m_pRenderData;
185 
186  void GetNumberFormatter();
187 
188  css::uno::Reference<css::uno::XInterface> create(
189  OUString const & rServiceName,
190  css::uno::Sequence<css::uno::Any> const * arguments);
191 
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 );
196 
197  OUString maBuildId;
198 
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
202  // is implemented.
204 
207 
209  virtual SdrModel& getSdrModelFromUnoModel() const override;
210 
211  virtual ~SwXTextDocument() override;
212 public:
213  SwXTextDocument(SwDocShell* pShell);
214 
215  void NotifyRefreshListeners();
216  virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& aType ) override;
217  virtual void SAL_CALL acquire( ) throw() override;
218  virtual void SAL_CALL release( ) throw() override;
219 
220  //XWeak
221  virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter( ) override;
222 
223  virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes( ) override;
224 
225  static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
226 
227  //XUnoTunnel
228  virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
229 
230  //XTextDocument
231  virtual css::uno::Reference< css::text::XText > SAL_CALL getText() override;
232  virtual void SAL_CALL reformat() override;
233 
234  //XModel
235  virtual sal_Bool SAL_CALL attachResource( const OUString& aURL, const css::uno::Sequence< css::beans::PropertyValue >& aArgs ) override;
236  virtual OUString SAL_CALL getURL( ) override;
237  virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getArgs( ) override;
238  virtual void SAL_CALL connectController( const css::uno::Reference< css::frame::XController >& xController ) override;
239  virtual void SAL_CALL disconnectController( const css::uno::Reference< css::frame::XController >& xController ) override;
240  virtual void SAL_CALL lockControllers( ) override;
241  virtual void SAL_CALL unlockControllers( ) override;
242  virtual sal_Bool SAL_CALL hasControllersLocked( ) override;
243  virtual css::uno::Reference< css::frame::XController > SAL_CALL getCurrentController( ) override;
244  virtual void SAL_CALL setCurrentController( const css::uno::Reference< css::frame::XController >& xController ) override;
245  virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getCurrentSelection( ) override;
246 
247  //XComponent
248  virtual void SAL_CALL dispose() override;
249  virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override;
250  virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > & aListener) override;
251 
252  //XCloseable
253  virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) override;
254 
255  //XLineNumberingProperties
256  virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getLineNumberingProperties() override;
257 
258  //XChapterNumberingSupplier
259  virtual css::uno::Reference< css::container::XIndexReplace > SAL_CALL getChapterNumberingRules() override;
260 
261  //XNumberingRulesSupplier
262  virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getNumberingRules() override;
263 
264  //XFootnotesSupplier
265  virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getFootnotes() override;
266  virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getFootnoteSettings() override;
267 
268  //XEndnotesSupplier
269  virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getEndnotes() override;
270  virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getEndnoteSettings() override;
271 
272  //XReplaceable
273  virtual css::uno::Reference< css::util::XReplaceDescriptor > SAL_CALL createReplaceDescriptor() override;
274  virtual sal_Int32 SAL_CALL replaceAll(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) override;
275 
276  //XSearchable
277  virtual css::uno::Reference< css::util::XSearchDescriptor > SAL_CALL createSearchDescriptor() override;
278  virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL findAll(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) override;
279  virtual css::uno::Reference< css::uno::XInterface > SAL_CALL findFirst(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc) override;
280  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) override;
281 
282  //XPagePrintable
283  virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getPagePrintSettings() override;
284  virtual void SAL_CALL setPagePrintSettings(const css::uno::Sequence< css::beans::PropertyValue >& aSettings) override;
285  virtual void SAL_CALL printPages(const css::uno::Sequence< css::beans::PropertyValue >& xOptions) override;
286 
287  //XReferenceMarksSupplier
288  virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getReferenceMarks() override;
289 
290  // css::text::XTextFieldsSupplier
291  virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getTextFields() override;
292  virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextFieldMasters() override;
293 
294  // css::text::XTextEmbeddedObjectsSupplier
295  virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getEmbeddedObjects() override;
296 
297  // css::text::XBookmarksSupplier
298  virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getBookmarks() override;
299 
300  // css::text::XTextSectionsSupplier
301  virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextSections() override;
302 
303  // css::text::XTextTablesSupplier
304  virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextTables() override;
305 
306  // css::text::XTextGraphicObjectsSupplier
307  virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getGraphicObjects() override;
308 
309  // css::text::XTextFramesSupplier
310  virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getTextFrames() override;
311 
312  //XStyleFamiliesSupplier
313  virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getStyleFamilies() override;
314 
315  //XAutoStylesSupplier
316  virtual css::uno::Reference< css::style::XAutoStyles > SAL_CALL getAutoStyles( ) override;
317 
318  //XMultiServiceFactory
319  virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance(const OUString& ServiceSpecifier) override;
320  virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const OUString& ServiceSpecifier,
321  const css::uno::Sequence< css::uno::Any >& Arguments) override;
322  virtual css::uno::Sequence< OUString > SAL_CALL getAvailableServiceNames() override;
323 
324  //XServiceInfo
325  virtual OUString SAL_CALL getImplementationName() override;
326  virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
327  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
328 
329  // css::drawing::XDrawPageSupplier
330  virtual css::uno::Reference< css::drawing::XDrawPage > SAL_CALL getDrawPage() override;
331 
332  // css::drawing::XDrawPagesSupplier
333  virtual css::uno::Reference< css::drawing::XDrawPages > SAL_CALL getDrawPages() override;
334 
335  // css::text::XDocumentIndexesSupplier
336  virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getDocumentIndexes() override;
337 
338  //XPropertySet
339  virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
340  virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
341  virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
342  virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
343  virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
344  virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
345  virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
346 
347  //XPropertyState
348  virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& rPropertyName ) override;
349  virtual css::uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::uno::Sequence< OUString >& rPropertyNames ) override;
350  virtual void SAL_CALL setPropertyToDefault( const OUString& rPropertyName ) override;
351  virtual css::uno::Any SAL_CALL getPropertyDefault( const OUString& rPropertyName ) override;
352 
353  //XLinkTargetSupplier
354  virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks() override;
355 
356  //XRedlinesSupplier
357  virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getRedlines( ) override;
358 
359  // css::util::XRefreshable
360  virtual void SAL_CALL refresh() override;
361  virtual void SAL_CALL addRefreshListener(const css::uno::Reference< css::util::XRefreshListener > & l) override;
362  virtual void SAL_CALL removeRefreshListener(const css::uno::Reference< css::util::XRefreshListener > & l) override;
363 
364  // css::util::XLinkUpdate,
365  virtual void SAL_CALL updateLinks( ) override;
366 
367  // css::view::XRenderable
368  virtual sal_Int32 SAL_CALL getRendererCount( const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) override;
369  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 ) override;
370  virtual void SAL_CALL render( sal_Int32 nRenderer, const css::uno::Any& aSelection, const css::uno::Sequence< css::beans::PropertyValue >& xOptions ) override;
371 
372  // css::xforms::XFormsSupplier
373  virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL getXForms( ) override;
374 
375  // css::document::XDocumentLanguages
376  virtual css::uno::Sequence< css::lang::Locale > SAL_CALL getDocumentLanguages( ::sal_Int16 nScriptTypes, ::sal_Int16 nCount ) override;
377 
378  // css::text::XFlatParagraphIteratorProvider:
379  virtual css::uno::Reference< css::text::XFlatParagraphIterator > SAL_CALL getFlatParagraphIterator(::sal_Int32 nTextMarkupType, sal_Bool bAutomatic ) override;
380 
381  // css::util::XCloneable
382  virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
383 
384  // css::text::XPasteBroadcaster
385  void SAL_CALL addPasteEventListener(
386  const ::css::uno::Reference<::css::text::XPasteListener>& xListener) override;
387  void SAL_CALL removePasteEventListener(
388  const ::css::uno::Reference<::css::text::XPasteListener>& xListener) override;
389 
391  virtual void paintTile( VirtualDevice &rDevice,
392  int nOutputWidth,
393  int nOutputHeight,
394  int nTilePosX,
395  int nTilePosY,
396  long nTileWidth,
397  long nTileHeight ) override;
399  virtual Size getDocumentSize() override;
401  virtual void setPart(int nPart) override;
403  virtual int getParts() override;
405  virtual int getPart() override;
407  virtual OUString getPartName(int nPart) override;
409  virtual OUString getPartHash(int nPart) override;
411  virtual VclPtr<vcl::Window> getDocWindow() override;
413  virtual void initializeForTiledRendering(const css::uno::Sequence<css::beans::PropertyValue>& rArguments) override;
415  virtual void postKeyEvent(int nType, int nCharCode, int nKeyCode) override;
417  virtual void postMouseEvent(int nType, int nX, int nY, int nCount, int nButtons, int nModifier) override;
419  virtual void setTextSelection(int nType, int nX, int nY) override;
421  virtual css::uno::Reference<css::datatransfer::XTransferable> getSelection() override;
423  virtual void setGraphicSelection(int nType, int nX, int nY) override;
425  virtual void resetSelection() override;
427  virtual OUString getPartPageRectangles() override;
429  virtual void setClipboard(const css::uno::Reference<css::datatransfer::clipboard::XClipboard>& xClipboard) override;
431  virtual bool isMimeTypeSupported() override;
433  virtual void setClientVisibleArea(const tools::Rectangle& rRectangle) override;
435  virtual void setClientZoom(int nTilePixelWidth_, int nTilePixelHeight_, int nTileTwipWidth_, int nTileTwipHeight_) override;
437  virtual PointerStyle getPointer() override;
439  OUString getTrackedChanges() override;
441  OUString getTrackedChangeAuthors() override;
442 
443  OUString getRulerState() override;
445  OUString getPostIts() override;
446 
447  // css::tiledrendering::XTiledRenderable
448  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 ) override;
449 
450  void Invalidate();
451  void Reactivate(SwDocShell* pNewDocShell);
452  SwXDocumentPropertyHelper * GetPropertyHelper ();
453  bool IsValid() const {return bObjectValid;}
454 
455  void InitNewDoc();
456 
457  SwUnoCursor* CreateCursorForSearch(css::uno::Reference< css::text::XTextCursor > & xCursor);
458  SwUnoCursor* FindAny(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc,
459  css::uno::Reference< css::text::XTextCursor > & xCursor, bool bAll,
460  sal_Int32& nResult,
461  css::uno::Reference< css::uno::XInterface > const & xLastResult);
462 
463  SwDocShell* GetDocShell() {return pDocShell;}
464 };
465 
466 class SwXLinkTargetSupplier final : public cppu::WeakImplHelper
467 <
468  css::container::XNameAccess,
469  css::lang::XServiceInfo
470 >
471 {
473  OUString sTables;
474  OUString sFrames;
475  OUString sGraphics;
476  OUString sOLEs;
477  OUString sSections;
478  OUString sOutlines;
479  OUString sBookmarks;
480 
481 public:
483  virtual ~SwXLinkTargetSupplier() override;
484 
485  //XNameAccess
486  virtual css::uno::Any SAL_CALL getByName(const OUString& Name) override;
487  virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
488  virtual sal_Bool SAL_CALL hasByName(const OUString& Name) override;
489 
490  //XElementAccess
491  virtual css::uno::Type SAL_CALL getElementType( ) override;
492  virtual sal_Bool SAL_CALL hasElements( ) override;
493 
494  //XServiceInfo
495  virtual OUString SAL_CALL getImplementationName() override;
496  virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
497  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
498 
499  void Invalidate() {pxDoc = nullptr;}
500 };
501 
502 class SwXLinkNameAccessWrapper final : public cppu::WeakImplHelper
503 <
504  css::beans::XPropertySet,
505  css::container::XNameAccess,
506  css::lang::XServiceInfo,
507  css::document::XLinkTargetSupplier
508 >
509 {
510  css::uno::Reference< css::container::XNameAccess > xRealAccess;
512  const OUString sLinkSuffix;
513  const OUString sLinkDisplayName;
515 
516 public:
517  SwXLinkNameAccessWrapper(css::uno::Reference< css::container::XNameAccess > const & xAccess,
518  const OUString& rLinkDisplayName, const OUString& sSuffix);
520  const OUString& rLinkDisplayName, const OUString& sSuffix);
521  virtual ~SwXLinkNameAccessWrapper() override;
522 
523  //XNameAccess
524  virtual css::uno::Any SAL_CALL getByName(const OUString& Name) override;
525  virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override;
526  virtual sal_Bool SAL_CALL hasByName(const OUString& Name) override;
527 
528  //XElementAccess
529  virtual css::uno::Type SAL_CALL getElementType( ) override;
530  virtual sal_Bool SAL_CALL hasElements( ) override;
531 
532  //XPropertySet
533  virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
534  virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
535  virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
536  virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
537  virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
538  virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
539  virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
540 
541  //XLinkTargetSupplier
542  virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks() override;
543 
544  //XServiceInfo
545  virtual OUString SAL_CALL getImplementationName() override;
546  virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
547  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
548 
549 };
550 
551 class SwXOutlineTarget final : public cppu::WeakImplHelper
552 <
553  css::beans::XPropertySet,
554  css::lang::XServiceInfo
555 >
556 {
558  OUString const sOutlineText;
559 
560 public:
561  SwXOutlineTarget(const OUString& rOutlineText);
562  virtual ~SwXOutlineTarget() override;
563 
564  //XPropertySet
565  virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) override;
566  virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
567  virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
568  virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
569  virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
570  virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
571  virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
572 
573  //XServiceInfo
574  virtual OUString SAL_CALL getImplementationName() override;
575  virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
576  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
577 };
578 
579 enum class SwCreateDrawTable {
581 };
582 
584 {
585  css::uno::Reference < css::uno::XInterface > xDashTable;
586  css::uno::Reference < css::uno::XInterface > xGradientTable;
587  css::uno::Reference < css::uno::XInterface > xHatchTable;
588  css::uno::Reference < css::uno::XInterface > xBitmapTable;
589  css::uno::Reference < css::uno::XInterface > xTransGradientTable;
590  css::uno::Reference < css::uno::XInterface > xMarkerTable;
591  css::uno::Reference < css::uno::XInterface > xDrawDefaults;
592 
594 public:
596  virtual ~SwXDocumentPropertyHelper() override;
597  css::uno::Reference<css::uno::XInterface> GetDrawTable(SwCreateDrawTable nWhich);
598  void Invalidate();
599 
600  virtual void onChange() override;
601 };
602 
603 // The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of
604 // the current SwViewShell so that fields are not printed as commands and
605 // hidden characters are always invisible. Hidden text and place holders
606 // should be printed according to the current print options.
607 // After printing the view options are restored
609 {
612 public:
613  SwViewOptionAdjust_Impl( SwViewShell& rSh, const SwViewOption &rViewOptions );
615  void AdjustViewOptions( SwPrintData const* const pPrtOptions, bool setShowPlaceHoldersInPDF );
616  bool checkShell( const SwViewShell& rCompare ) const
617  { return &rCompare == m_pShell; }
618  void DontTouchThatViewShellItSmellsFunny() { m_pShell = nullptr; }
619 };
620 
621 #endif
622 
623 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Any SAL_CALL getByName(const OUString &Name) override
Definition: unotxdoc.cxx:3993
css::uno::Reference< css::uno::XInterface > xDrawDefaults
Definition: unotxdoc.hxx:591
Type
css::uno::Reference< css::container::XNameAccess > mxXTextFieldMasters
Definition: unotxdoc.hxx:163
virtual ~SwXOutlineTarget() override
Definition: unotxdoc.cxx:4231
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unotxdoc.cxx:4247
const SfxItemPropertySet * pPropSet
Definition: unotxdoc.hxx:557
virtual OUString SAL_CALL getImplementationName() override
Definition: unotxdoc.cxx:3954
css::uno::Reference< css::uno::XInterface > xHatchTable
Definition: unotxdoc.hxx:587
css::uno::Reference< css::container::XNameAccess > mxXTextSections
Definition: unotxdoc.hxx:164
virtual sal_Bool SAL_CALL hasByName(const OUString &Name) override
Definition: unotxdoc.cxx:3930
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unotxdoc.cxx:4200
cppu::WeakImplHelper< css::text::XTextDocument, css::text::XLineNumberingProperties, css::text::XChapterNumberingSupplier, css::text::XNumberingRulesSupplier, css::text::XFootnotesSupplier, css::text::XEndnotesSupplier, css::util::XReplaceable, css::text::XPagePrintable, css::text::XReferenceMarksSupplier, css::text::XTextTablesSupplier, css::text::XTextFramesSupplier, css::text::XBookmarksSupplier, css::text::XTextSectionsSupplier, css::text::XTextGraphicObjectsSupplier, css::text::XTextEmbeddedObjectsSupplier, css::text::XTextFieldsSupplier, css::style::XStyleFamiliesSupplier, css::style::XAutoStylesSupplier, css::lang::XServiceInfo, css::drawing::XDrawPageSupplier, css::drawing::XDrawPagesSupplier, css::text::XDocumentIndexesSupplier, css::beans::XPropertySet, css::beans::XPropertyState, css::document::XLinkTargetSupplier, css::document::XRedlinesSupplier, css::util::XRefreshable, css::util::XLinkUpdate, css::view::XRenderable, css::xforms::XFormsSupplier, css::text::XFlatParagraphIteratorProvider, css::document::XDocumentLanguages, css::util::XCloneable, css::text::XPasteBroadcaster > SwXTextDocumentBaseClass
Definition: unotxdoc.hxx:130
virtual ~SwXLinkNameAccessWrapper() override
Definition: unotxdoc.cxx:3989
SwXBodyText * pBodyText
Definition: unotxdoc.hxx:153
virtual css::uno::Reference< css::container::XNameAccess > SAL_CALL getLinks() override
Definition: unotxdoc.cxx:4204
css::uno::Reference< css::drawing::XDrawPage > mxXDrawPage
Definition: unotxdoc.hxx:150
signed char sal_Int8
SwXOutlineTarget(const OUString &rOutlineText)
Definition: unotxdoc.cxx:4225
void DontTouchThatViewShellItSmellsFunny()
Definition: unotxdoc.hxx:618
css::uno::Reference< css::container::XNameAccess > mxXBookmarks
Definition: unotxdoc.hxx:165
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: unotxdoc.cxx:3919
virtual css::uno::Any SAL_CALL getByName(const OUString &Name) override
Definition: unotxdoc.cxx:3858
Definition: doc.hxx:185
virtual sal_Bool SAL_CALL hasElements() override
Definition: unotxdoc.cxx:3949
const OUString sLinkSuffix
Definition: unotxdoc.hxx:512
SwViewShell * m_pShell
Definition: unotxdoc.hxx:610
virtual SdrModel & getSdrModelFromUnoModel() const =0
css::uno::Reference< css::container::XIndexReplace > mxXChapterNumbering
Definition: unotxdoc.hxx:172
void AdjustViewOptions(SwPrintData const *const pPrtOptions, bool setShowPlaceHoldersInPDF)
Definition: unotxdoc.cxx:4389
virtual void SAL_CALL acquire() override
const SfxItemPropertySet * pPropSet
Definition: unotxdoc.hxx:511
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unotxdoc.cxx:4265
css::uno::Reference< css::uno::XInterface > xMarkerTable
Definition: unotxdoc.hxx:590
virtual OUString SAL_CALL getImplementationName() override
Definition: unotxdoc.cxx:4275
virtual ~SwXDocumentPropertyHelper() override
Definition: unotxdoc.cxx:4298
css::uno::Reference< css::uno::XInterface > xGradientTable
Definition: unotxdoc.hxx:586
SwXDrawPage * pDrawPage
Definition: unotxdoc.hxx:149
css::uno::Reference< css::container::XNameAccess > mxXTextFrames
Definition: unotxdoc.hxx:167
css::uno::Reference< css::container::XIndexAccess > mxXDocumentIndexes
Definition: unotxdoc.hxx:173
SwXLinkNameAccessWrapper(css::uno::Reference< css::container::XNameAccess > const &xAccess, const OUString &rLinkDisplayName, const OUString &sSuffix)
A class that stores temporary data that is needed for rendering the document.
Definition: printdata.hxx:203
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unotxdoc.cxx:4192
css::uno::Reference< css::container::XNameAccess > mxXReferenceMarks
Definition: unotxdoc.hxx:161
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
SwCreateDrawTable
Definition: unotxdoc.hxx:579
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unotxdoc.cxx:4136
std::deque< std::unique_ptr< UnoActionContext, o3tl::default_delete< UnoActionContext > > > maActionArr
Definition: unotxdoc.hxx:142
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unotxdoc.cxx:3959
SwDocShell * pDocShell
Definition: unotxdoc.hxx:146
css::uno::Reference< css::container::XEnumerationAccess > mxXRedlines
Definition: unotxdoc.hxx:177
OUString const sOutlineText
Definition: unotxdoc.hxx:558
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
Reference< deployment::XPackageRegistry > create(Reference< deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, Reference< XComponentContext > const &xComponentContext)
std::unique_ptr< T, UnoImplPtrDeleter< T > > UnoImplPtr
Smart pointer class ensuring that the pointed object is deleted with a locked SolarMutex.
virtual void SAL_CALL removePropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &aListener) override
Definition: unotxdoc.cxx:4260
std::unique_ptr< SwRenderData > m_pRenderData
Definition: unotxdoc.hxx:184
const SfxItemPropertySet * pPropSet
Definition: unotxdoc.hxx:144
css::uno::Reference< css::uno::XAggregation > xNumFormatAgg
Definition: unotxdoc.hxx:154
css::uno::Reference< css::beans::XPropertySet > mxXLineNumberingProperties
Definition: unotxdoc.hxx:175
css::uno::Reference< css::uno::XInterface > xBitmapTable
Definition: unotxdoc.hxx:588
css::uno::Reference< css::container::XIndexAccess > mxXFootnotes
Definition: unotxdoc.hxx:157
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unotxdoc.cxx:4214
virtual void onChange() override
Definition: unotxdoc.cxx:4367
SwXTextDocument * pxDoc
Definition: unotxdoc.hxx:472
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: unotxdoc.cxx:4280
css::uno::Reference< css::container::XNameAccess > xRealAccess
Definition: unotxdoc.hxx:510
OUString maBuildId
Definition: unotxdoc.hxx:197
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unotxdoc.cxx:3943
css::uno::Reference< css::container::XIndexAccess > mxXEndnotes
Definition: unotxdoc.hxx:159
SfxViewFrame * m_pHiddenViewFrame
Definition: unotxdoc.hxx:180
SwXTextDocument * pxDoc
Definition: unotxdoc.hxx:514
unsigned char sal_Bool
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: unotxdoc.cxx:4241
css::uno::Reference< css::uno::XInterface > xDashTable
Definition: unotxdoc.hxx:585
SwDocShell * GetDocShell()
Definition: unotxdoc.hxx:463
SwViewOptionAdjust_Impl(SwViewShell &rSh, const SwViewOption &rViewOptions)
Definition: unotxdoc.cxx:4373
css::uno::Reference< css::container::XNameAccess > mxLinkTargetSupplier
Definition: unotxdoc.hxx:176
virtual void SAL_CALL addVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unotxdoc.cxx:4196
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unotxdoc.cxx:4130
css::uno::Reference< css::beans::XPropertySet > mxXEndnoteSettings
Definition: unotxdoc.hxx:160
virtual css::uno::Type SAL_CALL getElementType() override
Definition: unotxdoc.cxx:4111
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unotxdoc.cxx:3964
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
Definition: unotxdoc.cxx:4043
virtual OUString SAL_CALL getImplementationName() override
Definition: unotxdoc.cxx:4209
css::uno::Reference< css::uno::XInterface > xTransGradientTable
Definition: unotxdoc.hxx:589
bool bApplyPagePrintSettingsFromXPagePrintable
Definition: unotxdoc.hxx:203
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unotxdoc.cxx:4219
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
css::uno::Reference< css::beans::XPropertySet > mxXFootnoteSettings
Definition: unotxdoc.hxx:158
virtual sal_Bool SAL_CALL hasByName(const OUString &Name) override
Definition: unotxdoc.cxx:4073
bool checkShell(const SwViewShell &rCompare) const
Definition: unotxdoc.hxx:616
::sw::UnoImplPtr< Impl > m_pImpl
Definition: unotxdoc.hxx:139
css::uno::Reference< css::text::XText > xBodyText
Definition: unotxdoc.hxx:152
css::uno::Reference< css::container::XEnumerationAccess > mxXTextFieldTypes
Definition: unotxdoc.hxx:162
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unotxdoc.cxx:4188
css::uno::Reference< css::container::XNameAccess > mxXTextTables
Definition: unotxdoc.hxx:166
css::uno::Reference< css::container::XNameAccess > mxXStyleFamilies
Definition: unotxdoc.hxx:170
virtual void SAL_CALL addPropertyChangeListener(const OUString &aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener > &xListener) override
Definition: unotxdoc.cxx:4255
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: unotxdoc.cxx:4235
css::uno::Reference< css::uno::XInterface > GetDrawTable(SwCreateDrawTable nWhich)
Definition: unotxdoc.cxx:4302
virtual void SAL_CALL removeVetoableChangeListener(const OUString &PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener > &aListener) override
Definition: unotxdoc.cxx:4270
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: unotxdoc.cxx:4285
PointerStyle
const OUString sLinkDisplayName
Definition: unotxdoc.hxx:513
css::uno::Reference< css::container::XNameAccess > mxXEmbeddedObjects
Definition: unotxdoc.hxx:169
SwXLinkTargetSupplier(SwXTextDocument &rxDoc)
Definition: unotxdoc.cxx:3842
css::uno::Reference< css::container::XNameAccess > mxXGraphicObjects
Definition: unotxdoc.hxx:168
css::uno::Reference< css::container::XIndexAccess > mxXNumberingRules
Definition: unotxdoc.hxx:156
SwXDocumentPropertyHelper(SwDoc &rDoc)
Definition: unotxdoc.cxx:4292
rtl::Reference< SwXDocumentPropertyHelper > mxPropertyHelper
Definition: unotxdoc.hxx:181
SwViewOption const m_aOldViewOptions
Definition: unotxdoc.hxx:611
std::unique_ptr< SwPrintUIOptions > m_pPrintUIOptions
Definition: unotxdoc.hxx:183
virtual sal_Bool SAL_CALL hasElements() override
Definition: unotxdoc.cxx:4116
virtual ~SwXLinkTargetSupplier() override
Definition: unotxdoc.cxx:3854
css::uno::Reference< css::style::XAutoStyles > mxXAutoStyles
Definition: unotxdoc.hxx:171
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: unotxdoc.cxx:4172