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

Generated by: LCOV version 1.10