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 
30 #include <editeng/boxitem.hxx>
31 #include <sax/fshelper.hxx>
32 #include <sax/fastattribs.hxx>
33 #include <vcl/vclenum.hxx>
34 #include <svx/xenum.hxx>
35 
36 #include <fldbas.hxx>
37 
38 #include <vector>
39 #include <boost/optional.hpp>
40 #include <oox/export/vmlexport.hxx>
41 #include <oox/export/drawingml.hxx>
42 #include "docxtablestyleexport.hxx"
43 
44 #include <com/sun/star/table/BorderLine2.hpp>
45 #include <com/sun/star/drawing/FillStyle.hpp>
46 
47 class SwGrfNode;
48 class SdrObject;
49 enum class SvxBoxItemLine;
50 
51 namespace docx { class FootnotesList; }
52 namespace oox { namespace drawingml { class DrawingML; } }
53 
54 struct FieldInfos
55 {
56  std::shared_ptr<const SwField> pField;
57  const ::sw::mark::IFieldmark* pFieldmark;
59  bool bOpen;
60  bool bClose;
61  OUString sCmd;
62  FieldInfos() : pFieldmark(nullptr), eType(ww::eUNKNOWN), bOpen(false), bClose(false){}
63 };
64 
66 {
71 };
72 
84 {
85  sal_Int32 tag = 0;
86  bool bUseStartEnd = false;
87  bool bWriteTag = true;
88  bool bWriteDistance = false;
89  SvxShadowLocation aShadowLocation = SvxShadowLocation::NONE;
90  std::shared_ptr<editeng::WordBorderDistances> pDistances;
91 };
92 
94 
99 {
102 
105 
107  sal_uInt32 m_nTableDepth;
108 
110  : m_bTableCellOpen(false),
111  m_bTableCellParaSdtOpen(false),
112  m_nTableDepth(0)
113  {
114  }
115 };
116 
119 {
120 public:
122  virtual void RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript ) override;
123 
125  virtual void StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo ) override;
126 
128  virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) override;
129 
131  virtual void EmptyParagraph() override;
132 
134  virtual void SectionBreaks(const SwNode& rNode) override;
135 
137  virtual void StartParagraphProperties() override;
138 
140  virtual void EndParagraphProperties(const SfxItemSet& rParagraphMarkerProperties, const SwRedlineData* pRedlineData, const SwRedlineData* pRedlineParagraphMarkerDeleted, const SwRedlineData* pRedlineParagraphMarkerInserted) override;
141 
143  virtual void StartRun( const SwRedlineData* pRedlineData, sal_Int32 nPos, bool bSingleEmptyRun = false ) override;
144 
146  virtual void EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool bLastRun = false) override;
147 
149  virtual void StartRunProperties() override;
150 
152  virtual void EndRunProperties( const SwRedlineData* pRedlineData ) override;
153 
154  virtual bool FootnoteEndnoteRefTag() override;
155 
156  virtual void SectFootnoteEndnotePr() override;
157 
158  virtual void WritePostitFieldReference() override;
159 
161  virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 ) override;
162 
164  virtual void RawText(const OUString& rText, rtl_TextEncoding eCharSet) override;
165 
167  virtual void StartRuby( const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby ) override;
168 
170  virtual void EndRuby(const SwTextNode& rNode, sal_Int32 nPos) override;
171 
173  virtual bool StartURL( const OUString& rUrl, const OUString& rTarget ) override;
174 
176  virtual bool EndURL(bool) override;
177 
178  virtual void FieldVanish( const OUString& rText, ww::eField eType ) override;
179 
183  virtual void Redline( const SwRedlineData* pRedline ) override;
184 
189  void StartRedline( const SwRedlineData * pRedlineData );
190 
194  void EndRedline( const SwRedlineData * pRedlineData );
195 
196  virtual void SetStateOfFlyFrame( FlyProcessingState nStateOfFlyFrame ) override;
197  virtual void SetAnchorIsLinkedToNode( bool bAnchorLinkedToNode ) override;
198  virtual bool IsFlyProcessingPostponed() override;
199  virtual void ResetFlyProcessingFlag() override;
200 
201  virtual void FormatDrop( const SwTextNode& rNode, const SwFormatDrop& rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) override;
202 
204  virtual void ParagraphStyle( sal_uInt16 nStyle ) override;
205 
206  virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
207  virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
208  virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
209  virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
210  void TableDefaultCellMargins( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
211  virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
212  virtual void TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
213  virtual void TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
214  virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
215  virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
216  virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
217  virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
218  virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner ) override;
219  virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
220  virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
221  virtual void TableRowEnd( sal_uInt32 nDepth ) override;
222 
224  virtual void StartStyles() override;
225 
227  virtual void EndStyles( sal_uInt16 nNumberOfStyles ) override;
228 
230  virtual void DefaultStyle() override;
231 
233  void DocDefaults( );
234 
236  void LatentStyles();
237 
243  void OutputDefaultItem(const SfxPoolItem& rHt);
244 
246  virtual void StartStyle( const OUString& rName, StyleType eType,
247  sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
248  bool bAutoUpdate ) override;
249 
251  virtual void EndStyle() override;
252 
254  virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle ) override;
255 
257  virtual void EndStyleProperties( bool bParProp ) override;
258 
260  virtual void OutlineNumbering(sal_uInt8 nLvl) override;
261 
264  virtual void PageBreakBefore( bool bBreak ) override;
265 
268  virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = nullptr ) override;
269 
270  // preserve DOCX page vertical alignment
271  virtual void TextVerticalAdjustment( const css::drawing::TextVerticalAdjust ) override;
272 
274  virtual void StartSection() override;
275 
277  virtual void EndSection() override;
278 
280  virtual void SectionFormProtection( bool bProtected ) override;
281 
283  virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo ) override;
284 
286  virtual void SectionTitlePage() override;
287 
289  virtual void SectionPageBorders( const SwFrameFormat* pFormat, const SwFrameFormat* pFirstPageFormat ) override;
290 
292  virtual void SectionBiDi( bool bBiDi ) override;
293 
296  virtual void SectionPageNumbering( sal_uInt16 nNumType, const ::boost::optional<sal_uInt16>& oPageRestartNumber ) override;
297 
299  virtual void SectionType( sal_uInt8 nBreakCode ) override;
300 
302  void StartFont( const OUString& rFamilyName ) const;
303 
305  void EndFont() const;
306 
308  void FontAlternateName( const OUString& rName ) const;
309 
311  void FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEncoding ) const;
312 
314  void FontFamilyType( FontFamily eFamily ) const;
315 
317  void FontPitchType( FontPitch ePitch ) const;
318 
320  void EmbedFont( const OUString& name, FontFamily family, FontPitch pitch );
321 
323  virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) override;
324 
326  virtual void StartAbstractNumbering( sal_uInt16 nId ) override;
327 
329  virtual void EndAbstractNumbering() override;
330 
332  virtual void NumberingLevel( sal_uInt8 nLevel,
333  sal_uInt16 nStart,
334  sal_uInt16 nNumberingType,
335  SvxAdjust eAdjust,
336  const sal_uInt8 *pNumLvlPos,
337  sal_uInt8 nFollow,
338  const wwFont *pFont,
339  const SfxItemSet *pOutSet,
340  sal_Int16 nIndentAt,
341  sal_Int16 nFirstLineIndex,
342  sal_Int16 nListTabPos,
343  const OUString &rNumberingString,
344  const SvxBrushItem* pBrush ) override;
345 
346  void WriteField_Impl( const SwField* pField, ww::eField eType, const OUString& rFieldCmd, FieldFlags nMode );
347  void WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark );
348 
349  void WriteBookmarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
350  void WriteFinalBookmarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
351  void WriteAnnotationMarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
352  void PushRelIdCache();
353  void PopRelIdCache();
355  void EndParaSdtBlock();
356 
357  void WriteFloatingTable(ww8::Frame const* pParentFrame);
358 
359 private:
367 
372 
380 
385 
392  void FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrameFormat* pOLEFrameFormat, SwOLENode* pOLENode, const SdrObject* pSdrObj = nullptr);
393  void WriteSrcRect( const SdrObject* pSdrObj, const SwFrameFormat* pFrameFormat );
394  void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat);
395  bool WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize );
396  bool WriteOLEMath( const SwOLENode& rNode );
397  void PostponeOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat );
398  void WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* rFlyFrameFormat );
399 
400  void WriteActiveXControl(const SdrObject* pObject, const SwFrameFormat& rFrameFormat, bool bInsideRun);
401  bool ExportAsActiveXControl(const SdrObject* pObject) const;
402 
403  void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
404  void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
405  void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
406  void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow );
407  void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow );
408  void EndTableCell( sal_uInt32 nCell );
409  void EndTableRow( );
410  void EndTable();
411  void SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, sal_Int32 nCell, sal_uInt32 nRow);
412  void PopulateFrameProperties(const SwFrameFormat* pFrameFormat, const Size& rSize);
413  static bool TextBoxIsFramePr(const SwFrameFormat& rFrameFormat);
415  void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, bool bForceEmptyParagraph = false );
416 
417  void WriteFFData( const FieldInfos& rInfos );
419 
420  void EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic, FontWeight weight,
421  FontPitch pitch );
422 
430  static OString TransHighlightColor( sal_uInt8 nIco );
431 protected:
432 
434  virtual void OutputFlyFrame_Impl( const ww8::Frame& rFormat, const Point& rNdTopLeft ) override;
435 
437  virtual void CharCaseMap( const SvxCaseMapItem& rCaseMap ) override;
438 
440  virtual void CharColor( const SvxColorItem& rColor) override;
441 
443  virtual void CharContour( const SvxContourItem& rContour ) override;
444 
446  virtual void CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ) override;
447 
449  virtual void CharEscapement( const SvxEscapementItem& rEscapement ) override;
450 
452  virtual void CharFont( const SvxFontItem& rFont ) override;
453 
455  virtual void CharFontSize( const SvxFontHeightItem& rFontSize ) override;
456 
458  virtual void CharKerning( const SvxKerningItem& rKerning ) override;
459 
461  virtual void CharLanguage( const SvxLanguageItem& rLanguage ) override;
462 
464  virtual void CharPosture( const SvxPostureItem& rPosture ) override;
465 
467  virtual void CharShadow( const SvxShadowedItem& rShadow ) override;
468 
470  virtual void CharUnderline( const SvxUnderlineItem& rUnderline ) override;
471 
473  virtual void CharWeight( const SvxWeightItem& rWeight ) override;
474 
476  virtual void CharAutoKern( const SvxAutoKernItem& ) override;
477 
479  virtual void CharAnimatedText( const SvxBlinkItem& rBlink ) override;
480 
482  virtual void CharBackground( const SvxBrushItem& rBrush ) override;
483 
485  virtual void CharFontCJK( const SvxFontItem& rFont ) override;
486 
488  virtual void CharFontSizeCJK( const SvxFontHeightItem& rFontSize ) override { CharFontSize( rFontSize ); }
489 
491  virtual void CharLanguageCJK( const SvxLanguageItem& rLanguageItem ) override { CharLanguage( rLanguageItem ); }
492 
494  virtual void CharPostureCJK( const SvxPostureItem& rPosture ) override;
495 
497  virtual void CharWeightCJK( const SvxWeightItem& rWeight ) override;
498 
500  virtual void CharFontCTL( const SvxFontItem& rFont ) override;
501 
503  virtual void CharFontSizeCTL( const SvxFontHeightItem& rFontSize ) override { CharFontSize( rFontSize ); }
504 
506  virtual void CharLanguageCTL( const SvxLanguageItem& rLanguageItem ) override { CharLanguage( rLanguageItem); }
507 
509  virtual void CharPostureCTL( const SvxPostureItem& rWeight ) override;
510 
512  virtual void CharWeightCTL( const SvxWeightItem& rWeight ) override;
513 
515  virtual void CharBidiRTL( const SfxPoolItem& ) override;
516 
518  virtual void CharIdctHint( const SfxPoolItem& ) override;
519 
521  virtual void CharRotate( const SvxCharRotateItem& rRotate ) override;
522 
524  virtual void CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisMark ) override;
525 
527  virtual void CharTwoLines( const SvxTwoLinesItem& rTwoLines ) override;
528 
530  virtual void CharScaleWidth( const SvxCharScaleWidthItem& rScaleWidth ) override;
531 
533  virtual void CharRelief( const SvxCharReliefItem& rRelief) override;
534 
536  virtual void CharHidden( const SvxCharHiddenItem& rHidden ) override;
537 
539  virtual void CharBorder( const ::editeng::SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ) override;
540 
542  virtual void CharHighlight( const SvxBrushItem& rHighlight ) override;
543 
545  virtual void TextINetFormat( const SwFormatINetFormat& ) override;
546 
548  virtual void TextCharFormat( const SwFormatCharFormat& ) override;
549 
551  virtual void TextFootnote_Impl( const SwFormatFootnote& ) override;
552 
555 
557  virtual void ParaLineSpacing_Impl( short nSpace, short nMulti ) override;
558 
560  virtual void ParaAdjust( const SvxAdjustItem& rAdjust ) override;
561 
563  virtual void ParaSplit( const SvxFormatSplitItem& rSplit ) override;
564 
566  virtual void ParaWidows( const SvxWidowsItem& rWidows ) override;
567 
569  virtual void ParaTabStop( const SvxTabStopItem& rTabStop ) override;
570 
572  virtual void ParaHyphenZone( const SvxHyphenZoneItem& ) override;
573 
575  virtual void ParaNumRule_Impl( const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId ) override;
576 
578  virtual void ParaScriptSpace( const SfxBoolItem& ) override;
579 
581  virtual void ParaHangingPunctuation( const SfxBoolItem& ) override;
582 
584  virtual void ParaForbiddenRules( const SfxBoolItem& ) override;
585 
587  virtual void ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) override;
588 
590  virtual void ParaSnapToGrid( const SvxParaGridItem& ) override;
591 
593  virtual void FormatFrameSize( const SwFormatFrameSize& ) override;
594 
596  virtual void FormatPaperBin( const SvxPaperBinItem& ) override;
597 
599  virtual void FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) override;
600 
602  virtual void FormatULSpace( const SvxULSpaceItem& rULSpace ) override;
603 
605  virtual void FormatSurround( const SwFormatSurround& ) override;
606 
608  virtual void FormatVertOrientation( const SwFormatVertOrient& ) override;
609 
611  virtual void FormatHorizOrientation( const SwFormatHoriOrient& ) override;
612 
614  virtual void FormatAnchor( const SwFormatAnchor& ) override;
615 
617  virtual void FormatBackground( const SvxBrushItem& ) override;
618 
620  virtual void FormatFillStyle( const XFillStyleItem& ) override;
621 
623  virtual void FormatFillGradient( const XFillGradientItem& ) override;
624 
626  virtual void FormatBox( const SvxBoxItem& ) override;
627 
629  virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFormatCol & rCol, bool bEven, SwTwips nPageSize ) override;
630 
632  virtual void FormatKeep( const SvxFormatKeepItem& ) override;
633 
635  virtual void FormatTextGrid( const SwTextGridItem& ) override;
636 
638  virtual void FormatLineNumbering( const SwFormatLineNumber& ) override;
639 
641  virtual void FormatFrameDirection( const SvxFrameDirectionItem& ) override;
642 
644  virtual void ParaGrabBag( const SfxGrabBagItem& ) override;
645 
647  virtual void CharGrabBag( const SfxGrabBagItem& ) override;
648 
649  // Sfx item RES_PARATR_OUTLINELEVEL
650  virtual void ParaOutlineLevel( const SfxUInt16Item& ) override;
651 
653  virtual void WriteExpand( const SwField* pField ) override;
654 
655  virtual void RefField( const SwField& rField, const OUString& rRef ) override;
656  virtual void HiddenField( const SwField& rField ) override;
657  virtual void SetField( const SwField& rField, ww::eField eType, const OUString& rCmd ) override;
658  virtual void PostitField( const SwField* pField ) override;
659  virtual bool DropdownField( const SwField* pField ) override;
660  virtual bool PlaceholderField( const SwField* pField ) override;
661 
662  virtual bool AnalyzeURL( const OUString& rURL, const OUString& rTarget, OUString* pLinkURL, OUString* pMark ) override;
663 
664  virtual void WriteBookmarkInActParagraph( const OUString& rName, sal_Int32 nFirstRunPos, sal_Int32 nLastRunPos ) override;
665 
668 
671 
674 
675 private:
676 
677  void DoWriteBookmarkTagStart(const OUString & bookmarkName);
678  void DoWriteBookmarkTagEnd(const OUString & bookmarkName);
679  void DoWriteBookmarksStart(std::vector<OUString>& rStarts);
680  void DoWriteBookmarksEnd(std::vector<OUString>& rEnds);
681  void DoWriteBookmarkStartIfExist(sal_Int32 nRunPos);
682  void DoWriteBookmarkEndIfExist(sal_Int32 nRunPos);
683 
684  void DoWritePermissionTagStart(const OUString & permission);
685  void DoWritePermissionTagEnd(const OUString & permission);
687  void DoWritePermissionsEnd();
688 
689  void DoWriteAnnotationMarks( );
690  void WritePostponedGraphic();
691  void WritePostponedMath(const SwOLENode* pObject);
692  void WritePostponedFormControl(const SdrObject* pObject);
693  void WritePostponedActiveXControl(bool bInsideRun);
694  void WritePostponedDiagram();
695  void WritePostponedChart();
696  void WritePostponedOLE();
699 
700  void WriteSdtBlock(sal_Int32& nSdtPrToken,
704  OUString& rSdtPrAlias,
705  bool bPara);
707  void EndSdtBlock();
708 
709  void StartField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun = false );
710  void DoWriteCmd( const OUString& rCmd );
711  void CmdField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun );
712  void EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos& rInfos );
713  void DoWriteFieldRunProperties( const SwTextNode* pNode, sal_Int32 nPos, bool bWriteCombChars = false );
714 
715  static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue );
716  static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... );
717 
737  std::unique_ptr<docx::FootnotesList> m_pFootnotesList;
738  std::unique_ptr<docx::FootnotesList> m_pEndnotesList;
740  std::unique_ptr< const WW8_SepInfo > m_pSectionInfo;
741 
744 
746  sal_Int32 m_nRedlineId;
747 
752 
755 
759 
762  std::vector< FieldInfos > m_Fields;
763  OUString m_sFieldBkm;
764  sal_Int32 m_nNextBookmarkId;
766 
767  OUString m_sRawText;
768 
770  std::vector<OUString> m_rBookmarksStart;
771  std::vector<OUString> m_rBookmarksEnd;
772 
774  std::vector<OUString> m_rFinalBookmarksStart;
775  std::vector<OUString> m_rFinalBookmarksEnd;
776 
778  std::multimap<sal_Int32, OUString> m_aBookmarksOfParagraphStart;
779  std::multimap<sal_Int32, OUString> m_aBookmarksOfParagraphEnd;
780 
782  std::vector<OUString> m_rPermissionsStart;
783  std::vector<OUString> m_rPermissionsEnd;
784 
786  std::vector<OString> m_rAnnotationMarksStart;
787  std::vector<OString> m_rAnnotationMarksEnd;
788 
790  std::map<OUString, sal_Int32> m_rOpenedBookmarksIds;
791 
794 
796  std::map<OString, sal_Int32> m_rOpenedAnnotationMarksIds;
797 
800 
803  std::map<OUString, std::vector<OString> > m_aSeqBookmarksNames;
804 
806  std::vector<css::beans::PropertyValue> m_aTextEffectsGrabBag;
807 
809  std::unique_ptr<SwWriteTable> m_xTableWrt;
810 
812 
818 
819  // Remember that a column break has to be opened at the
820  // beginning of the next paragraph
822 
823  // Remember that a page break has to be opened at the
824  // beginning of the next paragraph
826 
827  std::vector<ww8::Frame> m_aFramesOfParagraph;
828  std::set<const SwFrameFormat*> m_aFloatingTablesOfParagraph;
829  sal_Int32 m_nTextFrameLevel;
830 
831  // close of hyperlink needed
835  // Count nested HyperLinks
836  sal_Int32 m_nHyperLinkCount;
838 
839  // If the exported numbering rule defines the outlines
841 
843  {
844  PostponedGraphic( const SwGrfNode* n, Size s, const SdrObject* sObj )
845  : grfNode( n ), size( s ), pSdrObj(sObj) {};
846 
847  const SwGrfNode* grfNode;
848  Size const size;
850  };
851  std::unique_ptr< std::vector<PostponedGraphic> > m_pPostponedGraphic;
853  {
854  PostponedDiagram( const SdrObject* o, const SwFrameFormat* frm ) : object( o ), frame( frm ) {};
855  const SdrObject* object;
857  };
858  std::unique_ptr< std::vector<PostponedDiagram> > m_pPostponedDiagrams;
859 
861  {
862  PostponedDrawing( const SdrObject* sdrObj, const SwFrameFormat* frm) : object( sdrObj ), frame( frm ) {};
863  const SdrObject* object;
865  };
866  std::unique_ptr< std::vector<PostponedDrawing> > m_pPostponedDMLDrawings;
867  std::unique_ptr< std::vector<PostponedDrawing> > m_pPostponedCustomShape;
868 
870  {
871  PostponedOLE( SwOLENode* rObject, const Size& rSize, const SwFlyFrameFormat* rFrame ) : object( rObject ), size( rSize ), frame( rFrame ) {};
872  SwOLENode* object;
873  const Size size;
875  };
876  std::unique_ptr< std::vector<PostponedOLE> > m_pPostponedOLEs;
877 
878  std::vector<const SwOLENode*> m_aPostponedMaths;
880  unsigned int m_nChartCount;
881  std::vector<std::pair<const SdrObject*, Size>> m_aPostponedCharts;
882  std::vector<const SdrObject*> m_aPostponedFormControls;
883  std::vector<PostponedDrawing> m_aPostponedActiveXControls;
886  std::vector< std::pair<const SwPostItField*, sal_Int32> > m_postitFields;
888  unsigned int m_postitFieldsMaxId;
892  {
893  OString relId;
894  OString fontKey;
895  };
896 
897  std::unique_ptr<TableReference> m_tableReference;
898 
899  std::map< OUString, EmbeddedFontRef > fontFilesMap; // font file url to data
900 
901  // Remember first cell (used for default borders/margins) of each table
902  std::vector<ww8::WW8TableNodeInfoInner::Pointer_t> tableFirstCells;
903  // Remember last open and closed cells on each level
904  std::vector<sal_Int32> lastOpenCell;
905  std::vector<sal_Int32> lastClosedCell;
906 
910 
912 
913  std::shared_ptr<DocxTableStyleExport> m_pTableStyleExport;
914  // flag to check if auto spacing was set in original file
916  // store hardcoded value which was set during import.
918 
920 
922  std::stack< std::map<const Graphic*, OString> > m_aRelIdCache;
924  std::stack< std::map<BitmapChecksum, OUString> > m_aSdrRelIdCache;
925 
932  sal_Int32 m_nRunSdtPrToken;
944 
945  std::map<SvxBoxItemLine, css::table::BorderLine2> m_aTableStyleConf;
946 
947 public:
948  DocxAttributeOutput( DocxExport &rExport, const ::sax_fastparser::FSHelperPtr& pSerializer, oox::drawingml::DrawingML* pDrawingML );
949 
950  virtual ~DocxAttributeOutput() override;
951 
953  virtual DocxExport& GetExport() override;
954  const DocxExport& GetExport() const { return const_cast< DocxAttributeOutput* >( this )->GetExport(); }
955 
957  void SetSerializer( ::sax_fastparser::FSHelperPtr const & pSerializer );
958 
960  const ::sax_fastparser::FSHelperPtr& GetSerializer( ) { return m_pSerializer; }
961 
963  bool HasFootnotes() const;
964 
966  bool HasEndnotes() const;
967 
969  void FootnotesEndnotes( bool bFootnotes );
970 
972  static void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr const & fs, int tag, const SwEndNoteInfo& info, int listtag );
973 
974  bool HasPostitFields() const;
975  void WritePostitFields();
976 
978  virtual void WriteOutliner(const OutlinerParaObject& rParaObj) override;
979  virtual void WriteVMLTextBox(css::uno::Reference<css::drawing::XShape> xShape) override;
981  virtual void WriteTextBox(css::uno::Reference<css::drawing::XShape> xShape) override;
982  virtual OUString FindRelId(BitmapChecksum nChecksum) override;
983  virtual void CacheRelId(BitmapChecksum nChecksum, const OUString& rRelId) override;
984  virtual oox::drawingml::DrawingML& GetDrawingML() override;
985 
986  void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) override;
987 
988  void SetWritingHeaderFooter( bool bWritingHeaderFooter ) { m_bWritingHeaderFooter = bWritingHeaderFooter; }
990  void SetAlternateContentChoiceOpen( bool bAltContentChoiceOpen ) { m_bAlternateContentChoiceOpen = bAltContentChoiceOpen; }
992  void GetSdtEndBefore(const SdrObject* pSdrObj);
994 
998  void popFromTableExportContext(DocxTableExportContext const & rContext);
999 };
1000 
1006 {
1011  sal_uInt32 m_nTableDepth;
1012  DocxTableExportContext(DocxAttributeOutput& rOutput) : m_rOutput(rOutput) { m_rOutput.pushToTableExportContext(*this); }
1014 };
1015 
1016 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXATTRIBUTEOUTPUT_HXX
1017 
1018 /* 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:279
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).
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.
const ::sax_fastparser::FSHelperPtr & GetSerializer()
Occasionally need to use this serializer from the outside.
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)
The class that does all the actual DOCX export-related work.
Definition: docxexport.hxx:67
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.
std::vector< std::pair< const SdrObject *, Size > > m_aPostponedCharts
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.
FieldFlags
Definition: wrtww8.hxx:147
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:300
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)
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.
bool WriteOLEChart(const SdrObject *pSdrObj, const Size &rSize)
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.
OString const name
virtual void EmptyParagraph() override
Empty paragraph.
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:170
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
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
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
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.
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.
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)
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