LCOV - code coverage report
Current view: top level - include/xmloff - txtparae.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 51 0.0 %
Date: 2014-04-14 Functions: 0 23 0.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             : 
      20             : #ifndef INCLUDED_XMLOFF_TXTPARAE_HXX
      21             : #define INCLUDED_XMLOFF_TXTPARAE_HXX
      22             : 
      23             : #include <sal/config.h>
      24             : #include <xmloff/dllapi.h>
      25             : #include <rtl/ustring.hxx>
      26             : #include <com/sun/star/uno/Reference.h>
      27             : #include <com/sun/star/uno/Sequence.h>
      28             : #include <com/sun/star/beans/PropertyValue.hpp>
      29             : #include <xmloff/uniref.hxx>
      30             : #include <xmloff/xmlexppr.hxx>
      31             : #include <xmloff/styleexp.hxx>
      32             : #include <xmloff/xmltoken.hxx>
      33             : #include <xmloff/SinglePropertySetInfoCache.hxx>
      34             : #include <vector>
      35             : #include <boost/scoped_ptr.hpp>
      36             : 
      37             : class XMLTextListsHelper;
      38             : class SvXMLExport;
      39             : class SvXMLAutoStylePoolP;
      40             : class XMLTextFieldExport;
      41             : class XMLTextNumRuleInfo;
      42             : class XMLTextListAutoStylePool;
      43             : class XMLSectionExport;
      44             : class XMLIndexMarkExport;
      45             : class XMLRedlineExport;
      46             : struct XMLPropertyState;
      47             : class MultiPropertySetHelper;
      48             : 
      49             : namespace com { namespace sun { namespace star
      50             : {
      51             :     namespace beans { class XPropertySet; class XPropertyState;
      52             :                       class XPropertySetInfo; }
      53             :     namespace container { class XEnumerationAccess; class XEnumeration; class XIndexAccess; }
      54             :     namespace text { class XTextContent; class XTextRange; class XText;
      55             :                      class XFootnote; class XTextFrame; class XTextSection;
      56             :                      class XTextField;
      57             :                      class XDocumentIndex; class XTextShapesSupplier; }
      58             : } } }
      59             : 
      60             : namespace xmloff
      61             : {
      62             :     class OFormLayerXMLExport;
      63             :     class BoundFrameSets;
      64             : }
      65             : 
      66             : class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport
      67             : {
      68             :     struct Impl;
      69             :     ::boost::scoped_ptr<Impl> m_pImpl;
      70             : 
      71             : //  SvXMLExport& rExport;
      72             :     SvXMLAutoStylePoolP& rAutoStylePool;
      73             :     UniReference < SvXMLExportPropertyMapper > xParaPropMapper;
      74             :     UniReference < SvXMLExportPropertyMapper > xTextPropMapper;
      75             :     UniReference < SvXMLExportPropertyMapper > xFramePropMapper;
      76             :     UniReference < SvXMLExportPropertyMapper > xAutoFramePropMapper;
      77             :     UniReference < SvXMLExportPropertyMapper > xSectionPropMapper;
      78             :     UniReference < SvXMLExportPropertyMapper > xRubyPropMapper;
      79             : 
      80             :     const ::std::auto_ptr< ::xmloff::BoundFrameSets > pBoundFrameSets;
      81             :     XMLTextFieldExport          *pFieldExport;
      82             :     std::vector<OUString>  *pListElements;
      83             :     XMLTextListAutoStylePool    *pListAutoPool;
      84             :     XMLSectionExport            *pSectionExport;
      85             :     XMLIndexMarkExport          *pIndexMarkExport;
      86             : 
      87             :     /// may be NULL (if no redlines should be exported; e.g. in block mode)
      88             :     XMLRedlineExport            *pRedlineExport;
      89             :     std::vector<OUString>       *pHeadingStyles;
      90             : 
      91             :     bool                        bProgress;
      92             : 
      93             :     bool                        bBlock;
      94             : 
      95             :     // keep track of open rubies
      96             :     OUString                    sOpenRubyText;
      97             :     OUString                    sOpenRubyCharStyle;
      98             :     bool                        bOpenRuby;
      99             : 
     100             :     XMLTextListsHelper* mpTextListsHelper;
     101             :     ::std::vector< XMLTextListsHelper* > maTextListsHelperStack;
     102             : 
     103             :     enum FrameType { FT_TEXT, FT_GRAPHIC, FT_EMBEDDED, FT_SHAPE };
     104             : public:
     105             : 
     106             :     enum FieldmarkType { NONE, TEXT, CHECK }; // Used for simulating fieldmarks in OpenDocument 1.n Strict (for n <= 2). CHECK currently ignored.
     107             : 
     108             : 
     109             :     void exportTextRangeSpan(
     110             :             const ::com::sun::star::uno::Reference< com::sun::star::text::XTextRange > & rTextRange,
     111             :             ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > & xPropSet,
     112             :             ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > & xPropSetInfo,
     113             :             const bool bIsUICharStyle,
     114             :             const bool bHasAutoStyle,
     115             :             const OUString& sStyle,
     116             :             bool& rPrevCharIsSpace,
     117             :             FieldmarkType& openFieldMark);
     118             : 
     119             : protected:
     120             : 
     121             :     const OUString sActualSize;
     122             :     // Implement Title/Description Elements UI (#i73249#)
     123             :     const OUString sTitle;
     124             :     const OUString sDescription;
     125             :     const OUString sAnchorCharStyleName;
     126             :     const OUString sAnchorPageNo;
     127             :     const OUString sAnchorType;
     128             :     const OUString sBeginNotice;
     129             :     const OUString sBookmark;
     130             :     const OUString sCategory;
     131             :     const OUString sChainNextName;
     132             :     const OUString sCharStyleName;
     133             :     const OUString sCharStyleNames;
     134             :     const OUString sContourPolyPolygon;
     135             :     const OUString sDocumentIndex;
     136             :     const OUString sDocumentIndexMark;
     137             :     const OUString sEndNotice;
     138             :     const OUString sFootnote;
     139             :     const OUString sFootnoteCounting;
     140             :     const OUString sFrame;
     141             :     const OUString sFrameHeightAbsolute;
     142             :     const OUString sFrameHeightPercent;
     143             :     const OUString sFrameStyleName;
     144             :     const OUString sFrameWidthAbsolute;
     145             :     const OUString sFrameWidthPercent;
     146             :     const OUString sGraphicFilter;
     147             :     const OUString sGraphicRotation;
     148             :     const OUString sGraphicURL;
     149             :     const OUString sReplacementGraphicURL;
     150             :     const OUString sHeight;
     151             :     const OUString sHoriOrient;
     152             :     const OUString sHoriOrientPosition;
     153             :     const OUString sHyperLinkName;
     154             :     const OUString sHyperLinkTarget;
     155             :     const OUString sHyperLinkURL;
     156             :     const OUString sIsAutomaticContour;
     157             :     const OUString sIsCollapsed;
     158             :     const OUString sIsPixelContour;
     159             :     const OUString sIsStart;
     160             :     const OUString sIsSyncHeightToWidth;
     161             :     const OUString sIsSyncWidthToHeight;
     162             :     const OUString sNumberingRules;
     163             :     const OUString sNumberingType;
     164             :     const OUString sPageDescName;
     165             :     const OUString sPageStyleName;
     166             :     const OUString sParaChapterNumberingLevel;
     167             :     const OUString sParaConditionalStyleName;
     168             :     const OUString sParagraphService;
     169             :     const OUString sParaStyleName;
     170             :     const OUString sPositionEndOfDoc;
     171             :     const OUString sPrefix;
     172             :     const OUString sRedline;
     173             :     const OUString sReferenceId;
     174             :     const OUString sReferenceMark;
     175             :     const OUString sRelativeHeight;
     176             :     const OUString sRelativeWidth;
     177             :     const OUString sRuby;
     178             :     const OUString sRubyAdjust;
     179             :     const OUString sRubyCharStyleName;
     180             :     const OUString sRubyText;
     181             :     const OUString sServerMap;
     182             :     const OUString sShapeService;
     183             :     const OUString sSizeType;
     184             :     const OUString sSoftPageBreak;
     185             :     const OUString sStartAt;
     186             :     const OUString sSuffix;
     187             :     const OUString sTableService;
     188             :     const OUString sText;
     189             :     const OUString sTextContentService;
     190             :     const OUString sTextEmbeddedService;
     191             :     const OUString sTextEndnoteService;
     192             :     const OUString sTextField;
     193             :     const OUString sTextFieldService;
     194             :     const OUString sTextFrameService;
     195             :     const OUString sTextGraphicService;
     196             :     const OUString sTextPortionType;
     197             :     const OUString sTextSection;
     198             :     const OUString sUnvisitedCharStyleName;
     199             :     const OUString sVertOrient;
     200             :     const OUString sVertOrientPosition;
     201             :     const OUString sVisitedCharStyleName;
     202             :     const OUString sWidth;
     203             :     const OUString sWidthType;
     204             :     const OUString sTextFieldStart;
     205             :     const OUString sTextFieldEnd;
     206             :     const OUString sTextFieldStartEnd;
     207             : 
     208             :     SinglePropertySetInfoCache aCharStyleNamesPropInfoCache;
     209             : 
     210           0 :     SvXMLAutoStylePoolP& GetAutoStylePool() { return rAutoStylePool; }
     211           0 :     const SvXMLAutoStylePoolP& GetAutoStylePool() const { return rAutoStylePool; }
     212             : 
     213             : public:
     214           0 :     UniReference < SvXMLExportPropertyMapper > GetParaPropMapper() const
     215             :     {
     216           0 :         return xParaPropMapper;
     217             :     }
     218             : 
     219           0 :     UniReference < SvXMLExportPropertyMapper > GetTextPropMapper() const
     220             :     {
     221           0 :         return xTextPropMapper;
     222             :     }
     223             : 
     224           0 :     UniReference < SvXMLExportPropertyMapper > GetFramePropMapper() const
     225             :     {
     226           0 :         return xFramePropMapper;
     227             :     }
     228           0 :     UniReference < SvXMLExportPropertyMapper > GetAutoFramePropMapper() const
     229             :     {
     230           0 :         return xAutoFramePropMapper;
     231             :     }
     232           0 :     UniReference < SvXMLExportPropertyMapper > GetSectionPropMapper() const
     233             :     {
     234           0 :         return xSectionPropMapper;
     235             :     }
     236           0 :     UniReference < SvXMLExportPropertyMapper > GetRubyPropMapper() const
     237             :     {
     238           0 :         return xRubyPropMapper;
     239             :     }
     240             : 
     241             :     OUString FindTextStyleAndHyperlink(
     242             :             const ::com::sun::star::uno::Reference <
     243             :                 ::com::sun::star::beans::XPropertySet > & rPropSet,
     244             :             bool& rbHyperlink,
     245             :             bool& rbHasCharStyle,
     246             :             bool& rbHasAutoStyle,
     247             :             const XMLPropertyState** pAddState = NULL) const;
     248             :     bool addHyperlinkAttributes(
     249             :         const ::com::sun::star::uno::Reference <
     250             :                 ::com::sun::star::beans::XPropertySet > & rPropSet,
     251             :         const ::com::sun::star::uno::Reference <
     252             :                 ::com::sun::star::beans::XPropertyState > & rPropState,
     253             :         const ::com::sun::star::uno::Reference <
     254             :                 ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
     255             : 
     256             :     void exportTextRangeEnumeration(
     257             :         const ::com::sun::star::uno::Reference <
     258             :             ::com::sun::star::container::XEnumeration > & rRangeEnum,
     259             :         bool bAutoStyles, bool bProgress,
     260             :         bool bPrvChrIsSpc = true );
     261             : 
     262             : protected:
     263             : 
     264             :     sal_Int32 addTextFrameAttributes(
     265             :         const ::com::sun::star::uno::Reference <
     266             :                 ::com::sun::star::beans::XPropertySet >& rPropSet,
     267             :         bool bShape,
     268             :         OUString *pMinHeightValue = 0,
     269             :         OUString *pMinWidthValue = 0 );
     270             : 
     271             :     virtual void exportStyleAttributes(
     272             :         const ::com::sun::star::uno::Reference<
     273             :                 ::com::sun::star::style::XStyle > & rStyle ) SAL_OVERRIDE;
     274             : 
     275             :     void exportPageFrames( bool bAutoStyles, bool bProgress );
     276             :     void exportFrameFrames( bool bAutoStyles, bool bProgress,
     277             :             const ::com::sun::star::uno::Reference <
     278             :                     ::com::sun::star::text::XTextFrame > *pParentTxtFrame = 0 );
     279             : 
     280             :     void exportNumStyles( bool bUsed );
     281             : 
     282             :     void exportText(
     283             :         const ::com::sun::star::uno::Reference <
     284             :             ::com::sun::star::text::XText > & rText,
     285             :         bool bAutoStyles, bool bProgress, bool bExportParagraph );
     286             : 
     287             :     void exportText(
     288             :         const ::com::sun::star::uno::Reference <
     289             :             ::com::sun::star::text::XText > & rText,
     290             :         const ::com::sun::star::uno::Reference <
     291             :             ::com::sun::star::text::XTextSection > & rBaseSection,
     292             :         bool bAutoStyles, bool bProgress, bool bExportParagraph );
     293             : 
     294             :     bool exportTextContentEnumeration(
     295             :         const ::com::sun::star::uno::Reference <
     296             :             ::com::sun::star::container::XEnumeration > & rContentEnum,
     297             :         bool bAutoStyles,
     298             :         const ::com::sun::star::uno::Reference <
     299             :             ::com::sun::star::text::XTextSection > & rBaseSection,
     300             :         bool bProgress,
     301             :         bool bExportParagraph = true,
     302             :         const ::com::sun::star::uno::Reference <
     303             :             ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0,
     304             :         bool bExportLevels = true );
     305             :     void exportParagraph(
     306             :         const ::com::sun::star::uno::Reference <
     307             :             ::com::sun::star::text::XTextContent > & rTextContent,
     308             :         bool bAutoStyles, bool bProgress,
     309             :         bool bExportParagraph,
     310             :         MultiPropertySetHelper& rPropSetHelper);
     311             :     virtual void exportTable(
     312             :         const ::com::sun::star::uno::Reference <
     313             :             ::com::sun::star::text::XTextContent > & rTextContent,
     314             :         bool bAutoStyles, bool bProgress );
     315             : 
     316             :     void exportTextField(
     317             :         const ::com::sun::star::uno::Reference <
     318             :             ::com::sun::star::text::XTextRange > & rTextRange,
     319             :         bool bAutoStyles, bool bProgress );
     320             : 
     321             :     void exportTextField(
     322             :         const ::com::sun::star::uno::Reference <
     323             :             ::com::sun::star::text::XTextField> & xTextField,
     324             :         const bool bAutoStyles, const bool bProgress,
     325             :         const bool bRecursive );
     326             : 
     327             :     void exportAnyTextFrame(
     328             :         const ::com::sun::star::uno::Reference <
     329             :             ::com::sun::star::text::XTextContent > & rTextContent,
     330             :         FrameType eTxpe,
     331             :         bool bAutoStyles, bool bProgress, bool bExportContent,
     332             :         const ::com::sun::star::uno::Reference <
     333             :             ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
     334             :     void _exportTextFrame(
     335             :         const ::com::sun::star::uno::Reference <
     336             :             ::com::sun::star::beans::XPropertySet > & rPropSet,
     337             :         const ::com::sun::star::uno::Reference <
     338             :             ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo,
     339             :         bool bProgress );
     340             :     inline void exportTextFrame(
     341             :         const ::com::sun::star::uno::Reference <
     342             :             ::com::sun::star::text::XTextContent > & rTextContent,
     343             :         bool bAutoStyles, bool bProgress, bool bExportContent,
     344             :         const ::com::sun::star::uno::Reference <
     345             :             ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
     346             :     inline void exportShape(
     347             :         const ::com::sun::star::uno::Reference <
     348             :             ::com::sun::star::text::XTextContent > & rTextContent,
     349             :         bool bAutoStyles,
     350             :         const ::com::sun::star::uno::Reference <
     351             :             ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0  );
     352             : 
     353             :     void exportContour(
     354             :         const ::com::sun::star::uno::Reference <
     355             :             ::com::sun::star::beans::XPropertySet > & rPropSet,
     356             :         const ::com::sun::star::uno::Reference <
     357             :             ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
     358             :     void _exportTextGraphic(
     359             :         const ::com::sun::star::uno::Reference <
     360             :             ::com::sun::star::beans::XPropertySet > & rPropSet,
     361             :         const ::com::sun::star::uno::Reference <
     362             :             ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
     363             :     inline void exportTextGraphic(
     364             :         const ::com::sun::star::uno::Reference <
     365             :             ::com::sun::star::text::XTextContent > & rTextContent,
     366             :         bool bAutoStyles,
     367             :         const ::com::sun::star::uno::Reference <
     368             :             ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0  );
     369             : 
     370             :     virtual void _collectTextEmbeddedAutoStyles(
     371             :         const ::com::sun::star::uno::Reference <
     372             :             ::com::sun::star::beans::XPropertySet > & rPropSet );
     373             :     virtual void _exportTextEmbedded(
     374             :         const ::com::sun::star::uno::Reference <
     375             :             ::com::sun::star::beans::XPropertySet > & rPropSet,
     376             :         const ::com::sun::star::uno::Reference <
     377             :             ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
     378             :     inline void exportTextEmbedded(
     379             :         const ::com::sun::star::uno::Reference <
     380             :             ::com::sun::star::text::XTextContent > & rTextContent,
     381             :         bool bAutoStyles,
     382             :         const ::com::sun::star::uno::Reference <
     383             :             ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0  );
     384             :     virtual void setTextEmbeddedGraphicURL(
     385             :         const ::com::sun::star::uno::Reference <
     386             :                 ::com::sun::star::beans::XPropertySet >& rPropSet,
     387             :         OUString& rStreamName ) const;
     388             : 
     389             :     /// export a footnote and styles
     390             :     void exportTextFootnote(
     391             :         const ::com::sun::star::uno::Reference<
     392             :             ::com::sun::star::beans::XPropertySet > & rPropSet,
     393             :         const OUString& sString,
     394             :         bool bAutoStyles, bool bProgress );
     395             : 
     396             :     /// helper for exportTextFootnote
     397             :     void exportTextFootnoteHelper(
     398             :         const ::com::sun::star::uno::Reference<
     399             :             ::com::sun::star::text::XFootnote > & rPropSet,
     400             :         const ::com::sun::star::uno::Reference<
     401             :             ::com::sun::star::text::XText> & rText,
     402             :         const OUString& sString,
     403             :         bool bAutoStyles,
     404             :         bool bIsEndnote, bool bProgress );
     405             : 
     406             :     /// export footnote and endnote configuration elements
     407             :     void exportTextFootnoteConfiguration();
     408             : 
     409             :     void exportTextFootnoteConfigurationHelper(
     410             :         const ::com::sun::star::uno::Reference<
     411             :             ::com::sun::star::beans::XPropertySet> & rFootnoteSupplier,
     412             :         bool bIsEndnote);
     413             : 
     414             :     void exportTextMark(
     415             :         const ::com::sun::star::uno::Reference<
     416             :             ::com::sun::star::beans::XPropertySet> & xPropSet,
     417             :         const OUString& rProperty,
     418             :         const enum ::xmloff::token::XMLTokenEnum pElements[],
     419             :         bool bAutoStyles);
     420             : 
     421             :     void exportIndexMark(
     422             :         const ::com::sun::star::uno::Reference<
     423             :             ::com::sun::star::beans::XPropertySet> & rPropSet,
     424             :         bool bAutoStyles);
     425             : 
     426             :     void exportSoftPageBreak(
     427             :         const ::com::sun::star::uno::Reference<
     428             :             ::com::sun::star::beans::XPropertySet> & rPropSet,
     429             :         bool bAutoStyles);
     430             : 
     431             :     void exportTextRange(
     432             :         const ::com::sun::star::uno::Reference <
     433             :             ::com::sun::star::text::XTextRange > & rTextRange,
     434             :         bool bAutoStyles,
     435             :         bool& rPrevCharWasSpace,
     436             :         FieldmarkType& openFieldmarkType );
     437             : 
     438             :     void exportListChange( const XMLTextNumRuleInfo& rPrvInfo,
     439             :                            const XMLTextNumRuleInfo& rNextInfo );
     440             : 
     441             :     /// check if current section or current list has changed;
     442             :     /// calls exortListChange as appropriate
     443             :     void exportListAndSectionChange(
     444             :         ::com::sun::star::uno::Reference <
     445             :             ::com::sun::star::text::XTextSection > & rOldSection,
     446             :         const ::com::sun::star::uno::Reference <
     447             :             ::com::sun::star::text::XTextSection > & rNewSection,
     448             :         const XMLTextNumRuleInfo& rOldList,
     449             :         const XMLTextNumRuleInfo& rNewList,
     450             :         bool bAutoStyles );
     451             : 
     452             :     /// overload for exportListAndSectionChange;
     453             :     /// takes new content rather than new section.
     454             :     void exportListAndSectionChange(
     455             :         ::com::sun::star::uno::Reference <
     456             :             ::com::sun::star::text::XTextSection > & rOldSection,
     457             :         const ::com::sun::star::uno::Reference <
     458             :             ::com::sun::star::text::XTextContent > & rNewContent,
     459             :         const XMLTextNumRuleInfo& rOldList,
     460             :         const XMLTextNumRuleInfo& rNewList,
     461             :         bool bAutoStyles );
     462             :     void exportListAndSectionChange(
     463             :         ::com::sun::star::uno::Reference <
     464             :             ::com::sun::star::text::XTextSection > & rOldSection,
     465             :         MultiPropertySetHelper& rPropSetHelper,
     466             :         sal_Int16 nTextSectionId,
     467             :         const ::com::sun::star::uno::Reference <
     468             :             ::com::sun::star::text::XTextContent > & rNewContent,
     469             :         const XMLTextNumRuleInfo& rOldList,
     470             :         const XMLTextNumRuleInfo& rNewList,
     471             :         bool bAutoStyles );
     472             : 
     473             :     /// export a redline text portion
     474             :     void exportChange(
     475             :         const ::com::sun::star::uno::Reference <
     476             :             ::com::sun::star::beans::XPropertySet > & rPropSet,
     477             :         bool bAutoStyle);
     478             : 
     479             :     /// export a ruby
     480             :     void exportRuby(
     481             :         const ::com::sun::star::uno::Reference<
     482             :             ::com::sun::star::beans::XPropertySet> & rPortionPropSet,
     483             :         bool bAutoStyles );
     484             : 
     485             :     /// export a text:meta
     486             :     void exportMeta(
     487             :         const ::com::sun::star::uno::Reference<
     488             :             ::com::sun::star::beans::XPropertySet> & i_xPortion,
     489             :         bool i_bAutoStyles, bool i_isProgress );
     490             : 
     491             : public:
     492             : 
     493             :     XMLTextParagraphExport(
     494             :             SvXMLExport& rExp,
     495             :                SvXMLAutoStylePoolP & rASP
     496             :                           );
     497             :     virtual ~XMLTextParagraphExport();
     498             : 
     499             :     /// add autostyle for specified family
     500             :     void Add(
     501             :         sal_uInt16 nFamily,
     502             :         MultiPropertySetHelper& rPropSetHelper,
     503             :         const ::com::sun::star::uno::Reference <
     504             :             ::com::sun::star::beans::XPropertySet > & rPropSet,
     505             :         const XMLPropertyState** pAddState = NULL );
     506             :     void Add(
     507             :         sal_uInt16 nFamily,
     508             :         const ::com::sun::star::uno::Reference <
     509             :             ::com::sun::star::beans::XPropertySet > & rPropSet,
     510             :         const XMLPropertyState** pAddState = NULL, bool bDontSeek = false );
     511             : 
     512             :     /// find style name for specified family and parent
     513             :     OUString Find(
     514             :         sal_uInt16 nFamily,
     515             :         const ::com::sun::star::uno::Reference <
     516             :             ::com::sun::star::beans::XPropertySet > & rPropSet,
     517             :         const OUString& rParent,
     518             :         const XMLPropertyState** pAddState = NULL ) const;
     519             : 
     520             :     static SvXMLExportPropertyMapper *CreateShapeExtPropMapper(
     521             :                                                 SvXMLExport& rExport );
     522             :     static SvXMLExportPropertyMapper *CreateCharExtPropMapper(
     523             :                                                 SvXMLExport& rExport);
     524             :     static SvXMLExportPropertyMapper *CreateParaExtPropMapper(
     525             :                                                 SvXMLExport& rExport);
     526             :     static SvXMLExportPropertyMapper *CreateParaDefaultExtPropMapper(
     527             :                                                 SvXMLExport& rExport);
     528             : 
     529             :     // This methods exports all (or all used) styles
     530             :     void exportTextStyles( bool bUsed
     531             :                            , bool bProg = false
     532             :                          );
     533             : 
     534             :     /// This method exports (text field) declarations etc.
     535             :     void exportTextDeclarations();
     536             : 
     537             :     /// export the (text field) declarations for a particular XText
     538             :     void exportTextDeclarations(
     539             :         const ::com::sun::star::uno::Reference <
     540             :             ::com::sun::star::text::XText > & rText );
     541             : 
     542             :     /// true: export only those declarations that are used;
     543             :     /// false: export all declarations
     544             :     void exportUsedDeclarations( bool bOnlyUsed );
     545             : 
     546             :     /// Export the list of change information (enclosed by <tracked-changes>)
     547             :     /// (or the necessary automatic styles)
     548             :     void exportTrackedChanges(bool bAutoStyle);
     549             : 
     550             :     /// Export the list of change information (enclosed by <tracked-changes>)
     551             :     /// (or the necessary automatic styles)
     552             :     void exportTrackedChanges(const ::com::sun::star::uno::Reference <
     553             :                                   ::com::sun::star::text::XText > & rText,
     554             :                               bool bAutoStyle );
     555             : 
     556             :     /// Record tracked changes for this particular XText
     557             :     /// (empty reference stop recording)
     558             :     /// This should be used if tracked changes for e.g. footers are to
     559             :     /// be exported separately via the exportTrackedChanges(bool,
     560             :     /// Reference<XText>) method.
     561             :     void recordTrackedChangesForXText(
     562             :         const ::com::sun::star::uno::Reference <
     563             :             ::com::sun::star::text::XText > & rText );
     564             : 
     565             : 
     566             :     /// Stop recording tracked changes.
     567             :     /// This is the same as calling recordTrackedChanges(...) with an
     568             :     /// empty reference.
     569             :     void recordTrackedChangesNoXText();
     570             : 
     571             : 
     572             :     // This method exports the given OUString
     573             :     void exportText(
     574             :         const OUString& rText,
     575             :         bool& rPrevCharWasSpace );
     576             : 
     577             :     // This method collects all automatic styles for the given XText
     578           0 :     void collectTextAutoStyles(
     579             :         const ::com::sun::star::uno::Reference <
     580             :             ::com::sun::star::text::XText > & rText,
     581             :         bool bIsProgress = false,
     582             :         bool bExportParagraph = true )
     583             :     {
     584           0 :         exportText( rText, true, bIsProgress, bExportParagraph );
     585           0 :     }
     586             : 
     587           0 :     void collectTextAutoStyles(
     588             :         const ::com::sun::star::uno::Reference <
     589             :             ::com::sun::star::text::XText > & rText,
     590             :         const ::com::sun::star::uno::Reference <
     591             :             ::com::sun::star::text::XTextSection > & rBaseSection,
     592             :         bool bIsProgress = false,
     593             :         bool bExportParagraph = true )
     594             :     {
     595           0 :         exportText( rText, rBaseSection, true, bIsProgress, bExportParagraph );
     596           0 :     }
     597             : 
     598             :     // It the model implements the xAutoStylesSupplier interface, the automatic
     599             :     // styles can exported without iterating over the text portions
     600             :     bool collectTextAutoStylesOptimized(
     601             :         bool bIsProgress = false );
     602             : 
     603             :     // This method exports all automatic styles that have been collected.
     604             :     virtual void exportTextAutoStyles();
     605             : 
     606             :     void exportEvents( const ::com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet > & rPropSet );
     607             : 
     608             :     // Implement Title/Description Elements UI (#i73249#)
     609             :     void exportTitleAndDescription( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & rPropSet,
     610             :                                     const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
     611             : 
     612             :     // This method exports the given XText
     613           0 :     void exportText(
     614             :         const ::com::sun::star::uno::Reference <
     615             :             ::com::sun::star::text::XText > & rText,
     616             :         bool bIsProgress = false,
     617             :         bool bExportParagraph = true)
     618             :     {
     619           0 :         exportText( rText, false, bIsProgress, bExportParagraph );
     620           0 :     }
     621             : 
     622           0 :     void exportText(
     623             :         const ::com::sun::star::uno::Reference <
     624             :             ::com::sun::star::text::XText > & rText,
     625             :         const ::com::sun::star::uno::Reference <
     626             :             ::com::sun::star::text::XTextSection > & rBaseSection,
     627             :         bool bIsProgress = false,
     628             :         bool bExportParagraph = true)
     629             :     {
     630           0 :         exportText( rText, rBaseSection, false, bIsProgress, bExportParagraph );
     631           0 :     }
     632             : 
     633           0 :     void exportFramesBoundToPage( bool bIsProgress = false )
     634             :     {
     635           0 :         exportPageFrames( false, bIsProgress );
     636           0 :     }
     637           0 :     void exportFramesBoundToFrame(
     638             :             const ::com::sun::star::uno::Reference <
     639             :                     ::com::sun::star::text::XTextFrame >& rParentTxtFrame,
     640             :             bool bIsProgress = false )
     641             :     {
     642           0 :         exportFrameFrames( false, bIsProgress, &rParentTxtFrame );
     643           0 :     }
     644             :     inline const XMLTextListAutoStylePool& GetListAutoStylePool() const;
     645             : 
     646           0 :     void SetBlockMode( bool bSet ) { bBlock = bSet; }
     647           0 :     bool IsBlockMode() const { return bBlock; }
     648             : 
     649             : 
     650           0 :     UniReference < SvXMLExportPropertyMapper > GetParagraphPropertyMapper() const
     651             :     {
     652           0 :         return xParaPropMapper;
     653             :     }
     654             : 
     655             : 
     656             :     /** exclude form controls which are in mute sections.
     657             :      *
     658             :      * This method is necessary to prevent the form layer export from exporting
     659             :      * control models whose controls are not represented in the document.  To
     660             :      * achieve this, this method iterates over all shapes, checks to see if
     661             :      * they are control shapes, and if so, whether they should be exported or
     662             :      * not. If not, the form layer export will be notified accordingly.
     663             :      *
     664             :      * The reason this method is located here is tha it needs to access the
     665             :      * XMLSectionExport, which is only available here.
     666             :      */
     667             :     void PreventExportOfControlsInMuteSections(
     668             :         const ::com::sun::star::uno::Reference<
     669             :             ::com::sun::star::container::XIndexAccess> & rShapes,
     670             :         UniReference<xmloff::OFormLayerXMLExport> xFormExport );
     671             : 
     672           0 :     SinglePropertySetInfoCache& GetCharStyleNamesPropInfoCache() { return aCharStyleNamesPropInfoCache; }
     673             : 
     674             :     void PushNewTextListsHelper();
     675             : 
     676             :     void PopTextListsHelper();
     677             : 
     678             : private:
     679             :         XMLTextParagraphExport(XMLTextParagraphExport &); // private copy-ctor because of explicit copy-ctor of auto_ptr
     680             : };
     681             : 
     682             : inline const XMLTextListAutoStylePool&
     683           0 :     XMLTextParagraphExport::GetListAutoStylePool() const
     684             : {
     685           0 :     return *pListAutoPool;
     686             : }
     687             : 
     688           0 : inline void XMLTextParagraphExport::exportTextFrame(
     689             :         const ::com::sun::star::uno::Reference <
     690             :             ::com::sun::star::text::XTextContent > & rTextContent,
     691             :         bool bAutoStyles, bool bIsProgress, bool bExportContent,
     692             :         const ::com::sun::star::uno::Reference <
     693             :             ::com::sun::star::beans::XPropertySet > *pRangePropSet)
     694             : {
     695             :     exportAnyTextFrame( rTextContent, FT_TEXT, bAutoStyles, bIsProgress,
     696           0 :                         bExportContent, pRangePropSet );
     697           0 : }
     698             : 
     699           0 : inline void XMLTextParagraphExport::exportTextGraphic(
     700             :         const ::com::sun::star::uno::Reference <
     701             :             ::com::sun::star::text::XTextContent > & rTextContent,
     702             :         bool bAutoStyles,
     703             :         const ::com::sun::star::uno::Reference <
     704             :             ::com::sun::star::beans::XPropertySet > *pRangePropSet )
     705             : {
     706             :     exportAnyTextFrame( rTextContent, FT_GRAPHIC, bAutoStyles, false,
     707           0 :                         true, pRangePropSet );
     708           0 : }
     709             : 
     710           0 : inline void XMLTextParagraphExport::exportTextEmbedded(
     711             :         const ::com::sun::star::uno::Reference <
     712             :             ::com::sun::star::text::XTextContent > & rTextContent,
     713             :         bool bAutoStyles,
     714             :         const ::com::sun::star::uno::Reference <
     715             :             ::com::sun::star::beans::XPropertySet > *pRangePropSet )
     716             : {
     717             :     exportAnyTextFrame( rTextContent, FT_EMBEDDED, bAutoStyles, false,
     718           0 :                         true, pRangePropSet );
     719           0 : }
     720             : 
     721           0 : inline void XMLTextParagraphExport::exportShape(
     722             :         const ::com::sun::star::uno::Reference <
     723             :             ::com::sun::star::text::XTextContent > & rTextContent,
     724             :         bool bAutoStyles,
     725             :         const ::com::sun::star::uno::Reference <
     726             :             ::com::sun::star::beans::XPropertySet > *pRangePropSet )
     727             : {
     728             :     exportAnyTextFrame( rTextContent, FT_SHAPE, bAutoStyles, false,
     729           0 :                         true, pRangePropSet );
     730           0 : }
     731             : 
     732             : #endif
     733             : 
     734             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10