LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sw/inc - unotxdoc.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 3 7 42.9 %
Date: 2013-07-09 Functions: 7 13 53.8 %
Legend: Lines: hit not hit

          Line data    Source code
       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 SW_UNOTXDOC_HXX
      20             : #define SW_UNOTXDOC_HXX
      21             : 
      22             : #include "swdllapi.h"
      23             : #include <sfx2/sfxbasemodel.hxx>
      24             : 
      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
      70             : 
      71             : #include <unobaseclass.hxx>
      72             : #include <viewopt.hxx>
      73             : 
      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
      76             : 
      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
      81             : 
      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>
     107             : 
     108      345448 : __DEF_IMPLHELPER_EX( 32 )
     109             : 
     110             : class SwDoc;
     111             : class SwDocShell;
     112             : class UnoActionContext;
     113             : class SwXBodyText;
     114             : class SwXDrawPage;
     115             : class SwUnoCrsr;
     116             : class SwXDocumentPropertyHelper;
     117             : class SfxViewFrame;
     118             : class SwPrintUIOptions;
     119             : class SwPrintData;
     120             : class SwRenderData;
     121             : class ViewShell;
     122             : 
     123             : typedef std::deque<UnoActionContext*> ActionContextArr;
     124             : 
     125             : typedef cppu::WeakImplHelper32
     126             : <
     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
     159             : >
     160             : SwXTextDocumentBaseClass;
     161             : 
     162             : class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass,
     163             :     public SvxFmMSFactory,
     164             :     public SfxBaseModel
     165             : {
     166             : private:
     167             :     class Impl;
     168             :     ::sw::UnoImplPtr<Impl> m_pImpl;
     169             : 
     170             :     ActionContextArr        aActionArr;
     171             : 
     172             :     const SfxItemPropertySet* pPropSet;
     173             : 
     174             :     SwDocShell*             pDocShell;
     175             :     sal_Bool                    bObjectValid;
     176             : 
     177             :     SwXDrawPage*            pDrawPage;
     178             :     css::uno::Reference< css::drawing::XDrawPage > *            pxXDrawPage;
     179             : 
     180             :     css::uno::Reference< css::text::XText >                 xBodyText;
     181             :     SwXBodyText*            pBodyText;
     182             :     css::uno::Reference< css::uno::XAggregation >           xNumFmtAgg;
     183             : 
     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;
     202             : 
     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;
     207             : 
     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;
     212             : 
     213             :     SwPrintUIOptions *                              m_pPrintUIOptions;
     214             :     SwRenderData *                               m_pRenderData;
     215             : 
     216             :     void                    GetBodyText();
     217             :     void                    GetNumberFormatter();
     218             : 
     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 );
     223             : 
     224             :     OUString           maBuildId;
     225             : 
     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
     229             :     // is implemented.
     230             :     sal_Bool bApplyPagePrintSettingsFromXPagePrintable;
     231             : 
     232             :     using SfxBaseModel::addEventListener;
     233             :     using SfxBaseModel::removeEventListener;
     234             : 
     235             : protected:
     236             :     virtual ~SwXTextDocument();
     237             : public:
     238             :     SwXTextDocument(SwDocShell* pShell);
     239             : 
     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();
     244             : 
     245             :     //XWeak
     246             :     virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter(  ) throw(css::uno::RuntimeException);
     247             : 
     248             :     virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) throw(css::uno::RuntimeException);
     249             : 
     250             :     static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
     251             : 
     252             :     //XUnoTunnel
     253             :     virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException);
     254             : 
     255             :     //XTextDocument
     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 );
     258             : 
     259             :     //XModel
     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);
     271             : 
     272             :     //XComponent
     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 );
     276             : 
     277             :     //XCloseable
     278             :     virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw (css::util::CloseVetoException, css::uno::RuntimeException);
     279             : 
     280             :     //XLineNumberingProperties
     281             :     virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getLineNumberingProperties(void) throw( css::uno::RuntimeException );
     282             : 
     283             :     //XChapterNumberingSupplier
     284             :     virtual css::uno::Reference< css::container::XIndexReplace >  SAL_CALL getChapterNumberingRules(void) throw( css::uno::RuntimeException );
     285             : 
     286             :     //XNumberingRulesSupplier
     287             :     virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getNumberingRules() throw (css::uno::RuntimeException);
     288             : 
     289             :     //XFootnotesSupplier
     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 );
     292             : 
     293             :     //XEndnotesSupplier
     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 );
     296             : 
     297             :     //XReplaceable
     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 );
     300             : 
     301             :     //XSearchable
     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 );
     306             : 
     307             :     //XPagePrintable
     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 );
     311             : 
     312             :     //XReferenceMarksSupplier
     313             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getReferenceMarks(void) throw( css::uno::RuntimeException );
     314             : 
     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 );
     318             : 
     319             :     // css::text::XTextEmbeddedObjectsSupplier
     320             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getEmbeddedObjects(void) throw( css::uno::RuntimeException );
     321             : 
     322             :     // css::text::XBookmarksSupplier
     323             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getBookmarks(void) throw( css::uno::RuntimeException );
     324             : 
     325             :     // css::text::XTextSectionsSupplier
     326             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getTextSections(void) throw( css::uno::RuntimeException );
     327             : 
     328             :     // css::text::XTextTablesSupplier
     329             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getTextTables(void) throw( css::uno::RuntimeException );
     330             : 
     331             :     // css::text::XTextGraphicObjectsSupplier
     332             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getGraphicObjects(void) throw( css::uno::RuntimeException );
     333             : 
     334             :     // css::text::XTextFramesSupplier
     335             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getTextFrames(void) throw( css::uno::RuntimeException );
     336             : 
     337             :     //XStyleFamiliesSupplier
     338             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getStyleFamilies(void) throw( css::uno::RuntimeException );
     339             : 
     340             :     //XAutoStylesSupplier
     341             :     virtual css::uno::Reference< css::style::XAutoStyles > SAL_CALL getAutoStyles(  ) throw (css::uno::RuntimeException);
     342             : 
     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 );
     351             : 
     352             :     //XServiceInfo
     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 );
     356             : 
     357             :     // css::drawing::XDrawPageSupplier
     358             :     virtual css::uno::Reference< css::drawing::XDrawPage >  SAL_CALL getDrawPage(void) throw( css::uno::RuntimeException );
     359             : 
     360             :     // css::text::XDocumentIndexesSupplier
     361             :     virtual css::uno::Reference< css::container::XIndexAccess >  SAL_CALL getDocumentIndexes(void) throw( css::uno::RuntimeException );
     362             : 
     363             :     //XPropertySet
     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);
     371             : 
     372             :     //XPropertyState
     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);
     377             : 
     378             :     //XLinkTargetSupplier
     379             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getLinks(void) throw( css::uno::RuntimeException );
     380             : 
     381             :     //XRedlinesSupplier
     382             :     virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getRedlines(  ) throw(css::uno::RuntimeException);
     383             : 
     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 );
     388             : 
     389             :     // css::util::XLinkUpdate,
     390             :     virtual void SAL_CALL updateLinks(  ) throw(css::uno::RuntimeException);
     391             : 
     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);
     396             : 
     397             :     // css::xforms::XFormsSupplier
     398             :     virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL getXForms(  ) throw (css::uno::RuntimeException);
     399             : 
     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);
     402             : 
     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);
     405             : 
     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);
     408             : 
     409             : 
     410             :     //
     411             :     void                        Invalidate();
     412             :     void                        Reactivate(SwDocShell* pNewDocShell);
     413             :     SwXDocumentPropertyHelper * GetPropertyHelper ();
     414       29365 :     sal_Bool                    IsValid() const {return bObjectValid;}
     415             : 
     416             :     void                        InitNewDoc();
     417             : 
     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,
     421             :                                             sal_Int32& nResult,
     422             :                                             css::uno::Reference< css::uno::XInterface >  xLastResult);
     423             : 
     424             :     SwXDrawPage*                GetDrawPage();
     425        9220 :     SwDocShell*                 GetDocShell() {return pDocShell;}
     426             : 
     427             : 
     428             :     void * SAL_CALL operator new( size_t ) throw();
     429             :     void SAL_CALL operator delete( void * ) throw();
     430             : 
     431             : };
     432             : 
     433             : class SwXLinkTargetSupplier : public cppu::WeakImplHelper2
     434             : <
     435             :     css::container::XNameAccess,
     436             :     css::lang::XServiceInfo
     437             : >
     438             : {
     439             :     SwXTextDocument* pxDoc;
     440             :     String sTables;
     441             :     String sFrames;
     442             :     String sGraphics;
     443             :     String sOLEs;
     444             :     String sSections;
     445             :     String sOutlines;
     446             :     String sBookmarks;
     447             : 
     448             : public:
     449             :     SwXLinkTargetSupplier(SwXTextDocument& rxDoc);
     450             :     ~SwXLinkTargetSupplier();
     451             : 
     452             :     //XNameAccess
     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 );
     456             : 
     457             :     //XElementAccess
     458             :     virtual css::uno::Type SAL_CALL getElementType(  ) throw(css::uno::RuntimeException);
     459             :     virtual sal_Bool SAL_CALL hasElements(  ) throw(css::uno::RuntimeException);
     460             : 
     461             :     //XServiceInfo
     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 );
     465             : 
     466             :     //
     467           0 :     void    Invalidate() {pxDoc = 0;}
     468             : };
     469             : 
     470             : class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper4
     471             : <
     472             :     css::beans::XPropertySet,
     473             :     css::container::XNameAccess,
     474             :     css::lang::XServiceInfo,
     475             :     css::document::XLinkTargetSupplier
     476             : >
     477             : {
     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;
     484             : 
     485             : 
     486             : public:
     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();
     492             : 
     493             :     //XNameAccess
     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 );
     497             : 
     498             :     //XElementAccess
     499             :     virtual css::uno::Type SAL_CALL getElementType(  ) throw(css::uno::RuntimeException);
     500             :     virtual sal_Bool SAL_CALL hasElements(  ) throw(css::uno::RuntimeException);
     501             : 
     502             :     //XPropertySet
     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);
     510             : 
     511             :     //XLinkTargetSupplier
     512             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getLinks(void) throw( css::uno::RuntimeException );
     513             : 
     514             :     //XServiceInfo
     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 );
     518             : 
     519             : };
     520             : 
     521             : class SwXOutlineTarget : public cppu::WeakImplHelper2
     522             : <
     523             :     css::beans::XPropertySet,
     524             :     css::lang::XServiceInfo
     525             : >
     526             : {
     527             :     const SfxItemPropertySet*   pPropSet;
     528             :     String                      sOutlineText;
     529             : 
     530             : public:
     531             :     SwXOutlineTarget(const String& rOutlineText);
     532             :     ~SwXOutlineTarget();
     533             : 
     534             :     //XPropertySet
     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);
     542             : 
     543             :     //XServiceInfo
     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 );
     547             : };
     548             : 
     549             : class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable
     550             : {
     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;
     558             : 
     559             :     SwDoc*  m_pDoc;
     560             : public:
     561             :     SwXDocumentPropertyHelper(SwDoc& rDoc);
     562             :     ~SwXDocumentPropertyHelper();
     563             :     css::uno::Reference<css::uno::XInterface> GetDrawTable(short nWhich);
     564             :     void Invalidate();
     565             : 
     566             :     virtual void onChange();
     567             : };
     568             : 
     569             : 
     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
     577             : {
     578             :     ViewShell *     m_pShell;
     579             :     SwViewOption    m_aOldViewOptions;
     580             : 
     581             : public:
     582             :     SwViewOptionAdjust_Impl( ViewShell& rSh, const SwViewOption &rViewOptions );
     583             :     ~SwViewOptionAdjust_Impl();
     584             :     void AdjustViewOptions( SwPrintData const* const pPrtOptions );
     585           0 :     bool checkShell( const ViewShell& rCompare ) const
     586           0 :     { return &rCompare == m_pShell; }
     587           0 :     void DontTouchThatViewShellItSmellsFunny() { m_pShell = 0; }
     588             : };
     589             : 
     590             : #endif
     591             : 
     592             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10