LibreOffice Module sw (master)  1
docxattributeoutput.hxx
Go to the documentation of this file.
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 <memory>
24 
25 #include "attributeoutputbase.hxx"
26 #include "fields.hxx"
27 #include <IMark.hxx>
28 #include "docxexport.hxx"
29 #include <wrtswtbl.hxx>
30 
31 #include <editeng/boxitem.hxx>
32 #include <sax/fshelper.hxx>
33 #include <sax/fastattribs.hxx>
34 #include <vcl/vclenum.hxx>
35 #include <svx/xenum.hxx>
36 
37 #include <fldbas.hxx>
38 
39 #include <vector>
40 #include <boost/optional.hpp>
41 #include <oox/export/vmlexport.hxx>
42 #include <oox/export/drawingml.hxx>
43 #include "docxtablestyleexport.hxx"
44 
45 #include <com/sun/star/table/BorderLine2.hpp>
46 #include <com/sun/star/drawing/FillStyle.hpp>
47 
48 class SwGrfNode;
49 class SdrObject;
50 enum class SvxBoxItemLine;
51 
52 namespace docx { class FootnotesList; }
53 namespace oox { namespace drawingml { class DrawingML; } }
54 
55 struct FieldInfos
56 {
57  std::shared_ptr<const SwField> pField;
58  const ::sw::mark::IFieldmark* pFieldmark;
60  bool bOpen;
61  bool bSep;
62  bool bClose;
63  OUString sCmd;
65  : pFieldmark(nullptr), eType(ww::eUNKNOWN)
66  , bOpen(false), bSep(false), bClose(false)
67  {}
68 };
69 
71 {
76 };
77 
89 {
90  sal_Int32 tag = 0;
91  bool bUseStartEnd = false;
92  bool bWriteTag = true;
93  bool bWriteDistance = false;
94  SvxShadowLocation aShadowLocation = SvxShadowLocation::NONE;
95  std::shared_ptr<editeng::WordBorderDistances> pDistances;
96 };
97 
99 
104 {
107 
110 
112  sal_uInt32 m_nTableDepth;
113 
115  : m_bTableCellOpen(false),
116  m_bTableCellParaSdtOpen(false),
117  m_nTableDepth(0)
118  {
119  }
120 };
121 
124 {
125 public:
127  virtual void RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript ) override;
128 
130  virtual void StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo ) override;
131 
133  virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) override;
134 
136  virtual void EmptyParagraph() override;
137 
139  virtual void SectionBreaks(const SwNode& rNode) override;
140 
142  virtual void StartParagraphProperties() override;
143 
145  virtual void EndParagraphProperties(const SfxItemSet& rParagraphMarkerProperties, const SwRedlineData* pRedlineData, const SwRedlineData* pRedlineParagraphMarkerDeleted, const SwRedlineData* pRedlineParagraphMarkerInserted) override;
146 
148  virtual void StartRun( const SwRedlineData* pRedlineData, sal_Int32 nPos, bool bSingleEmptyRun = false ) override;
149 
151  virtual void EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool bLastRun = false) override;
152 
154  virtual void StartRunProperties() override;
155 
157  virtual void EndRunProperties( const SwRedlineData* pRedlineData ) override;
158 
159  virtual bool FootnoteEndnoteRefTag() override;
160 
161  virtual void SectFootnoteEndnotePr() override;
162 
163  virtual void WritePostitFieldReference() override;
164 
166  virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 ) override;
167 
169  virtual void RawText(const OUString& rText, rtl_TextEncoding eCharSet) override;
170 
172  virtual void StartRuby( const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby ) override;
173 
175  virtual void EndRuby(const SwTextNode& rNode, sal_Int32 nPos) override;
176 
178  virtual bool StartURL( const OUString& rUrl, const OUString& rTarget ) override;
179 
181  virtual bool EndURL(bool) override;
182 
183  virtual void FieldVanish( const OUString& rText, ww::eField eType ) override;
184 
188  virtual void Redline( const SwRedlineData* pRedline ) override;
189 
194  void StartRedline( const SwRedlineData * pRedlineData );
195 
199  void EndRedline( const SwRedlineData * pRedlineData );
200 
201  virtual void SetStateOfFlyFrame( FlyProcessingState nStateOfFlyFrame ) override;
202  virtual void SetAnchorIsLinkedToNode( bool bAnchorLinkedToNode ) override;
203  virtual bool IsFlyProcessingPostponed() override;
204  virtual void ResetFlyProcessingFlag() override;
205 
206  virtual void FormatDrop( const SwTextNode& rNode, const SwFormatDrop& rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) override;
207 
209  virtual void ParagraphStyle( sal_uInt16 nStyle ) override;
210 
211  virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
212  virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
213  virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
214  virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
215  void TableDefaultCellMargins( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
216  virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
217  virtual void TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
218  virtual void TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
219  virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
220  virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
221  virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
222  virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
223  virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner ) override;
224  virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
225  virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
226  virtual void TableRowEnd( sal_uInt32 nDepth ) override;
227 
229  virtual void StartStyles() override;
230 
232  virtual void EndStyles( sal_uInt16 nNumberOfStyles ) override;
233 
235  virtual void DefaultStyle() override;
236 
238  void DocDefaults( );
239 
241  void LatentStyles();
242 
248  void OutputDefaultItem(const SfxPoolItem& rHt);
249 
251  virtual void StartStyle( const OUString& rName, StyleType eType,
252  sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
253  bool bAutoUpdate ) override;
254 
256  virtual void EndStyle() override;
257 
259  virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle ) override;
260 
262  virtual void EndStyleProperties( bool bParProp ) override;
263 
265  virtual void OutlineNumbering(sal_uInt8 nLvl) override;
266 
269  virtual void PageBreakBefore( bool bBreak ) override;
270 
273  virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = nullptr ) override;
274 
275  // preserve DOCX page vertical alignment
276  virtual void TextVerticalAdjustment( const css::drawing::TextVerticalAdjust ) override;
277 
279  virtual void StartSection() override;
280 
282  virtual void EndSection() override;
283 
285  virtual void SectionFormProtection( bool bProtected ) override;
286 
288  virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo ) override;
289 
291  virtual void SectionTitlePage() override;
292 
294  virtual void SectionPageBorders( const SwFrameFormat* pFormat, const SwFrameFormat* pFirstPageFormat ) override;
295 
297  virtual void SectionBiDi( bool bBiDi ) override;
298 
301  virtual void SectionPageNumbering( sal_uInt16 nNumType, const ::boost::optional<sal_uInt16>& oPageRestartNumber ) override;
302 
304  virtual void SectionType( sal_uInt8 nBreakCode ) override;
305 
307  void StartFont( const OUString& rFamilyName ) const;
308 
310  void EndFont() const;
311 
313  void FontAlternateName( const OUString& rName ) const;
314 
316  void FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEncoding ) const;
317 
319  void FontFamilyType( FontFamily eFamily ) const;
320 
322  void FontPitchType( FontPitch ePitch ) const;
323 
325  void EmbedFont( const OUString& name, FontFamily family, FontPitch pitch );
326 
328  virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) override;
329 
331  virtual void OverrideNumberingDefinition(SwNumRule const& rRule,
332  sal_uInt16 nNum, sal_uInt16 nAbstractNum) override;
333 
335  virtual void StartAbstractNumbering( sal_uInt16 nId ) override;
336 
338  virtual void EndAbstractNumbering() override;
339 
341  virtual void NumberingLevel( sal_uInt8 nLevel,
342  sal_uInt16 nStart,
343  sal_uInt16 nNumberingType,
344  SvxAdjust eAdjust,
345  const sal_uInt8 *pNumLvlPos,
346  sal_uInt8 nFollow,
347  const wwFont *pFont,
348  const SfxItemSet *pOutSet,
349  sal_Int16 nIndentAt,
350  sal_Int16 nFirstLineIndex,
351  sal_Int16 nListTabPos,
352  const OUString &rNumberingString,
353  const SvxBrushItem* pBrush ) override;
354 
355  void WriteField_Impl( const SwField* pField, ww::eField eType, const OUString& rFieldCmd, FieldFlags nMode );
356  void WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark );
357 
358  void WriteBookmarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
359  void WriteFinalBookmarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
360  void WriteAnnotationMarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
361  void PushRelIdCache();
362  void PopRelIdCache();
364  void EndParaSdtBlock();
365 
366  void WriteFloatingTable(ww8::Frame const* pParentFrame);
367 
368 private:
376 
381 
389 
394 
401  void FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrameFormat* pOLEFrameFormat, SwOLENode* pOLENode, const SdrObject* pSdrObj = nullptr);
402  void WriteSrcRect( const SdrObject* pSdrObj, const SwFrameFormat* pFrameFormat );
403  void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat);
404  bool WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat);
405  bool WriteOLEMath( const SwOLENode& rNode );
406  void PostponeOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat );
407  void WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* rFlyFrameFormat );
408 
409  void WriteActiveXControl(const SdrObject* pObject, const SwFrameFormat& rFrameFormat, bool bInsideRun);
410  bool ExportAsActiveXControl(const SdrObject* pObject) const;
411 
412  void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
413  void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
414  void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
415  void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow );
416  void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow );
417  void EndTableCell( sal_uInt32 nCell );
418  void EndTableRow( );
419  void EndTable();
420  void SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, sal_Int32 nCell, sal_uInt32 nRow);
421  void PopulateFrameProperties(const SwFrameFormat* pFrameFormat, const Size& rSize);
422  static bool TextBoxIsFramePr(const SwFrameFormat& rFrameFormat);
424  void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, bool bForceEmptyParagraph = false );
425 
426  void WriteFFData( const FieldInfos& rInfos );
428 
429  void EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic, FontWeight weight,
430  FontPitch pitch );
431 
439  static OString TransHighlightColor( sal_uInt8 nIco );
440 protected:
441 
443  virtual void OutputFlyFrame_Impl( const ww8::Frame& rFormat, const Point& rNdTopLeft ) override;
444 
446  virtual void CharCaseMap( const SvxCaseMapItem& rCaseMap ) override;
447 
449  virtual void CharColor( const SvxColorItem& rColor) override;
450 
452  virtual void CharContour( const SvxContourItem& rContour ) override;
453 
455  virtual void CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ) override;
456 
458  virtual void CharEscapement( const SvxEscapementItem& rEscapement ) override;
459 
461  virtual void CharFont( const SvxFontItem& rFont ) override;
462 
464  virtual void CharFontSize( const SvxFontHeightItem& rFontSize ) override;
465 
467  virtual void CharKerning( const SvxKerningItem& rKerning ) override;
468 
470  virtual void CharLanguage( const SvxLanguageItem& rLanguage ) override;
471 
473  virtual void CharPosture( const SvxPostureItem& rPosture ) override;
474 
476  virtual void CharShadow( const SvxShadowedItem& rShadow ) override;
477 
479  virtual void CharUnderline( const SvxUnderlineItem& rUnderline ) override;
480 
482  virtual void CharWeight( const SvxWeightItem& rWeight ) override;
483 
485  virtual void CharAutoKern( const SvxAutoKernItem& ) override;
486 
488  virtual void CharAnimatedText( const SvxBlinkItem& rBlink ) override;
489 
491  virtual void CharBackground( const SvxBrushItem& rBrush ) override;
492 
494  virtual void CharFontCJK( const SvxFontItem& rFont ) override;
495 
497  virtual void CharFontSizeCJK( const SvxFontHeightItem& rFontSize ) override { CharFontSize( rFontSize ); }
498 
500  virtual void CharLanguageCJK( const SvxLanguageItem& rLanguageItem ) override { CharLanguage( rLanguageItem ); }
501 
503  virtual void CharPostureCJK( const SvxPostureItem& rPosture ) override;
504 
506  virtual void CharWeightCJK( const SvxWeightItem& rWeight ) override;
507 
509  virtual void CharFontCTL( const SvxFontItem& rFont ) override;
510 
512  virtual void CharFontSizeCTL( const SvxFontHeightItem& rFontSize ) override { CharFontSize( rFontSize ); }
513 
515  virtual void CharLanguageCTL( const SvxLanguageItem& rLanguageItem ) override { CharLanguage( rLanguageItem); }
516 
518  virtual void CharPostureCTL( const SvxPostureItem& rWeight ) override;
519 
521  virtual void CharWeightCTL( const SvxWeightItem& rWeight ) override;
522 
524  virtual void CharBidiRTL( const SfxPoolItem& ) override;
525 
527  virtual void CharIdctHint( const SfxPoolItem& ) override;
528 
530  virtual void CharRotate( const SvxCharRotateItem& rRotate ) override;
531 
533  virtual void CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisMark ) override;
534 
536  virtual void CharTwoLines( const SvxTwoLinesItem& rTwoLines ) override;
537 
539  virtual void CharScaleWidth( const SvxCharScaleWidthItem& rScaleWidth ) override;
540 
542  virtual void CharRelief( const SvxCharReliefItem& rRelief) override;
543 
545  virtual void CharHidden( const SvxCharHiddenItem& rHidden ) override;
546 
548  virtual void CharBorder( const ::editeng::SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ) override;
549 
551  virtual void CharHighlight( const SvxBrushItem& rHighlight ) override;
552 
554  virtual void TextINetFormat( const SwFormatINetFormat& ) override;
555 
557  virtual void TextCharFormat( const SwFormatCharFormat& ) override;
558 
560  virtual void TextFootnote_Impl( const SwFormatFootnote& ) override;
561 
564 
566  virtual void ParaLineSpacing_Impl( short nSpace, short nMulti ) override;
567 
569  virtual void ParaAdjust( const SvxAdjustItem& rAdjust ) override;
570 
572  virtual void ParaSplit( const SvxFormatSplitItem& rSplit ) override;
573 
575  virtual void ParaWidows( const SvxWidowsItem& rWidows ) override;
576 
578  virtual void ParaTabStop( const SvxTabStopItem& rTabStop ) override;
579 
581  virtual void ParaHyphenZone( const SvxHyphenZoneItem& ) override;
582 
584  virtual void ParaNumRule_Impl( const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId ) override;
585 
587  virtual void ParaScriptSpace( const SfxBoolItem& ) override;
588 
590  virtual void ParaHangingPunctuation( const SfxBoolItem& ) override;
591 
593  virtual void ParaForbiddenRules( const SfxBoolItem& ) override;
594 
596  virtual void ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) override;
597 
599  virtual void ParaSnapToGrid( const SvxParaGridItem& ) override;
600 
602  virtual void FormatFrameSize( const SwFormatFrameSize& ) override;
603 
605  virtual void FormatPaperBin( const SvxPaperBinItem& ) override;
606 
608  virtual void FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) override;
609 
611  virtual void FormatULSpace( const SvxULSpaceItem& rULSpace ) override;
612 
614  virtual void FormatSurround( const SwFormatSurround& ) override;
615 
617  virtual void FormatVertOrientation( const SwFormatVertOrient& ) override;
618 
620  virtual void FormatHorizOrientation( const SwFormatHoriOrient& ) override;
621 
623  virtual void FormatAnchor( const SwFormatAnchor& ) override;
624 
626  virtual void FormatBackground( const SvxBrushItem& ) override;
627 
629  virtual void FormatFillStyle( const XFillStyleItem& ) override;
630 
632  virtual void FormatFillGradient( const XFillGradientItem& ) override;
633 
635  virtual void FormatBox( const SvxBoxItem& ) override;
636 
638  virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFormatCol & rCol, bool bEven, SwTwips nPageSize ) override;
639 
641  virtual void FormatKeep( const SvxFormatKeepItem& ) override;
642 
644  virtual void FormatTextGrid( const SwTextGridItem& ) override;
645 
647  virtual void FormatLineNumbering( const SwFormatLineNumber& ) override;
648 
650  virtual void FormatFrameDirection( const SvxFrameDirectionItem& ) override;
651 
653  virtual void ParaGrabBag( const SfxGrabBagItem& ) override;
654 
656  virtual void CharGrabBag( const SfxGrabBagItem& ) override;
657 
658  // Sfx item RES_PARATR_OUTLINELEVEL
659  virtual void ParaOutlineLevel( const SfxUInt16Item& ) override;
660 
662  virtual void WriteExpand( const SwField* pField ) override;
663 
664  virtual void RefField( const SwField& rField, const OUString& rRef ) override;
665  virtual void HiddenField( const SwField& rField ) override;
666  virtual void SetField( const SwField& rField, ww::eField eType, const OUString& rCmd ) override;
667  virtual void PostitField( const SwField* pField ) override;
668  virtual bool DropdownField( const SwField* pField ) override;
669  virtual bool PlaceholderField( const SwField* pField ) override;
670 
671  virtual bool AnalyzeURL( const OUString& rURL, const OUString& rTarget, OUString* pLinkURL, OUString* pMark ) override;
672 
673  virtual void WriteBookmarkInActParagraph( const OUString& rName, sal_Int32 nFirstRunPos, sal_Int32 nLastRunPos ) override;
674 
677 
680 
683 
684 private:
685 
686  void DoWriteBookmarkTagStart(const OUString & bookmarkName);
687  void DoWriteBookmarkTagEnd(const OUString & bookmarkName);
688  void DoWriteBookmarksStart(std::vector<OUString>& rStarts);
689  void DoWriteBookmarksEnd(std::vector<OUString>& rEnds);
690  void DoWriteBookmarkStartIfExist(sal_Int32 nRunPos);
691  void DoWriteBookmarkEndIfExist(sal_Int32 nRunPos);
692 
693  void DoWritePermissionTagStart(const OUString & permission);
694  void DoWritePermissionTagEnd(const OUString & permission);
696  void DoWritePermissionsEnd();
697 
698  void DoWriteAnnotationMarks( );
699  void WritePostponedGraphic();
700  void WritePostponedMath(const SwOLENode* pObject);
701  void WritePostponedFormControl(const SdrObject* pObject);
702  void WritePostponedActiveXControl(bool bInsideRun);
703  void WritePostponedDiagram();
704  void WritePostponedChart();
705  void WritePostponedOLE();
708 
709  void WriteSdtBlock(sal_Int32& nSdtPrToken,
713  OUString& rSdtPrAlias,
714  bool bPara);
716  void EndSdtBlock();
717 
718  void WriteFormDateStart(const OUString& sFullDate, const OUString& sDateFormat, const OUString& sLang);
719  void WriteFormDateEnd();
720 
721  void StartField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun = false );
722  void DoWriteCmd( const OUString& rCmd );
723  void CmdField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun );
724  void CmdEndField_Impl( const SwTextNode* pNode, sal_Int32 nPos, bool bWriteRun );
725  void EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos& rInfos );
726  void DoWriteFieldRunProperties( const SwTextNode* pNode, sal_Int32 nPos, bool bWriteCombChars = false );
727 
728  static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue );
729  static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... );
730 
750  std::unique_ptr<docx::FootnotesList> m_pFootnotesList;
751  std::unique_ptr<docx::FootnotesList> m_pEndnotesList;
754  std::unique_ptr< const WW8_SepInfo > m_pSectionInfo;
755 
758 
760  sal_Int32 m_nRedlineId;
761 
766 
769 
773 
776 
779  std::vector< FieldInfos > m_Fields;
780  OUString m_sFieldBkm;
781  sal_Int32 m_nNextBookmarkId;
783 
784  OUString m_sRawText;
785 
787  std::vector<OUString> m_rBookmarksStart;
788  std::vector<OUString> m_rBookmarksEnd;
789 
791  std::vector<OUString> m_rFinalBookmarksStart;
792  std::vector<OUString> m_rFinalBookmarksEnd;
793 
795  std::multimap<sal_Int32, OUString> m_aBookmarksOfParagraphStart;
796  std::multimap<sal_Int32, OUString> m_aBookmarksOfParagraphEnd;
797 
799  std::vector<OUString> m_rPermissionsStart;
800  std::vector<OUString> m_rPermissionsEnd;
801 
803  std::vector<OString> m_rAnnotationMarksStart;
804  std::vector<OString> m_rAnnotationMarksEnd;
805 
807  std::map<OUString, sal_Int32> m_rOpenedBookmarksIds;
808 
811 
813  std::map<OString, sal_Int32> m_rOpenedAnnotationMarksIds;
814 
817 
820  std::map<OUString, std::vector<OString> > m_aSeqBookmarksNames;
821 
823  std::vector<css::beans::PropertyValue> m_aTextEffectsGrabBag;
824 
826  std::unique_ptr<SwWriteTable> m_xTableWrt;
827 
829 
835 
836  // Remember that a column break has to be opened at the
837  // beginning of the next paragraph
839 
840  // Remember that a page break has to be opened at the
841  // beginning of the next paragraph
843 
844  std::vector<ww8::Frame> m_aFramesOfParagraph;
845  std::set<const SwFrameFormat*> m_aFloatingTablesOfParagraph;
846  sal_Int32 m_nTextFrameLevel;
847 
848  // close of hyperlink needed
852  // Count nested HyperLinks
853  sal_Int32 m_nHyperLinkCount;
855 
856  // If the exported numbering rule defines the outlines
858 
860  {
861  PostponedGraphic( const SwGrfNode* n, Size s, const SdrObject* sObj )
862  : grfNode( n ), size( s ), pSdrObj(sObj) {};
863 
864  const SwGrfNode* grfNode;
865  Size const size;
867  };
868  std::unique_ptr< std::vector<PostponedGraphic> > m_pPostponedGraphic;
870  {
871  PostponedDiagram( const SdrObject* o, const SwFrameFormat* frm ) : object( o ), frame( frm ) {};
872  const SdrObject* object;
874  };
875  std::unique_ptr< std::vector<PostponedDiagram> > m_pPostponedDiagrams;
876 
878  {
879  PostponedDrawing( const SdrObject* sdrObj, const SwFrameFormat* frm) : object( sdrObj ), frame( frm ) {};
880  const SdrObject* object;
882  };
883  std::unique_ptr< std::vector<PostponedDrawing> > m_pPostponedDMLDrawings;
884  std::unique_ptr< std::vector<PostponedDrawing> > m_pPostponedCustomShape;
885 
887  {
888  PostponedOLE( SwOLENode* rObject, const Size& rSize, const SwFlyFrameFormat* rFrame ) : object( rObject ), size( rSize ), frame( rFrame ) {};
889  SwOLENode* object;
890  const Size size;
892  };
893  std::unique_ptr< std::vector<PostponedOLE> > m_pPostponedOLEs;
894 
895  std::vector<const SwOLENode*> m_aPostponedMaths;
897  unsigned int m_nChartCount;
899  {
900  PostponedChart( const SdrObject* sdrObject, const Size& rSize, const SwFlyFrameFormat* rFrame ) : object(sdrObject), size(rSize), frame(rFrame) {};
901  const SdrObject* object;
902  const Size size;
904  };
905  std::vector<PostponedChart> m_aPostponedCharts;
906  std::vector<const SdrObject*> m_aPostponedFormControls;
907  std::vector<PostponedDrawing> m_aPostponedActiveXControls;
910  std::vector< std::pair<const SwPostItField*, sal_Int32> > m_postitFields;
912  unsigned int m_postitFieldsMaxId;
916  {
917  OString relId;
918  OString fontKey;
919  };
920 
921  std::unique_ptr<TableReference> m_tableReference;
922 
923  std::map< OUString, EmbeddedFontRef > fontFilesMap; // font file url to data
924 
925  // Remember first cell (used for default borders/margins) of each table
926  std::vector<ww8::WW8TableNodeInfoInner::Pointer_t> tableFirstCells;
927  // Remember last open and closed cells on each level
928  std::vector<sal_Int32> lastOpenCell;
929  std::vector<sal_Int32> lastClosedCell;
930 
934 
936 
937  std::shared_ptr<DocxTableStyleExport> m_pTableStyleExport;
938  // flag to check if auto spacing was set in original file
940  // store hardcoded value which was set during import.
942 
944 
946  std::stack< std::map<const Graphic*, OString> > m_aRelIdCache;
948  std::stack< std::map<BitmapChecksum, OUString> > m_aSdrRelIdCache;
949 
956  sal_Int32 m_nRunSdtPrToken;
968 
969  std::map<SvxBoxItemLine, css::table::BorderLine2> m_aTableStyleConf;
970 
971 public:
972  DocxAttributeOutput( DocxExport &rExport, const ::sax_fastparser::FSHelperPtr& pSerializer, oox::drawingml::DrawingML* pDrawingML );
973 
974  virtual ~DocxAttributeOutput() override;
975 
977  virtual DocxExport& GetExport() override;
978  const DocxExport& GetExport() const { return const_cast< DocxAttributeOutput* >( this )->GetExport(); }
979 
981  void SetSerializer( ::sax_fastparser::FSHelperPtr const & pSerializer );
982 
984  const ::sax_fastparser::FSHelperPtr& GetSerializer( ) const { return m_pSerializer; }
985 
987  bool HasFootnotes() const;
988 
990  bool HasEndnotes() const;
991 
993  void FootnotesEndnotes( bool bFootnotes );
994 
996  static void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr const & fs, int tag, const SwEndNoteInfo& info, int listtag );
997 
998  bool HasPostitFields() const;
999  void WritePostitFields();
1000 
1002  virtual void WriteOutliner(const OutlinerParaObject& rParaObj) override;
1003  virtual void WriteVMLTextBox(css::uno::Reference<css::drawing::XShape> xShape) override;
1005  virtual void WriteTextBox(css::uno::Reference<css::drawing::XShape> xShape) override;
1006  virtual OUString FindRelId(BitmapChecksum nChecksum) override;
1007  virtual void CacheRelId(BitmapChecksum nChecksum, const OUString& rRelId) override;
1008  virtual oox::drawingml::DrawingML& GetDrawingML() override;
1009 
1010  void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) override;
1011 
1012  void SetWritingHeaderFooter( bool bWritingHeaderFooter ) { m_bWritingHeaderFooter = bWritingHeaderFooter; }
1014  void SetAlternateContentChoiceOpen( bool bAltContentChoiceOpen ) { m_bAlternateContentChoiceOpen = bAltContentChoiceOpen; }
1016  void GetSdtEndBefore(const SdrObject* pSdrObj);
1017  bool IsFirstParagraph() const { return m_bIsFirstParagraph; }
1018 
1022  void popFromTableExportContext(DocxTableExportContext const & rContext);
1023 };
1024 
1030 {
1035  sal_uInt32 m_nTableDepth;
1036  DocxTableExportContext(DocxAttributeOutput& rOutput) : m_rOutput(rOutput) { m_rOutput.pushToTableExportContext(*this); }
1038 };
1039 
1040 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXATTRIBUTEOUTPUT_HXX
1041 
1042 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< docx::FootnotesList > m_pEndnotesList
virtual void TableRowRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual void StartAbstractNumbering(sal_uInt16 nId) override
Start of the abstract numbering definition instance.
void WritePostponedActiveXControl(bool bInsideRun)
virtual void TableCanSplit(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void DoWritePermissionTagEnd(const OUString &permission)
virtual void WriteVMLTextBox(css::uno::Reference< css::drawing::XShape > xShape) override
DocxAttributeOutput & m_rOutput
Definition: wwstyles.hxx:25
void WritePostponedMath(const SwOLENode *pObject)
bool HasFootnotes() const
Do we have any footnotes?
std::multimap< sal_Int32, OUString > m_aBookmarksOfParagraphEnd
sal_uInt64 BitmapChecksum
virtual bool PlaceholderField(const SwField *pField) override
virtual void NumberingDefinition(sal_uInt16 nId, const SwNumRule &rRule) override
Definition of a numbering instance.
std::map< SvxBoxItemLine, css::table::BorderLine2 > m_aTableStyleConf
virtual void TextCharFormat(const SwFormatCharFormat &) override
Sfx item RES_TXTATR_CHARFMT.
virtual oox::drawingml::DrawingML & GetDrawingML() override
std::map< OUString, sal_Int32 > m_rOpenedBookmarksIds
Maps of the bookmarks ids.
The class that has handlers for various resource types when exporting as DOCX.
OUString m_aStartedParagraphSdtPrAlias
Same as m_aParagraphSdtPrAlias, but its content is available till the SDT is closed.
virtual void FormatPaperBin(const SvxPaperBinItem &) override
Sfx item RES_PAPER_BIN.
virtual bool DropdownField(const SwField *pField) override
virtual void StartRun(const SwRedlineData *pRedlineData, sal_Int32 nPos, bool bSingleEmptyRun=false) override
Start of the text run.
void EmbedFont(const OUString &name, FontFamily family, FontPitch pitch)
Write out the font into the document, if it's an embedded font.
virtual void SectionBiDi(bool bBiDi) override
Columns populated from right/numbers on the right side?
virtual void SetStateOfFlyFrame(FlyProcessingState nStateOfFlyFrame) override
Set the state of the Fly at current position.
DocxColBreakStatus m_nColBreakStatus
virtual void CharLanguageCJK(const SvxLanguageItem &rLanguageItem) override
Sfx item RES_CHRATR_CJK_LANGUAGE.
void WriteOLE2Obj(const SdrObject *pSdrObj, SwOLENode &rNode, const Size &rSize, const SwFlyFrameFormat *pFlyFrameFormat)
OUString m_aParagraphSdtPrAlias
Value of the paragraph SDT element.
std::vector< FieldInfos > m_Fields
virtual ~DocxAttributeOutput() override
virtual void CharPostureCJK(const SvxPostureItem &rPosture) override
Sfx item RES_CHRATR_CJK_POSTURE.
virtual void CharEmphasisMark(const SvxEmphasisMarkItem &rEmphasisMark) override
Sfx item RES_CHRATR_EMPHASIS_MARK.
virtual void CharUnderline(const SvxUnderlineItem &rUnderline) override
Sfx item RES_CHRATR_UNDERLINE.
virtual void TableBackgrounds(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
DocxColBreakStatus
void OutputDefaultItem(const SfxPoolItem &rHt)
Similar to OutputItem(), but write something only if it is not the default.
virtual void ParaHyphenZone(const SvxHyphenZoneItem &) override
Sfx item RES_PARATR_HYPHENZONE.
virtual void CharFontCJK(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_CJK_FONT.
void StartTableRow(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner)
virtual void CharKerning(const SvxKerningItem &rKerning) override
Sfx item RES_CHRATR_KERNING.
virtual void SectionType(sal_uInt8 nBreakCode) override
The type of breaking.
virtual void CharHidden(const SvxCharHiddenItem &rHidden) override
Sfx item RES_CHRATR_HIDDEN.
sal_uInt32 m_nTableDepth
Remember the current table depth.
void StartTableCell(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow)
sal_uIntPtr sal_uLong
DocxExport & m_rExport
Reference to the export, where to get the data from.
bool m_bTableCellOpen
Remember if we are in an open cell, or not.
sal_Int32 m_nParagraphSdtPrToken
members to control the existence of grabbagged SDT properties in the paragraph
virtual void ParaSplit(const SvxFormatSplitItem &rSplit) override
Sfx item RES_PARATR_SPLIT.
void EndFont() const
End the font.
Base class of all fields.
Definition: fldbas.hxx:280
virtual void FormatLineNumbering(const SwFormatLineNumber &) override
Sfx item RES_LINENUMBER.
std::set< const SwFrameFormat * > m_aFloatingTablesOfParagraph
virtual void RunText(const OUString &rText, rtl_TextEncoding eCharSet=RTL_TEXTENCODING_UTF8) override
Output text (inside a run).
virtual void OverrideNumberingDefinition(SwNumRule const &rRule, sal_uInt16 nNum, sal_uInt16 nAbstractNum) override
Numbering definition that overrides abstract numbering definition.
rtl::Reference< sax_fastparser::FastAttributeList > m_pRunSdtPrDataBindingAttrs
virtual void CharWeightCTL(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_CTL_WEIGHT.
unsigned int m_postitFieldsMaxId
Number of postit fields which already have a commentReference written.
bool m_bTableCellParaSdtOpen
If paragraph sdt got opened in this table cell.
sal_Int16 nId
void WriteFloatingTable(ww8::Frame const *pParentFrame)
All the information that should be stashed away when we're in the middle of of a table export and sti...
DocxTableExportContext(DocxAttributeOutput &rOutput)
virtual void CharFontSizeCJK(const SvxFontHeightItem &rFontSize) override
Sfx item RES_CHRATR_CJK_FONTSIZE.
virtual void SetAnchorIsLinkedToNode(bool bAnchorLinkedToNode) override
If the node has an anchor linked.
virtual void FormatColumns_Impl(sal_uInt16 nCols, const SwFormatCol &rCol, bool bEven, SwTwips nPageSize) override
Sfx item RES_COL.
void pushToTableExportContext(DocxTableExportContext &rContext)
Stores the table export state to the passed context and resets own state.
void EndField_Impl(const SwTextNode *pNode, sal_Int32 nPos, FieldInfos &rInfos)
virtual void StartStyle(const OUString &rName, StyleType eType, sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId, bool bAutoUpdate) override
Start of a style in the styles table.
virtual void TableDefaultBorders(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual void TableInfoCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
long SwTwips
Definition: swtypes.hxx:49
virtual void ParaAdjust(const SvxAdjustItem &rAdjust) override
Sfx item RES_PARATR_ADJUST.
virtual void TableVerticalCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
rtl::Reference< sax_fastparser::FastAttributeList > m_pParagraphSdtPrDataBindingAttrs
bool m_bWritingHeaderFooter
Flag indicating that the header \ footer are being written.
virtual void CharPostureCTL(const SvxPostureItem &rWeight) override
Sfx item RES_CHRATR_CTL_POSTURE.
std::vector< PostponedDrawing > m_aPostponedActiveXControls
virtual void PageBreakBefore(bool bBreak) override
Page break As a paragraph property - the paragraph should be on the next page.
virtual void FormatKeep(const SvxFormatKeepItem &) override
Sfx item RES_KEEP.
void popFromTableExportContext(DocxTableExportContext const &rContext)
Restores from the remembered state.
bool ExportAsActiveXControl(const SdrObject *pObject) const
virtual void SectionBreak(sal_uInt8 nC, const WW8_SepInfo *pSectionInfo=nullptr) override
Write a section break msword::ColumnBreak or msword::PageBreak.
void SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t const &pInner, sal_Int32 nCell, sal_uInt32 nRow)
const ::sax_fastparser::FSHelperPtr & GetSerializer() const
Occasionally need to use this serializer from the outside.
The class that does all the actual DOCX export-related work.
Definition: docxexport.hxx:65
bool m_bOpenedSectPr
Flag indicating that the section properties are being written.
virtual void EndRun(const SwTextNode *pNode, sal_Int32 nPos, bool bLastRun=false) override
End of the text run.
void DoWritePermissionsStart()
Write the start permissions.
virtual void CharFontCTL(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_CTL_FONT.
virtual void SectionBreaks(const SwNode &rNode) override
Called in order to output section breaks.
virtual void ResetFlyProcessingFlag() override
Reset the flag for FlyProcessing.
virtual void CharBidiRTL(const SfxPoolItem &) override
Sfx item RES_CHRATR_BidiRTL.
std::vector< sal_Int32 > lastOpenCell
virtual void FormatTextGrid(const SwTextGridItem &) override
Sfx item RES_TEXTGRID.
virtual void WriteOutliner(const OutlinerParaObject &rParaObj) override
VMLTextExport.
boost::optional< css::drawing::FillStyle > m_oFillStyle
std::unique_ptr< std::vector< PostponedOLE > > m_pPostponedOLEs
bool m_bParagraphSdtHasId
Currently paragraph SDT has a child element.
rtl::Reference< sax_fastparser::FastAttributeList > m_pBackgroundAttrList
Attributes of the paragraph background.
rtl::Reference< sax_fastparser::FastAttributeList > m_pParagraphSdtPrTokenAttributes
virtual void SectionPageBorders(const SwFrameFormat *pFormat, const SwFrameFormat *pFirstPageFormat) override
Description of the page borders.
FlyProcessingState m_nStateOfFlyFrame
State of the Fly at current position.
static void WriteFootnoteEndnotePr(::sax_fastparser::FSHelperPtr const &fs, int tag, const SwEndNoteInfo &info, int listtag)
writes the footnotePr/endnotePr (depending on tag) section
virtual void ParaOutlineLevel(const SfxUInt16Item &) override
Sfx item RES_PARATR_OUTLINELEVEL.
virtual void ParaWidows(const SvxWidowsItem &rWidows) override
Sfx item RES_PARATR_WIDOWS.
PostponedChart(const SdrObject *sdrObject, const Size &rSize, const SwFlyFrameFormat *rFrame)
FieldFlags
Definition: wrtww8.hxx:146
std::unique_ptr< std::vector< PostponedDrawing > > m_pPostponedCustomShape
virtual void ParaForbiddenRules(const SfxBoolItem &) override
Sfx item RES_PARATR_FORBIDDEN_RULES.
std::vector< OUString > m_rFinalBookmarksEnd
bool m_bHadSectPr
Did we have a section break in this paragraph? Set by StartSection(), reset by the next StartParagrap...
OString m_sLastOpenedBookmark
Name of the last opened bookmark.
virtual void StartRunProperties() override
Called before we start outputting the attributes.
virtual void EndStyles(sal_uInt16 nNumberOfStyles) override
End of the styles table.
std::map< OUString, EmbeddedFontRef > fontFilesMap
std::unique_ptr< const WW8_SepInfo > m_pSectionInfo
void DoWriteBookmarkTagEnd(const OUString &bookmarkName)
rtl::Reference< sax_fastparser::FastAttributeList > m_pCharLangAttrList
virtual bool StartURL(const OUString &rUrl, const OUString &rTarget) override
Output URL start.
void CmdField_Impl(const SwTextNode *pNode, sal_Int32 nPos, FieldInfos const &rInfos, bool bWriteRun)
std::vector< css::beans::PropertyValue > m_aTextEffectsGrabBag
GrabBag for text effects like glow, shadow, ...
char sal_Char
virtual void EndRuby(const SwTextNode &rNode, sal_Int32 nPos) override
Output ruby end.
void StartFont(const OUString &rFamilyName) const
Start the font.
std::unique_ptr< docx::FootnotesList > m_pFootnotesList
StyleType
void EndSdtBlock()
Closes a currently open SDT block.
virtual OUString FindRelId(BitmapChecksum nChecksum) override
virtual void ParaHangingPunctuation(const SfxBoolItem &) override
Sfx item RES_PARATR_HANGINGPUNCTUATION.
void StartRedline(const SwRedlineData *pRedlineData)
Output redlining.
eField
Definition: fields.hxx:26
std::map< OUString, std::vector< OString > > m_aSeqBookmarksNames
If there are bookmarks around sequence fields, this map contains the names of these bookmarks for eac...
oox::drawingml::DrawingML & m_rDrawingML
DrawingML access.
virtual void TableOrientation(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual void FormatHorizOrientation(const SwFormatHoriOrient &) override
Sfx item RES_HORI_ORIENT.
std::vector< sal_Int32 > lastClosedCell
virtual void WriteExpand(const SwField *pField) override
Write the expanded field.
void DoWriteBookmarksEnd(std::vector< OUString > &rEnds)
export the end bookmarks
virtual void ParaScriptSpace(const SfxBoolItem &) override
Sfx item RES_PARATR_SCRIPTSPACE.
virtual void ParagraphStyle(sal_uInt16 nStyle) override
Output style.
rtl::Reference< sax_fastparser::FastAttributeList > m_pRunSdtPrTokenChildren
Collects and outputs fonts.
Definition: wrtww8.hxx:299
rtl::Reference< sax_fastparser::FastAttributeList > m_pEastAsianLayoutAttrList
void DocDefaults()
Write Doc Defaults.
void WriteSdtBlock(sal_Int32 &nSdtPrToken, rtl::Reference< sax_fastparser::FastAttributeList > &pSdtPrTokenChildren, rtl::Reference< sax_fastparser::FastAttributeList > &pSdtPrTokenAttributes, rtl::Reference< sax_fastparser::FastAttributeList > &pSdtPrDataBindingAttrs, OUString &rSdtPrAlias, bool bPara)
virtual void OutputFlyFrame_Impl(const ww8::Frame &rFormat, const Point &rNdTopLeft) override
Output frames - the implementation.
void WriteFFData(const FieldInfos &rInfos)
bool IsAlternateContentChoiceOpen() const
Remember footnotes/endnotes so that we can dump them in one go.
virtual void TextFootnote_Impl(const SwFormatFootnote &) override
Sfx item RES_TXTATR_FTN.
void WriteFinalBookmarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
const SwField * pendingPlaceholder
virtual void RefField(const SwField &rField, const OUString &rRef) override
sal_uInt32 tag
std::vector< OUString > m_rFinalBookmarksStart
Bookmarks to output at the end.
virtual void CharCrossedOut(const SvxCrossedOutItem &rCrossedOut) override
Sfx item RES_CHRATR_CROSSEDOUT.
static void AddToAttrList(rtl::Reference< sax_fastparser::FastAttributeList > &pAttrList, sal_Int32 nAttrName, const sal_Char *sAttrValue)
std::shared_ptr< WW8TableInfo > Pointer_t
Style of a layout element.
Definition: frmfmt.hxx:57
void DoWriteFieldRunProperties(const SwTextNode *pNode, sal_Int32 nPos, bool bWriteCombChars=false)
Writes properties for run that is used to separate field implementation.
virtual void SectionTitlePage() override
Has different headers/footers for the title page.
std::vector< const SdrObject * > m_aPostponedFormControls
void WriteActiveXControl(const SdrObject *pObject, const SwFrameFormat &rFrameFormat, bool bInsideRun)
SvxAdjust
std::unique_ptr< std::vector< PostponedGraphic > > m_pPostponedGraphic
bool HasEndnotes() const
Do we have any endnotes?
void WriteFormData_Impl(const ::sw::mark::IFieldmark &rFieldmark)
virtual void EndRunProperties(const SwRedlineData *pRedlineData) override
Called after we end outputting the attributes.
virtual void FormatFillStyle(const XFillStyleItem &) override
Sfx item RES_FILL_STYLE.
virtual void SectFootnoteEndnotePr() override
for footnote/endnote section properties
virtual void EndSection() override
End of the section properties.
std::unique_ptr< SwWriteTable > m_xTableWrt
The current table helper.
void FootnotesEndnotes(bool bFootnotes)
Output the content of the footnotes.xml resp. endnotes.xml.
void FontAlternateName(const OUString &rName) const
Alternate name for the font.
sal_Int32 m_nRedlineId
Id of the redline.
virtual bool IsFlyProcessingPostponed() override
Is processing of fly postponed ?
virtual void PostitField(const SwField *pField) override
virtual void EndAbstractNumbering() override
End of the abstract numbering definition instance.
void WriteField_Impl(const SwField *pField, ww::eField eType, const OUString &rFieldCmd, FieldFlags nMode)
void DoWritePermissionTagStart(const OUString &permission)
void WriteBookmarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
virtual void TextINetFormat(const SwFormatINetFormat &) override
Sfx item RES_TXTATR_INETFMT.
DocxAttributeOutput(DocxExport &rExport, const ::sax_fastparser::FSHelperPtr &pSerializer, oox::drawingml::DrawingML *pDrawingML)
void DoWriteCmd(const OUString &rCmd)
FlyAnchors.
Definition: fmtanchr.hxx:34
void InitTableHelper(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner)
std::shared_ptr< editeng::WordBorderDistances > pDistances
virtual void StartSection() override
Start of the section properties.
void WriteOLE(SwOLENode &rNode, const Size &rSize, const SwFlyFrameFormat *rFlyFrameFormat)
void WriteAnnotationMarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
virtual void WriteTextBox(css::uno::Reference< css::drawing::XShape > xShape) override
DMLTextExport.
std::vector< ww8::WW8TableNodeInfoInner::Pointer_t > tableFirstCells
void InitCollectedParagraphProperties()
Initialize the structures where we are going to collect some of the paragraph properties.
virtual void CharAnimatedText(const SvxBlinkItem &rBlink) override
Sfx item RES_CHRATR_BLINK.
void EndParaSdtBlock()
End possibly opened paragraph sdt block.
PostponedGraphic(const SwGrfNode *n, Size s, const SdrObject *sObj)
virtual void NumberingLevel(sal_uInt8 nLevel, sal_uInt16 nStart, sal_uInt16 nNumberingType, SvxAdjust eAdjust, const sal_uInt8 *pNumLvlPos, sal_uInt8 nFollow, const wwFont *pFont, const SfxItemSet *pOutSet, sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos, const OUString &rNumberingString, const SvxBrushItem *pBrush) override
All the numbering level information.
virtual void DefaultStyle() override
Write default style.
virtual void TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void TableCellProperties(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow)
OString m_sLastOpenedAnnotationMark
Name of the last opened annotation mark.
virtual void EmptyParagraph() override
Empty paragraph.
bool WriteOLEChart(const SdrObject *pSdrObj, const Size &rSize, const SwFlyFrameFormat *pFlyFrameFormat)
rtl::Reference< sax_fastparser::FastAttributeList > m_pFontsAttrList
std::shared_ptr< DocxTableStyleExport > m_pTableStyleExport
virtual void FormatVertOrientation(const SwFormatVertOrient &) override
Sfx item RES_VERT_ORIENT.
virtual void FormatFrameSize(const SwFormatFrameSize &) override
Sfx item RES_FRM_SIZE.
FontPitch
const SwRedlineData * m_pRedlineData
Redline data to remember in the text run.
DocumentType const eType
const DocxExport & GetExport() const
std::shared_ptr< FastSerializerHelper > FSHelperPtr
std::vector< OUString > m_rPermissionsStart
Permissions to output.
virtual bool FootnoteEndnoteRefTag() override
docx requires footnoteRef/endnoteRef tag at the beginning of each of them
virtual void CharEscapement(const SvxEscapementItem &rEscapement) override
Sfx item RES_CHRATR_ESCAPEMENT.
virtual void WriteBookmarkInActParagraph(const OUString &rName, sal_Int32 nFirstRunPos, sal_Int32 nLastRunPos) override
Insert a bookmark inside the currently processed paragraph.
virtual void RawText(const OUString &rText, rtl_TextEncoding eCharSet) override
Output text (without markup).
virtual void CacheRelId(BitmapChecksum nChecksum, const OUString &rRelId) override
void EndTableCell(sal_uInt32 nCell)
unsigned int m_nChartCount
count charts consistently for unit tests
void SetAlternateContentChoiceOpen(bool bAltContentChoiceOpen)
bool WriteOLEMath(const SwOLENode &rNode)
virtual void CharWeight(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_WEIGHT.
void WritePostponedFormControl(const SdrObject *pObject)
void StartTable(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner)
< purpose of derivation from SwClient: character style for displaying the numbers.
Definition: lineinfo.hxx:37
virtual void TableCellRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
SvxShadowLocation aShadowLocation
virtual void SectionFormProtection(bool bProtected) override
Protection of forms.
void EmbedFontStyle(const OUString &name, int tag, FontFamily family, FontItalic italic, FontWeight weight, FontPitch pitch)
void FontPitchType(FontPitch ePitch) const
Font pitch.
rtl::Reference< sax_fastparser::FastAttributeList > m_pSectionSpacingAttrList
virtual void FormatLRSpace(const SvxLRSpaceItem &rLRSpace) override
Sfx item RES_LR_SPACE.
void InitCollectedRunProperties()
Initialize the structures where we are going to collect some of the run properties.
virtual void CharLanguage(const SvxLanguageItem &rLanguage) override
Sfx item RES_CHRATR_LANGUAGE.
A structure that holds flags for the table export.
std::stack< std::map< const Graphic *, OString > > m_aRelIdCache
RelId <-> Graphic* cache, so that in case of alternate content, the same graphic only gets written on...
FontFamily
virtual bool AnalyzeURL(const OUString &rURL, const OUString &rTarget, OUString *pLinkURL, OUString *pMark) override
sal_Int32 m_nRunSdtPrToken
members to control the existence of grabbagged SDT properties in the text run
rtl::Reference< sax_fastparser::FastAttributeList > m_pParagraphSpacingAttrList
virtual void EndStyleProperties(bool bParProp) override
End of (paragraph or run) properties of a style.
virtual void TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
static bool TextBoxIsFramePr(const SwFrameFormat &rFrameFormat)
std::unique_ptr< TableReference > m_tableReference
std::shared_ptr< const SwField > pField
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
void SetWritingHeaderFooter(bool bWritingHeaderFooter)
std::multimap< sal_Int32, OUString > m_aBookmarksOfParagraphStart
Bookmarks of the current paragraph.
virtual void TextVerticalAdjustment(const css::drawing::TextVerticalAdjust) override
bool m_bPreventDoubleFieldsHandling
Field data to remember in the text run.
FontWeight
virtual void CharShadow(const SvxShadowedItem &rShadow) override
Sfx item RES_CHRATR_SHADOWED.
virtual void CharLanguageCTL(const SvxLanguageItem &rLanguageItem) override
Sfx item RES_CHRATR_CTL_LANGUAGE.
void DoWritePermissionsEnd()
export the end permissions
A structure that holds information about the options selected when outputting a border to DOCX...
void EndRedline(const SwRedlineData *pRedlineData)
Output redlining.
virtual void CharRelief(const SvxCharReliefItem &rRelief) override
Sfx item RES_CHRATR_RELIEF.
PostponedDrawing(const SdrObject *sdrObj, const SwFrameFormat *frm)
virtual void FormatSurround(const SwFormatSurround &) override
Sfx item RES_SURROUND.
virtual void TableInfoRow(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual void CharGrabBag(const SfxGrabBagItem &) override
Sfx item RES_CHRATR_GRABBAG.
FlyProcessingState
enum to state the present state of the fly
Definition: wrtww8.hxx:169
void DoWriteBookmarksStart(std::vector< OUString > &rStarts)
Write the start bookmarks.
virtual void FormatBackground(const SvxBrushItem &) override
Sfx item RES_BACKGROUND.
unsigned char sal_uInt8
Make exporting a Writer Frame easy.
virtual void CharTwoLines(const SvxTwoLinesItem &rTwoLines) override
Sfx item RES_CHRATR_TWO_LINES.
void WriteCollectedRunProperties()
Output what we collected during the run properties output.
virtual void FormatDrop(const SwTextNode &rNode, const SwFormatDrop &rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override
virtual void FormatAnchor(const SwFormatAnchor &) override
Sfx item RES_ANCHOR.
virtual void ParaGrabBag(const SfxGrabBagItem &) override
Sfx item RES_PARATR_GRABBAG.
virtual void FormatBox(const SvxBoxItem &) override
Sfx item RES_BOX.
void GetSdtEndBefore(const SdrObject *pSdrObj)
void FootnoteEndnoteReference()
Output the footnote/endnote reference (if there's one to output).
virtual void EndParagraph(ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override
End of the paragraph.
void PopulateFrameProperties(const SwFrameFormat *pFrameFormat, const Size &rSize)
virtual void SetField(const SwField &rField, ww::eField eType, const OUString &rCmd) override
virtual void CharFont(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_FONT.
SvxBoxItemLine
virtual void StartParagraph(ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo) override
Start of the paragraph.
void FontCharset(sal_uInt8 nCharSet, rtl_TextEncoding nEncoding) const
Font charset.
virtual void CharBorder(const ::editeng::SvxBorderLine *pAllBorder, const sal_uInt16 nDist, const bool bShadow) override
Sfx item RES_CHRATR_BOX.
virtual void FormatFillGradient(const XFillGradientItem &) override
Sfx item RES_FILL_GRADIENT.
virtual void ParaSnapToGrid(const SvxParaGridItem &) override
Sfx item RES_PARATR_SNAPTOGRID.
virtual void ParaTabStop(const SvxTabStopItem &rTabStop) override
Sfx item RES_PARATR_TABSTOP.
static OString TransHighlightColor(sal_uInt8 nIco)
Translate an ico value to the corresponding HighlightColorValues enumaration item.
virtual void ParaVerticalAlign(const SvxParaVertAlignItem &rAlign) override
Sfx item RES_PARATR_VERTALIGN.
std::shared_ptr< WW8TableNodeInfoInner > Pointer_t
const char * name
virtual bool EndURL(bool) override
Output URL end.
void WriteSrcRect(const SdrObject *pSdrObj, const SwFrameFormat *pFrameFormat)
virtual void TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual void CharAutoKern(const SvxAutoKernItem &) override
Sfx item RES_CHRATR_AUTOKERN.
virtual void CharScaleWidth(const SvxCharScaleWidthItem &rScaleWidth) override
Sfx item RES_CHRATR_SCALEW.
void LatentStyles()
Write latent styles.
std::vector< OString > m_rAnnotationMarksEnd
bool m_bIgnoreNextFill
If FormatBox() already handled fill style / gradient.
virtual void CharCaseMap(const SvxCaseMapItem &rCaseMap) override
Sfx item Sfx item RES_CHRATR_CASEMAP.
virtual void StartStyles() override
Start of the styles table.
void StartField_Impl(const SwTextNode *pNode, sal_Int32 nPos, FieldInfos const &rInfos, bool bWriteRun=false)
PostponedOLE(SwOLENode *rObject, const Size &rSize, const SwFlyFrameFormat *rFrame)
virtual void CharColor(const SvxColorItem &rColor) override
Sfx item Sfx item RES_CHRATR_COLOR.
std::vector< OUString > m_rPermissionsEnd
std::vector< std::pair< const SwPostItField *, sal_Int32 > > m_postitFields
Maps postit fields to ID's, used in commentRangeStart/End, commentReference and comment.xml.
virtual void CharFontSize(const SvxFontHeightItem &rFontSize) override
Sfx item RES_CHRATR_FONTSIZE.
virtual void CharFontSizeCTL(const SvxFontHeightItem &rFontSize) override
Sfx item RES_CHRATR_CTL_FONTSIZE.
virtual void CharHighlight(const SvxBrushItem &rHighlight) override
Sfx item RES_CHRATR_HIGHLIGHT.
std::unique_ptr< std::vector< PostponedDrawing > > m_pPostponedDMLDrawings
std::vector< PostponedChart > m_aPostponedCharts
virtual void CharBackground(const SvxBrushItem &rBrush) override
Sfx item RES_CHRATR_BACKGROUND.
void PostponeOLE(SwOLENode &rNode, const Size &rSize, const SwFlyFrameFormat *pFlyFrameFormat)
virtual void SectionPageNumbering(sal_uInt16 nNumType, const ::boost::optional< sal_uInt16 > &oPageRestartNumber) override
The style of the page numbers.
virtual void RTLAndCJKState(bool bIsRTL, sal_uInt16 nScript) override
Export the state of RTL/CJK.
virtual void FieldVanish(const OUString &rText, ww::eField eType) override
std::unique_ptr< std::vector< PostponedDiagram > > m_pPostponedDiagrams
virtual void StartParagraphProperties() override
Called before we start outputting the attributes.
virtual void CharPosture(const SvxPostureItem &rPosture) override
Sfx item RES_CHRATR_POSTURE.
std::vector< const SwOLENode * > m_aPostponedMaths
bool m_bEndCharSdt
If the current SDT around runs should be ended before the current run.
void FlyFrameGraphic(const SwGrfNode *pGrfNode, const Size &rSize, const SwFlyFrameFormat *pOLEFrameFormat, SwOLENode *pOLENode, const SdrObject *pSdrObj=nullptr)
Output graphic fly frames or replacement graphics for OLE nodes.
std::stack< std::map< BitmapChecksum, OUString > > m_aSdrRelIdCache
RelId <-> BitmapChecksum cache, similar to m_aRelIdCache, but used for non-Writer graphics...
virtual void EndStyle() override
End of a style in the styles table.
virtual void CharRotate(const SvxCharRotateItem &rRotate) override
Sfx item RES_CHRATR_ROTATE.
virtual void ParaLineSpacing_Impl(short nSpace, short nMulti) override
Sfx item RES_PARATR_LINESPACING.
void BulletDefinition(int nId, const Graphic &rGraphic, Size aSize) override
Exports the definition (image, size) of a single numbering picture bullet.
virtual void SectionLineNumbering(sal_uLong nRestartNo, const SwLineNumberInfo &rLnNumInfo) override
Numbering of the lines in the document.
bool m_bStartedParaSdt
If an SDT around paragraphs is currently open.
rtl::Reference< sax_fastparser::FastAttributeList > m_pHyperlinkAttrList
void CmdEndField_Impl(const SwTextNode *pNode, sal_Int32 nPos, bool bWriteRun)
virtual DocxExport & GetExport() override
Return the right export class.
virtual void ParaNumRule_Impl(const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) override
Sfx item RES_PARATR_NUMRULE.
void WriteCollectedParagraphProperties()
Output what we collected during the run properties output.
const ::sw::mark::IFieldmark * pFieldmark
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps...
Definition: paratr.hxx:50
virtual void CharWeightCJK(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_CJK_WEIGHT.
void FinishTableRowCell(ww8::WW8TableNodeInfoInner::Pointer_t const &pInner, bool bForceEmptyParagraph=false)
End cell, row, and even the entire table if necessary.
void WriteFormDateStart(const OUString &sFullDate, const OUString &sDateFormat, const OUString &sLang)
virtual void TableBidi(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void DoWriteBookmarkTagStart(const OUString &bookmarkName)
virtual void StartRuby(const SwTextNode &rNode, sal_Int32 nPos, const SwFormatRuby &rRuby) override
Output ruby start.
virtual void Redline(const SwRedlineData *pRedline) override
Output redlining.
virtual void TableNodeInfoInner(ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner) override
::sax_fastparser::FSHelperPtr m_pSerializer
Fast serializer to output the data.
std::vector< ww8::Frame > m_aFramesOfParagraph
rtl::Reference< sax_fastparser::FastAttributeList > m_pParagraphSdtPrTokenChildren
bool m_bRunTextIsOn
Flag indicating that the Run Text is being written.
std::vector< OUString > m_rBookmarksEnd
void TableDefaultCellMargins(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner)
bool m_bStartedCharSdt
If an SDT around runs is currently open.
virtual void CharIdctHint(const SfxPoolItem &) override
Sfx item RES_CHRATR_IdctHint.
virtual void OutlineNumbering(sal_uInt8 nLvl) override
Numbering rule and Id.
virtual void TableRowEnd(sal_uInt32 nDepth) override
virtual void StartStyleProperties(bool bParProp, sal_uInt16 nStyle) override
Start of (paragraph or run) properties of a style.
sal_Int32 nPos
std::vector< OString > m_rAnnotationMarksStart
Annotation marks to output.
bool GetWritingHeaderFooter() const
std::shared_ptr< WW8TableNodeInfo > Pointer_t
editeng::WordPageMargins m_pageMargins
virtual void CharContour(const SvxContourItem &rContour) override
Sfx item Sfx item RES_CHRATR_CONTOUR.
virtual void WritePostitFieldReference() override
for docx w:commentReference
virtual void HiddenField(const SwField &rField) override
virtual void FormatULSpace(const SvxULSpaceItem &rULSpace) override
Sfx item RES_UL_SPACE.
std::vector< OUString > m_rBookmarksStart
Bookmarks to output.
ww8::WW8TableInfo::Pointer_t m_pTableInfo
void SetSerializer(::sax_fastparser::FSHelperPtr const &pSerializer)
For e.g. the output of the styles, we need to switch the serializer to another one.
void DoWriteBookmarkStartIfExist(sal_Int32 nRunPos)
bool m_bWritingField
Flag indicating that multiple runs of a field are being written.
virtual void FormatFrameDirection(const SvxFrameDirectionItem &) override
Sfx item RES_FRAMEDIR.
PostponedDiagram(const SdrObject *o, const SwFrameFormat *frm)
FontItalic
rtl::Reference< sax_fastparser::FastAttributeList > m_pColorAttrList
Attributes of the run color.
std::map< OString, sal_Int32 > m_rOpenedAnnotationMarksIds
Maps of the annotation marks ids.
virtual void EndParagraphProperties(const SfxItemSet &rParagraphMarkerProperties, const SwRedlineData *pRedlineData, const SwRedlineData *pRedlineParagraphMarkerDeleted, const SwRedlineData *pRedlineParagraphMarkerInserted) override
Called after we end outputting the attributes.
SvxShadowLocation
void FontFamilyType(FontFamily eFamily) const
Font family.
void DoWriteBookmarkEndIfExist(sal_Int32 nRunPos)
Base class of the Writer document model elements.
Definition: node.hxx:79