LibreOffice Module sw (master)  1
docxattributeoutput.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_DOCXATTRIBUTEOUTPUT_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_WW8_DOCXATTRIBUTEOUTPUT_HXX
22 
23 #include <memory>
24 
25 #include "attributeoutputbase.hxx"
26 #include "fields.hxx"
27 #include <IMark.hxx>
28 #include "docxexport.hxx"
29 #include <wrtswtbl.hxx>
30 
31 #include <editeng/boxitem.hxx>
32 #include <sax/fshelper.hxx>
33 #include <sax/fastattribs.hxx>
34 #include <vcl/vclenum.hxx>
35 #include <svx/xenum.hxx>
36 
37 #include <fldbas.hxx>
38 
39 #include <vector>
40 #include <boost/optional.hpp>
41 #include <oox/export/vmlexport.hxx>
42 #include <oox/export/drawingml.hxx>
43 #include "docxtablestyleexport.hxx"
44 
45 #include <com/sun/star/table/BorderLine2.hpp>
46 #include <com/sun/star/drawing/FillStyle.hpp>
47 
48 class SwGrfNode;
49 class SdrObject;
50 enum class SvxBoxItemLine;
51 
52 namespace docx { class FootnotesList; }
53 namespace oox { namespace drawingml { class DrawingML; } }
54 
55 struct FieldInfos
56 {
57  std::shared_ptr<const SwField> pField;
58  const ::sw::mark::IFieldmark* pFieldmark;
60  bool bOpen;
61  bool bClose;
62  OUString sCmd;
63  FieldInfos() : pFieldmark(nullptr), eType(ww::eUNKNOWN), bOpen(false), bClose(false){}
64 };
65 
67 {
72 };
73 
85 {
86  sal_Int32 tag = 0;
87  bool bUseStartEnd = false;
88  bool bWriteTag = true;
89  bool bWriteDistance = false;
90  SvxShadowLocation aShadowLocation = SvxShadowLocation::NONE;
91  std::shared_ptr<editeng::WordBorderDistances> pDistances;
92 };
93 
95 
100 {
103 
106 
108  sal_uInt32 m_nTableDepth;
109 
111  : m_bTableCellOpen(false),
112  m_bTableCellParaSdtOpen(false),
113  m_nTableDepth(0)
114  {
115  }
116 };
117 
120 {
121 public:
123  virtual void RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript ) override;
124 
126  virtual void StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo ) override;
127 
129  virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) override;
130 
132  virtual void EmptyParagraph() override;
133 
135  virtual void SectionBreaks(const SwNode& rNode) override;
136 
138  virtual void StartParagraphProperties() override;
139 
141  virtual void EndParagraphProperties(const SfxItemSet& rParagraphMarkerProperties, const SwRedlineData* pRedlineData, const SwRedlineData* pRedlineParagraphMarkerDeleted, const SwRedlineData* pRedlineParagraphMarkerInserted) override;
142 
144  virtual void StartRun( const SwRedlineData* pRedlineData, sal_Int32 nPos, bool bSingleEmptyRun = false ) override;
145 
147  virtual void EndRun(const SwTextNode* pNode, sal_Int32 nPos, bool bLastRun = false) override;
148 
150  virtual void StartRunProperties() override;
151 
153  virtual void EndRunProperties( const SwRedlineData* pRedlineData ) override;
154 
155  virtual bool FootnoteEndnoteRefTag() override;
156 
157  virtual void SectFootnoteEndnotePr() override;
158 
159  virtual void WritePostitFieldReference() override;
160 
162  virtual void RunText( const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 ) override;
163 
165  virtual void RawText(const OUString& rText, rtl_TextEncoding eCharSet) override;
166 
168  virtual void StartRuby( const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby ) override;
169 
171  virtual void EndRuby(const SwTextNode& rNode, sal_Int32 nPos) override;
172 
174  virtual bool StartURL( const OUString& rUrl, const OUString& rTarget ) override;
175 
177  virtual bool EndURL(bool) override;
178 
179  virtual void FieldVanish( const OUString& rText, ww::eField eType ) override;
180 
184  virtual void Redline( const SwRedlineData* pRedline ) override;
185 
190  void StartRedline( const SwRedlineData * pRedlineData );
191 
195  void EndRedline( const SwRedlineData * pRedlineData );
196 
197  virtual void SetStateOfFlyFrame( FlyProcessingState nStateOfFlyFrame ) override;
198  virtual void SetAnchorIsLinkedToNode( bool bAnchorLinkedToNode ) override;
199  virtual bool IsFlyProcessingPostponed() override;
200  virtual void ResetFlyProcessingFlag() override;
201 
202  virtual void FormatDrop( const SwTextNode& rNode, const SwFormatDrop& rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) override;
203 
205  virtual void ParagraphStyle( sal_uInt16 nStyle ) override;
206 
207  virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
208  virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
209  virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
210  virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
211  void TableDefaultCellMargins( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
212  virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
213  virtual void TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
214  virtual void TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
215  virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
216  virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
217  virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
218  virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
219  virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner ) override;
220  virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
221  virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) override;
222  virtual void TableRowEnd( sal_uInt32 nDepth ) override;
223 
225  virtual void StartStyles() override;
226 
228  virtual void EndStyles( sal_uInt16 nNumberOfStyles ) override;
229 
231  virtual void DefaultStyle() override;
232 
234  void DocDefaults( );
235 
237  void LatentStyles();
238 
244  void OutputDefaultItem(const SfxPoolItem& rHt);
245 
247  virtual void StartStyle( const OUString& rName, StyleType eType,
248  sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
249  bool bAutoUpdate ) override;
250 
252  virtual void EndStyle() override;
253 
255  virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle ) override;
256 
258  virtual void EndStyleProperties( bool bParProp ) override;
259 
261  virtual void OutlineNumbering(sal_uInt8 nLvl) override;
262 
265  virtual void PageBreakBefore( bool bBreak ) override;
266 
269  virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = nullptr ) override;
270 
271  // preserve DOCX page vertical alignment
272  virtual void TextVerticalAdjustment( const css::drawing::TextVerticalAdjust ) override;
273 
275  virtual void StartSection() override;
276 
278  virtual void EndSection() override;
279 
281  virtual void SectionFormProtection( bool bProtected ) override;
282 
284  virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo ) override;
285 
287  virtual void SectionTitlePage() override;
288 
290  virtual void SectionPageBorders( const SwFrameFormat* pFormat, const SwFrameFormat* pFirstPageFormat ) override;
291 
293  virtual void SectionBiDi( bool bBiDi ) override;
294 
297  virtual void SectionPageNumbering( sal_uInt16 nNumType, const ::boost::optional<sal_uInt16>& oPageRestartNumber ) override;
298 
300  virtual void SectionType( sal_uInt8 nBreakCode ) override;
301 
303  void StartFont( const OUString& rFamilyName ) const;
304 
306  void EndFont() const;
307 
309  void FontAlternateName( const OUString& rName ) const;
310 
312  void FontCharset( sal_uInt8 nCharSet, rtl_TextEncoding nEncoding ) const;
313 
315  void FontFamilyType( FontFamily eFamily ) const;
316 
318  void FontPitchType( FontPitch ePitch ) const;
319 
321  void EmbedFont( const OUString& name, FontFamily family, FontPitch pitch );
322 
324  virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) override;
325 
327  virtual void StartAbstractNumbering( sal_uInt16 nId ) override;
328 
330  virtual void EndAbstractNumbering() override;
331 
333  virtual void NumberingLevel( sal_uInt8 nLevel,
334  sal_uInt16 nStart,
335  sal_uInt16 nNumberingType,
336  SvxAdjust eAdjust,
337  const sal_uInt8 *pNumLvlPos,
338  sal_uInt8 nFollow,
339  const wwFont *pFont,
340  const SfxItemSet *pOutSet,
341  sal_Int16 nIndentAt,
342  sal_Int16 nFirstLineIndex,
343  sal_Int16 nListTabPos,
344  const OUString &rNumberingString,
345  const SvxBrushItem* pBrush ) override;
346 
347  void WriteField_Impl( const SwField* pField, ww::eField eType, const OUString& rFieldCmd, FieldFlags nMode );
348  void WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark );
349 
350  void WriteBookmarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
351  void WriteFinalBookmarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
352  void WriteAnnotationMarks_Impl( std::vector< OUString >& rStarts, std::vector< OUString >& rEnds );
353  void PushRelIdCache();
354  void PopRelIdCache();
356  void EndParaSdtBlock();
357 
358  void WriteFloatingTable(ww8::Frame const* pParentFrame);
359 
360 private:
368 
373 
381 
386 
393  void FlyFrameGraphic( const SwGrfNode* pGrfNode, const Size& rSize, const SwFlyFrameFormat* pOLEFrameFormat, SwOLENode* pOLENode, const SdrObject* pSdrObj = nullptr);
394  void WriteSrcRect( const SdrObject* pSdrObj, const SwFrameFormat* pFrameFormat );
395  void WriteOLE2Obj( const SdrObject* pSdrObj, SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat);
396  bool WriteOLEChart( const SdrObject* pSdrObj, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat);
397  bool WriteOLEMath( const SwOLENode& rNode );
398  void PostponeOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* pFlyFrameFormat );
399  void WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* rFlyFrameFormat );
400 
401  void WriteActiveXControl(const SdrObject* pObject, const SwFrameFormat& rFrameFormat, bool bInsideRun);
402  bool ExportAsActiveXControl(const SdrObject* pObject) const;
403 
404  void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
405  void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
406  void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner );
407  void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow );
408  void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t const & pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow );
409  void EndTableCell( sal_uInt32 nCell );
410  void EndTableRow( );
411  void EndTable();
412  void SyncNodelessCells(ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, sal_Int32 nCell, sal_uInt32 nRow);
413  void PopulateFrameProperties(const SwFrameFormat* pFrameFormat, const Size& rSize);
414  static bool TextBoxIsFramePr(const SwFrameFormat& rFrameFormat);
416  void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t const & pInner, bool bForceEmptyParagraph = false );
417 
418  void WriteFFData( const FieldInfos& rInfos );
420 
421  void EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic, FontWeight weight,
422  FontPitch pitch );
423 
431  static OString TransHighlightColor( sal_uInt8 nIco );
432 protected:
433 
435  virtual void OutputFlyFrame_Impl( const ww8::Frame& rFormat, const Point& rNdTopLeft ) override;
436 
438  virtual void CharCaseMap( const SvxCaseMapItem& rCaseMap ) override;
439 
441  virtual void CharColor( const SvxColorItem& rColor) override;
442 
444  virtual void CharContour( const SvxContourItem& rContour ) override;
445 
447  virtual void CharCrossedOut( const SvxCrossedOutItem& rCrossedOut ) override;
448 
450  virtual void CharEscapement( const SvxEscapementItem& rEscapement ) override;
451 
453  virtual void CharFont( const SvxFontItem& rFont ) override;
454 
456  virtual void CharFontSize( const SvxFontHeightItem& rFontSize ) override;
457 
459  virtual void CharKerning( const SvxKerningItem& rKerning ) override;
460 
462  virtual void CharLanguage( const SvxLanguageItem& rLanguage ) override;
463 
465  virtual void CharPosture( const SvxPostureItem& rPosture ) override;
466 
468  virtual void CharShadow( const SvxShadowedItem& rShadow ) override;
469 
471  virtual void CharUnderline( const SvxUnderlineItem& rUnderline ) override;
472 
474  virtual void CharWeight( const SvxWeightItem& rWeight ) override;
475 
477  virtual void CharAutoKern( const SvxAutoKernItem& ) override;
478 
480  virtual void CharAnimatedText( const SvxBlinkItem& rBlink ) override;
481 
483  virtual void CharBackground( const SvxBrushItem& rBrush ) override;
484 
486  virtual void CharFontCJK( const SvxFontItem& rFont ) override;
487 
489  virtual void CharFontSizeCJK( const SvxFontHeightItem& rFontSize ) override { CharFontSize( rFontSize ); }
490 
492  virtual void CharLanguageCJK( const SvxLanguageItem& rLanguageItem ) override { CharLanguage( rLanguageItem ); }
493 
495  virtual void CharPostureCJK( const SvxPostureItem& rPosture ) override;
496 
498  virtual void CharWeightCJK( const SvxWeightItem& rWeight ) override;
499 
501  virtual void CharFontCTL( const SvxFontItem& rFont ) override;
502 
504  virtual void CharFontSizeCTL( const SvxFontHeightItem& rFontSize ) override { CharFontSize( rFontSize ); }
505 
507  virtual void CharLanguageCTL( const SvxLanguageItem& rLanguageItem ) override { CharLanguage( rLanguageItem); }
508 
510  virtual void CharPostureCTL( const SvxPostureItem& rWeight ) override;
511 
513  virtual void CharWeightCTL( const SvxWeightItem& rWeight ) override;
514 
516  virtual void CharBidiRTL( const SfxPoolItem& ) override;
517 
519  virtual void CharIdctHint( const SfxPoolItem& ) override;
520 
522  virtual void CharRotate( const SvxCharRotateItem& rRotate ) override;
523 
525  virtual void CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisMark ) override;
526 
528  virtual void CharTwoLines( const SvxTwoLinesItem& rTwoLines ) override;
529 
531  virtual void CharScaleWidth( const SvxCharScaleWidthItem& rScaleWidth ) override;
532 
534  virtual void CharRelief( const SvxCharReliefItem& rRelief) override;
535 
537  virtual void CharHidden( const SvxCharHiddenItem& rHidden ) override;
538 
540  virtual void CharBorder( const ::editeng::SvxBorderLine* pAllBorder, const sal_uInt16 nDist, const bool bShadow ) override;
541 
543  virtual void CharHighlight( const SvxBrushItem& rHighlight ) override;
544 
546  virtual void TextINetFormat( const SwFormatINetFormat& ) override;
547 
549  virtual void TextCharFormat( const SwFormatCharFormat& ) override;
550 
552  virtual void TextFootnote_Impl( const SwFormatFootnote& ) override;
553 
556 
558  virtual void ParaLineSpacing_Impl( short nSpace, short nMulti ) override;
559 
561  virtual void ParaAdjust( const SvxAdjustItem& rAdjust ) override;
562 
564  virtual void ParaSplit( const SvxFormatSplitItem& rSplit ) override;
565 
567  virtual void ParaWidows( const SvxWidowsItem& rWidows ) override;
568 
570  virtual void ParaTabStop( const SvxTabStopItem& rTabStop ) override;
571 
573  virtual void ParaHyphenZone( const SvxHyphenZoneItem& ) override;
574 
576  virtual void ParaNumRule_Impl( const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId ) override;
577 
579  virtual void ParaScriptSpace( const SfxBoolItem& ) override;
580 
582  virtual void ParaHangingPunctuation( const SfxBoolItem& ) override;
583 
585  virtual void ParaForbiddenRules( const SfxBoolItem& ) override;
586 
588  virtual void ParaVerticalAlign( const SvxParaVertAlignItem& rAlign ) override;
589 
591  virtual void ParaSnapToGrid( const SvxParaGridItem& ) override;
592 
594  virtual void FormatFrameSize( const SwFormatFrameSize& ) override;
595 
597  virtual void FormatPaperBin( const SvxPaperBinItem& ) override;
598 
600  virtual void FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) override;
601 
603  virtual void FormatULSpace( const SvxULSpaceItem& rULSpace ) override;
604 
606  virtual void FormatSurround( const SwFormatSurround& ) override;
607 
609  virtual void FormatVertOrientation( const SwFormatVertOrient& ) override;
610 
612  virtual void FormatHorizOrientation( const SwFormatHoriOrient& ) override;
613 
615  virtual void FormatAnchor( const SwFormatAnchor& ) override;
616 
618  virtual void FormatBackground( const SvxBrushItem& ) override;
619 
621  virtual void FormatFillStyle( const XFillStyleItem& ) override;
622 
624  virtual void FormatFillGradient( const XFillGradientItem& ) override;
625 
627  virtual void FormatBox( const SvxBoxItem& ) override;
628 
630  virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFormatCol & rCol, bool bEven, SwTwips nPageSize ) override;
631 
633  virtual void FormatKeep( const SvxFormatKeepItem& ) override;
634 
636  virtual void FormatTextGrid( const SwTextGridItem& ) override;
637 
639  virtual void FormatLineNumbering( const SwFormatLineNumber& ) override;
640 
642  virtual void FormatFrameDirection( const SvxFrameDirectionItem& ) override;
643 
645  virtual void ParaGrabBag( const SfxGrabBagItem& ) override;
646 
648  virtual void CharGrabBag( const SfxGrabBagItem& ) override;
649 
650  // Sfx item RES_PARATR_OUTLINELEVEL
651  virtual void ParaOutlineLevel( const SfxUInt16Item& ) override;
652 
654  virtual void WriteExpand( const SwField* pField ) override;
655 
656  virtual void RefField( const SwField& rField, const OUString& rRef ) override;
657  virtual void HiddenField( const SwField& rField ) override;
658  virtual void SetField( const SwField& rField, ww::eField eType, const OUString& rCmd ) override;
659  virtual void PostitField( const SwField* pField ) override;
660  virtual bool DropdownField( const SwField* pField ) override;
661  virtual bool PlaceholderField( const SwField* pField ) override;
662 
663  virtual bool AnalyzeURL( const OUString& rURL, const OUString& rTarget, OUString* pLinkURL, OUString* pMark ) override;
664 
665  virtual void WriteBookmarkInActParagraph( const OUString& rName, sal_Int32 nFirstRunPos, sal_Int32 nLastRunPos ) override;
666 
669 
672 
675 
676 private:
677 
678  void DoWriteBookmarkTagStart(const OUString & bookmarkName);
679  void DoWriteBookmarkTagEnd(const OUString & bookmarkName);
680  void DoWriteBookmarksStart(std::vector<OUString>& rStarts);
681  void DoWriteBookmarksEnd(std::vector<OUString>& rEnds);
682  void DoWriteBookmarkStartIfExist(sal_Int32 nRunPos);
683  void DoWriteBookmarkEndIfExist(sal_Int32 nRunPos);
684 
685  void DoWritePermissionTagStart(const OUString & permission);
686  void DoWritePermissionTagEnd(const OUString & permission);
688  void DoWritePermissionsEnd();
689 
690  void DoWriteAnnotationMarks( );
691  void WritePostponedGraphic();
692  void WritePostponedMath(const SwOLENode* pObject);
693  void WritePostponedFormControl(const SdrObject* pObject);
694  void WritePostponedActiveXControl(bool bInsideRun);
695  void WritePostponedDiagram();
696  void WritePostponedChart();
697  void WritePostponedOLE();
700 
701  void WriteSdtBlock(sal_Int32& nSdtPrToken,
705  OUString& rSdtPrAlias,
706  bool bPara);
708  void EndSdtBlock();
709 
710  void WriteFormDateStart(const OUString& sFullDate, const OUString& sDateFormat, const OUString& sLang);
711  void WriteFormDateEnd();
712 
713  void StartField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun = false );
714  void DoWriteCmd( const OUString& rCmd );
715  void CmdField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos const & rInfos, bool bWriteRun );
716  void EndField_Impl( const SwTextNode* pNode, sal_Int32 nPos, FieldInfos& rInfos );
717  void DoWriteFieldRunProperties( const SwTextNode* pNode, sal_Int32 nPos, bool bWriteCombChars = false );
718 
719  static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nAttrName, const sal_Char* sAttrValue );
720  static void AddToAttrList( rtl::Reference<sax_fastparser::FastAttributeList>& pAttrList, sal_Int32 nArgs, ... );
721 
741  std::unique_ptr<docx::FootnotesList> m_pFootnotesList;
742  std::unique_ptr<docx::FootnotesList> m_pEndnotesList;
744  std::unique_ptr< const WW8_SepInfo > m_pSectionInfo;
745 
748 
750  sal_Int32 m_nRedlineId;
751 
756 
759 
763 
766 
769  std::vector< FieldInfos > m_Fields;
770  OUString m_sFieldBkm;
771  sal_Int32 m_nNextBookmarkId;
773 
774  OUString m_sRawText;
775 
777  std::vector<OUString> m_rBookmarksStart;
778  std::vector<OUString> m_rBookmarksEnd;
779 
781  std::vector<OUString> m_rFinalBookmarksStart;
782  std::vector<OUString> m_rFinalBookmarksEnd;
783 
785  std::multimap<sal_Int32, OUString> m_aBookmarksOfParagraphStart;
786  std::multimap<sal_Int32, OUString> m_aBookmarksOfParagraphEnd;
787 
789  std::vector<OUString> m_rPermissionsStart;
790  std::vector<OUString> m_rPermissionsEnd;
791 
793  std::vector<OString> m_rAnnotationMarksStart;
794  std::vector<OString> m_rAnnotationMarksEnd;
795 
797  std::map<OUString, sal_Int32> m_rOpenedBookmarksIds;
798 
801 
803  std::map<OString, sal_Int32> m_rOpenedAnnotationMarksIds;
804 
807 
810  std::map<OUString, std::vector<OString> > m_aSeqBookmarksNames;
811 
813  std::vector<css::beans::PropertyValue> m_aTextEffectsGrabBag;
814 
816  std::unique_ptr<SwWriteTable> m_xTableWrt;
817 
819 
825 
826  // Remember that a column break has to be opened at the
827  // beginning of the next paragraph
829 
830  // Remember that a page break has to be opened at the
831  // beginning of the next paragraph
833 
834  std::vector<ww8::Frame> m_aFramesOfParagraph;
835  std::set<const SwFrameFormat*> m_aFloatingTablesOfParagraph;
836  sal_Int32 m_nTextFrameLevel;
837 
838  // close of hyperlink needed
842  // Count nested HyperLinks
843  sal_Int32 m_nHyperLinkCount;
845 
846  // If the exported numbering rule defines the outlines
848 
850  {
851  PostponedGraphic( const SwGrfNode* n, Size s, const SdrObject* sObj )
852  : grfNode( n ), size( s ), pSdrObj(sObj) {};
853 
854  const SwGrfNode* grfNode;
855  Size const size;
857  };
858  std::unique_ptr< std::vector<PostponedGraphic> > m_pPostponedGraphic;
860  {
861  PostponedDiagram( const SdrObject* o, const SwFrameFormat* frm ) : object( o ), frame( frm ) {};
862  const SdrObject* object;
864  };
865  std::unique_ptr< std::vector<PostponedDiagram> > m_pPostponedDiagrams;
866 
868  {
869  PostponedDrawing( const SdrObject* sdrObj, const SwFrameFormat* frm) : object( sdrObj ), frame( frm ) {};
870  const SdrObject* object;
872  };
873  std::unique_ptr< std::vector<PostponedDrawing> > m_pPostponedDMLDrawings;
874  std::unique_ptr< std::vector<PostponedDrawing> > m_pPostponedCustomShape;
875 
877  {
878  PostponedOLE( SwOLENode* rObject, const Size& rSize, const SwFlyFrameFormat* rFrame ) : object( rObject ), size( rSize ), frame( rFrame ) {};
879  SwOLENode* object;
880  const Size size;
882  };
883  std::unique_ptr< std::vector<PostponedOLE> > m_pPostponedOLEs;
884 
885  std::vector<const SwOLENode*> m_aPostponedMaths;
887  unsigned int m_nChartCount;
889  {
890  PostponedChart( const SdrObject* sdrObject, const Size& rSize, const SwFlyFrameFormat* rFrame ) : object(sdrObject), size(rSize), frame(rFrame) {};
891  const SdrObject* object;
892  const Size size;
894  };
895  std::vector<PostponedChart> m_aPostponedCharts;
896  std::vector<const SdrObject*> m_aPostponedFormControls;
897  std::vector<PostponedDrawing> m_aPostponedActiveXControls;
900  std::vector< std::pair<const SwPostItField*, sal_Int32> > m_postitFields;
902  unsigned int m_postitFieldsMaxId;
906  {
907  OString relId;
908  OString fontKey;
909  };
910 
911  std::unique_ptr<TableReference> m_tableReference;
912 
913  std::map< OUString, EmbeddedFontRef > fontFilesMap; // font file url to data
914 
915  // Remember first cell (used for default borders/margins) of each table
916  std::vector<ww8::WW8TableNodeInfoInner::Pointer_t> tableFirstCells;
917  // Remember last open and closed cells on each level
918  std::vector<sal_Int32> lastOpenCell;
919  std::vector<sal_Int32> lastClosedCell;
920 
924 
926 
927  std::shared_ptr<DocxTableStyleExport> m_pTableStyleExport;
928  // flag to check if auto spacing was set in original file
930  // store hardcoded value which was set during import.
932 
934 
936  std::stack< std::map<const Graphic*, OString> > m_aRelIdCache;
938  std::stack< std::map<BitmapChecksum, OUString> > m_aSdrRelIdCache;
939 
946  sal_Int32 m_nRunSdtPrToken;
958 
959  std::map<SvxBoxItemLine, css::table::BorderLine2> m_aTableStyleConf;
960 
961 public:
962  DocxAttributeOutput( DocxExport &rExport, const ::sax_fastparser::FSHelperPtr& pSerializer, oox::drawingml::DrawingML* pDrawingML );
963 
964  virtual ~DocxAttributeOutput() override;
965 
967  virtual DocxExport& GetExport() override;
968  const DocxExport& GetExport() const { return const_cast< DocxAttributeOutput* >( this )->GetExport(); }
969 
971  void SetSerializer( ::sax_fastparser::FSHelperPtr const & pSerializer );
972 
974  const ::sax_fastparser::FSHelperPtr& GetSerializer( ) { return m_pSerializer; }
975 
977  bool HasFootnotes() const;
978 
980  bool HasEndnotes() const;
981 
983  void FootnotesEndnotes( bool bFootnotes );
984 
986  static void WriteFootnoteEndnotePr( ::sax_fastparser::FSHelperPtr const & fs, int tag, const SwEndNoteInfo& info, int listtag );
987 
988  bool HasPostitFields() const;
989  void WritePostitFields();
990 
992  virtual void WriteOutliner(const OutlinerParaObject& rParaObj) override;
993  virtual void WriteVMLTextBox(css::uno::Reference<css::drawing::XShape> xShape) override;
995  virtual void WriteTextBox(css::uno::Reference<css::drawing::XShape> xShape) override;
996  virtual OUString FindRelId(BitmapChecksum nChecksum) override;
997  virtual void CacheRelId(BitmapChecksum nChecksum, const OUString& rRelId) override;
998  virtual oox::drawingml::DrawingML& GetDrawingML() override;
999 
1000  void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) override;
1001 
1002  void SetWritingHeaderFooter( bool bWritingHeaderFooter ) { m_bWritingHeaderFooter = bWritingHeaderFooter; }
1004  void SetAlternateContentChoiceOpen( bool bAltContentChoiceOpen ) { m_bAlternateContentChoiceOpen = bAltContentChoiceOpen; }
1006  void GetSdtEndBefore(const SdrObject* pSdrObj);
1008 
1012  void popFromTableExportContext(DocxTableExportContext const & rContext);
1013 };
1014 
1020 {
1025  sal_uInt32 m_nTableDepth;
1026  DocxTableExportContext(DocxAttributeOutput& rOutput) : m_rOutput(rOutput) { m_rOutput.pushToTableExportContext(*this); }
1028 };
1029 
1030 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXATTRIBUTEOUTPUT_HXX
1031 
1032 /* 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:65
bool m_bOpenedSectPr
Flag indicating that the section properties are being written.
virtual void EndRun(const SwTextNode *pNode, sal_Int32 nPos, bool bLastRun=false) override
End of the text run.
void DoWritePermissionsStart()
Write the start permissions.
virtual void CharFontCTL(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_CTL_FONT.
virtual void SectionBreaks(const SwNode &rNode) override
Called in order to output section breaks.
virtual void ResetFlyProcessingFlag() override
Reset the flag for FlyProcessing.
virtual void CharBidiRTL(const SfxPoolItem &) override
Sfx item RES_CHRATR_BidiRTL.
std::vector< sal_Int32 > lastOpenCell
virtual void FormatTextGrid(const SwTextGridItem &) override
Sfx item RES_TEXTGRID.
virtual void WriteOutliner(const OutlinerParaObject &rParaObj) override
VMLTextExport.
boost::optional< css::drawing::FillStyle > m_oFillStyle
std::unique_ptr< std::vector< PostponedOLE > > m_pPostponedOLEs
bool m_bParagraphSdtHasId
Currently paragraph SDT has a child element.
rtl::Reference< sax_fastparser::FastAttributeList > m_pBackgroundAttrList
Attributes of the paragraph background.
rtl::Reference< sax_fastparser::FastAttributeList > m_pParagraphSdtPrTokenAttributes
virtual void SectionPageBorders(const SwFrameFormat *pFormat, const SwFrameFormat *pFirstPageFormat) override
Description of the page borders.
FlyProcessingState m_nStateOfFlyFrame
State of the Fly at current position.
static void WriteFootnoteEndnotePr(::sax_fastparser::FSHelperPtr const &fs, int tag, const SwEndNoteInfo &info, int listtag)
writes the footnotePr/endnotePr (depending on tag) section
virtual void ParaOutlineLevel(const SfxUInt16Item &) override
Sfx item RES_PARATR_OUTLINELEVEL.
virtual void ParaWidows(const SvxWidowsItem &rWidows) override
Sfx item RES_PARATR_WIDOWS.
PostponedChart(const SdrObject *sdrObject, const Size &rSize, const SwFlyFrameFormat *rFrame)
FieldFlags
Definition: wrtww8.hxx:146
std::unique_ptr< std::vector< PostponedDrawing > > m_pPostponedCustomShape
virtual void ParaForbiddenRules(const SfxBoolItem &) override
Sfx item RES_PARATR_FORBIDDEN_RULES.
std::vector< OUString > m_rFinalBookmarksEnd
bool m_bHadSectPr
Did we have a section break in this paragraph? Set by StartSection(), reset by the next StartParagrap...
OString m_sLastOpenedBookmark
Name of the last opened bookmark.
virtual void StartRunProperties() override
Called before we start outputting the attributes.
virtual void EndStyles(sal_uInt16 nNumberOfStyles) override
End of the styles table.
std::map< OUString, EmbeddedFontRef > fontFilesMap
std::unique_ptr< const WW8_SepInfo > m_pSectionInfo
void DoWriteBookmarkTagEnd(const OUString &bookmarkName)
rtl::Reference< sax_fastparser::FastAttributeList > m_pCharLangAttrList
virtual bool StartURL(const OUString &rUrl, const OUString &rTarget) override
Output URL start.
void CmdField_Impl(const SwTextNode *pNode, sal_Int32 nPos, FieldInfos const &rInfos, bool bWriteRun)
std::vector< css::beans::PropertyValue > m_aTextEffectsGrabBag
GrabBag for text effects like glow, shadow, ...
char sal_Char
virtual void EndRuby(const SwTextNode &rNode, sal_Int32 nPos) override
Output ruby end.
void StartFont(const OUString &rFamilyName) const
Start the font.
std::unique_ptr< docx::FootnotesList > m_pFootnotesList
StyleType
void EndSdtBlock()
Closes a currently open SDT block.
virtual OUString FindRelId(BitmapChecksum nChecksum) override
virtual void ParaHangingPunctuation(const SfxBoolItem &) override
Sfx item RES_PARATR_HANGINGPUNCTUATION.
void StartRedline(const SwRedlineData *pRedlineData)
Output redlining.
eField
Definition: fields.hxx:26
std::map< OUString, std::vector< OString > > m_aSeqBookmarksNames
If there are bookmarks around sequence fields, this map contains the names of these bookmarks for eac...
oox::drawingml::DrawingML & m_rDrawingML
DrawingML access.
virtual void TableOrientation(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual void FormatHorizOrientation(const SwFormatHoriOrient &) override
Sfx item RES_HORI_ORIENT.
std::vector< sal_Int32 > lastClosedCell
virtual void WriteExpand(const SwField *pField) override
Write the expanded field.
void DoWriteBookmarksEnd(std::vector< OUString > &rEnds)
export the end bookmarks
virtual void ParaScriptSpace(const SfxBoolItem &) override
Sfx item RES_PARATR_SCRIPTSPACE.
virtual void ParagraphStyle(sal_uInt16 nStyle) override
Output style.
rtl::Reference< sax_fastparser::FastAttributeList > m_pRunSdtPrTokenChildren
Collects and outputs fonts.
Definition: wrtww8.hxx:299
rtl::Reference< sax_fastparser::FastAttributeList > m_pEastAsianLayoutAttrList
void DocDefaults()
Write Doc Defaults.
void WriteSdtBlock(sal_Int32 &nSdtPrToken, rtl::Reference< sax_fastparser::FastAttributeList > &pSdtPrTokenChildren, rtl::Reference< sax_fastparser::FastAttributeList > &pSdtPrTokenAttributes, rtl::Reference< sax_fastparser::FastAttributeList > &pSdtPrDataBindingAttrs, OUString &rSdtPrAlias, bool bPara)
virtual void OutputFlyFrame_Impl(const ww8::Frame &rFormat, const Point &rNdTopLeft) override
Output frames - the implementation.
void WriteFFData(const FieldInfos &rInfos)
Remember footnotes/endnotes so that we can dump them in one go.
virtual void TextFootnote_Impl(const SwFormatFootnote &) override
Sfx item RES_TXTATR_FTN.
void WriteFinalBookmarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
const SwField * pendingPlaceholder
virtual void RefField(const SwField &rField, const OUString &rRef) override
sal_uInt32 tag
std::vector< OUString > m_rFinalBookmarksStart
Bookmarks to output at the end.
virtual void CharCrossedOut(const SvxCrossedOutItem &rCrossedOut) override
Sfx item RES_CHRATR_CROSSEDOUT.
static void AddToAttrList(rtl::Reference< sax_fastparser::FastAttributeList > &pAttrList, sal_Int32 nAttrName, const sal_Char *sAttrValue)
std::shared_ptr< WW8TableInfo > Pointer_t
Style of a layout element.
Definition: frmfmt.hxx:57
void DoWriteFieldRunProperties(const SwTextNode *pNode, sal_Int32 nPos, bool bWriteCombChars=false)
Writes properties for run that is used to separate field implementation.
virtual void SectionTitlePage() override
Has different headers/footers for the title page.
std::vector< const SdrObject * > m_aPostponedFormControls
void WriteActiveXControl(const SdrObject *pObject, const SwFrameFormat &rFrameFormat, bool bInsideRun)
SvxAdjust
std::unique_ptr< std::vector< PostponedGraphic > > m_pPostponedGraphic
bool HasEndnotes() const
Do we have any endnotes?
void WriteFormData_Impl(const ::sw::mark::IFieldmark &rFieldmark)
virtual void EndRunProperties(const SwRedlineData *pRedlineData) override
Called after we end outputting the attributes.
virtual void FormatFillStyle(const XFillStyleItem &) override
Sfx item RES_FILL_STYLE.
virtual void SectFootnoteEndnotePr() override
for footnote/endnote section properties
virtual void EndSection() override
End of the section properties.
std::unique_ptr< SwWriteTable > m_xTableWrt
The current table helper.
void FootnotesEndnotes(bool bFootnotes)
Output the content of the footnotes.xml resp. endnotes.xml.
void FontAlternateName(const OUString &rName) const
Alternate name for the font.
sal_Int32 m_nRedlineId
Id of the redline.
virtual bool IsFlyProcessingPostponed() override
Is processing of fly postponed ?
virtual void PostitField(const SwField *pField) override
virtual void EndAbstractNumbering() override
End of the abstract numbering definition instance.
void WriteField_Impl(const SwField *pField, ww::eField eType, const OUString &rFieldCmd, FieldFlags nMode)
void DoWritePermissionTagStart(const OUString &permission)
void WriteBookmarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
virtual void TextINetFormat(const SwFormatINetFormat &) override
Sfx item RES_TXTATR_INETFMT.
DocxAttributeOutput(DocxExport &rExport, const ::sax_fastparser::FSHelperPtr &pSerializer, oox::drawingml::DrawingML *pDrawingML)
void DoWriteCmd(const OUString &rCmd)
FlyAnchors.
Definition: fmtanchr.hxx:34
void InitTableHelper(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner)
std::shared_ptr< editeng::WordBorderDistances > pDistances
virtual void StartSection() override
Start of the section properties.
void WriteOLE(SwOLENode &rNode, const Size &rSize, const SwFlyFrameFormat *rFlyFrameFormat)
void WriteAnnotationMarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
virtual void WriteTextBox(css::uno::Reference< css::drawing::XShape > xShape) override
DMLTextExport.
std::vector< ww8::WW8TableNodeInfoInner::Pointer_t > tableFirstCells
void InitCollectedParagraphProperties()
Initialize the structures where we are going to collect some of the paragraph properties.
virtual void CharAnimatedText(const SvxBlinkItem &rBlink) override
Sfx item RES_CHRATR_BLINK.
void EndParaSdtBlock()
End possibly opened paragraph sdt block.
PostponedGraphic(const SwGrfNode *n, Size s, const SdrObject *sObj)
virtual void NumberingLevel(sal_uInt8 nLevel, sal_uInt16 nStart, sal_uInt16 nNumberingType, SvxAdjust eAdjust, const sal_uInt8 *pNumLvlPos, sal_uInt8 nFollow, const wwFont *pFont, const SfxItemSet *pOutSet, sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos, const OUString &rNumberingString, const SvxBrushItem *pBrush) override
All the numbering level information.
virtual void DefaultStyle() override
Write default style.
virtual void TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void TableCellProperties(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner, sal_uInt32 nCell, sal_uInt32 nRow)
OString m_sLastOpenedAnnotationMark
Name of the last opened annotation mark.
virtual void EmptyParagraph() override
Empty paragraph.
bool WriteOLEChart(const SdrObject *pSdrObj, const Size &rSize, const SwFlyFrameFormat *pFlyFrameFormat)
rtl::Reference< sax_fastparser::FastAttributeList > m_pFontsAttrList
std::shared_ptr< DocxTableStyleExport > m_pTableStyleExport
virtual void FormatVertOrientation(const SwFormatVertOrient &) override
Sfx item RES_VERT_ORIENT.
virtual void FormatFrameSize(const SwFormatFrameSize &) override
Sfx item RES_FRM_SIZE.
FontPitch
const SwRedlineData * m_pRedlineData
Redline data to remember in the text run.
DocumentType const eType
const DocxExport & GetExport() const
std::shared_ptr< FastSerializerHelper > FSHelperPtr
std::vector< OUString > m_rPermissionsStart
Permissions to output.
virtual bool FootnoteEndnoteRefTag() override
docx requires footnoteRef/endnoteRef tag at the beginning of each of them
virtual void CharEscapement(const SvxEscapementItem &rEscapement) override
Sfx item RES_CHRATR_ESCAPEMENT.
virtual void WriteBookmarkInActParagraph(const OUString &rName, sal_Int32 nFirstRunPos, sal_Int32 nLastRunPos) override
Insert a bookmark inside the currently processed paragraph.
virtual void RawText(const OUString &rText, rtl_TextEncoding eCharSet) override
Output text (without markup).
virtual void CacheRelId(BitmapChecksum nChecksum, const OUString &rRelId) override
void EndTableCell(sal_uInt32 nCell)
unsigned int m_nChartCount
count charts consistently for unit tests
void SetAlternateContentChoiceOpen(bool bAltContentChoiceOpen)
bool WriteOLEMath(const SwOLENode &rNode)
virtual void CharWeight(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_WEIGHT.
void WritePostponedFormControl(const SdrObject *pObject)
void StartTable(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner)
< purpose of derivation from SwClient: character style for displaying the numbers.
Definition: lineinfo.hxx:37
virtual void TableCellRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
SvxShadowLocation aShadowLocation
virtual void SectionFormProtection(bool bProtected) override
Protection of forms.
void EmbedFontStyle(const OUString &name, int tag, FontFamily family, FontItalic italic, FontWeight weight, FontPitch pitch)
void FontPitchType(FontPitch ePitch) const
Font pitch.
rtl::Reference< sax_fastparser::FastAttributeList > m_pSectionSpacingAttrList
virtual void FormatLRSpace(const SvxLRSpaceItem &rLRSpace) override
Sfx item RES_LR_SPACE.
void InitCollectedRunProperties()
Initialize the structures where we are going to collect some of the run properties.
virtual void CharLanguage(const SvxLanguageItem &rLanguage) override
Sfx item RES_CHRATR_LANGUAGE.
A structure that holds flags for the table export.
std::stack< std::map< const Graphic *, OString > > m_aRelIdCache
RelId <-> Graphic* cache, so that in case of alternate content, the same graphic only gets written on...
FontFamily
virtual bool AnalyzeURL(const OUString &rURL, const OUString &rTarget, OUString *pLinkURL, OUString *pMark) override
sal_Int32 m_nRunSdtPrToken
members to control the existence of grabbagged SDT properties in the text run
rtl::Reference< sax_fastparser::FastAttributeList > m_pParagraphSpacingAttrList
virtual void EndStyleProperties(bool bParProp) override
End of (paragraph or run) properties of a style.
virtual void TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
static bool TextBoxIsFramePr(const SwFrameFormat &rFrameFormat)
std::unique_ptr< TableReference > m_tableReference
std::shared_ptr< const SwField > pField
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
void SetWritingHeaderFooter(bool bWritingHeaderFooter)
std::multimap< sal_Int32, OUString > m_aBookmarksOfParagraphStart
Bookmarks of the current paragraph.
virtual void TextVerticalAdjustment(const css::drawing::TextVerticalAdjust) override
bool m_bPreventDoubleFieldsHandling
Field data to remember in the text run.
FontWeight
virtual void CharShadow(const SvxShadowedItem &rShadow) override
Sfx item RES_CHRATR_SHADOWED.
virtual void CharLanguageCTL(const SvxLanguageItem &rLanguageItem) override
Sfx item RES_CHRATR_CTL_LANGUAGE.
void DoWritePermissionsEnd()
export the end permissions
A structure that holds information about the options selected when outputting a border to DOCX...
void EndRedline(const SwRedlineData *pRedlineData)
Output redlining.
virtual void CharRelief(const SvxCharReliefItem &rRelief) override
Sfx item RES_CHRATR_RELIEF.
PostponedDrawing(const SdrObject *sdrObj, const SwFrameFormat *frm)
virtual void FormatSurround(const SwFormatSurround &) override
Sfx item RES_SURROUND.
virtual void TableInfoRow(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual void CharGrabBag(const SfxGrabBagItem &) override
Sfx item RES_CHRATR_GRABBAG.
FlyProcessingState
enum to state the present state of the fly
Definition: wrtww8.hxx:169
void DoWriteBookmarksStart(std::vector< OUString > &rStarts)
Write the start bookmarks.
virtual void FormatBackground(const SvxBrushItem &) override
Sfx item RES_BACKGROUND.
unsigned char sal_uInt8
Make exporting a Writer Frame easy.
virtual void CharTwoLines(const SvxTwoLinesItem &rTwoLines) override
Sfx item RES_CHRATR_TWO_LINES.
void WriteCollectedRunProperties()
Output what we collected during the run properties output.
virtual void FormatDrop(const SwTextNode &rNode, const SwFormatDrop &rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override
virtual void FormatAnchor(const SwFormatAnchor &) override
Sfx item RES_ANCHOR.
virtual void ParaGrabBag(const SfxGrabBagItem &) override
Sfx item RES_PARATR_GRABBAG.
virtual void FormatBox(const SvxBoxItem &) override
Sfx item RES_BOX.
void GetSdtEndBefore(const SdrObject *pSdrObj)
void FootnoteEndnoteReference()
Output the footnote/endnote reference (if there's one to output).
virtual void EndParagraph(ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override
End of the paragraph.
void PopulateFrameProperties(const SwFrameFormat *pFrameFormat, const Size &rSize)
virtual void SetField(const SwField &rField, ww::eField eType, const OUString &rCmd) override
virtual void CharFont(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_FONT.
SvxBoxItemLine
virtual void StartParagraph(ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo) override
Start of the paragraph.
void FontCharset(sal_uInt8 nCharSet, rtl_TextEncoding nEncoding) const
Font charset.
virtual void CharBorder(const ::editeng::SvxBorderLine *pAllBorder, const sal_uInt16 nDist, const bool bShadow) override
Sfx item RES_CHRATR_BOX.
virtual void FormatFillGradient(const XFillGradientItem &) override
Sfx item RES_FILL_GRADIENT.
virtual void ParaSnapToGrid(const SvxParaGridItem &) override
Sfx item RES_PARATR_SNAPTOGRID.
virtual void ParaTabStop(const SvxTabStopItem &rTabStop) override
Sfx item RES_PARATR_TABSTOP.
static OString TransHighlightColor(sal_uInt8 nIco)
Translate an ico value to the corresponding HighlightColorValues enumaration item.
virtual void ParaVerticalAlign(const SvxParaVertAlignItem &rAlign) override
Sfx item RES_PARATR_VERTALIGN.
std::shared_ptr< WW8TableNodeInfoInner > Pointer_t
const char * name
virtual bool EndURL(bool) override
Output URL end.
void WriteSrcRect(const SdrObject *pSdrObj, const SwFrameFormat *pFrameFormat)
virtual void TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual void CharAutoKern(const SvxAutoKernItem &) override
Sfx item RES_CHRATR_AUTOKERN.
virtual void CharScaleWidth(const SvxCharScaleWidthItem &rScaleWidth) override
Sfx item RES_CHRATR_SCALEW.
void LatentStyles()
Write latent styles.
std::vector< OString > m_rAnnotationMarksEnd
bool m_bIgnoreNextFill
If FormatBox() already handled fill style / gradient.
virtual void CharCaseMap(const SvxCaseMapItem &rCaseMap) override
Sfx item Sfx item RES_CHRATR_CASEMAP.
virtual void StartStyles() override
Start of the styles table.
void StartField_Impl(const SwTextNode *pNode, sal_Int32 nPos, FieldInfos const &rInfos, bool bWriteRun=false)
PostponedOLE(SwOLENode *rObject, const Size &rSize, const SwFlyFrameFormat *rFrame)
virtual void CharColor(const SvxColorItem &rColor) override
Sfx item Sfx item RES_CHRATR_COLOR.
std::vector< OUString > m_rPermissionsEnd
std::vector< std::pair< const SwPostItField *, sal_Int32 > > m_postitFields
Maps postit fields to ID's, used in commentRangeStart/End, commentReference and comment.xml.
virtual void CharFontSize(const SvxFontHeightItem &rFontSize) override
Sfx item RES_CHRATR_FONTSIZE.
virtual void CharFontSizeCTL(const SvxFontHeightItem &rFontSize) override
Sfx item RES_CHRATR_CTL_FONTSIZE.
virtual void CharHighlight(const SvxBrushItem &rHighlight) override
Sfx item RES_CHRATR_HIGHLIGHT.
std::unique_ptr< std::vector< PostponedDrawing > > m_pPostponedDMLDrawings
std::vector< PostponedChart > m_aPostponedCharts
virtual void CharBackground(const SvxBrushItem &rBrush) override
Sfx item RES_CHRATR_BACKGROUND.
void PostponeOLE(SwOLENode &rNode, const Size &rSize, const SwFlyFrameFormat *pFlyFrameFormat)
virtual void SectionPageNumbering(sal_uInt16 nNumType, const ::boost::optional< sal_uInt16 > &oPageRestartNumber) override
The style of the page numbers.
virtual void RTLAndCJKState(bool bIsRTL, sal_uInt16 nScript) override
Export the state of RTL/CJK.
virtual void FieldVanish(const OUString &rText, ww::eField eType) override
std::unique_ptr< std::vector< PostponedDiagram > > m_pPostponedDiagrams
virtual void StartParagraphProperties() override
Called before we start outputting the attributes.
virtual void CharPosture(const SvxPostureItem &rPosture) override
Sfx item RES_CHRATR_POSTURE.
std::vector< const SwOLENode * > m_aPostponedMaths
bool m_bEndCharSdt
If the current SDT around runs should be ended before the current run.
void FlyFrameGraphic(const SwGrfNode *pGrfNode, const Size &rSize, const SwFlyFrameFormat *pOLEFrameFormat, SwOLENode *pOLENode, const SdrObject *pSdrObj=nullptr)
Output graphic fly frames or replacement graphics for OLE nodes.
std::stack< std::map< BitmapChecksum, OUString > > m_aSdrRelIdCache
RelId <-> BitmapChecksum cache, similar to m_aRelIdCache, but used for non-Writer graphics...
virtual void EndStyle() override
End of a style in the styles table.
virtual void CharRotate(const SvxCharRotateItem &rRotate) override
Sfx item RES_CHRATR_ROTATE.
virtual void ParaLineSpacing_Impl(short nSpace, short nMulti) override
Sfx item RES_PARATR_LINESPACING.
void BulletDefinition(int nId, const Graphic &rGraphic, Size aSize) override
Exports the definition (image, size) of a single numbering picture bullet.
virtual void SectionLineNumbering(sal_uLong nRestartNo, const SwLineNumberInfo &rLnNumInfo) override
Numbering of the lines in the document.
bool m_bStartedParaSdt
If an SDT around paragraphs is currently open.
rtl::Reference< sax_fastparser::FastAttributeList > m_pHyperlinkAttrList
virtual DocxExport & GetExport() override
Return the right export class.
virtual void ParaNumRule_Impl(const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) override
Sfx item RES_PARATR_NUMRULE.
void WriteCollectedParagraphProperties()
Output what we collected during the run properties output.
const ::sw::mark::IFieldmark * pFieldmark
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps...
Definition: paratr.hxx:50
virtual void CharWeightCJK(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_CJK_WEIGHT.
void FinishTableRowCell(ww8::WW8TableNodeInfoInner::Pointer_t const &pInner, bool bForceEmptyParagraph=false)
End cell, row, and even the entire table if necessary.
void WriteFormDateStart(const OUString &sFullDate, const OUString &sDateFormat, const OUString &sLang)
virtual void TableBidi(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void DoWriteBookmarkTagStart(const OUString &bookmarkName)
virtual void StartRuby(const SwTextNode &rNode, sal_Int32 nPos, const SwFormatRuby &rRuby) override
Output ruby start.
virtual void Redline(const SwRedlineData *pRedline) override
Output redlining.
virtual void TableNodeInfoInner(ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner) override
::sax_fastparser::FSHelperPtr m_pSerializer
Fast serializer to output the data.
std::vector< ww8::Frame > m_aFramesOfParagraph
rtl::Reference< sax_fastparser::FastAttributeList > m_pParagraphSdtPrTokenChildren
bool m_bRunTextIsOn
Flag indicating that the Run Text is being written.
std::vector< OUString > m_rBookmarksEnd
void TableDefaultCellMargins(ww8::WW8TableNodeInfoInner::Pointer_t const &pTableTextNodeInfoInner)
bool m_bStartedCharSdt
If an SDT around runs is currently open.
virtual void CharIdctHint(const SfxPoolItem &) override
Sfx item RES_CHRATR_IdctHint.
virtual void OutlineNumbering(sal_uInt8 nLvl) override
Numbering rule and Id.
virtual void TableRowEnd(sal_uInt32 nDepth) override
virtual void StartStyleProperties(bool bParProp, sal_uInt16 nStyle) override
Start of (paragraph or run) properties of a style.
sal_Int32 nPos
std::vector< OString > m_rAnnotationMarksStart
Annotation marks to output.
std::shared_ptr< WW8TableNodeInfo > Pointer_t
editeng::WordPageMargins m_pageMargins
virtual void CharContour(const SvxContourItem &rContour) override
Sfx item Sfx item RES_CHRATR_CONTOUR.
virtual void WritePostitFieldReference() override
for docx w:commentReference
virtual void HiddenField(const SwField &rField) override
virtual void FormatULSpace(const SvxULSpaceItem &rULSpace) override
Sfx item RES_UL_SPACE.
std::vector< OUString > m_rBookmarksStart
Bookmarks to output.
ww8::WW8TableInfo::Pointer_t m_pTableInfo
void SetSerializer(::sax_fastparser::FSHelperPtr const &pSerializer)
For e.g. the output of the styles, we need to switch the serializer to another one.
void DoWriteBookmarkStartIfExist(sal_Int32 nRunPos)
bool m_bWritingField
Flag indicating that multiple runs of a field are being written.
virtual void FormatFrameDirection(const SvxFrameDirectionItem &) override
Sfx item RES_FRAMEDIR.
PostponedDiagram(const SdrObject *o, const SwFrameFormat *frm)
FontItalic
rtl::Reference< sax_fastparser::FastAttributeList > m_pColorAttrList
Attributes of the run color.
std::map< OString, sal_Int32 > m_rOpenedAnnotationMarksIds
Maps of the annotation marks ids.
virtual void EndParagraphProperties(const SfxItemSet &rParagraphMarkerProperties, const SwRedlineData *pRedlineData, const SwRedlineData *pRedlineParagraphMarkerDeleted, const SwRedlineData *pRedlineParagraphMarkerInserted) override
Called after we end outputting the attributes.
SvxShadowLocation
void FontFamilyType(FontFamily eFamily) const
Font family.
void DoWriteBookmarkEndIfExist(sal_Int32 nRunPos)
Base class of the Writer document model elements.
Definition: node.hxx:79