LCOV - code coverage report
Current view: top level - sw/source/filter/ww8 - docxattributeoutput.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 27 28 96.4 %
Date: 2014-04-11 Functions: 24 27 88.9 %
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_SW_SOURCE_FILTER_WW8_DOCXATTRIBUTEOUTPUT_HXX
      21             : #define INCLUDED_SW_SOURCE_FILTER_WW8_DOCXATTRIBUTEOUTPUT_HXX
      22             : 
      23             : #include "attributeoutputbase.hxx"
      24             : #include "fields.hxx"
      25             : #include "IMark.hxx"
      26             : #include "docxexport.hxx"
      27             : 
      28             : #include <sax/fshelper.hxx>
      29             : #include <sax/fastattribs.hxx>
      30             : #include <vcl/vclenum.hxx>
      31             : #include <svx/xenum.hxx>
      32             : 
      33             : #include <fldbas.hxx>
      34             : 
      35             : #include <vector>
      36             : #include <boost/scoped_ptr.hpp>
      37             : #include <boost/optional.hpp>
      38             : #include <oox/export/vmlexport.hxx>
      39             : #include <oox/export/drawingml.hxx>
      40             : #include <docxtablestyleexport.hxx>
      41             : 
      42             : #include <com/sun/star/table/BorderLine2.hpp>
      43             : 
      44             : #include <boost/scoped_ptr.hpp>
      45             : 
      46             : class SwGrfNode;
      47             : class SdrObject;
      48             : 
      49             : namespace docx { class FootnotesList; }
      50             : namespace oox { namespace drawingml { class DrawingML; } }
      51             : 
      52         833 : struct FieldInfos
      53             : {
      54             :     const SwField*    pField;
      55             :     const ::sw::mark::IFieldmark* pFieldmark;
      56             :     ww::eField  eType;
      57             :     bool        bOpen;
      58             :     bool        bClose;
      59             :     OUString    sCmd;
      60         260 :     FieldInfos() : pField(NULL), pFieldmark(NULL), eType(ww::eUNKNOWN), bOpen(false), bClose(false){}
      61             : };
      62             : 
      63             : enum DocxColBreakStatus
      64             : {
      65             :     COLBRK_NONE,
      66             :     COLBRK_POSTPONE,
      67             :     COLBRK_WRITE
      68             : };
      69             : 
      70             : /**
      71             :  * A structure that holds information about the options selected
      72             :  * when outputting a border to DOCX.
      73             :  *
      74             :  * There are 3 functions that initialize this structure:
      75             :  * - lcl_getTableDefaultBorderOptions - retrieves the options for when outputting table default borders
      76             :  * - lcl_getTableCellBorderOptions    - retrieves the options for when outputting table cell borders
      77             :  * - lcl_getBoxBorderOptions          - retrieves the options for when outputting box borders
      78             :  *
      79             :  */
      80             : struct OutputBorderOptions
      81             : {
      82             :     sal_Int32           tag;
      83             :     bool                bUseStartEnd;
      84             :     bool                bWriteTag;
      85             :     bool                bWriteInsideHV;
      86             :     bool                bWriteDistance;
      87             :     SvxShadowLocation   aShadowLocation;
      88             :     bool                bCheckDistanceSize;
      89             : 
      90        1557 :     OutputBorderOptions() : tag(0), bUseStartEnd(false), bWriteTag(true), bWriteInsideHV(false), bWriteDistance(false), aShadowLocation(SVX_SHADOW_NONE), bCheckDistanceSize(false) {}
      91             : };
      92             : 
      93             : /**
      94             :  * A structure that holds information about the page margins.
      95             :  *
      96             :  */
      97             : struct PageMargins
      98             : {
      99             :     sal_uInt16 nPageMarginLeft;
     100             :     sal_uInt16 nPageMarginRight;
     101             :     sal_uInt16 nPageMarginTop;
     102             :     sal_uInt16 nPageMarginBottom;
     103             : 
     104         272 :     PageMargins() : nPageMarginLeft(0), nPageMarginRight(0), nPageMarginTop(0), nPageMarginBottom(0) {}
     105             : };
     106             : 
     107             : /**
     108             :  * A structure that holds flags for the table export.
     109             :  */
     110         594 : struct TableReference
     111             : {
     112             :     /// Remember if we are in an open cell, or not.
     113             :     bool m_bTableCellOpen;
     114             : 
     115             :     /// Remember the current table depth.
     116             :     sal_uInt32 m_nTableDepth;
     117             : 
     118             :     ww8::WW8TableNodeInfoInner::Pointer_t m_pOldTablepInner;
     119             : 
     120         544 :     TableReference()
     121             :         : m_bTableCellOpen(false),
     122         544 :         m_nTableDepth(0)
     123             :     {
     124         544 :     }
     125             : 
     126          25 :     TableReference operator= (const TableReference& rhs)
     127             :     {
     128          25 :         m_bTableCellOpen = rhs.m_bTableCellOpen ;
     129          25 :         m_nTableDepth    = rhs.m_nTableDepth ;
     130          25 :         return *this ;
     131             :     }
     132             : };
     133             : 
     134             : /// The class that has handlers for various resource types when exporting as DOCX.
     135             : class DocxAttributeOutput : public AttributeOutputBase, public oox::vml::VMLTextExport, public oox::drawingml::DMLTextExport
     136             : {
     137             : public:
     138             :     /// Export the state of RTL/CJK.
     139             :     virtual void RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript ) SAL_OVERRIDE;
     140             : 
     141             :     /// Start of the paragraph.
     142             :     virtual void StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo ) SAL_OVERRIDE;
     143             : 
     144             :     /// End of the paragraph.
     145             :     virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) SAL_OVERRIDE;
     146             : 
     147             :     /// Empty paragraph.
     148             :     virtual void EmptyParagraph() SAL_OVERRIDE;
     149             : 
     150             :     /// Called in order to output section breaks.
     151             :     virtual void SectionBreaks(const SwTxtNode& rNode) SAL_OVERRIDE;
     152             : 
     153             :     /// Called before we start outputting the attributes.
     154             :     virtual void StartParagraphProperties() SAL_OVERRIDE;
     155             : 
     156             :     /// Called after we end outputting the attributes.
     157             :     virtual void EndParagraphProperties( const SfxItemSet* pParagraphMarkerProperties, const SwRedlineData* pRedlineData, const SwRedlineData* pRedlineParagraphMarkerDeleted, const SwRedlineData* pRedlineParagraphMarkerInserted) SAL_OVERRIDE;
     158             : 
     159             :     /// Start of the text run.
     160             :     virtual void StartRun( const SwRedlineData* pRedlineData, bool bSingleEmptyRun = false ) SAL_OVERRIDE;
     161             : 
     162             :     /// End of the text run.
     163             :     virtual void EndRun() SAL_OVERRIDE;
     164             : 
     165             :     /// Called before we start outputting the attributes.
     166             :     virtual void StartRunProperties() SAL_OVERRIDE;
     167             : 
     168             :     /// Called after we end outputting the attributes.
     169             :     virtual void EndRunProperties( const SwRedlineData* pRedlineData ) SAL_OVERRIDE;
     170             : 
     171             :     virtual void FootnoteEndnoteRefTag() SAL_OVERRIDE;
     172             : 
     173             :     virtual void SectFootnoteEndnotePr() SAL_OVERRIDE;
     174             : 
     175             :     virtual void WritePostitFieldReference() SAL_OVERRIDE;
     176             : 
     177             :     /// Output text (inside a run).
     178             :     virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 ) SAL_OVERRIDE;
     179             : 
     180             :     /// Output text (without markup).
     181             :     virtual void RawText( const OUString& rText, bool bForceUnicode, rtl_TextEncoding eCharSet ) SAL_OVERRIDE;
     182             : 
     183             :     /// Output ruby start.
     184             :     virtual void StartRuby( const SwTxtNode& rNode, sal_Int32 nPos, const SwFmtRuby& rRuby ) SAL_OVERRIDE;
     185             : 
     186             :     /// Output ruby end.
     187             :     virtual void EndRuby() SAL_OVERRIDE;
     188             : 
     189             :     /// Output URL start.
     190             :     virtual bool StartURL( const OUString& rUrl, const OUString& rTarget ) SAL_OVERRIDE;
     191             : 
     192             :     /// Output URL end.
     193             :     virtual bool EndURL() SAL_OVERRIDE;
     194             : 
     195             :     virtual void FieldVanish( const OUString& rTxt, ww::eField eType ) SAL_OVERRIDE;
     196             : 
     197             :     /// Output redlining.
     198             :     ///
     199             :     /// The common attribute that can be among the run properties.
     200             :     virtual void Redline( const SwRedlineData* pRedline ) SAL_OVERRIDE;
     201             : 
     202             :     /// Output redlining.
     203             :     ///
     204             :     /// Start of the tag that encloses the run, fills the info according to
     205             :     /// the value of pRedlineData.
     206             :     void StartRedline( const SwRedlineData * pRedlineData );
     207             : 
     208             :     /// Output redlining.
     209             :     ///
     210             :     /// End of the tag that encloses the run.
     211             :     void EndRedline( const SwRedlineData * pRedlineData );
     212             : 
     213             :     virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) SAL_OVERRIDE;
     214             : 
     215             :     /// Output style.
     216             :     virtual void ParagraphStyle( sal_uInt16 nStyle ) SAL_OVERRIDE;
     217             : 
     218             :     virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     219             :     virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     220             :     virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     221             :     virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     222             :     virtual void TableDefaultCellMargins( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
     223             :     virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     224             :     virtual void TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     225             :     virtual void TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     226             :     virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     227             :     virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     228             :     virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     229             :     virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     230             :     virtual void TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo ) SAL_OVERRIDE;
     231             :     virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner ) SAL_OVERRIDE;
     232             :     virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     233             :     virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     234             :     virtual void TableRowEnd( sal_uInt32 nDepth = 1 ) SAL_OVERRIDE;
     235             : 
     236             :     /// Start of the styles table.
     237             :     virtual void StartStyles() SAL_OVERRIDE;
     238             : 
     239             :     /// End of the styles table.
     240             :     virtual void EndStyles( sal_uInt16 nNumberOfStyles ) SAL_OVERRIDE;
     241             : 
     242             :     /// Write default style.
     243             :     virtual void DefaultStyle( sal_uInt16 nStyle ) SAL_OVERRIDE;
     244             : 
     245             :     /// Write Doc Defaults
     246             :     void DocDefaults( );
     247             : 
     248             :     /// Write latent styles.
     249             :     void LatentStyles();
     250             : 
     251             :     /** Similar to OutputItem(), but write something only if it is not the default.
     252             : 
     253             :         This is to output the docDefaults, and we should write something out
     254             :         only in case it is not what MSO already uses for the document by default.
     255             :     */
     256             :     void OutputDefaultItem(const SfxPoolItem& rHt);
     257             : 
     258             :     /// Start of a style in the styles table.
     259             :     virtual void StartStyle( const OUString& rName, StyleType eType,
     260             :             sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
     261             :             bool bAutoUpdate ) SAL_OVERRIDE;
     262             : 
     263             :     /// End of a style in the styles table.
     264             :     virtual void EndStyle() SAL_OVERRIDE;
     265             : 
     266             :     /// Start of (paragraph or run) properties of a style.
     267             :     virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle ) SAL_OVERRIDE;
     268             : 
     269             :     /// End of (paragraph or run) properties of a style.
     270             :     virtual void EndStyleProperties( bool bParProp ) SAL_OVERRIDE;
     271             : 
     272             :     /// Numbering rule and Id.
     273             :     virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt ) SAL_OVERRIDE;
     274             : 
     275             :     /// Page break
     276             :     /// As a paragraph property - the paragraph should be on the next page.
     277             :     virtual void PageBreakBefore( bool bBreak ) SAL_OVERRIDE;
     278             : 
     279             :     /// Write a section break
     280             :     /// msword::ColumnBreak or msword::PageBreak
     281             :     virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL ) SAL_OVERRIDE;
     282             : 
     283             :     /// Start of the section properties.
     284             :     virtual void StartSection() SAL_OVERRIDE;
     285             : 
     286             :     /// End of the section properties.
     287             :     virtual void EndSection() SAL_OVERRIDE;
     288             : 
     289             :     /// Protection of forms.
     290             :     virtual void SectionFormProtection( bool bProtected ) SAL_OVERRIDE;
     291             : 
     292             :     /// Numbering of the lines in the document.
     293             :     virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo ) SAL_OVERRIDE;
     294             : 
     295             :     /// Has different headers/footers for the title page.
     296             :     virtual void SectionTitlePage() SAL_OVERRIDE;
     297             : 
     298             :     /// Description of the page borders.
     299             :     virtual void SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFmt* pFirstPageFmt ) SAL_OVERRIDE;
     300             : 
     301             :     /// Columns populated from right/numbers on the right side?
     302             :     virtual void SectionBiDi( bool bBiDi ) SAL_OVERRIDE;
     303             : 
     304             :     /// The style of the page numbers.
     305             :     ///
     306             :     virtual void SectionPageNumbering( sal_uInt16 nNumType, ::boost::optional<sal_uInt16> oPageRestartNumber ) SAL_OVERRIDE;
     307             : 
     308             :     /// The type of breaking.
     309             :     virtual void SectionType( sal_uInt8 nBreakCode ) SAL_OVERRIDE;
     310             : 
     311             :     /// Start the font.
     312             :     void StartFont( const OUString& rFamilyName ) const;
     313             : 
     314             :     /// End the font.
     315             :     void EndFont() const;
     316             : 
     317             :     /// Alternate name for the font.
     318             :     void FontAlternateName( const OUString& rName ) const;
     319             : 
     320             :     /// Font charset.
     321             :     void FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEncoding ) const;
     322             : 
     323             :     /// Font family.
     324             :     void FontFamilyType( FontFamily eFamily ) const;
     325             : 
     326             :     /// Font pitch.
     327             :     void FontPitchType( FontPitch ePitch ) const;
     328             : 
     329             :     /// Write out the font into the document, if it's an embedded font.
     330             :     void EmbedFont( const OUString& name, FontFamily family, FontPitch pitch, rtl_TextEncoding encoding );
     331             : 
     332             :     /// Definition of a numbering instance.
     333             :     virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) SAL_OVERRIDE;
     334             : 
     335             :     /// Start of the abstract numbering definition instance.
     336             :     virtual void StartAbstractNumbering( sal_uInt16 nId ) SAL_OVERRIDE;
     337             : 
     338             :     /// End of the abstract numbering definition instance.
     339             :     virtual void EndAbstractNumbering() SAL_OVERRIDE;
     340             : 
     341             :     /// All the numbering level information.
     342             :     virtual void NumberingLevel( sal_uInt8 nLevel,
     343             :         sal_uInt16 nStart,
     344             :         sal_uInt16 nNumberingType,
     345             :         SvxAdjust eAdjust,
     346             :         const sal_uInt8 *pNumLvlPos,
     347             :         sal_uInt8 nFollow,
     348             :         const wwFont *pFont,
     349             :         const SfxItemSet *pOutSet,
     350             :         sal_Int16 nIndentAt,
     351             :         sal_Int16 nFirstLineIndex,
     352             :         sal_Int16 nListTabPos,
     353             :         const OUString &rNumberingString,
     354             :         const SvxBrushItem* pBrush = 0 ) SAL_OVERRIDE;
     355             : 
     356             :     void WriteField_Impl( const SwField* pFld, ww::eField eType, const OUString& rFldCmd, sal_uInt8 nMode );
     357             :     void WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark );
     358             : 
     359             :     void WriteBookmarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
     360             :     void WriteAnnotationMarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
     361             : 
     362             : private:
     363             :     /// Initialize the structures where we are going to collect some of the paragraph properties.
     364             :     ///
     365             :     /// Some of the properties have to be collected from more sources, and are
     366             :     /// actually not written between StartParagraphProperties and
     367             :     /// EndParagraphProperties.  They are output in this method, which is
     368             :     /// supposed to be called just before outputting </rPr> whenever it is done.
     369             :     void InitCollectedParagraphProperties();
     370             : 
     371             :     /// Output what we collected during the run properties output.
     372             :     ///
     373             :     /// @see WriteCollectedParagrapProperties().
     374             :     void WriteCollectedParagraphProperties();
     375             : 
     376             :     /// Initialize the structures where we are going to collect some of the run properties.
     377             :     ///
     378             :     /// This is an equivalent of InitCollectedParagraphProperties(), resp.
     379             :     /// WriteCollectectedParagraphProperties().
     380             :     ///
     381             :     /// @see InitCollectedParagraphProperties().
     382             :     void InitCollectedRunProperties();
     383             : 
     384             :     /// Output what we collected during the run properties output.
     385             :     ///
     386             :     /// @see InitCollectedRunProperies(), WriteCollectedParagraphProperties()
     387             :     void WriteCollectedRunProperties();
     388             : 
     389             :     /// Output graphic fly frames or replacement graphics for OLE nodes.
     390             :     ///
     391             :     /// For graphic frames, just use the first two parameters, for OLE
     392             :     /// replacement graphics, set the first as 0, and pass the remaining three.
     393             :     ///
     394             :     /// @see WriteOLE2Obj()
     395             :     void FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrmFmt* pOLEFrmFmt = 0, SwOLENode* pOLENode = 0, const SdrObject* pSdrObj = 0);
     396             :     void WriteSrcRect( const SdrObject* pSdrObj );
     397             :     void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrmFmt* pFlyFrmFmt);
     398             :     bool WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize );
     399             :     bool WriteOLEMath( const SdrObject* pSdrObj, const SwOLENode& rNode, const Size& rSize );
     400             :     bool PostponeOLE( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrmFmt* pFlyFrmFmt );
     401             :     void WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrmFmt* rFlyFrmFmt );
     402             : 
     403             :     /// checks whether the current component is a diagram
     404             :     bool IsDiagram (const SdrObject* sdrObject);
     405             : 
     406             :     void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
     407             :     void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
     408             :     void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
     409             :     void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
     410             :     void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
     411             :     void EndTableCell( );
     412             :     void EndTableRow( );
     413             :     void EndTable();
     414             : 
     415             :     /// End cell, row, and even the entire table if necessary.
     416             :     void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph = false );
     417             : 
     418             :     void WriteFFData( const FieldInfos& rInfos );
     419             :     void WritePendingPlaceholder();
     420             : 
     421             :     void EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic, FontWeight weight,
     422             :         FontPitch pitch, rtl_TextEncoding encoding );
     423             : 
     424             :     /**
     425             :      * Translate a color object to the corresponding HighlightColorValues enumaration item
     426             :      *
     427             :      * @param[in]   rColor      a color object to translate
     428             :      * @return      color name (e.g. "red"), if color is inside the enumeration's range
     429             :      *              empty string, otherwise
     430             :     **/
     431             :     OString TransHighlightColor( const Color& rColor );
     432             : protected:
     433             : 
     434             :     /// Output frames - the implementation.
     435             :     virtual void OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point& rNdTopLeft ) SAL_OVERRIDE;
     436             : 
     437             :     /// Sfx item Sfx item RES_CHRATR_CASEMAP
     438             :     virtual void CharCaseMap( const SvxCaseMapItem& rCaseMap ) SAL_OVERRIDE;
     439             : 
     440             :     /// Sfx item Sfx item RES_CHRATR_COLOR
     441             :     virtual void CharColor( const SvxColorItem& rColor) SAL_OVERRIDE;
     442             : 
     443             :     /// Sfx item Sfx item RES_CHRATR_CONTOUR
     444             :     virtual void CharContour( const SvxContourItem& rContour ) SAL_OVERRIDE;
     445             : 
     446             :     /// Sfx item RES_CHRATR_CROSSEDOUT
     447             :     virtual void CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ) SAL_OVERRIDE;
     448             : 
     449             :     /// Sfx item RES_CHRATR_ESCAPEMENT
     450             :     virtual void CharEscapement( const SvxEscapementItem& rEscapement ) SAL_OVERRIDE;
     451             : 
     452             :     /// Sfx item RES_CHRATR_FONT
     453             :     virtual void CharFont( const SvxFontItem& rFont ) SAL_OVERRIDE;
     454             : 
     455             :     /// Sfx item RES_CHRATR_FONTSIZE
     456             :     virtual void CharFontSize( const SvxFontHeightItem& rFontSize ) SAL_OVERRIDE;
     457             : 
     458             :     /// Sfx item RES_CHRATR_KERNING
     459             :     virtual void CharKerning( const SvxKerningItem& rKerning ) SAL_OVERRIDE;
     460             : 
     461             :     /// Sfx item RES_CHRATR_LANGUAGE
     462             :     virtual void CharLanguage( const SvxLanguageItem& rLanguage ) SAL_OVERRIDE;
     463             : 
     464             :     /// Sfx item RES_CHRATR_POSTURE
     465             :     virtual void CharPosture( const SvxPostureItem& rPosture ) SAL_OVERRIDE;
     466             : 
     467             :     /// Sfx item RES_CHRATR_SHADOWED
     468             :     virtual void CharShadow( const SvxShadowedItem& rShadow ) SAL_OVERRIDE;
     469             : 
     470             :     /// Sfx item RES_CHRATR_UNDERLINE
     471             :     virtual void CharUnderline( const SvxUnderlineItem& rUnderline ) SAL_OVERRIDE;
     472             : 
     473             :     /// Sfx item RES_CHRATR_WEIGHT
     474             :     virtual void CharWeight( const SvxWeightItem& rWeight ) SAL_OVERRIDE;
     475             : 
     476             :     /// Sfx item RES_CHRATR_AUTOKERN
     477             :     virtual void CharAutoKern( const SvxAutoKernItem& ) SAL_OVERRIDE;
     478             : 
     479             :     /// Sfx item RES_CHRATR_BLINK
     480             :     virtual void CharAnimatedText( const SvxBlinkItem& rBlink ) SAL_OVERRIDE;
     481             : 
     482             :     /// Sfx item RES_CHRATR_BACKGROUND
     483             :     virtual void CharBackground( const SvxBrushItem& rBrush ) SAL_OVERRIDE;
     484             : 
     485             :     /// Sfx item RES_CHRATR_CJK_FONT
     486             :     virtual void CharFontCJK( const SvxFontItem& rFont ) SAL_OVERRIDE;
     487             : 
     488             :     /// Sfx item RES_CHRATR_CJK_FONTSIZE
     489        1760 :     virtual void CharFontSizeCJK( const SvxFontHeightItem& rFontSize ) SAL_OVERRIDE { CharFontSize( rFontSize ); }
     490             : 
     491             :     /// Sfx item RES_CHRATR_CJK_LANGUAGE
     492        1350 :     virtual void CharLanguageCJK( const SvxLanguageItem& rLanguageItem ) SAL_OVERRIDE { CharLanguage( rLanguageItem ); }
     493             : 
     494             :     /// Sfx item RES_CHRATR_CJK_POSTURE
     495             :     virtual void CharPostureCJK( const SvxPostureItem& rPosture ) SAL_OVERRIDE;
     496             : 
     497             :     /// Sfx item RES_CHRATR_CJK_WEIGHT
     498             :     virtual void CharWeightCJK( const SvxWeightItem& rWeight ) SAL_OVERRIDE;
     499             : 
     500             :     /// Sfx item RES_CHRATR_CTL_FONT
     501             :     virtual void CharFontCTL( const SvxFontItem& rFont ) SAL_OVERRIDE;
     502             : 
     503             :     /// Sfx item RES_CHRATR_CTL_FONTSIZE
     504        5827 :     virtual void CharFontSizeCTL( const SvxFontHeightItem& rFontSize ) SAL_OVERRIDE { CharFontSize( rFontSize ); }
     505             : 
     506             :     /// Sfx item RES_CHRATR_CTL_LANGUAGE
     507        2306 :     virtual void CharLanguageCTL( const SvxLanguageItem& rLanguageItem ) SAL_OVERRIDE { CharLanguage( rLanguageItem); }
     508             : 
     509             :     /// Sfx item RES_CHRATR_CTL_POSTURE
     510             :     virtual void CharPostureCTL( const SvxPostureItem& rWeight ) SAL_OVERRIDE;
     511             : 
     512             :     /// Sfx item RES_CHRATR_CTL_WEIGHT
     513             :     virtual void CharWeightCTL( const SvxWeightItem& rWeight ) SAL_OVERRIDE;
     514             : 
     515             :     /// Sfx item RES_CHRATR_BidiRTL
     516             :     virtual void CharBidiRTL( const SfxPoolItem& ) SAL_OVERRIDE;
     517             : 
     518             :     /// Sfx item RES_CHRATR_IdctHint
     519             :     virtual void CharIdctHint( const SfxPoolItem& ) SAL_OVERRIDE;
     520             : 
     521             :     /// Sfx item RES_CHRATR_ROTATE
     522             :     virtual void CharRotate( const SvxCharRotateItem& rRotate ) SAL_OVERRIDE;
     523             : 
     524             :     /// Sfx item RES_CHRATR_EMPHASIS_MARK
     525             :     virtual void CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisMark ) SAL_OVERRIDE;
     526             : 
     527             :     /// Sfx item RES_CHRATR_TWO_LINES
     528             :     virtual void CharTwoLines( const SvxTwoLinesItem& rTwoLines ) SAL_OVERRIDE;
     529             : 
     530             :     /// Sfx item RES_CHRATR_SCALEW
     531             :     virtual void CharScaleWidth( const SvxCharScaleWidthItem& rScaleWidth ) SAL_OVERRIDE;
     532             : 
     533             :     /// Sfx item RES_CHRATR_RELIEF
     534             :     virtual void CharRelief( const SvxCharReliefItem& rRelief) SAL_OVERRIDE;
     535             : 
     536             :     /// Sfx item RES_CHRATR_HIDDEN
     537             :     virtual void CharHidden( const SvxCharHiddenItem& rHidden ) SAL_OVERRIDE;
     538             : 
     539             :     /// Sfx item RES_CHRATR_BOX
     540             :     virtual void CharBorder( const ::editeng::SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ) SAL_OVERRIDE;
     541             : 
     542             :     /// Sfx item RES_CHRATR_HIGHLIGHT
     543             :     virtual void CharHighlight( const SvxBrushItem& rHighlight ) SAL_OVERRIDE;
     544             : 
     545             :     /// Sfx item RES_TXTATR_INETFMT
     546             :     virtual void TextINetFormat( const SwFmtINetFmt& ) SAL_OVERRIDE;
     547             : 
     548             :     /// Sfx item RES_TXTATR_CHARFMT
     549             :     virtual void TextCharFormat( const SwFmtCharFmt& ) SAL_OVERRIDE;
     550             : 
     551             :     /// Sfx item RES_TXTATR_FTN
     552             :     virtual void TextFootnote_Impl( const SwFmtFtn& ) SAL_OVERRIDE;
     553             : 
     554             :     /// Output the footnote/endnote reference (if there's one to output).
     555             :     void FootnoteEndnoteReference();
     556             : 
     557             :     /// Sfx item RES_PARATR_LINESPACING
     558             :     virtual void ParaLineSpacing_Impl( short nSpace, short nMulti ) SAL_OVERRIDE;
     559             : 
     560             :     /// Sfx item RES_PARATR_ADJUST
     561             :     virtual void ParaAdjust( const SvxAdjustItem& rAdjust ) SAL_OVERRIDE;
     562             : 
     563             :     /// Sfx item RES_PARATR_SPLIT
     564             :     virtual void ParaSplit( const SvxFmtSplitItem& rSplit ) SAL_OVERRIDE;
     565             : 
     566             :     /// Sfx item RES_PARATR_WIDOWS
     567             :     virtual void ParaWidows( const SvxWidowsItem& rWidows ) SAL_OVERRIDE;
     568             : 
     569             :     /// Sfx item RES_PARATR_TABSTOP
     570             :     virtual void ParaTabStop( const SvxTabStopItem& rTabStop ) SAL_OVERRIDE;
     571             : 
     572             :     /// Sfx item RES_PARATR_HYPHENZONE
     573             :     virtual void ParaHyphenZone( const SvxHyphenZoneItem& ) SAL_OVERRIDE;
     574             : 
     575             :     /// Sfx item RES_PARATR_NUMRULE
     576             :     virtual void ParaNumRule_Impl( const SwTxtNode *pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId ) SAL_OVERRIDE;
     577             : 
     578             :     /// Sfx item RES_PARATR_SCRIPTSPACE
     579             :     virtual void ParaScriptSpace( const SfxBoolItem& ) SAL_OVERRIDE;
     580             : 
     581             :     /// Sfx item RES_PARATR_HANGINGPUNCTUATION
     582             :     virtual void ParaHangingPunctuation( const SfxBoolItem& ) SAL_OVERRIDE;
     583             : 
     584             :     /// Sfx item RES_PARATR_FORBIDDEN_RULES
     585             :     virtual void ParaForbiddenRules( const SfxBoolItem& ) SAL_OVERRIDE;
     586             : 
     587             :     /// Sfx item RES_PARATR_VERTALIGN
     588             :     virtual void ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) SAL_OVERRIDE;
     589             : 
     590             :     /// Sfx item RES_PARATR_SNAPTOGRID
     591             :     virtual void ParaSnapToGrid( const SvxParaGridItem& ) SAL_OVERRIDE;
     592             : 
     593             :     /// Sfx item RES_FRM_SIZE
     594             :     virtual void FormatFrameSize( const SwFmtFrmSize& ) SAL_OVERRIDE;
     595             : 
     596             :     /// Sfx item RES_PAPER_BIN
     597             :     virtual void FormatPaperBin( const SvxPaperBinItem& ) SAL_OVERRIDE;
     598             : 
     599             :     /// Sfx item RES_LR_SPACE
     600             :     virtual void FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) SAL_OVERRIDE;
     601             : 
     602             :     /// Sfx item RES_UL_SPACE
     603             :     virtual void FormatULSpace( const SvxULSpaceItem& rULSpace ) SAL_OVERRIDE;
     604             : 
     605             :     /// Sfx item RES_SURROUND
     606             :     virtual void FormatSurround( const SwFmtSurround& ) SAL_OVERRIDE;
     607             : 
     608             :     /// Sfx item RES_VERT_ORIENT
     609             :     virtual void FormatVertOrientation( const SwFmtVertOrient& ) SAL_OVERRIDE;
     610             : 
     611             :     /// Sfx item RES_HORI_ORIENT
     612             :     virtual void FormatHorizOrientation( const SwFmtHoriOrient& ) SAL_OVERRIDE;
     613             : 
     614             :     /// Sfx item RES_ANCHOR
     615             :     virtual void FormatAnchor( const SwFmtAnchor& ) SAL_OVERRIDE;
     616             : 
     617             :     /// Sfx item RES_BACKGROUND
     618             :     virtual void FormatBackground( const SvxBrushItem& ) SAL_OVERRIDE;
     619             : 
     620             :     /// Sfx item RES_FILL_STYLE
     621             :     virtual void FormatFillStyle( const XFillStyleItem& ) SAL_OVERRIDE;
     622             : 
     623             :     /// Sfx item RES_FILL_GRADIENT
     624             :     virtual void FormatFillGradient( const XFillGradientItem& ) SAL_OVERRIDE;
     625             : 
     626             :     /// Sfx item RES_BOX
     627             :     virtual void FormatBox( const SvxBoxItem& ) SAL_OVERRIDE;
     628             : 
     629             :     /// Sfx item RES_COL
     630             :     virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) SAL_OVERRIDE;
     631             : 
     632             :     /// Sfx item RES_KEEP
     633             :     virtual void FormatKeep( const SvxFmtKeepItem& ) SAL_OVERRIDE;
     634             : 
     635             :     /// Sfx item RES_TEXTGRID
     636             :     virtual void FormatTextGrid( const SwTextGridItem& ) SAL_OVERRIDE;
     637             : 
     638             :     /// Sfx item RES_LINENUMBER
     639             :     virtual void FormatLineNumbering( const SwFmtLineNumber& ) SAL_OVERRIDE;
     640             : 
     641             :     /// Sfx item RES_FRAMEDIR
     642             :     virtual void FormatFrameDirection( const SvxFrameDirectionItem& ) SAL_OVERRIDE;
     643             : 
     644             :     /// Sfx item RES_PARATR_GRABBAG
     645             :     virtual void ParaGrabBag( const SfxGrabBagItem& ) SAL_OVERRIDE;
     646             : 
     647             :     /// Sfx item RES_CHRATR_GRABBAG
     648             :     virtual void CharGrabBag( const SfxGrabBagItem& ) SAL_OVERRIDE;
     649             : 
     650             :     // Sfx item RES_PARATR_OUTLINELEVEL
     651             :     virtual void ParaOutlineLevel( const SfxUInt16Item& ) SAL_OVERRIDE;
     652             : 
     653             :     /// Write the expanded field
     654             :     virtual void WriteExpand( const SwField* pFld ) SAL_OVERRIDE;
     655             : 
     656             :     virtual void RefField( const SwField& rFld, const OUString& rRef ) SAL_OVERRIDE;
     657             :     virtual void HiddenField( const SwField& rFld ) SAL_OVERRIDE;
     658             :     virtual void SetField( const SwField& rFld, ww::eField eType, const OUString& rCmd ) SAL_OVERRIDE;
     659             :     virtual void PostitField( const SwField* pFld ) SAL_OVERRIDE;
     660             :     virtual bool DropdownField( const SwField* pFld ) SAL_OVERRIDE;
     661             :     virtual bool PlaceholderField( const SwField* pFld ) SAL_OVERRIDE;
     662             : 
     663             :     virtual bool AnalyzeURL( const OUString& rURL, const OUString& rTarget, OUString* pLinkURL, OUString* pMark ) SAL_OVERRIDE;
     664             : 
     665             :     /// Reference to the export, where to get the data from
     666             :     DocxExport &m_rExport;
     667             : 
     668             :     /// Fast serializer to output the data
     669             :     ::sax_fastparser::FSHelperPtr m_pSerializer;
     670             : 
     671             :     /// DrawingML access
     672             :     oox::drawingml::DrawingML &m_rDrawingML;
     673             : 
     674             : private:
     675             : 
     676             :     void DoWriteBookmarks( );
     677             :     void DoWriteAnnotationMarks( );
     678             :     void WritePostponedGraphic();
     679             :     void WritePostponedMath();
     680             :     void WritePostponedFormControl(const SdrObject* pObject);
     681             :     void WritePostponedDiagram();
     682             :     void WritePostponedChart();
     683             :     void WritePostponedOLE();
     684             :     void WritePostponedVMLDrawing();
     685             :     void WritePostponedDMLDrawing();
     686             : 
     687             :     void WriteSdtBlock( sal_Int32& nSdtPrToken, ::sax_fastparser::FastAttributeList* &pSdtPrTokenChildren, ::sax_fastparser::FastAttributeList* &pSdtPrDataBindingAttrs );
     688             : 
     689             :     void StartField_Impl( FieldInfos& rInfos, bool bWriteRun = false );
     690             :     void DoWriteCmd( const OUString& rCmd );
     691             :     void CmdField_Impl( FieldInfos& rInfos );
     692             :     void EndField_Impl( FieldInfos& rInfos );
     693             : 
     694             :     void AddToAttrList( ::sax_fastparser::FastAttributeList* &pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue );
     695             :     void AddToAttrList( ::sax_fastparser::FastAttributeList* &pAttrList, sal_Int32 nArgs, ... );
     696             : 
     697             :     ::sax_fastparser::FastAttributeList *m_pFontsAttrList, *m_pEastAsianLayoutAttrList;
     698             :     ::sax_fastparser::FastAttributeList *m_pCharLangAttrList;
     699             :     ::sax_fastparser::FastAttributeList *m_pSectionSpacingAttrList;
     700             :     ::sax_fastparser::FastAttributeList *m_pParagraphSpacingAttrList;
     701             :     ::sax_fastparser::FastAttributeList *m_pHyperlinkAttrList;
     702             :     /// Attributes of the run color
     703             :     ::sax_fastparser::FastAttributeList *m_pColorAttrList;
     704             :     /// Attributes of the paragraph background
     705             :     ::sax_fastparser::FastAttributeList *m_pBackgroundAttrList;
     706             :     OUString m_hyperLinkAnchor;
     707             :     bool m_endPageRef;
     708             :     ::docx::FootnotesList *m_pFootnotesList;
     709             :     ::docx::FootnotesList *m_pEndnotesList;
     710             :     int m_footnoteEndnoteRefTag;
     711             :     boost::scoped_ptr< const WW8_SepInfo > m_pSectionInfo;
     712             : 
     713             :     /// Redline data to remember in the text run.
     714             :     const SwRedlineData *m_pRedlineData;
     715             : 
     716             :     /// Id of the redline
     717             :     sal_Int32 m_nRedlineId;
     718             : 
     719             :     /// Flag indicating that the section properties are being written
     720             :     bool m_bOpenedSectPr;
     721             : 
     722             :     /// Flag indicating that the header \ footer are being written
     723             :     bool m_bWritingHeaderFooter;
     724             : 
     725             :     /// Field data to remember in the text run
     726             :     std::vector< FieldInfos > m_Fields;
     727             :     OUString m_sFieldBkm;
     728             :     sal_Int32 m_nNextBookmarkId;
     729             :     sal_Int32 m_nNextAnnotationMarkId;
     730             : 
     731             :     /// Bookmarks to output
     732             :     std::vector<OString> m_rBookmarksStart;
     733             :     std::vector<OString> m_rBookmarksEnd;
     734             : 
     735             :     /// Annotation marks to output
     736             :     std::vector<OString> m_rAnnotationMarksStart;
     737             :     std::vector<OString> m_rAnnotationMarksEnd;
     738             : 
     739             :     /// Maps of the bookmarks ids
     740             :     std::map<OString, sal_uInt16> m_rOpenedBookmarksIds;
     741             : 
     742             :     /// Name of the last opened bookmark.
     743             :     OString m_sLastOpenedBookmark;
     744             : 
     745             :     /// Maps of the annotation marks ids
     746             :     std::map<OString, sal_uInt16> m_rOpenedAnnotationMarksIds;
     747             : 
     748             :     /// Name of the last opened annotation mark.
     749             :     OString m_sLastOpenedAnnotationMark;
     750             : 
     751             :     /// If there are bookmarks around sequence fields, this map contains the
     752             :     /// names of these bookmarks for each sequence.
     753             :     std::map<OUString, std::vector<OString> > m_aSeqBookmarksNames;
     754             : 
     755             :     /// GrabBag for text effexts like glow, shadow, ...
     756             :     css::uno::Sequence<css::beans::PropertyValue> m_aTextEffectsGrabBag;
     757             : 
     758             :     /// The current table helper
     759             :     SwWriteTable *m_pTableWrt;
     760             : 
     761             :     bool m_bParagraphOpened;
     762             :     bool m_bIsFirstParagraph;
     763             :     bool m_bAlternateContentChoiceOpen;
     764             : 
     765             :     // Remember that a column break has to be opened at the
     766             :     // beginning of the next paragraph
     767             :     DocxColBreakStatus m_nColBreakStatus;
     768             : 
     769             :     std::vector<sw::Frame> m_aFramesOfParagraph;
     770             :     sal_Int32 m_nTextFrameLevel;
     771             : 
     772             :     // close of hyperlink needed
     773             :     bool m_closeHyperlinkInThisRun;
     774             :     bool m_closeHyperlinkInPreviousRun;
     775             :     bool m_startedHyperlink;
     776             :     // Count nested HyperLinks
     777             :     sal_Int32 m_nHyperLinkCount;
     778             :     sal_Int16 m_nFieldsInHyperlink;
     779             : 
     780             :     struct PostponedGraphic
     781             :     {
     782          45 :         PostponedGraphic( const SwGrfNode* n, Size s, const SwFlyFrmFmt* pOLEFrmFmt, SwOLENode* pOLENode, const SdrObject* sObj )
     783          45 :             : grfNode( n ), size( s ), mOLEFrmFmt( pOLEFrmFmt ), mOLENode( pOLENode ), pSdrObj(sObj) {};
     784             : 
     785             :         const SwGrfNode* grfNode;
     786             :         Size size;
     787             :         const SwFlyFrmFmt* mOLEFrmFmt;
     788             :         SwOLENode* mOLENode;
     789             :         const SdrObject* pSdrObj;
     790             :     };
     791             :     std::list< PostponedGraphic >* m_postponedGraphic;
     792             :     struct PostponedDiagram
     793             :     {
     794           2 :         PostponedDiagram( const SdrObject* o, const SwFrmFmt* frm ) : object( o ), frame( frm ) {};
     795             :         const SdrObject* object;
     796             :         const SwFrmFmt* frame;
     797             :     };
     798             :     std::list< PostponedDiagram >* m_postponedDiagram;
     799             : 
     800             :     struct PostponedDrawing
     801             :     {
     802          49 :         PostponedDrawing( const SdrObject* sdrObj, const SwFrmFmt* frm, const Point* pt ) : object( sdrObj ), frame( frm ), point( pt ) {};
     803             :         const SdrObject* object;
     804             :         const SwFrmFmt* frame;
     805             :         const Point* point;
     806             :     };
     807             :     std::list< PostponedDrawing >* m_postponedVMLDrawing;
     808             :     std::list< PostponedDrawing >* m_postponedDMLDrawing;
     809             : 
     810             :     struct PostponedOLE
     811             :     {
     812           6 :         PostponedOLE( SwOLENode* rObject, const Size rSize, const SwFlyFrmFmt* rFrame ) : object( rObject ), size( rSize ), frame( rFrame ) {};
     813             :         SwOLENode* object;
     814             :         const Size size;
     815             :         const SwFlyFrmFmt* frame;
     816             :     };
     817             :     std::list< PostponedOLE >* m_postponedOLE;
     818             : 
     819             :     const SwOLENode* m_postponedMath;
     820             :     const SdrObject* m_postponedChart;
     821             :     Size m_postponedChartSize;
     822             :     std::vector<const SdrObject*> m_aPostponedFormControls;
     823             :     const SwField* pendingPlaceholder;
     824             :     /// Maps postit fields to ID's, used in commentRangeStart/End, commentReference and comment.xml.
     825             :     std::vector< std::pair<const SwPostItField*, sal_Int32> > m_postitFields;
     826             :     /// Number of postit fields which already have a commentReference written.
     827             :     unsigned int m_postitFieldsMaxId;
     828             :     int m_anchorId;
     829             :     int m_nextFontId;
     830           0 :     struct EmbeddedFontRef
     831             :     {
     832             :         OString relId;
     833             :         OString fontKey;
     834             :     };
     835             : 
     836             :     boost::scoped_ptr<TableReference> m_tableReference;
     837             :     boost::scoped_ptr<TableReference> m_oldTableReference;
     838             : 
     839             :     std::map< OUString, EmbeddedFontRef > fontFilesMap; // font file url to data
     840             : 
     841             :     // Remember first cell (used for for default borders/margins) of each table
     842             :     std::vector<ww8::WW8TableNodeInfoInner::Pointer_t> tableFirstCells;
     843             : 
     844             :     boost::optional<XFillStyle> m_oFillStyle;
     845             :     /// If FormatBox() already handled fill style / gradient.
     846             :     bool m_bIgnoreNextFill;
     847             : 
     848             :     /// Is fake rotation detected, so rotation with 90 degrees should be ignored in this cell?
     849             :     bool m_bBtLr;
     850             : 
     851             :     PageMargins m_pageMargins;
     852             : 
     853             :     boost::shared_ptr<DocxTableStyleExport> m_pTableStyleExport;
     854             :     // flag to check if auto spacing was set in original file
     855             :     bool m_bParaBeforeAutoSpacing,m_bParaAfterAutoSpacing;
     856             :     // store hardcoded value which was set during import.
     857             :     sal_Int32 m_nParaBeforeSpacing,m_nParaAfterSpacing;
     858             : 
     859             :     bool m_setFootnote;
     860             : 
     861             :     /// RelId <-> Graphic* cache, so that in case of alternate content, the same graphic only gets written once.
     862             :     std::map<const Graphic*, OString> m_aRelIdCache;
     863             : 
     864             :     /// members to control the existence of grabbagged SDT properties in the paragraph
     865             :     sal_Int32 m_nParagraphSdtPrToken;
     866             :     ::sax_fastparser::FastAttributeList *m_pParagraphSdtPrTokenChildren;
     867             :     ::sax_fastparser::FastAttributeList *m_pParagraphSdtPrDataBindingAttrs;
     868             :     /// members to control the existence of grabbagged SDT properties in the text run
     869             :     sal_Int32 m_nRunSdtPrToken;
     870             :     ::sax_fastparser::FastAttributeList *m_pRunSdtPrTokenChildren;
     871             :     ::sax_fastparser::FastAttributeList *m_pRunSdtPrDataBindingAttrs;
     872             : 
     873             :     std::map<sal_uInt16, css::table::BorderLine2> m_aTableStyleConf;
     874             : 
     875             : public:
     876             :     DocxAttributeOutput( DocxExport &rExport, ::sax_fastparser::FSHelperPtr pSerializer, oox::drawingml::DrawingML* pDrawingML );
     877             : 
     878             :     virtual ~DocxAttributeOutput();
     879             : 
     880             :     /// Return the right export class.
     881             :     virtual DocxExport& GetExport() SAL_OVERRIDE;
     882        2026 :     const DocxExport& GetExport() const { return const_cast< DocxAttributeOutput* >( this )->GetExport(); }
     883             : 
     884             :     /// For eg. the output of the styles, we need to switch the serializer to an other one.
     885             :     void SetSerializer( ::sax_fastparser::FSHelperPtr pSerializer );
     886             : 
     887             :     /// Occasionnaly need to use this serializer from the outside
     888         160 :     ::sax_fastparser::FSHelperPtr GetSerializer( ) { return m_pSerializer; }
     889             : 
     890             :     /// Do we have any footnotes?
     891             :     bool HasFootnotes() const;
     892             : 
     893             :     /// Do we have any endnotes?
     894             :     bool HasEndnotes() const;
     895             : 
     896             :     /// Output the content of the footnotes.xml resp. endnotes.xml
     897             :     void FootnotesEndnotes( bool bFootnotes );
     898             : 
     899             :     /// writes the footnotePr/endnotePr (depending on tag) section
     900             :     void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr fs, int tag, const SwEndNoteInfo& info, int listtag );
     901             : 
     902             :     bool HasPostitFields() const;
     903             :     void WritePostitFields();
     904             : 
     905             :     /// VMLTextExport
     906             :     virtual void WriteOutliner(const OutlinerParaObject& rParaObj) SAL_OVERRIDE;
     907             :     virtual oox::drawingml::DrawingML& GetDrawingML() SAL_OVERRIDE;
     908             :     virtual void switchHeaderFooter(bool isHeaderFooter, sal_Int32 index);
     909             : 
     910             :     void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) SAL_OVERRIDE;
     911             : 
     912         596 :     void SetWritingHeaderFooter( bool bWritingHeaderFooter )    {   m_bWritingHeaderFooter = bWritingHeaderFooter;   }
     913          27 :     bool GetWritingHeaderFooter( )  {   return m_bWritingHeaderFooter;  }
     914         230 :     void SetAlternateContentChoiceOpen( bool bAltContentChoiceOpen ) { m_bAlternateContentChoiceOpen = bAltContentChoiceOpen; }
     915         164 :     bool IsAlternateContentChoiceOpen( ) { return m_bAlternateContentChoiceOpen; }
     916             : };
     917             : 
     918             : #endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXATTRIBUTEOUTPUT_HXX
     919             : 
     920             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10