LCOV - code coverage report
Current view: top level - sw/source/filter/ww8 - rtfattributeoutput.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 1 0.0 %
Date: 2014-04-11 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
      21             : #define INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
      22             : 
      23             : #include "attributeoutputbase.hxx"
      24             : #include "rtfexport.hxx"
      25             : #include "rtfstringbuffer.hxx"
      26             : 
      27             : #include <rtl/strbuf.hxx>
      28             : #include <svx/xenum.hxx>
      29             : 
      30             : #include <boost/optional.hpp>
      31             : 
      32             : class SwGrfNode;
      33             : class SwOLENode;
      34             : class SwFlyFrmFmt;
      35             : 
      36             : /// The class that has handlers for various resource types when exporting as RTF
      37             : class RtfAttributeOutput : public AttributeOutputBase
      38             : {
      39             :     friend class RtfStringBufferValue;
      40             : public:
      41             :     /// Export the state of RTL/CJK.
      42             :     virtual void RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript ) SAL_OVERRIDE;
      43             : 
      44             :     /// Start of the paragraph.
      45             :     virtual void StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo ) SAL_OVERRIDE;
      46             : 
      47             :     /// End of the paragraph.
      48             :     virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) SAL_OVERRIDE;
      49             : 
      50             :     /// Empty paragraph.
      51             :     virtual void EmptyParagraph() SAL_OVERRIDE;
      52             : 
      53             :     /// Called in order to output section breaks.
      54             :     virtual void SectionBreaks(const SwTxtNode& rNode) SAL_OVERRIDE;
      55             : 
      56             :     /// Called before we start outputting the attributes.
      57             :     virtual void StartParagraphProperties() SAL_OVERRIDE;
      58             : 
      59             :     /// Called after we end outputting the attributes.
      60             :     virtual void EndParagraphProperties( const SfxItemSet* pParagraphMarkerProperties, const SwRedlineData* pRedlineData, const SwRedlineData* pRedlineParagraphMarkerDeleted, const SwRedlineData* pRedlineParagraphMarkerInserted ) SAL_OVERRIDE;
      61             : 
      62             :     /// Start of the text run.
      63             :     virtual void StartRun( const SwRedlineData* pRedlineData, bool bSingleEmptyRun = false ) SAL_OVERRIDE;
      64             : 
      65             :     /// End of the text run.
      66             :     virtual void EndRun() SAL_OVERRIDE;
      67             : 
      68             :     /// Called before we start outputting the attributes.
      69             :     virtual void StartRunProperties() SAL_OVERRIDE;
      70             : 
      71             :     /// Called after we end outputting the attributes.
      72             :     virtual void EndRunProperties( const SwRedlineData* pRedlineData ) SAL_OVERRIDE;
      73             : 
      74             :     /// Output text (inside a run).
      75             :     virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 ) SAL_OVERRIDE;
      76             : 
      77             :     // Access to (anyway) private buffers, used by the sdr exporter
      78             :     OStringBuffer& RunText();
      79             :     OStringBuffer& Styles();
      80             : 
      81             :     /// Output text (without markup).
      82             :     virtual void RawText( const OUString& rText, bool bForceUnicode, rtl_TextEncoding eCharSet ) SAL_OVERRIDE;
      83             : 
      84             :     /// Output ruby start.
      85             :     virtual void StartRuby( const SwTxtNode& rNode, sal_Int32 nPos, const SwFmtRuby& rRuby ) SAL_OVERRIDE;
      86             : 
      87             :     /// Output ruby end.
      88             :     virtual void EndRuby() SAL_OVERRIDE;
      89             : 
      90             :     /// Output URL start.
      91             :     virtual bool StartURL( const OUString& rUrl, const OUString& rTarget ) SAL_OVERRIDE;
      92             : 
      93             :     /// Output URL end.
      94             :     virtual bool EndURL() SAL_OVERRIDE;
      95             : 
      96             :     virtual void FieldVanish( const OUString& rTxt, ww::eField eType ) SAL_OVERRIDE;
      97             : 
      98             :     /// Output redlining.
      99             :     ///
     100             :     /// The common attribute that can be among the run properties.
     101             :     virtual void Redline( const SwRedlineData* pRedline ) SAL_OVERRIDE;
     102             : 
     103             :     virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) SAL_OVERRIDE;
     104             : 
     105             :     /// Output style.
     106             :     virtual void ParagraphStyle( sal_uInt16 nStyle ) SAL_OVERRIDE;
     107             : 
     108             :     virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     109             :     virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     110             :     virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     111             :     virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     112             :     virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     113             :     virtual void TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     114             :     virtual void TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     115             :     virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     116             :     virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     117             :     virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     118             :     virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     119             :     virtual void TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo ) SAL_OVERRIDE;
     120             :     virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner ) SAL_OVERRIDE;
     121             :     virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     122             :     virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) SAL_OVERRIDE;
     123             :     virtual void TableRowEnd( sal_uInt32 nDepth ) SAL_OVERRIDE;
     124             : 
     125             :     /// Start of the styles table.
     126             :     virtual void StartStyles() SAL_OVERRIDE;
     127             : 
     128             :     /// End of the styles table.
     129             :     virtual void EndStyles( sal_uInt16 nNumberOfStyles ) SAL_OVERRIDE;
     130             : 
     131             :     /// Write default style.
     132             :     virtual void DefaultStyle( sal_uInt16 nStyle ) SAL_OVERRIDE;
     133             : 
     134             :     /// Start of a style in the styles table.
     135             :     virtual void StartStyle( const OUString& rName, StyleType eType,
     136             :             sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
     137             :             bool bAutoUpdate ) SAL_OVERRIDE;
     138             : 
     139             :     /// End of a style in the styles table.
     140             :     virtual void EndStyle() SAL_OVERRIDE;
     141             : 
     142             :     /// Start of (paragraph or run) properties of a style.
     143             :     virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle ) SAL_OVERRIDE;
     144             : 
     145             :     /// End of (paragraph or run) properties of a style.
     146             :     virtual void EndStyleProperties( bool bParProp ) SAL_OVERRIDE;
     147             : 
     148             :     /// Numbering rule and Id.
     149             :     virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt ) SAL_OVERRIDE;
     150             : 
     151             :     /// Page break
     152             :     /// As a paragraph property - the paragraph should be on the next page.
     153             :     virtual void PageBreakBefore( bool bBreak ) SAL_OVERRIDE;
     154             : 
     155             :     /// Write a section break
     156             :     /// msword::ColumnBreak or msword::PageBreak
     157             :     virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL ) SAL_OVERRIDE;
     158             : 
     159             :     /// Start of the section properties.
     160             :     virtual void StartSection() SAL_OVERRIDE;
     161             : 
     162             :     /// End of the section properties.
     163             :     virtual void EndSection() SAL_OVERRIDE;
     164             : 
     165             :     /// Protection of forms.
     166             :     virtual void SectionFormProtection( bool bProtected ) SAL_OVERRIDE;
     167             : 
     168             :     /// Numbering of the lines in the document.
     169             :     virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo ) SAL_OVERRIDE;
     170             : 
     171             :     /// Has different headers/footers for the title page.
     172             :     virtual void SectionTitlePage() SAL_OVERRIDE;
     173             : 
     174             :     /// Description of the page borders.
     175             :     virtual void SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFmt* pFirstPageFmt ) SAL_OVERRIDE;
     176             : 
     177             :     /// Columns populated from right/numbers on the right side?
     178             :     virtual void SectionBiDi( bool bBiDi ) SAL_OVERRIDE;
     179             : 
     180             :     /// The style of the page numbers.
     181             :     ///
     182             :     virtual void SectionPageNumbering( sal_uInt16 nNumType, ::boost::optional<sal_uInt16> oPageRestartNumber ) SAL_OVERRIDE;
     183             : 
     184             :     /// The type of breaking.
     185             :     virtual void SectionType( sal_uInt8 nBreakCode ) SAL_OVERRIDE;
     186             : 
     187             :     /// Definition of a numbering instance.
     188             :     virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) SAL_OVERRIDE;
     189             : 
     190             :     /// Start of the abstract numbering definition instance.
     191             :     virtual void StartAbstractNumbering( sal_uInt16 nId ) SAL_OVERRIDE;
     192             : 
     193             :     /// End of the abstract numbering definition instance.
     194             :     virtual void EndAbstractNumbering() SAL_OVERRIDE;
     195             : 
     196             :     /// All the numbering level information.
     197             :     virtual void NumberingLevel( sal_uInt8 nLevel,
     198             :         sal_uInt16 nStart,
     199             :         sal_uInt16 nNumberingType,
     200             :         SvxAdjust eAdjust,
     201             :         const sal_uInt8 *pNumLvlPos,
     202             :         sal_uInt8 nFollow,
     203             :         const wwFont *pFont,
     204             :         const SfxItemSet *pOutSet,
     205             :         sal_Int16 nIndentAt,
     206             :         sal_Int16 nFirstLineIndex,
     207             :         sal_Int16 nListTabPos,
     208             :         const OUString &rNumberingString,
     209             :         const SvxBrushItem* pBrush = 0) SAL_OVERRIDE;//For i120928,to export graphic of bullet
     210             : 
     211             :     void WriteField_Impl( const SwField* pFld, ww::eField eType, const OUString& rFldCmd, sal_uInt8 nMode );
     212             :     void WriteBookmarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
     213             :     void WriteAnnotationMarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
     214             :     void WriteHeaderFooter_Impl( const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr, bool bTitlepg );
     215             : 
     216             : protected:
     217             :     /// Output frames - the implementation.
     218             :     virtual void OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point& rNdTopLeft ) SAL_OVERRIDE;
     219             : 
     220             :     /// Sfx item Sfx item RES_CHRATR_CASEMAP
     221             :     virtual void CharCaseMap( const SvxCaseMapItem& rCaseMap ) SAL_OVERRIDE;
     222             : 
     223             :     /// Sfx item Sfx item RES_CHRATR_COLOR
     224             :     virtual void CharColor( const SvxColorItem& rColor) SAL_OVERRIDE;
     225             : 
     226             :     /// Sfx item Sfx item RES_CHRATR_CONTOUR
     227             :     virtual void CharContour( const SvxContourItem& rContour ) SAL_OVERRIDE;
     228             : 
     229             :     /// Sfx item RES_CHRATR_CROSSEDOUT
     230             :     virtual void CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ) SAL_OVERRIDE;
     231             : 
     232             :     /// Sfx item RES_CHRATR_ESCAPEMENT
     233             :     virtual void CharEscapement( const SvxEscapementItem& rEscapement ) SAL_OVERRIDE;
     234             : 
     235             :     /// Sfx item RES_CHRATR_FONT
     236             :     virtual void CharFont( const SvxFontItem& rFont ) SAL_OVERRIDE;
     237             : 
     238             :     /// Sfx item RES_CHRATR_FONTSIZE
     239             :     virtual void CharFontSize( const SvxFontHeightItem& rFontSize ) SAL_OVERRIDE;
     240             : 
     241             :     /// Sfx item RES_CHRATR_KERNING
     242             :     virtual void CharKerning( const SvxKerningItem& rKerning ) SAL_OVERRIDE;
     243             : 
     244             :     /// Sfx item RES_CHRATR_LANGUAGE
     245             :     virtual void CharLanguage( const SvxLanguageItem& rLanguage ) SAL_OVERRIDE;
     246             : 
     247             :     /// Sfx item RES_CHRATR_POSTURE
     248             :     virtual void CharPosture( const SvxPostureItem& rPosture ) SAL_OVERRIDE;
     249             : 
     250             :     /// Sfx item RES_CHRATR_SHADOWED
     251             :     virtual void CharShadow( const SvxShadowedItem& rShadow ) SAL_OVERRIDE;
     252             : 
     253             :     /// Sfx item RES_CHRATR_UNDERLINE
     254             :     virtual void CharUnderline( const SvxUnderlineItem& rUnderline ) SAL_OVERRIDE;
     255             : 
     256             :     /// Sfx item RES_CHRATR_WEIGHT
     257             :     virtual void CharWeight( const SvxWeightItem& rWeight ) SAL_OVERRIDE;
     258             : 
     259             :     /// Sfx item RES_CHRATR_AUTOKERN
     260             :     virtual void CharAutoKern( const SvxAutoKernItem& ) SAL_OVERRIDE;
     261             : 
     262             :     /// Sfx item RES_CHRATR_BLINK
     263             :     virtual void CharAnimatedText( const SvxBlinkItem& rBlink ) SAL_OVERRIDE;
     264             : 
     265             :     /// Sfx item RES_CHRATR_BACKGROUND
     266             :     virtual void CharBackground( const SvxBrushItem& rBrush ) SAL_OVERRIDE;
     267             : 
     268             :     /// Sfx item RES_CHRATR_CJK_FONT
     269             :     virtual void CharFontCJK( const SvxFontItem& rFont ) SAL_OVERRIDE;
     270             : 
     271             :     /// Sfx item RES_CHRATR_CJK_FONTSIZE
     272             :     virtual void CharFontSizeCJK( const SvxFontHeightItem& rFontSize ) SAL_OVERRIDE;
     273             : 
     274             :     /// Sfx item RES_CHRATR_CJK_LANGUAGE
     275             :     virtual void CharLanguageCJK( const SvxLanguageItem& rLanguageItem ) SAL_OVERRIDE;
     276             : 
     277             :     /// Sfx item RES_CHRATR_CJK_POSTURE
     278             :     virtual void CharPostureCJK( const SvxPostureItem& rPosture ) SAL_OVERRIDE;
     279             : 
     280             :     /// Sfx item RES_CHRATR_CJK_WEIGHT
     281             :     virtual void CharWeightCJK( const SvxWeightItem& rWeight ) SAL_OVERRIDE;
     282             : 
     283             :     /// Sfx item RES_CHRATR_CTL_FONT
     284             :     virtual void CharFontCTL( const SvxFontItem& rFont ) SAL_OVERRIDE;
     285             : 
     286             :     /// Sfx item RES_CHRATR_CTL_FONTSIZE
     287             :     virtual void CharFontSizeCTL( const SvxFontHeightItem& rFontSize ) SAL_OVERRIDE;
     288             : 
     289             :     /// Sfx item RES_CHRATR_CTL_LANGUAGE
     290             :     virtual void CharLanguageCTL( const SvxLanguageItem& rLanguageItem ) SAL_OVERRIDE;
     291             : 
     292             :     /// Sfx item RES_CHRATR_CTL_POSTURE
     293             :     virtual void CharPostureCTL( const SvxPostureItem& rWeight ) SAL_OVERRIDE;
     294             : 
     295             :     /// Sfx item RES_CHRATR_CTL_WEIGHT
     296             :     virtual void CharWeightCTL( const SvxWeightItem& rWeight ) SAL_OVERRIDE;
     297             : 
     298             :     /// Sfx item RES_CHRATR_BidiRTL
     299             :     virtual void CharBidiRTL( const SfxPoolItem& ) SAL_OVERRIDE;
     300             : 
     301             :     /// Sfx item RES_CHRATR_IdctHint
     302             :     virtual void CharIdctHint( const SfxPoolItem& ) SAL_OVERRIDE;
     303             : 
     304             :     /// Sfx item RES_CHRATR_ROTATE
     305             :     virtual void CharRotate( const SvxCharRotateItem& rRotate ) SAL_OVERRIDE;
     306             : 
     307             :     /// Sfx item RES_CHRATR_EMPHASIS_MARK
     308             :     virtual void CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisMark ) SAL_OVERRIDE;
     309             : 
     310             :     /// Sfx item RES_CHRATR_TWO_LINES
     311             :     virtual void CharTwoLines( const SvxTwoLinesItem& rTwoLines ) SAL_OVERRIDE;
     312             : 
     313             :     /// Sfx item RES_CHRATR_SCALEW
     314             :     virtual void CharScaleWidth( const SvxCharScaleWidthItem& rScaleWidth ) SAL_OVERRIDE;
     315             : 
     316             :     /// Sfx item RES_CHRATR_RELIEF
     317             :     virtual void CharRelief( const SvxCharReliefItem& rRelief) SAL_OVERRIDE;
     318             : 
     319             :     /// Sfx item RES_CHRATR_HIDDEN
     320             :     virtual void CharHidden( const SvxCharHiddenItem& rHidden ) SAL_OVERRIDE;
     321             : 
     322             :     /// Sfx item RES_CHRATR_BOX
     323             :     virtual void CharBorder( const ::editeng::SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ) SAL_OVERRIDE;
     324             : 
     325             :     /// Sfx item RES_CHRATR_HIGHLIGHT
     326           0 :     virtual void CharHighlight( const SvxBrushItem& ) SAL_OVERRIDE {};
     327             : 
     328             :     /// Sfx item RES_TXTATR_INETFMT
     329             :     virtual void TextINetFormat( const SwFmtINetFmt& ) SAL_OVERRIDE;
     330             : 
     331             :     /// Sfx item RES_TXTATR_CHARFMT
     332             :     virtual void TextCharFormat( const SwFmtCharFmt& ) SAL_OVERRIDE;
     333             : 
     334             :     /// Sfx item RES_TXTATR_FTN
     335             :     virtual void TextFootnote_Impl( const SwFmtFtn& ) SAL_OVERRIDE;
     336             : 
     337             :     /// Sfx item RES_PARATR_LINESPACING
     338             :     virtual void ParaLineSpacing_Impl( short nSpace, short nMulti ) SAL_OVERRIDE;
     339             : 
     340             :     /// Sfx item RES_PARATR_ADJUST
     341             :     virtual void ParaAdjust( const SvxAdjustItem& rAdjust ) SAL_OVERRIDE;
     342             : 
     343             :     /// Sfx item RES_PARATR_SPLIT
     344             :     virtual void ParaSplit( const SvxFmtSplitItem& rSplit ) SAL_OVERRIDE;
     345             : 
     346             :     /// Sfx item RES_PARATR_WIDOWS
     347             :     virtual void ParaWidows( const SvxWidowsItem& rWidows ) SAL_OVERRIDE;
     348             : 
     349             :     /// Sfx item RES_PARATR_TABSTOP
     350             :     virtual void ParaTabStop( const SvxTabStopItem& rTabStop ) SAL_OVERRIDE;
     351             : 
     352             :     /// Sfx item RES_PARATR_HYPHENZONE
     353             :     virtual void ParaHyphenZone( const SvxHyphenZoneItem& ) SAL_OVERRIDE;
     354             : 
     355             :     /// Sfx item RES_PARATR_NUMRULE
     356             :     virtual void ParaNumRule_Impl( const SwTxtNode *pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId ) SAL_OVERRIDE;
     357             : 
     358             :     /// Sfx item RES_PARATR_SCRIPTSPACE
     359             :     virtual void ParaScriptSpace( const SfxBoolItem& ) SAL_OVERRIDE;
     360             : 
     361             :     /// Sfx item RES_PARATR_HANGINGPUNCTUATION
     362             :     virtual void ParaHangingPunctuation( const SfxBoolItem& ) SAL_OVERRIDE;
     363             : 
     364             :     /// Sfx item RES_PARATR_FORBIDDEN_RULES
     365             :     virtual void ParaForbiddenRules( const SfxBoolItem& ) SAL_OVERRIDE;
     366             : 
     367             :     /// Sfx item RES_PARATR_VERTALIGN
     368             :     virtual void ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) SAL_OVERRIDE;
     369             : 
     370             :     /// Sfx item RES_PARATR_SNAPTOGRID
     371             :     virtual void ParaSnapToGrid( const SvxParaGridItem& ) SAL_OVERRIDE;
     372             : 
     373             :     /// Sfx item RES_FRM_SIZE
     374             :     virtual void FormatFrameSize( const SwFmtFrmSize& ) SAL_OVERRIDE;
     375             : 
     376             :     /// Sfx item RES_PAPER_BIN
     377             :     virtual void FormatPaperBin( const SvxPaperBinItem& ) SAL_OVERRIDE;
     378             : 
     379             :     /// Sfx item RES_LR_SPACE
     380             :     virtual void FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) SAL_OVERRIDE;
     381             : 
     382             :     /// Sfx item RES_UL_SPACE
     383             :     virtual void FormatULSpace( const SvxULSpaceItem& rULSpace ) SAL_OVERRIDE;
     384             : 
     385             :     /// Sfx item RES_SURROUND
     386             :     virtual void FormatSurround( const SwFmtSurround& ) SAL_OVERRIDE;
     387             : 
     388             :     /// Sfx item RES_VERT_ORIENT
     389             :     virtual void FormatVertOrientation( const SwFmtVertOrient& ) SAL_OVERRIDE;
     390             : 
     391             :     /// Sfx item RES_HORI_ORIENT
     392             :     virtual void FormatHorizOrientation( const SwFmtHoriOrient& ) SAL_OVERRIDE;
     393             : 
     394             :     /// Sfx item RES_ANCHOR
     395             :     virtual void FormatAnchor( const SwFmtAnchor& ) SAL_OVERRIDE;
     396             : 
     397             :     /// Sfx item RES_BACKGROUND
     398             :     virtual void FormatBackground( const SvxBrushItem& ) SAL_OVERRIDE;
     399             : 
     400             :     /// Sfx item RES_FILL_STYLE
     401             :     virtual void FormatFillStyle( const XFillStyleItem& ) SAL_OVERRIDE;
     402             : 
     403             :     /// Sfx item RES_FILL_GRADIENT
     404             :     virtual void FormatFillGradient( const XFillGradientItem& ) SAL_OVERRIDE;
     405             : 
     406             :     /// Sfx item RES_BOX
     407             :     virtual void FormatBox( const SvxBoxItem& ) SAL_OVERRIDE;
     408             : 
     409             :     /// Sfx item RES_COL
     410             :     virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) SAL_OVERRIDE;
     411             : 
     412             :     /// Sfx item RES_KEEP
     413             :     virtual void FormatKeep( const SvxFmtKeepItem& ) SAL_OVERRIDE;
     414             : 
     415             :     /// Sfx item RES_TEXTGRID
     416             :     virtual void FormatTextGrid( const SwTextGridItem& ) SAL_OVERRIDE;
     417             : 
     418             :     /// Sfx item RES_LINENUMBER
     419             :     virtual void FormatLineNumbering( const SwFmtLineNumber& ) SAL_OVERRIDE;
     420             : 
     421             :     /// Sfx item RES_FRAMEDIR
     422             :     virtual void FormatFrameDirection( const SvxFrameDirectionItem& ) SAL_OVERRIDE;
     423             : 
     424             :     /// Sfx item RES_PARATR_GRABBAG
     425             :     virtual void ParaGrabBag( const SfxGrabBagItem& ) SAL_OVERRIDE;
     426             : 
     427             :     /// Sfx item RES_CHRATR_GRABBAG
     428             :     virtual void CharGrabBag( const SfxGrabBagItem& ) SAL_OVERRIDE;
     429             : 
     430             :     /// Sfx item RES_PARATR_OUTLINELEVEL
     431             :     virtual void ParaOutlineLevel( const SfxUInt16Item& ) SAL_OVERRIDE;
     432             : 
     433             :     /// Write the expanded field
     434             :     virtual void WriteExpand( const SwField* pFld ) SAL_OVERRIDE;
     435             : 
     436             :     virtual void RefField( const SwField& rFld, const OUString& rRef ) SAL_OVERRIDE;
     437             :     virtual void HiddenField( const SwField& rFld ) SAL_OVERRIDE;
     438             :     virtual void SetField( const SwField& rFld, ww::eField eType, const OUString& rCmd ) SAL_OVERRIDE;
     439             :     virtual void PostitField( const SwField* pFld ) SAL_OVERRIDE;
     440             :     virtual bool DropdownField( const SwField* pFld ) SAL_OVERRIDE;
     441             :     virtual bool PlaceholderField( const SwField* pFld ) SAL_OVERRIDE;
     442             : 
     443             :     /// Reference to the export, where to get the data from
     444             :     RtfExport &m_rExport;
     445             : 
     446             : private:
     447             : 
     448             :     /// Output graphic fly frames.
     449             :     void FlyFrameGraphic( const SwFlyFrmFmt* pFlyFrmFmt, const SwGrfNode* pGrfNode );
     450             :     void FlyFrameOLE( const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize );
     451             :     void FlyFrameOLEReplacement(const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize);
     452             :     /// Math export.
     453             :     bool FlyFrameOLEMath(const SwFlyFrmFmt* pFlyFrmFmt, SwOLENode& rOLENode, const Size& rSize);
     454             : 
     455             :     /*
     456             :      * Table methods.
     457             :      */
     458             :     void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
     459             :     void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
     460             :     void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
     461             :     void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
     462             :     void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
     463             :     void EndTableCell( );
     464             :     void EndTableRow( );
     465             :     void EndTable();
     466             : 
     467             :     /// End cell, row, and even the entire table if necessary.
     468             :     void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph = false );
     469             : 
     470             :     void WriteTextFootnoteNumStr(const SwFmtFtn& rFootnote);
     471             : 
     472             :     /*
     473             :      * Current style name and its ID.
     474             :      */
     475             :     OUString m_rStyleName;
     476             :     sal_uInt16 m_nStyleId;
     477             :     /*
     478             :      * Current list ID.
     479             :      */
     480             :     sal_uInt16 m_nListId;
     481             :     /*
     482             :      * This is needed because the call order is: run text, run properties, paragraph properties.
     483             :      * What we need is the opposite.
     484             :      */
     485             :     RtfStringBuffer m_aRun;
     486             :     RtfStringBuffer m_aRunText;
     487             :     /*
     488             :      * This is written after runs.
     489             :      */
     490             :     OStringBuffer m_aAfterRuns;
     491             :     /*
     492             :      * Same for colors and stylesheets: first we just want to output colors,
     493             :      * need to buffer the stylesheet table to output it after the color one.
     494             :      */
     495             :     OStringBuffer m_aStylesheet;
     496             :     /*
     497             :      * This one just holds the style commands in the current style.
     498             :      */
     499             :     OStringBuffer m_aStyles;
     500             :     /*
     501             :      * This is the same as m_aStyles but the conents of it is written last.
     502             :      */
     503             :     OStringBuffer m_aStylesEnd;
     504             : 
     505             :     /*
     506             :      * We just get a "end of strike" mark at the end of strike, store here what to finish: single or double strike.
     507             :      */
     508             :     bool m_bStrikeDouble;
     509             : 
     510             :     sal_Int32 m_nNextAnnotationMarkId;
     511             :     sal_Int32 m_nCurrentAnnotationMarkId;
     512             :     /// Maps annotation mark names to ID's.
     513             :     std::map<OString, sal_uInt16> m_rOpenedAnnotationMarksIds;
     514             : 
     515             :     /*
     516             :      * The current table helper.
     517             :      */
     518             :     SwWriteTable *m_pTableWrt;
     519             : 
     520             :     /*
     521             :      * Remember if we are in an open cell, or not.
     522             :      */
     523             :     bool m_bTableCellOpen;
     524             : 
     525             :     /*
     526             :      * Remember the current table depth.
     527             :      */
     528             :     sal_uInt32 m_nTableDepth;
     529             : 
     530             :     /*
     531             :      * Remember if we wrote a \cell or not.
     532             :      */
     533             :     bool m_bTblAfterCell;
     534             : 
     535             :     /*
     536             :      * For late output of row definitions.
     537             :      */
     538             :     OStringBuffer m_aRowDefs;
     539             : 
     540             :     /*
     541             :      * Is a column break needed after the next \par?
     542             :      */
     543             :     bool m_nColBreakNeeded;
     544             : 
     545             :     /*
     546             :      * If section breaks should be buffered to m_aSectionBreaks
     547             :      */
     548             :     bool m_bBufferSectionBreaks;
     549             :     OStringBuffer m_aSectionBreaks;
     550             : 
     551             :     /*
     552             :      * If section headers (and footers) should be buffered to
     553             :      * m_aSectionHeaders.
     554             :      */
     555             :     bool m_bBufferSectionHeaders;
     556             :     OStringBuffer m_aSectionHeaders;
     557             : 
     558             :     /*
     559             :      * Support for starting multiple tables at the same cell.
     560             :      * If the current table is the last started one.
     561             :      */
     562             :     bool m_bLastTable;
     563             :     /*
     564             :      * List of already started but not yet defined tables (need to be defined
     565             :      * after the nested tables).
     566             :      */
     567             :     std::vector< OString > m_aTables;
     568             :     /*
     569             :      * If cell info is already output.
     570             :      */
     571             :     bool m_bWroteCellInfo;
     572             : 
     573             :     /*
     574             :      * If we had a field result in the URL.
     575             :      */
     576             :     bool m_bHadFieldResult;
     577             : 
     578             :     /// If we ended a table row without starting a new one.
     579             :     bool m_bTableRowEnded;
     580             : 
     581             :     /// Number of cells from the table definition, by depth.
     582             :     std::map<sal_uInt32,sal_uInt32> m_aCells;
     583             : 
     584             :     /// If we're in a paragraph that has a single empty run only.
     585             :     bool m_bSingleEmptyRun;
     586             : 
     587             :     bool m_bInRun;
     588             : 
     589             :     /// Maps ID's to postit fields, used in atrfstart/end and atnref.
     590             :     std::map<sal_uInt16, const SwPostItField*> m_aPostitFields;
     591             : 
     592             :     /// When exporting fly frames, this holds the real size of the frame.
     593             :     const Size* m_pFlyFrameSize;
     594             : 
     595             :     std::vector< std::pair<OString, OString> > m_aFlyProperties;
     596             : 
     597             :     boost::optional<XFillStyle> m_oFillStyle;
     598             : 
     599             : public:
     600             :     RtfAttributeOutput( RtfExport &rExport );
     601             : 
     602             :     virtual ~RtfAttributeOutput();
     603             : 
     604             :     /// Return the right export class.
     605             :     virtual MSWordExportBase& GetExport() SAL_OVERRIDE;
     606             : 
     607             :     OStringBuffer m_aTabStop;
     608             : 
     609             :     /// Access to the page style of the previous paragraph.
     610             :     const SwPageDesc* m_pPrevPageDesc;
     611             : 
     612             :     // These are used by wwFont::WriteRtf()
     613             :     /// Start the font.
     614             :     void StartFont( const OUString& rFamilyName ) const;
     615             : 
     616             :     /// End the font.
     617             :     void EndFont() const;
     618             : 
     619             :     /// Alternate name for the font.
     620             :     void FontAlternateName( const OUString& rName ) const;
     621             : 
     622             :     /// Font charset.
     623             :     void FontCharset( sal_uInt8 nCharSet ) const;
     624             : 
     625             :     /// Font family.
     626             :     void FontFamilyType( FontFamily eFamily, const wwFont &rFont ) const;
     627             : 
     628             :     /// Font pitch.
     629             :     void FontPitchType( FontPitch ePitch ) const;
     630             : 
     631             :     /// Writes binary data as a hex dump.
     632             :     static OString WriteHex(const sal_uInt8* pData, sal_uInt32 nSize, SvStream* pStream = 0, sal_uInt32 nLimit = 64);
     633             : 
     634             :     void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) SAL_OVERRIDE;
     635             : };
     636             : 
     637             : #endif // INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
     638             : 
     639             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10