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 <o3tl/optional.hxx>
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 
274  virtual void SectionBreak( sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo* pSectionInfo = nullptr ) override;
275 
276  // preserve DOCX page vertical alignment
277  virtual void TextVerticalAdjustment( const css::drawing::TextVerticalAdjust ) override;
278 
280  virtual void StartSection() override;
281 
283  virtual void EndSection() override;
284 
286  virtual void SectionFormProtection( bool bProtected ) override;
287 
289  virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo ) override;
290 
292  virtual void SectionTitlePage() override;
293 
295  virtual void SectionPageBorders( const SwFrameFormat* pFormat, const SwFrameFormat* pFirstPageFormat ) override;
296 
298  virtual void SectionBiDi( bool bBiDi ) override;
299 
302  virtual void SectionPageNumbering( sal_uInt16 nNumType, const ::o3tl::optional<sal_uInt16>& oPageRestartNumber ) override;
303 
305  virtual void SectionType( sal_uInt8 nBreakCode ) override;
306 
308  void StartFont( const OUString& rFamilyName ) const;
309 
311  void EndFont() const;
312 
314  void FontAlternateName( const OUString& rName ) const;
315 
317  void FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEncoding ) const;
318 
320  void FontFamilyType( FontFamily eFamily ) const;
321 
323  void FontPitchType( FontPitch ePitch ) const;
324 
326  void EmbedFont( const OUString& name, FontFamily family, FontPitch pitch );
327 
329  virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) override;
330 
332  virtual void OverrideNumberingDefinition(SwNumRule const& rRule,
333  sal_uInt16 nNum, sal_uInt16 nAbstractNum) override;
334 
336  virtual void StartAbstractNumbering( sal_uInt16 nId ) override;
337 
339  virtual void EndAbstractNumbering() override;
340 
342  virtual void NumberingLevel( sal_uInt8 nLevel,
343  sal_uInt16 nStart,
344  sal_uInt16 nNumberingType,
345  SvxAdjust eAdjust,
346  const sal_uInt8 *pNumLvlPos,
347  sal_uInt8 nFollow,
348  const wwFont *pFont,
349  const SfxItemSet *pOutSet,
350  sal_Int16 nIndentAt,
351  sal_Int16 nFirstLineIndex,
352  sal_Int16 nListTabPos,
353  const OUString &rNumberingString,
354  const SvxBrushItem* pBrush ) override;
355 
356  void WriteField_Impl( const SwField* pField, ww::eField eType, const OUString& rFieldCmd, FieldFlags nMode );
357  void WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark );
358 
359  void WriteBookmarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
360  void WriteFinalBookmarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
361  void WriteAnnotationMarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
362  void PushRelIdCache();
363  void PopRelIdCache();
365  void EndParaSdtBlock();
366 
367  void WriteFloatingTable(ww8::Frame const* pParentFrame);
368 
369 private:
377 
382 
390 
395 
402  void FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrameFormat* pOLEFrameFormat, SwOLENode* pOLENode, const SdrObject* pSdrObj = nullptr);
403  void WriteSrcRect( const SdrObject* pSdrObj, const SwFrameFormat* pFrameFormat );
404  void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat);
405  bool WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat);
406  bool WriteOLEMath( const SwOLENode& rNode );
407  void PostponeOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat );
408  void WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* rFlyFrameFormat );
409 
410  void WriteActiveXControl(const SdrObject* pObject, const SwFrameFormat& rFrameFormat, bool bInsideRun);
411  bool ExportAsActiveXControl(const SdrObject* pObject) const;
412 
413  void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
414  void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
415  void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
416  void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow );
417  void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow );
418  void EndTableCell( sal_uInt32 nCell );
419  void EndTableRow( );
420  void EndTable();
421  void SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, sal_Int32 nCell, sal_uInt32 nRow);
422  void PopulateFrameProperties(const SwFrameFormat* pFrameFormat, const Size& rSize);
423  static bool TextBoxIsFramePr(const SwFrameFormat& rFrameFormat);
425  void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, bool bForceEmptyParagraph = false );
426 
427  void WriteFFData( const FieldInfos& rInfos );
429 
430  void EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic, FontWeight weight,
431  FontPitch pitch );
432 
440  static OString TransHighlightColor( sal_uInt8 nIco );
441 protected:
442 
444  virtual void OutputFlyFrame_Impl( const ww8::Frame& rFormat, const Point& rNdTopLeft ) override;
445 
447  virtual void CharCaseMap( const SvxCaseMapItem& rCaseMap ) override;
448 
450  virtual void CharColor( const SvxColorItem& rColor) override;
451 
453  virtual void CharContour( const SvxContourItem& rContour ) override;
454 
456  virtual void CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ) override;
457 
459  virtual void CharEscapement( const SvxEscapementItem& rEscapement ) override;
460 
462  virtual void CharFont( const SvxFontItem& rFont ) override;
463 
465  virtual void CharFontSize( const SvxFontHeightItem& rFontSize ) override;
466 
468  virtual void CharKerning( const SvxKerningItem& rKerning ) override;
469 
471  virtual void CharLanguage( const SvxLanguageItem& rLanguage ) override;
472 
474  virtual void CharPosture( const SvxPostureItem& rPosture ) override;
475 
477  virtual void CharShadow( const SvxShadowedItem& rShadow ) override;
478 
480  virtual void CharUnderline( const SvxUnderlineItem& rUnderline ) override;
481 
483  virtual void CharWeight( const SvxWeightItem& rWeight ) override;
484 
486  virtual void CharAutoKern( const SvxAutoKernItem& ) override;
487 
489  virtual void CharAnimatedText( const SvxBlinkItem& rBlink ) override;
490 
492  virtual void CharBackground( const SvxBrushItem& rBrush ) override;
493 
495  virtual void CharFontCJK( const SvxFontItem& rFont ) override;
496 
498  virtual void CharFontSizeCJK( const SvxFontHeightItem& rFontSize ) override { CharFontSize( rFontSize ); }
499 
501  virtual void CharLanguageCJK( const SvxLanguageItem& rLanguageItem ) override { CharLanguage( rLanguageItem ); }
502 
504  virtual void CharPostureCJK( const SvxPostureItem& rPosture ) override;
505 
507  virtual void CharWeightCJK( const SvxWeightItem& rWeight ) override;
508 
510  virtual void CharFontCTL( const SvxFontItem& rFont ) override;
511 
513  virtual void CharFontSizeCTL( const SvxFontHeightItem& rFontSize ) override { CharFontSize( rFontSize ); }
514 
516  virtual void CharLanguageCTL( const SvxLanguageItem& rLanguageItem ) override { CharLanguage( rLanguageItem); }
517 
519  virtual void CharPostureCTL( const SvxPostureItem& rWeight ) override;
520 
522  virtual void CharWeightCTL( const SvxWeightItem& rWeight ) override;
523 
525  virtual void CharBidiRTL( const SfxPoolItem& ) override;
526 
528  virtual void CharIdctHint( const SfxPoolItem& ) override;
529 
531  virtual void CharRotate( const SvxCharRotateItem& rRotate ) override;
532 
534  virtual void CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisMark ) override;
535 
537  virtual void CharTwoLines( const SvxTwoLinesItem& rTwoLines ) override;
538 
540  virtual void CharScaleWidth( const SvxCharScaleWidthItem& rScaleWidth ) override;
541 
543  virtual void CharRelief( const SvxCharReliefItem& rRelief) override;
544 
546  virtual void CharHidden( const SvxCharHiddenItem& rHidden ) override;
547 
549  virtual void CharBorder( const ::editeng::SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ) override;
550 
552  virtual void CharHighlight( const SvxBrushItem& rHighlight ) override;
553 
555  virtual void TextINetFormat( const SwFormatINetFormat& ) override;
556 
558  virtual void TextCharFormat( const SwFormatCharFormat& ) override;
559 
561  virtual void TextFootnote_Impl( const SwFormatFootnote& ) override;
562 
565 
567  virtual void ParaLineSpacing_Impl( short nSpace, short nMulti ) override;
568 
570  virtual void ParaAdjust( const SvxAdjustItem& rAdjust ) override;
571 
573  virtual void ParaSplit( const SvxFormatSplitItem& rSplit ) override;
574 
576  virtual void ParaWidows( const SvxWidowsItem& rWidows ) override;
577 
579  virtual void ParaTabStop( const SvxTabStopItem& rTabStop ) override;
580 
582  virtual void ParaHyphenZone( const SvxHyphenZoneItem& ) override;
583 
585  virtual void ParaNumRule_Impl( const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId ) override;
586 
588  virtual void ParaScriptSpace( const SfxBoolItem& ) override;
589 
591  virtual void ParaHangingPunctuation( const SfxBoolItem& ) override;
592 
594  virtual void ParaForbiddenRules( const SfxBoolItem& ) override;
595 
597  virtual void ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) override;
598 
600  virtual void ParaSnapToGrid( const SvxParaGridItem& ) override;
601 
603  virtual void FormatFrameSize( const SwFormatFrameSize& ) override;
604 
606  virtual void FormatPaperBin( const SvxPaperBinItem& ) override;
607 
609  virtual void FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) override;
610 
612  virtual void FormatULSpace( const SvxULSpaceItem& rULSpace ) override;
613 
615  virtual void FormatSurround( const SwFormatSurround& ) override;
616 
618  virtual void FormatVertOrientation( const SwFormatVertOrient& ) override;
619 
621  virtual void FormatHorizOrientation( const SwFormatHoriOrient& ) override;
622 
624  virtual void FormatAnchor( const SwFormatAnchor& ) override;
625 
627  virtual void FormatBackground( const SvxBrushItem& ) override;
628 
630  virtual void FormatFillStyle( const XFillStyleItem& ) override;
631 
633  virtual void FormatFillGradient( const XFillGradientItem& ) override;
634 
636  virtual void FormatBox( const SvxBoxItem& ) override;
637 
639  virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFormatCol & rCol, bool bEven, SwTwips nPageSize ) override;
640 
642  virtual void FormatKeep( const SvxFormatKeepItem& ) override;
643 
645  virtual void FormatTextGrid( const SwTextGridItem& ) override;
646 
648  virtual void FormatLineNumbering( const SwFormatLineNumber& ) override;
649 
651  virtual void FormatFrameDirection( const SvxFrameDirectionItem& ) override;
652 
654  virtual void ParaGrabBag( const SfxGrabBagItem& ) override;
655 
657  virtual void CharGrabBag( const SfxGrabBagItem& ) override;
658 
659  // Sfx item RES_PARATR_OUTLINELEVEL
660  virtual void ParaOutlineLevel( const SfxUInt16Item& ) override;
661 
663  virtual void WriteExpand( const SwField* pField ) override;
664 
665  virtual void RefField( const SwField& rField, const OUString& rRef ) override;
666  virtual void HiddenField( const SwField& rField ) override;
667  virtual void SetField( const SwField& rField, ww::eField eType, const OUString& rCmd ) override;
668  virtual void PostitField( const SwField* pField ) override;
669  virtual bool DropdownField( const SwField* pField ) override;
670  virtual bool PlaceholderField( const SwField* pField ) override;
671 
672  virtual bool AnalyzeURL( const OUString& rURL, const OUString& rTarget, OUString* pLinkURL, OUString* pMark ) override;
673 
674  virtual void WriteBookmarkInActParagraph( const OUString& rName, sal_Int32 nFirstRunPos, sal_Int32 nLastRunPos ) override;
675 
678 
681 
684 
685 private:
686 
687  void DoWriteBookmarkTagStart(const OUString & bookmarkName);
688  void DoWriteBookmarkTagEnd(const OUString & bookmarkName);
689  void DoWriteBookmarksStart(std::vector<OUString>& rStarts);
690  void DoWriteBookmarksEnd(std::vector<OUString>& rEnds);
691  void DoWriteBookmarkStartIfExist(sal_Int32 nRunPos);
692  void DoWriteBookmarkEndIfExist(sal_Int32 nRunPos);
693 
694  void DoWritePermissionTagStart(const OUString & permission);
695  void DoWritePermissionTagEnd(const OUString & permission);
697  void DoWritePermissionsEnd();
698 
699  void DoWriteAnnotationMarks( );
700  void WritePostponedGraphic();
701  void WritePostponedMath(const SwOLENode* pObject);
702  void WritePostponedFormControl(const SdrObject* pObject);
703  void WritePostponedActiveXControl(bool bInsideRun);
704  void WritePostponedDiagram();
705  void WritePostponedChart();
706  void WritePostponedOLE();
709 
710  void WriteSdtBlock(sal_Int32& nSdtPrToken,
714  OUString& rSdtPrAlias,
715  bool bPara);
717  void EndSdtBlock();
718 
719  void WriteFormDateStart(const OUString& sFullDate, const OUString& sDateFormat, const OUString& sLang);
720  void WriteFormDateEnd();
721 
722  void StartField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun = false );
723  void DoWriteCmd( const OUString& rCmd );
724  void CmdField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun );
725  void CmdEndField_Impl( const SwTextNode* pNode, sal_Int32 nPos, bool bWriteRun );
726  void EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos& rInfos );
727  void DoWriteFieldRunProperties( const SwTextNode* pNode, sal_Int32 nPos, bool bWriteCombChars = false );
728 
729  static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const char* sAttrValue );
730  static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... );
731 
752  std::unique_ptr<docx::FootnotesList> m_pFootnotesList;
753  std::unique_ptr<docx::FootnotesList> m_pEndnotesList;
756  std::unique_ptr< const WW8_SepInfo > m_pSectionInfo;
757 
760 
762  sal_Int32 m_nRedlineId;
763 
768 
771 
775 
778 
781  std::vector< FieldInfos > m_Fields;
782  OUString m_sFieldBkm;
783  sal_Int32 m_nNextBookmarkId;
785 
786  OUString m_sRawText;
787 
789  std::vector<OUString> m_rBookmarksStart;
790  std::vector<OUString> m_rBookmarksEnd;
791 
793  std::vector<OUString> m_rFinalBookmarksStart;
794  std::vector<OUString> m_rFinalBookmarksEnd;
795 
797  std::multimap<sal_Int32, OUString> m_aBookmarksOfParagraphStart;
798  std::multimap<sal_Int32, OUString> m_aBookmarksOfParagraphEnd;
799 
801  std::vector<OUString> m_rPermissionsStart;
802  std::vector<OUString> m_rPermissionsEnd;
803 
805  std::vector<OString> m_rAnnotationMarksStart;
806  std::vector<OString> m_rAnnotationMarksEnd;
807 
809  std::map<OUString, sal_Int32> m_rOpenedBookmarksIds;
810 
813 
815  std::map<OString, sal_Int32> m_rOpenedAnnotationMarksIds;
816 
819 
822  std::map<OUString, std::vector<OString> > m_aSeqBookmarksNames;
823 
825  std::vector<css::beans::PropertyValue> m_aTextEffectsGrabBag;
826 
828  std::unique_ptr<SwWriteTable> m_xTableWrt;
829 
831 
837 
838  // Remember that a column break has to be opened at the
839  // beginning of the next paragraph
841 
842  // Remember that a page break has to be opened at the
843  // beginning of the next paragraph
845 
846  // This paragraph must end with page break
847  bool m_bPageBreakAfter = false;
848 
849  std::vector<ww8::Frame> m_aFramesOfParagraph;
850  std::set<const SwFrameFormat*> m_aFloatingTablesOfParagraph;
851  sal_Int32 m_nTextFrameLevel;
852 
853  // close of hyperlink needed
857  // Count nested HyperLinks
858  sal_Int32 m_nHyperLinkCount;
860 
861  // If the exported numbering rule defines the outlines
863 
865  {
866  PostponedGraphic( const SwGrfNode* n, Size s, const SdrObject* sObj )
867  : grfNode( n ), size( s ), pSdrObj(sObj) {};
868 
869  const SwGrfNode* grfNode;
870  Size const size;
872  };
873  std::unique_ptr< std::vector<PostponedGraphic> > m_pPostponedGraphic;
875  {
876  PostponedDiagram( const SdrObject* o, const SwFrameFormat* frm ) : object( o ), frame( frm ) {};
877  const SdrObject* object;
879  };
880  std::unique_ptr< std::vector<PostponedDiagram> > m_pPostponedDiagrams;
881 
883  {
884  PostponedDrawing( const SdrObject* sdrObj, const SwFrameFormat* frm) : object( sdrObj ), frame( frm ) {};
885  const SdrObject* object;
887  };
888  std::unique_ptr< std::vector<PostponedDrawing> > m_pPostponedDMLDrawings;
889  std::unique_ptr< std::vector<PostponedDrawing> > m_pPostponedCustomShape;
890 
892  {
893  PostponedOLE( SwOLENode* rObject, const Size& rSize, const SwFlyFrameFormat* rFrame ) : object( rObject ), size( rSize ), frame( rFrame ) {};
894  SwOLENode* object;
895  const Size size;
897  };
898  std::unique_ptr< std::vector<PostponedOLE> > m_pPostponedOLEs;
899 
900  std::vector<const SwOLENode*> m_aPostponedMaths;
902  unsigned int m_nChartCount;
904  {
905  PostponedChart( const SdrObject* sdrObject, const Size& rSize, const SwFlyFrameFormat* rFrame ) : object(sdrObject), size(rSize), frame(rFrame) {};
906  const SdrObject* object;
907  const Size size;
909  };
910  std::vector<PostponedChart> m_aPostponedCharts;
911  std::vector<const SdrObject*> m_aPostponedFormControls;
912  std::vector<PostponedDrawing> m_aPostponedActiveXControls;
915  std::vector< std::pair<const SwPostItField*, sal_Int32> > m_postitFields;
917  unsigned int m_postitFieldsMaxId;
921  {
922  OString relId;
923  OString fontKey;
924  };
925 
926  std::unique_ptr<TableReference> m_tableReference;
927 
928  std::map< OUString, EmbeddedFontRef > fontFilesMap; // font file url to data
929 
930  // Remember first cell (used for default borders/margins) of each table
931  std::vector<ww8::WW8TableNodeInfoInner::Pointer_t> tableFirstCells;
932  // Remember last open and closed cells on each level
933  std::vector<sal_Int32> lastOpenCell;
934  std::vector<sal_Int32> lastClosedCell;
935 
936  o3tl::optional<css::drawing::FillStyle> m_oFillStyle;
939 
941 
942  std::shared_ptr<DocxTableStyleExport> m_pTableStyleExport;
943  // flag to check if auto spacing was set in original file
945  // store hardcoded value which was set during import.
947 
949 
951  std::stack< std::map<const Graphic*, OString> > m_aRelIdCache;
953  std::stack< std::map<BitmapChecksum, OUString> > m_aSdrRelIdCache;
954 
961  sal_Int32 m_nRunSdtPrToken;
973 
974  std::map<SvxBoxItemLine, css::table::BorderLine2> m_aTableStyleConf;
975 
976 public:
977  DocxAttributeOutput( DocxExport &rExport, const ::sax_fastparser::FSHelperPtr& pSerializer, oox::drawingml::DrawingML* pDrawingML );
978 
979  virtual ~DocxAttributeOutput() override;
980 
982  virtual DocxExport& GetExport() override;
983  const DocxExport& GetExport() const { return const_cast< DocxAttributeOutput* >( this )->GetExport(); }
984 
986  void SetSerializer( ::sax_fastparser::FSHelperPtr const & pSerializer );
987 
989  const ::sax_fastparser::FSHelperPtr& GetSerializer( ) const { return m_pSerializer; }
990 
992  bool HasFootnotes() const;
993 
995  bool HasEndnotes() const;
996 
998  void FootnotesEndnotes( bool bFootnotes );
999 
1001  static void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr const & fs, int tag, const SwEndNoteInfo& info, int listtag );
1002 
1003  bool HasPostitFields() const;
1004  void WritePostitFields();
1005 
1007  virtual void WriteOutliner(const OutlinerParaObject& rParaObj) override;
1008  virtual void WriteVMLTextBox(css::uno::Reference<css::drawing::XShape> xShape) override;
1010  virtual void WriteTextBox(css::uno::Reference<css::drawing::XShape> xShape) override;
1011  virtual OUString FindRelId(BitmapChecksum nChecksum) override;
1012  virtual void CacheRelId(BitmapChecksum nChecksum, const OUString& rRelId) override;
1013  virtual oox::drawingml::DrawingML& GetDrawingML() override;
1014 
1015  void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) override;
1016 
1017  void SetWritingHeaderFooter( bool bWritingHeaderFooter ) { m_bWritingHeaderFooter = bWritingHeaderFooter; }
1019  void SetAlternateContentChoiceOpen( bool bAltContentChoiceOpen ) { m_bAlternateContentChoiceOpen = bAltContentChoiceOpen; }
1021  void GetSdtEndBefore(const SdrObject* pSdrObj);
1022  bool IsFirstParagraph() const { return m_bIsFirstParagraph; }
1023 
1027  void popFromTableExportContext(DocxTableExportContext const & rContext);
1028 };
1029 
1035 {
1040  sal_uInt32 m_nTableDepth;
1041  DocxTableExportContext(DocxAttributeOutput& rOutput) : m_rOutput(rOutput) { m_rOutput.pushToTableExportContext(*this); }
1043 };
1044 
1045 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXATTRIBUTEOUTPUT_HXX
1046 
1047 /* 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.
o3tl::optional< css::drawing::FillStyle > m_oFillStyle
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.
static void AddToAttrList(rtl::Reference< sax_fastparser::FastAttributeList > &pAttrList, sal_Int32 nAttrName, const char *sAttrValue)
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
FilterGroup & rTarget
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
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
EmbeddedObjectRef * pObject
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.
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, ...
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 SectionPageNumbering(sal_uInt16 nNumType, const ::o3tl::optional< sal_uInt16 > &oPageRestartNumber) override
The style of the page numbers.
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.
sal_Int16 nNumType
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.
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 SectionBreak(sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo *pSectionInfo=nullptr) override
Write a section break msword::ColumnBreak or msword::PageBreak bBreakAfter: the break must be schedul...
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 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.
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.
sal_uInt16 nPos
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