LCOV - code coverage report
Current view: top level - sw/inc - unotxdoc.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 3 6 50.0 %
Date: 2015-06-13 12:38:46 Functions: 3 5 60.0 %
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 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/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>
      71             : 
      72             : #include <unobaseclass.hxx>
      73             : #include <viewopt.hxx>
      74             : 
      75             : #include <deque>
      76             : 
      77             : class SwDoc;
      78             : class SwDocShell;
      79             : class UnoActionContext;
      80             : class SwXBodyText;
      81             : class SwXDrawPage;
      82             : class SwUnoCrsr;
      83             : class SwXDocumentPropertyHelper;
      84             : class SfxViewFrame;
      85             : class SwPrintUIOptions;
      86             : class SwPrintData;
      87             : class SwRenderData;
      88             : class SwViewShell;
      89             : 
      90             : typedef std::deque<UnoActionContext*> ActionContextArr;
      91             : 
      92             : typedef cppu::WeakImplHelper
      93             : <
      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
     126             : >
     127             : SwXTextDocumentBaseClass;
     128             : 
     129             : class SW_DLLPUBLIC SwXTextDocument : public SwXTextDocumentBaseClass,
     130             :     public SvxFmMSFactory,
     131             :     public SfxBaseModel,
     132             :     public vcl::ITiledRenderable,
     133             :     public ::com::sun::star::tiledrendering::XTiledRenderable
     134             : {
     135             : private:
     136             :     class Impl;
     137             :     ::sw::UnoImplPtr<Impl> m_pImpl;
     138             : 
     139             :     ActionContextArr        aActionArr;
     140             : 
     141             :     const SfxItemPropertySet* pPropSet;
     142             : 
     143             :     SwDocShell*             pDocShell;
     144             :     bool                    bObjectValid;
     145             : 
     146             :     SwXDrawPage*            pDrawPage;
     147             :     css::uno::Reference< css::drawing::XDrawPage > *            pxXDrawPage;
     148             : 
     149             :     css::uno::Reference< css::text::XText >                 xBodyText;
     150             :     SwXBodyText*            pBodyText;
     151             :     css::uno::Reference< css::uno::XAggregation >           xNumFormatAgg;
     152             : 
     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;
     171             : 
     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;
     176             : 
     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;
     181             : 
     182             :     SwPrintUIOptions *                              m_pPrintUIOptions;
     183             :     SwRenderData *                               m_pRenderData;
     184             : 
     185             :     void                    GetBodyText();
     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.
     203             :     bool bApplyPagePrintSettingsFromXPagePrintable;
     204             : 
     205             :     using SfxBaseModel::addEventListener;
     206             :     using SfxBaseModel::removeEventListener;
     207             : 
     208             : protected:
     209             :     virtual ~SwXTextDocument();
     210             : public:
     211             :     SwXTextDocument(SwDocShell* pShell);
     212             : 
     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;
     217             : 
     218             :     //XWeak
     219             :     virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter(  ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     220             : 
     221             :     virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes(  ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     222             : 
     223             :     static const css::uno::Sequence< sal_Int8 > & getUnoTunnelId();
     224             : 
     225             :     //XUnoTunnel
     226             :     virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     227             : 
     228             :     //XTextDocument
     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;
     231             : 
     232             :     //XModel
     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;
     244             : 
     245             :     //XComponent
     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;
     249             : 
     250             :     //XCloseable
     251             :     virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) throw (css::util::CloseVetoException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     252             : 
     253             :     //XLineNumberingProperties
     254             :     virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getLineNumberingProperties() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     255             : 
     256             :     //XChapterNumberingSupplier
     257             :     virtual css::uno::Reference< css::container::XIndexReplace >  SAL_CALL getChapterNumberingRules() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     258             : 
     259             :     //XNumberingRulesSupplier
     260             :     virtual css::uno::Reference< css::container::XIndexAccess > SAL_CALL getNumberingRules() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     261             : 
     262             :     //XFootnotesSupplier
     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;
     265             : 
     266             :     //XEndnotesSupplier
     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;
     269             : 
     270             :     //XReplaceable
     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;
     273             : 
     274             :     //XSearchable
     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;
     279             : 
     280             :     //XPagePrintable
     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;
     284             : 
     285             :     //XReferenceMarksSupplier
     286             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getReferenceMarks() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     287             : 
     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;
     291             : 
     292             :     // css::text::XTextEmbeddedObjectsSupplier
     293             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getEmbeddedObjects() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     294             : 
     295             :     // css::text::XBookmarksSupplier
     296             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getBookmarks() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     297             : 
     298             :     // css::text::XTextSectionsSupplier
     299             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getTextSections() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     300             : 
     301             :     // css::text::XTextTablesSupplier
     302             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getTextTables() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     303             : 
     304             :     // css::text::XTextGraphicObjectsSupplier
     305             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getGraphicObjects() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     306             : 
     307             :     // css::text::XTextFramesSupplier
     308             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getTextFrames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     309             : 
     310             :     //XStyleFamiliesSupplier
     311             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getStyleFamilies() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     312             : 
     313             :     //XAutoStylesSupplier
     314             :     virtual css::uno::Reference< css::style::XAutoStyles > SAL_CALL getAutoStyles(  ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     315             : 
     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;
     324             : 
     325             :     //XServiceInfo
     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;
     329             : 
     330             :     // css::drawing::XDrawPageSupplier
     331             :     virtual css::uno::Reference< css::drawing::XDrawPage >  SAL_CALL getDrawPage() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     332             : 
     333             :     // css::text::XDocumentIndexesSupplier
     334             :     virtual css::uno::Reference< css::container::XIndexAccess >  SAL_CALL getDocumentIndexes() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     335             : 
     336             :     //XPropertySet
     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;
     350             : 
     351             :     //XPropertyState
     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;
     356             : 
     357             :     //XLinkTargetSupplier
     358             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getLinks() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     359             : 
     360             :     //XRedlinesSupplier
     361             :     virtual css::uno::Reference< css::container::XEnumerationAccess > SAL_CALL getRedlines(  ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     362             : 
     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;
     367             : 
     368             :     // css::util::XLinkUpdate,
     369             :     virtual void SAL_CALL updateLinks(  ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     370             : 
     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;
     384             : 
     385             :     // css::xforms::XFormsSupplier
     386             :     virtual css::uno::Reference< css::container::XNameContainer > SAL_CALL getXForms(  ) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     387             : 
     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;
     393             : 
     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;
     396             : 
     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;
     399             : 
     400             :     /// @see vcl::ITiledRenderable::paintTile().
     401             :     virtual void paintTile( VirtualDevice &rDevice,
     402             :                             int nOutputWidth,
     403             :                             int nOutputHeight,
     404             :                             int nTilePosX,
     405             :                             int nTilePosY,
     406             :                             long nTileWidth,
     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::setGraphicSelection().
     421             :     virtual void setGraphicSelection(int nType, int nX, int nY) SAL_OVERRIDE;
     422             :     /// @see vcl::ITiledRenderable::resetSelection().
     423             :     virtual void resetSelection() SAL_OVERRIDE;
     424             : 
     425             :     // ::com::sun::star::tiledrendering::XTiledRenderable
     426             :     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;
     427             : 
     428             :     void                        Invalidate();
     429             :     void                        Reactivate(SwDocShell* pNewDocShell);
     430             :     SwXDocumentPropertyHelper * GetPropertyHelper ();
     431      227898 :     bool                    IsValid() const {return bObjectValid;}
     432             : 
     433             :     void                        InitNewDoc();
     434             : 
     435             :     SwUnoCrsr* CreateCursorForSearch(css::uno::Reference< css::text::XTextCursor > & xCrsr);
     436             :     SwUnoCrsr* FindAny(const css::uno::Reference< css::util::XSearchDescriptor > & xDesc,
     437             :                                             css::uno::Reference< css::text::XTextCursor > & xCrsr, bool bAll,
     438             :                                             sal_Int32& nResult,
     439             :                                             css::uno::Reference< css::uno::XInterface >  xLastResult);
     440             : 
     441       72925 :     SwDocShell*                 GetDocShell() {return pDocShell;}
     442             : 
     443             :     void * SAL_CALL operator new( size_t ) throw();
     444             :     void SAL_CALL operator delete( void * ) throw();
     445             : 
     446             : };
     447             : 
     448             : class SwXLinkTargetSupplier : public cppu::WeakImplHelper
     449             : <
     450             :     css::container::XNameAccess,
     451             :     css::lang::XServiceInfo
     452             : >
     453             : {
     454             :     SwXTextDocument* pxDoc;
     455             :     OUString sTables;
     456             :     OUString sFrames;
     457             :     OUString sGraphics;
     458             :     OUString sOLEs;
     459             :     OUString sSections;
     460             :     OUString sOutlines;
     461             :     OUString sBookmarks;
     462             : 
     463             : public:
     464             :     SwXLinkTargetSupplier(SwXTextDocument& rxDoc);
     465             :     virtual ~SwXLinkTargetSupplier();
     466             : 
     467             :     //XNameAccess
     468             :     virtual css::uno::Any SAL_CALL getByName(const OUString& Name)  throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     469             :     virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     470             :     virtual sal_Bool SAL_CALL hasByName(const OUString& Name) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     471             : 
     472             :     //XElementAccess
     473             :     virtual css::uno::Type SAL_CALL getElementType(  ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     474             :     virtual sal_Bool SAL_CALL hasElements(  ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     475             : 
     476             :     //XServiceInfo
     477             :     virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     478             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     479             :     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     480             : 
     481           0 :     void    Invalidate() {pxDoc = 0;}
     482             : };
     483             : 
     484             : class SwXLinkNameAccessWrapper : public cppu::WeakImplHelper
     485             : <
     486             :     css::beans::XPropertySet,
     487             :     css::container::XNameAccess,
     488             :     css::lang::XServiceInfo,
     489             :     css::document::XLinkTargetSupplier
     490             : >
     491             : {
     492             :     css::uno::Reference< css::container::XNameAccess >    xRealAccess;
     493             :     const SfxItemPropertySet*                                                       pPropSet;
     494             :     const OUString                                                                    sLinkSuffix;
     495             :     const OUString                                                                    sLinkDisplayName;
     496             :     css::uno::Reference< css::text::XTextDocument >         xDoc;
     497             :     SwXTextDocument*                                                                pxDoc;
     498             : 
     499             : public:
     500             :     SwXLinkNameAccessWrapper(css::uno::Reference< css::container::XNameAccess >  xAccess,
     501             :             const OUString& rLinkDisplayName, const OUString& sSuffix);
     502             :     SwXLinkNameAccessWrapper(SwXTextDocument& rxDoc,
     503             :             const OUString& rLinkDisplayName, const OUString& sSuffix);
     504             :     virtual ~SwXLinkNameAccessWrapper();
     505             : 
     506             :     //XNameAccess
     507             :     virtual css::uno::Any SAL_CALL getByName(const OUString& Name)  throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     508             :     virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     509             :     virtual sal_Bool SAL_CALL hasByName(const OUString& Name) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     510             : 
     511             :     //XElementAccess
     512             :     virtual css::uno::Type SAL_CALL getElementType(  ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     513             :     virtual sal_Bool SAL_CALL hasElements(  ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     514             : 
     515             :     //XPropertySet
     516             :     virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     517             :     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;
     518             :     virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     519             :     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;
     520             :     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;
     521             :     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;
     522             :     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;
     523             : 
     524             :     //XLinkTargetSupplier
     525             :     virtual css::uno::Reference< css::container::XNameAccess >  SAL_CALL getLinks() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     526             : 
     527             :     //XServiceInfo
     528             :     virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     529             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     530             :     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     531             : 
     532             : };
     533             : 
     534             : class SwXOutlineTarget : public cppu::WeakImplHelper
     535             : <
     536             :     css::beans::XPropertySet,
     537             :     css::lang::XServiceInfo
     538             : >
     539             : {
     540             :     const SfxItemPropertySet*   pPropSet;
     541             :     OUString                      sOutlineText;
     542             : 
     543             : public:
     544             :     SwXOutlineTarget(const OUString& rOutlineText);
     545             :     virtual ~SwXOutlineTarget();
     546             : 
     547             :     //XPropertySet
     548             :     virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     549             :     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;
     550             :     virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw(css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
     551             :     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;
     552             :     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;
     553             :     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;
     554             :     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;
     555             : 
     556             :     //XServiceInfo
     557             :     virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     558             :     virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     559             :     virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     560             : };
     561             : 
     562             : class SwXDocumentPropertyHelper : public SvxUnoForbiddenCharsTable
     563             : {
     564             :     css::uno::Reference < css::uno::XInterface > xDashTable;
     565             :     css::uno::Reference < css::uno::XInterface > xGradientTable;
     566             :     css::uno::Reference < css::uno::XInterface > xHatchTable;
     567             :     css::uno::Reference < css::uno::XInterface > xBitmapTable;
     568             :     css::uno::Reference < css::uno::XInterface > xTransGradientTable;
     569             :     css::uno::Reference < css::uno::XInterface > xMarkerTable;
     570             :     css::uno::Reference < css::uno::XInterface > xDrawDefaults;
     571             : 
     572             :     SwDoc*  m_pDoc;
     573             : public:
     574             :     SwXDocumentPropertyHelper(SwDoc& rDoc);
     575             :     virtual ~SwXDocumentPropertyHelper();
     576             :     css::uno::Reference<css::uno::XInterface> GetDrawTable(short nWhich);
     577             :     void Invalidate();
     578             : 
     579             :     virtual void onChange() SAL_OVERRIDE;
     580             : };
     581             : 
     582             : // The class SwViewOptionAdjust_Impl is used to adjust the SwViewOption of
     583             : // the current SwViewShell so that fields are not printed as commands and
     584             : // hidden characters are always invisible. Hidden text and place holders
     585             : // should be printed according to the current print options.
     586             : // After printing the view options are restored
     587             : class SwViewOptionAdjust_Impl
     588             : {
     589             :     SwViewShell *     m_pShell;
     590             :     SwViewOption    m_aOldViewOptions;
     591             : public:
     592             :     SwViewOptionAdjust_Impl( SwViewShell& rSh, const SwViewOption &rViewOptions );
     593             :     ~SwViewOptionAdjust_Impl();
     594             :     void AdjustViewOptions( SwPrintData const* const pPrtOptions );
     595           0 :     bool checkShell( const SwViewShell& rCompare ) const
     596           0 :     { return &rCompare == m_pShell; }
     597           1 :     void DontTouchThatViewShellItSmellsFunny() { m_pShell = 0; }
     598             : };
     599             : 
     600             : #endif
     601             : 
     602             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11