LibreOffice Module sw (master)  1
wrtww8.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_WRTWW8_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_WW8_WRTWW8_HXX
22 
23 #include <sot/storage.hxx>
24 #include <tools/solar.h>
25 #include <tools/gen.hxx>
26 #include <editeng/editdata.hxx>
28 
29 #include <shellio.hxx>
30 
31 #include "ww8struc.hxx"
32 #include "ww8scan.hxx"
33 #include "types.hxx"
34 #include "writerhelper.hxx"
35 #include <msfilter.hxx>
36 #include <expfld.hxx>
37 #include "WW8TableInfo.hxx"
38 #include <calbck.hxx>
40 
41 #include <vcl/graph.hxx>
42 
43 #include <optional>
44 #include <o3tl/typed_flags_set.hxx>
45 #include <o3tl/sorted_vector.hxx>
46 
47 #include <cstddef>
48 #include <memory>
49 #include <map>
50 #include <string_view>
51 #include <vector>
52 
53 
54 class SvxBrushItem;
55 class EditTextObject;
56 
57 // some forward declarations
58 class SwWW8AttrIter;
59 namespace msfilter
60 {
61  class MSCodec_Std97;
62 }
63 
64 namespace editeng { class SvxBorderLine; }
65 
68 class RtfAttributeOutput;
69 class BitmapPalette;
70 class SwEscherEx;
71 class DateTime;
72 namespace vcl { class Font; }
73 class MSWordExportBase;
74 class SdrObject;
75 class SdrTextObj;
76 class SfxItemSet;
77 class SvStream;
78 class SvxFontItem;
79 class SvxBoxItem;
80 class SwAttrSet;
81 class SwCharFormat;
82 class SwContentNode;
83 class SwField;
84 class SwFormat;
85 class SwFormatContent;
86 class SwFormatFootnote;
87 class SwFrameFormat;
88 class SwGrfNode;
89 class SwNumFormat;
90 class SwNumRule;
91 class SwNumRuleTable;
92 class SwPageDesc;
93 class SwFormatPageDesc;
94 class SwOLENode;
95 class SwPostItField;
96 class SwRedlineData;
97 class SwSectionFormat;
98 class SwSectionNode;
99 class SwTableNode;
100 class SwTOXType;
101 class SwTextFormatColl;
102 class SwTextNode;
103 class SwWW8WrGrf;
104 class SwWW8Writer;
105 class MSWordStyles;
106 class WW8AttributeOutput;
107 class WW8Export;
108 class MSWordAttrIter;
109 class WW8_WrFkp;
110 class WW8_WrPlc0;
111 class WW8_WrPlc1;
112 class WW8_WrPlcField;
113 class WW8_WrMagicTable;
115 class WW8_WrPlcPn;
117 class WW8_WrtFactoids;
118 class MSWordSections;
119 class WW8_WrPlcTextBoxes;
120 class WW8_WrPct; // administration
121 class WW8_WrtBookmarks;
124 class SwMSConvertControls;
125 class WW8_WrPc;
126 struct WW8_PdAttrDesc;
127 class SvxBrushItem;
128 namespace sw::mark { class IFieldmark; }
129 namespace com::sun::star::embed { class XEmbeddedObject; }
130 
131 typedef std::map<const css::embed::XEmbeddedObject*, sal_Int32> WW8OleMap;
133 
134 #define GRF_MAGIC_1 0x12 // 3 magic bytes for PicLocFc attribute
135 #define GRF_MAGIC_2 0x34
136 #define GRF_MAGIC_3 0x56
137 #define GRF_MAGIC_321 0x563412L
138 
139 #define OLE_PREVIEW_AS_EMF //If we want to export ole2 previews as emf in ww8+
140 
141 enum class FieldFlags : sal_uInt8 // for InsertField- Method
142 {
143  NONE = 0x00,
144  Start = 0x01,
145  CmdStart = 0x02,
146  CmdEnd = 0x04,
147  End = 0x10,
148  Close = 0x20,
149  All = 0x37
150 };
151 namespace o3tl {
152  template<> struct typed_flags<FieldFlags> : is_typed_flags<FieldFlags, 0x37> {};
153 }
154 
155 enum TextTypes //enums for TextTypes
156 {
157  TXT_MAINTEXT = 0, /*TXT_FTNEDN = 1,*/ TXT_HDFT = 2, TXT_FTN = 3,
159 };
160 
165 {
170 };
171 
173 {
176  const SwNode* pPDNd;
178  ::std::optional<sal_uInt16> oPgRestartNo;
180 
181  WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFormat* pFormat,
182  sal_uLong nLnRestart, ::std::optional<sal_uInt16> oPgRestart = std::nullopt,
183  const SwNode* pNd = nullptr, bool bIsFirstPara = false )
184  : pPageDesc( pPD ), pSectionFormat( pFormat ), pPDNd( pNd ),
185  nLnNumRestartNo( nLnRestart ), oPgRestartNo( oPgRestart ),
186  bIsFirstParagraph( bIsFirstPara )
187  {}
188 
189  bool IsProtected() const;
190 };
191 
193 // Plc for PageDescs -> Sepx ( Section Extensions )
195 {
196 protected:
198  std::vector<WW8_SepInfo> aSects;
199 
200  void CheckForFacinPg( const WW8Export& rWrt ) const;
201  void NeedsDocumentProtected(const WW8_SepInfo &rInfo);
202 
203  //No copy, no assign
204  MSWordSections( const MSWordSections& );
206 public:
207  explicit MSWordSections( MSWordExportBase& rExport );
208  virtual ~MSWordSections();
209 
210  virtual bool HeaderFooterWritten();
211 
212  void AppendSection( const SwPageDesc* pPd,
213  const SwSectionFormat* pSectionFormat,
214  sal_uLong nLnNumRestartNo,
215  bool bIsFirstParagraph = false );
216  void AppendSection( const SwFormatPageDesc& rPd,
217  const SwNode& rNd,
218  const SwSectionFormat* pSectionFormat,
219  sal_uLong nLnNumRestartNo );
220 
222  sal_uInt16 CurrentNumberOfColumns( const SwDoc &rDoc ) const;
223 
225  static sal_uInt16 NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo& rInfo );
226 
228 
231 
232  static void SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat,
233  sal_uInt8 nFlag );
234  static void SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat,
235  sal_uInt8 nFlag );
236 
238  static bool HasBorderItem( const SwFormat& rFormat );
239 };
240 
242 {
243  std::vector<WW8_CP> aCps;
244  std::vector< std::shared_ptr<WW8_PdAttrDesc> > m_SectionAttributes;
245  // hack to prevent adding sections in endnotes
247  std::unique_ptr<WW8_WrPlc0> pTextPos; // Position of the headers/footers
248 
249  WW8_WrPlcSepx( const WW8_WrPlcSepx& ) = delete;
250  WW8_WrPlcSepx& operator=( const WW8_WrPlcSepx& ) = delete;
251 
252 public:
253  explicit WW8_WrPlcSepx( MSWordExportBase& rExport );
254  virtual ~WW8_WrPlcSepx() override;
255 
256  virtual bool HeaderFooterWritten() override; // override
257 
258  void AppendSep( WW8_CP nStartCp,
259  const SwPageDesc* pPd,
260  const SwSectionFormat* pSectionFormat,
261  sal_uLong nLnNumRestartNo );
262  void AppendSep( WW8_CP nStartCp, const SwFormatPageDesc& rPd,
263  const SwNode& rNd,
264  const SwSectionFormat* pSectionFormat,
265  sal_uLong nLnNumRestartNo );
266  void Finish( WW8_CP nEndCp ) { aCps.push_back( nEndCp ); }
267 
268  bool WriteKFText( WW8Export& rWrt );
269  void WriteSepx( SvStream& rStrm ) const;
270  void WritePlcSed( WW8Export& rWrt ) const;
271  void WritePlcHdd( WW8Export& rWrt ) const;
272 
273 private:
274  void WriteFootnoteEndText( WW8Export& rWrt, sal_uLong nCpStt );
275 public:
276  void OutHeaderFooter(WW8Export& rWrt, bool bHeader,
277  const SwFormat& rFormat, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode);
278 };
279 
280 // class WW8_WrPct to construct the piece table
282 {
283  std::vector<std::unique_ptr<WW8_WrPc>> m_Pcts;
285 public:
286  explicit WW8_WrPct(WW8_FC nStartFc);
287  ~WW8_WrPct();
288  void AppendPc(WW8_FC nStartFc);
289  void WritePc( WW8Export& rWrt );
290  void SetParaBreak();
291  WW8_CP Fc2Cp( sal_uLong nFc ) const;
292 };
293 
295 class wwFont
296 {
297 //In some future land the stream could be converted to a nice stream interface
298 //and we could have harmony
299 private:
301  OUString msFamilyNm;
302  OUString msAltNm;
303  bool mbAlt;
306  rtl_TextEncoding meChrSet;
307 public:
308  wwFont( const OUString &rFamilyName, FontPitch ePitch, FontFamily eFamily,
309  rtl_TextEncoding eChrSet);
310  void Write( SvStream *pTableStram ) const;
311  void WriteDocx( DocxAttributeOutput* rAttrOutput ) const;
312  void WriteRtf( const RtfAttributeOutput* rAttrOutput ) const;
313  OUString const & GetFamilyName() const { return msFamilyNm; }
314  friend bool operator < (const wwFont &r1, const wwFont &r2);
315 };
316 
318 {
319 private:
321  std::map<wwFont, sal_uInt16> maFonts;
322 
324  std::vector< const wwFont* > AsVector() const;
325 
326 public:
329  void InitFontTable(const SwDoc& rDoc);
330  sal_uInt16 GetId(const SvxFontItem& rFont);
331  sal_uInt16 GetId(const wwFont& rFont);
332  void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib );
333  void WriteFontTable( DocxAttributeOutput& rAttrOutput );
334  void WriteFontTable( const RtfAttributeOutput& rAttrOutput );
335 
337  bool bLoadAllFonts: 1;
338 };
339 
340 class DrawObj
341 {
342 public:
343  WW8_CP mnCp; // CP-Pos of references
344  sal_uInt32 mnShapeId; // ShapeId for the SwFrameFormats
345  ww8::Frame maContent; // the frame itself
346  Point maParentPos; // Points
347  sal_Int32 mnThick; // Border Thicknesses
348  SvxFrameDirection mnDirection; // If BiDi or not
349  unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent
350  // msword hd/ft
351 
352  DrawObj(const ww8::Frame &rContent, WW8_CP nCp, Point aParentPos, SvxFrameDirection nDir,
353  unsigned int nHdFtIndex)
354  : mnCp(nCp), mnShapeId(0), maContent(rContent), maParentPos(aParentPos),
355  mnThick(0), mnDirection(nDir), mnHdFtIndex(nHdFtIndex) {}
356  void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick);
357 };
358 
359 typedef std::vector<DrawObj> DrawObjVector;
360 typedef std::vector<DrawObj *> DrawObjPointerVector;
361 
362 class PlcDrawObj // PC for DrawObjects and Text-/OLE-/GRF-Boxes
363 {
364 private:
365  DrawObjVector maDrawObjs; // vector of drawobjs
366 protected:
367  virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
368  sal_uInt32 nLen) const = 0;
369  virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const = 0;
370 public:
372  void WritePlc( WW8Export& rWrt ) const;
373  bool Append( WW8Export const &, WW8_CP nCp, const ww8::Frame& rFormat,
374  const Point& rNdTopLeft );
375  int size() { return maDrawObjs.size(); };
377  virtual ~PlcDrawObj();
378 private:
379  PlcDrawObj(const PlcDrawObj&) = delete;
380  PlcDrawObj& operator=(const PlcDrawObj&) = delete;
381 };
382 
384 {
385 public:
387 private:
388  virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
389  sal_uInt32 nLen) const override;
390  virtual WW8_CP GetCpOffset(const WW8Fib &) const override;
391 private:
392  MainTextPlcDrawObj(const MainTextPlcDrawObj&) = delete;
394 };
395 
397 {
398 public:
400 private:
401  virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
402  sal_uInt32 nLen) const override;
403  virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const override;
404 private:
405  HdFtPlcDrawObj(const HdFtPlcDrawObj&) = delete;
406  HdFtPlcDrawObj& operator=(const HdFtPlcDrawObj&) = delete;
407 };
408 
409 typedef std::pair<OUString, sal_uLong> aBookmarkPair;
410 
412 {
413  public:
414  virtual void Write(Writer &rWrt) override;
415 };
416 
429 {
432  std::unique_ptr<ww::bytes> pOOld;
433  std::shared_ptr<SwUnoCursor> pOldPam;
438 
439  bool bOldWriteAll : 1;
440  bool bOldOutTable : 1;
442  bool bOldStartTOX : 1;
443  bool bOldInWriteTOX : 1;
444  // m_bOutPageDescs does not have to be saved in MSWordExportBase::SaveData
445  // since it is only modified when outputting special texts.
446 };
447 
450 {
451 public:
453  std::vector<sal_uLong> m_aChapterFieldLocs;
454  OUString m_aMainStg;
455  std::vector<const SwTOXType*> m_aTOXArr;
456  const SfxItemSet* m_pISet; // for double attributes
458  WW8_WrPct* m_pPiece; // Pointer to Piece-Table
459  std::unique_ptr<SwNumRuleTable> m_pUsedNumTable; // all used NumRules
461  std::map<size_t, std::pair<size_t, size_t>> m_OverridingNums;
463  std::map<OUString, size_t> m_Lists;
464 
467  std::map < size_t, std::map<size_t, size_t> > m_ListLevelOverrides;
468 
470  std::stack< sal_Int32 > m_aCurrentCharPropStarts;
473  std::shared_ptr<NfKeywordTable> m_pKeyMap;
474  std::unique_ptr<SvxMSExportOLEObjects> m_pOLEExp;
475  std::unique_ptr<SwMSConvertControls> m_pOCXExp;
476  WW8OleMap m_aOleMap; // To remember all already exported ole objects
478 
479  sal_uInt16 m_nCharFormatStart;
480  sal_uInt16 m_nFormatCollStart;
481  sal_uInt16 m_nStyleBeforeFly;
482  sal_uInt16 m_nLastFormatId;
484  sal_uInt16 m_nUniqueList;
485  unsigned int m_nHdFtIndex;
486 
489 
490 public:
491  /* implicit bookmark vector containing pairs of node indexes and bookmark names */
492  std::vector<aBookmarkPair> m_aImplicitBookmarks;
493  std::unordered_map<OUString, OUString> m_TOXMarkBookmarksByURL;
494  std::unordered_map<SwTOXMark const*, OUString> m_TOXMarkBookmarksByTOXMark;
495  ww8::Frames m_aFrames; // The floating frames in this document
498  std::unique_ptr<WW8_WrPlcPn> m_pPapPlc;
499  std::unique_ptr<WW8_WrPlcPn> m_pChpPlc;
501  std::unique_ptr<MSWordStyles> m_pStyles;
503  std::unique_ptr<WW8_WrtFactoids> m_pFactoids;
505 
506  struct LinkedTextboxInfo //help analyze textbox flow links
507  {
508  sal_Int32 nId;
509  sal_Int32 nSeq;
510  OUString sNextChain;
511  OUString sPrevChain;
512  LinkedTextboxInfo(): nId(0), nSeq(0) {}
513  };
514  std::map<OUString,LinkedTextboxInfo> m_aLinkedTextboxesHelper;
517 
518  const ww8::Frame *m_pParentFrame; // If set we are exporting content inside
519  // a frame, e.g. a graphic node
520 
521  Point* m_pFlyOffset; // for adjusting of character-bound Fly in the Writer,
522  RndStdIds m_eNewAnchorType; // that is paragraph-bound in the WW.
523 
524  std::unique_ptr<WW8_WrPlcField> m_pFieldMain; // fields in MainText
525  std::unique_ptr<WW8_WrPlcField> m_pFieldHdFt; // fields in Header/Footer
526  std::unique_ptr<WW8_WrPlcField> m_pFieldFootnote; // fields in FootNotes
527  std::unique_ptr<WW8_WrPlcField> m_pFieldEdn; // fields in EndNotes
528  std::unique_ptr<WW8_WrPlcField> m_pFieldAtn; // fields in Annotations
529  std::unique_ptr<WW8_WrPlcField> m_pFieldTextBxs; // fields in textboxes
530  std::unique_ptr<WW8_WrPlcField> m_pFieldHFTextBxs; // fields in header/footer textboxes
531  std::unique_ptr<WW8_WrMagicTable> m_pMagicTable; // keeps track of table cell positions, and
532  // marks those that contain graphics,
533  // which is required to make word display
534  // graphics inside tables
535  std::unique_ptr<SwWW8WrGrf> m_pGrf;
536  const SwAttrSet* m_pStyAttr; // StyleAttr for Tabs
537  const sw::BroadcastingModify* m_pOutFormatNode; // write Format or Node
538  const SwFormat *m_pCurrentStyle; // iff bStyDef=true, then this store the current style
539 
540  MainTextPlcDrawObj *m_pSdrObjs; // Draw-/Fly-Objects
541  HdFtPlcDrawObj *m_pHFSdrObjs; // Draw-/Fly-Objects in header or footer
542 
543  SwEscherEx* m_pEscher; // escher export class
544  // #i43447# - removed
545 // SwTwips nFlyWidth, nFlyHeight; // for adaptation of graphics
546 
548 
549  bool m_bStyDef : 1; // should Style be written?
550  bool m_bBreakBefore : 1; // Breaks are being written 2 times
551  bool m_bOutKF : 1; // Header/Footer texts are being written
552  bool m_bOutFlyFrameAttrs : 1; // Frame-attr of Flys are being written
553  bool m_bOutPageDescs : 1;
554  bool m_bOutFirstPage : 1; // write Attrset of FirstPageDesc
555  bool m_bOutTable : 1; // table is being written
556  // ( is reset e.g. for Flys in a table )
557  bool m_bOutGrf : 1; // graphics are being written
558  bool m_bInWriteEscher : 1; // in write textboxes
559  bool m_bStartTOX : 1; // true: a TOX is started
560  bool m_bInWriteTOX : 1; // true: all content are in a TOX
561  bool m_bFootnoteAtTextEnd : 1; // true: all FTN at Textend
562  bool m_bEndAtTextEnd : 1; // true: all END at Textend
563  bool m_bHasHdr : 1;
564  bool m_bHasFtr : 1;
565  bool m_bSubstituteBullets : 1; // true: SubstituteBullet() gets called
566  bool m_bTabInTOC : 1; //true for TOC field flag 'w'
567 
568  bool m_bHideTabLeaderAndPageNumbers : 1 ; // true: the 'z' field of TOC is set.
572  bool m_bAddFootnoteTab; // only one aesthetic spacing tab per footnote
573 
576  std::shared_ptr<SwUnoCursor> & m_pCurPam;
578 
580  std::stack< MSWordSaveData > m_aSaveData;
581 
583  typedef std::vector< ::sw::mark::IMark* > IMarkVector;
588 
589 public:
591  ErrCode ExportDocument( bool bWriteAll );
592 
594  void WriteText();
595 
597  bool IsInTable() const;
598 
602  void WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp );
603 
605  void ExportPoolItemsToCHP( ww8::PoolItems &rItems, sal_uInt16 nScript, const SvxFontItem *pFont, bool bWriteCombChars = false );
606 
608  sal_uInt16 GetNumberingId( const SwNumRule& rNumRule );
609 
611  sal_uInt16 GetId( const SwTextFormatColl& rColl ) const;
612 
614  sal_uInt16 GetId( const SwCharFormat* pFormat ) const;
615 
616  sal_uInt16 GetId( const SwTOXType& rTOXType );
617 
619  sal_uInt16 GetId( const SvxFontItem& rFont)
620  {
621  return m_aFontHelper.GetId(rFont);
622  }
624  void GetId( const wwFont& rFont)
625  {
626  m_aFontHelper.GetId(rFont);
627  }
628 
629  const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
630  template<class T> const T& GetItem( TypedWhichId<T> nWhich ) const
631  {
632  return static_cast<const T&>(GetItem(sal_uInt16(nWhich)));
633  }
634 
636  bool HasRefToAttr(const OUString& rName);
637  bool HasRefToFootOrEndnote(const bool isEndNote, const sal_uInt16 nSeqNo);
638 
640  static OUString GetBookmarkName( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo );
641 
643  void OutputItemSet( const SfxItemSet& rSet, bool bPapFormat, bool bChpFormat, sal_uInt16 nScript, bool bExportParentItemSet );
644 
646 
648  SvxFrameDirection TrueFrameDirection( const SwFrameFormat& rFlyFormat ) const;
649 
652 
654 
658  SwNumRule * DuplicateNumRuleImpl(const SwNumRule *pRule);
659 
661  sal_uInt16 DuplicateAbsNum(OUString const& rListId,
662  SwNumRule const& rAbstractRule);
663 
664 
667  sal_uInt16 OverrideNumRule(SwNumRule const& rExistingRule,
668  OUString const& rListId,
669  SwNumRule const& rAbstractRule);
670 
672  void AddListLevelOverride(sal_uInt16 nListId,
673  sal_uInt16 nLevelNum,
674  sal_uInt16 nStartAt);
675 
677  virtual AttributeOutputBase& AttrOutput() const = 0;
678 
680  virtual MSWordSections& Sections() const = 0;
681 
683  virtual bool FieldsQuoted() const = 0;
684 
686  virtual bool AddSectionBreaksForTOX() const = 0;
687 
689  virtual bool ignoreAttributeForStyleDefaults( sal_uInt16 /*nWhich*/ ) const { return false; }
690 
692  virtual bool PreferPageBreakBefore() const = 0;
693 
704  virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) = 0;
705 
706  virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ) = 0;
707 
708  virtual void AppendBookmark( const OUString& rName ) = 0;
709 
710  virtual void AppendAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen ) = 0;
711 
712  virtual void AppendSmartTags(SwTextNode& /*rTextNode*/) { }
713 
714  //For i120928,add this interface to export graphic of bullet
715  virtual void ExportGrfBullet(const SwTextNode& rNd) = 0;
716 
717  // FIXME probably a hack...
718  virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() ) = 0;
719 
720  // FIXME definitely a hack, must not be here - it can't do anything
721  // sensible for docx
722  virtual void WriteChar( sal_Unicode c ) = 0;
723 
725  void OutputFormat( const SwFormat& rFormat, bool bPapFormat, bool bChpFormat, bool bFlyFormat = false );
726 
728  const SfxItemSet* GetCurItemSet() const { return m_pISet; }
729 
731  void SetCurItemSet( const SfxItemSet* pS ) { m_pISet = pS; }
732 
734  virtual void SaveData( sal_uLong nStt, sal_uLong nEnd );
735 
737  virtual void RestoreData();
738 
740  bool OutputFollowPageDesc( const SfxItemSet* pSet,
741  const SwTextNode* pNd );
742 
744  void WriteHeaderFooterText( const SwFormat& rFormat, bool bHeader);
745 
747  static const SwSectionFormat* GetSectionFormat( const SwNode& rNd );
748 
750  static sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd );
751 
753  void OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd, bool isCellOpen = false );
754 
758  void SectionProperties( const WW8_SepInfo& rSectionInfo, WW8_PdAttrDesc* pA = nullptr );
759 
761  virtual void WriteNumbering() = 0;
762 
764  void NumberingDefinitions();
765 
768 
770  void NumberingLevel(SwNumRule const& rRule, sal_uInt8 nLvl);
771 
772  // Convert the bullet according to the font.
773  void SubstituteBullet( OUString& rNumStr, rtl_TextEncoding& rChrSet,
774  OUString& rFontName ) const;
775 
777  virtual void SetupSectionPositions( WW8_PdAttrDesc* /*pA*/ ) {}
778 
780  void SetHdFtPageRoot( const SwTextNode *pNd ) { m_pTopNodeOfHdFtPage = pNd; }
781 
784 
786  virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
787  const SwFrameFormat& rFormat, const SwFrameFormat& rLeftHeaderFormat, const SwFrameFormat& rLeftFooterFormat, const SwFrameFormat& rFirstPageFormat,
788  sal_uInt8 nBreakCode, bool bEvenAndOddHeaders) = 0;
789 
791  virtual void OutputField( const SwField* pField, ww::eField eFieldType,
792  const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) = 0;
793 
795  virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) = 0;
796  virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark ) = 0;
797 
798  virtual void DoComboBox(const OUString &rName,
799  const OUString &rHelp,
800  const OUString &ToolTip,
801  const OUString &rSelected,
802  const css::uno::Sequence<OUString> &rListItems) = 0;
803 
804  virtual void DoFormText(const SwInputField * pField) = 0;
805 
806  static bool NoPageBreakSection( const SfxItemSet *pSet );
807 
808  // Compute the number format for WW dates
809  bool GetNumberFormat(const SwField& rField, OUString& rStr);
810 
811  virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) = 0;
812 
813  const SfxPoolItem* HasItem( sal_uInt16 nWhich ) const;
814 
816  int GetGrfIndex(const SvxBrushItem& rBrush);
817 
818  enum ExportFormat { DOC = 0, RTF = 1, DOCX = 2};
819  virtual ExportFormat GetExportFormat() const = 0;
820 
821 protected:
823  virtual ErrCode ExportDocument_Impl() = 0;
824 
826  sal_Int32 GetNextPos( SwWW8AttrIter const * pAttrIter, const SwTextNode& rNode, sal_Int32 nCurrentPos );
827 
829  void UpdatePosition( SwWW8AttrIter* pAttrIter, sal_Int32 nCurrentPos );
830 
832  virtual void OutputTextNode( SwTextNode& );
833 
835  void GatherChapterFields();
836 
837  void AddLinkTarget( std::u16string_view rURL );
838  void CollectOutlineBookmarks( const SwDoc &rDoc );
839 
840  bool SetCurrentPageDescFromNode(const SwNode &rNd);
841  bool ContentContainsChapterField(const SwFormatContent &rContent) const;
842  bool FormatHdFtContainsChapterField(const SwFrameFormat &rFormat) const;
843 
844  virtual void SectionBreaksAndFrames( const SwTextNode& rNode ) = 0;
845 
846  virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
847  const SwNode& rNd,
848  const SwFormatPageDesc* pNewPgDescFormat,
849  const SwPageDesc* pNewPgDesc,
850  bool bExtraPageBreak = false ) = 0;
851 
853  virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) = 0;
854 
856  void OutputStartNode( const SwStartNode& );
857 
859  virtual void OutputEndNode( const SwEndNode& );
860 
862  virtual void OutputGrfNode( const SwGrfNode& ) = 0;
863 
865  virtual void OutputOLENode( const SwOLENode& ) = 0;
866 
867  virtual void OutputLinkedOLE( const OUString& ) = 0;
868 
870  void OutputSectionNode( const SwSectionNode& );
871  static void UpdateTocSectionNodeProperties(const SwSectionNode& rSectionNode);
872 
873  virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) = 0;
874 
879 
883  bool NearestBookmark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly );
884 
885  void GetSortedBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen );
886 
887  bool GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt, sal_Int32 nEnd,
888  IMarkVector& rArr );
889 
892  void NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly );
893 
894  void GetSortedAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen );
895 
896  bool GetAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nStt, sal_Int32 nEnd,
897  IMarkVector& rArr );
898 
900 
901  void SetCurPam(sal_uLong nStt, sal_uLong nEnd);
902 
904  std::unique_ptr<SvxBrushItem> getBackground();
906  int CollectGrfsOfBullets();
908  void BulletDefinitions();
909 
910  bool NeedSectionBreak( const SwNode& rNd ) const;
911  bool NeedTextNodeSplit( const SwTextNode& rNd, SwSoftPageBreakList& pList ) const;
912 
913  std::vector<const Graphic*> m_vecBulletPic;
914 
915 public:
916  MSWordExportBase(SwDoc& rDocument, std::shared_ptr<SwUnoCursor> & pCurrentPam, SwPaM* pOriginalPam);
917  virtual ~MSWordExportBase();
918 
919  // TODO move as much as possible here from WW8Export! ;-)
920 
921  static void CorrectTabStopInSet( SfxItemSet& rSet, sal_Int32 nAbsLeft );
922 
923 private:
924  MSWordExportBase( const MSWordExportBase& ) = delete;
925  MSWordExportBase& operator=( const MSWordExportBase& ) = delete;
926 };
927 
929 class SwWW8Writer: public StgWriter
930 {
931 // friends to get access to m_pExport
932 // FIXME avoid that, this is probably not what we want
933 // (if yes, remove the friends, and provide here a GetExport() method)
934 friend void WW8_WrtRedlineAuthor::Write(Writer &rWrt);
935 
938 
939 public:
940  SwWW8Writer(const OUString& rFltName, const OUString& rBaseURL);
941  virtual ~SwWW8Writer() override;
942 
943  virtual ErrCode WriteStorage() override;
944  virtual ErrCode WriteMedium( SfxMedium& ) override;
945 
946  // TODO most probably we want to be able to get these in
947  // MSExportFilterBase
949 
950 public:
951  static void InsUInt16(ww::bytes &rO, sal_uInt16 n);
952  static void InsUInt32(ww::bytes &rO, sal_uInt32 n);
953  static void InsAsString16(ww::bytes &rO, const OUString& rStr);
954  static void InsAsString8(ww::bytes & O, std::u16string_view rStr,
955  rtl_TextEncoding eCodeSet);
956 
957  static sal_uLong FillUntil( SvStream& rStrm, sal_uLong nEndPos = 0 );
958  static void FillCount( SvStream& rStrm, sal_uLong nCount );
959 
960  static void WriteShort( SvStream& rStrm, sal_Int16 nVal ) { rStrm.WriteInt16( nVal ); }
961  static void WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal );
962 
963  static void WriteLong( SvStream& rStrm, sal_Int32 nVal ) { rStrm.WriteInt32( nVal ); }
964  static void WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal );
965 
966  static void WriteString16(SvStream& rStrm, const OUString& rStr,
967  bool bAddZero);
968  static void WriteString8(SvStream& rStrm, std::u16string_view rStr,
969  bool bAddZero, rtl_TextEncoding eCodeSet);
970 
971  static void WriteString_xstz(SvStream& rStrm, const OUString& rStr, bool bAddZero);
972 
974 
975  using StgWriter::Write;
976  virtual ErrCode Write( SwPaM&, SfxMedium&, const OUString* ) override;
977  //Seems not an expected to provide method to access the private member
978  SfxMedium* GetMedia() { return mpMedium; }
979 
980 private:
981  SwWW8Writer(const SwWW8Writer&) = delete;
982  SwWW8Writer& operator=(const SwWW8Writer&) = delete;
984 };
985 
988 {
989 public:
990  std::unique_ptr<ww::bytes> pO;
991 
993 
994  std::unique_ptr<WW8Fib> pFib;
995  std::unique_ptr<WW8Dop> pDop;
996  std::unique_ptr<WW8_WrPlcFootnoteEdn> pFootnote;
997  std::unique_ptr<WW8_WrPlcFootnoteEdn> pEdn;
998  std::unique_ptr<WW8_WrPlcSepx> pSepx;
999 
1000  bool m_bDot;
1001 
1002 protected:
1004  std::unique_ptr<WW8AttributeOutput> m_pAttrOutput;
1005 
1006 private:
1008 
1009 public:
1011  virtual AttributeOutputBase& AttrOutput() const override;
1012 
1014  virtual MSWordSections& Sections() const override;
1015 
1016  virtual bool PreferPageBreakBefore() const override { return true; }
1017 
1018  virtual bool FieldsQuoted() const override { return false; }
1019 
1020  virtual bool AddSectionBreaksForTOX() const override { return false; }
1021 private:
1023  virtual ErrCode ExportDocument_Impl() override;
1024 
1025  void PrepareStorage();
1026  void WriteFkpPlcUsw();
1027  void WriteMainText();
1028  void StoreDoc1();
1029 
1031  virtual void WriteNumbering() override;
1032 
1033  void OutOverrideListTab();
1034  void OutListNamesTab();
1035 
1036  void RestoreMacroCmds();
1037 
1038  void DoComboBox(css::uno::Reference<css::beans::XPropertySet> const & xPropSet);
1039 
1040 public:
1041 
1043  virtual void SetupSectionPositions( WW8_PdAttrDesc* pA ) override;
1044 
1045  bool MiserableFormFieldExportHack(const SwFrameFormat& rFrameFormat);
1046 
1049 
1050  sal_uInt16 AddRedlineAuthor( std::size_t nId );
1051 
1052  void WriteFootnoteBegin( const SwFormatFootnote& rFootnote, ww::bytes* pO = nullptr );
1053  void WritePostItBegin( ww::bytes* pO = nullptr );
1054  const SvxBrushItem* GetCurrentPageBgBrush() const;
1055  std::shared_ptr<SvxBrushItem> TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const;
1056 
1057  void AppendFlyInFlys(const ww8::Frame& rFrameFormat, const Point& rNdTopLeft);
1058  void WriteOutliner(const OutlinerParaObject& rOutliner, sal_uInt8 nTyp);
1059  void WriteSdrTextObj(const SdrTextObj& rObj, sal_uInt8 nTyp);
1060 
1061  sal_uInt32 GetSdrOrdNum( const SwFrameFormat& rFormat ) const;
1062  void CreateEscher();
1063  void WriteEscher();
1064 
1066  virtual void OutputField( const SwField* pField, ww::eField eFieldType,
1067  const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) override;
1068 
1069  void StartCommentOutput( std::u16string_view rName );
1070  void EndCommentOutput( std::u16string_view rName );
1071  void OutGrf(const ww8::Frame &rFrame);
1072  bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const& xOleStg,
1073  const tools::SvRef<SotStorage>& xObjStg, OUString const& rStorageName,
1074  SwOLENode* pOLENd);
1075 
1076  virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ) override;
1077  virtual void AppendBookmark( const OUString& rName ) override;
1078  void AppendBookmarkEndWithCorrection( const OUString& rName );
1079 
1080  virtual void AppendAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen ) override;
1081 
1082  virtual void AppendSmartTags(SwTextNode& rTextNode) override;
1083 
1084  virtual void ExportGrfBullet(const SwTextNode& rNd) override;
1085  void OutGrfBullets(const ww8::Frame &rFrame);
1086 
1087  void MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo);
1088 
1089  void WriteAsStringTable(const std::vector<OUString>&, sal_Int32& rfcSttbf,
1090  sal_Int32& rlcbSttbf);
1091 
1092  virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) override;
1093 
1094  virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() ) override;
1095  void WriteChar( sal_Unicode c ) override;
1096 
1097  void OutSwString(const OUString&, sal_Int32 nStt, sal_Int32 nLen);
1098 
1099  WW8_CP Fc2Cp( sal_uLong nFc ) const { return m_pPiece->Fc2Cp( nFc ); }
1100 
1101  // some partly static semi-internal function declarations
1102 
1103  void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz )
1104  { pO->insert( pO->end(), pBytes, pBytes+nSiz ); }
1105 
1106  virtual void SectionBreaksAndFrames( const SwTextNode& rNode ) override;
1107 
1109  // #i76300#
1110  virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
1111  const SwNode& rNd,
1112  const SwFormatPageDesc* pNewPgDescFormat,
1113  const SwPageDesc* pNewPgDesc,
1114  bool bExtraPageBreak = false ) override;
1115 
1116  static void Out_BorderLine(ww::bytes& rO, const ::editeng::SvxBorderLine* pLine,
1117  sal_uInt16 nDist, sal_uInt16 nSprmNo, sal_uInt16 nSprmNoVer9,
1118  bool bShadow);
1119 
1120  void Out_SwFormatBox(const SvxBoxItem& rBox, bool bShadow);
1121  static void Out_SwFormatTableBox( ww::bytes& rO, const SvxBoxItem * rBox );
1122  void Out_CellRangeBorders(const SvxBoxItem * pBox, sal_uInt8 nStart,
1123  sal_uInt8 nLimit);
1124  static bool TransBrush(const Color& rCol, WW8_SHD& rShd);
1125  static WW8_BRCVer9 TranslateBorderLine(const ::editeng::SvxBorderLine& pLine,
1126  sal_uInt16 nDist, bool bShadow);
1127 
1128  // #i77805# - new return value indicates, if an inherited outline numbering is suppressed
1129  virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) override;
1130 
1131  unsigned int GetHdFtIndex() const { return m_nHdFtIndex; }
1132  void SetHdFtIndex(unsigned int nHdFtIndex) { m_nHdFtIndex = nHdFtIndex; }
1134 
1140  static sal_uInt8 GetNumId( sal_uInt16 eNumType );
1141 
1143  virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) override;
1144 
1145  SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const;
1146 
1148  void MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight,
1149  const ww8::Frame &rFrameFormat);
1150 
1151  void InsUInt16( sal_uInt16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }
1152  void InsInt16(sal_Int16 n) { InsUInt16(sal_uInt16(n)); }
1153  void InsUInt32( sal_uInt32 n ) { SwWW8Writer::InsUInt32( *pO, n ); }
1154  void WriteStringAsPara( const OUString& rText );
1155 
1157  WW8Export( SwWW8Writer *pWriter,
1158  SwDoc& rDocument, std::shared_ptr<SwUnoCursor> & pCurrentPam, SwPaM* pOriginalPam,
1159  bool bDot );
1160  virtual ~WW8Export() override;
1161 
1162  virtual void DoComboBox(const OUString &rName,
1163  const OUString &rHelp,
1164  const OUString &ToolTip,
1165  const OUString &rSelected,
1166  const css::uno::Sequence<OUString> &rListItems) override;
1167 
1168  virtual void DoFormText(const SwInputField * pField) override;
1169 
1170  void GetCurrentItems(ww::bytes &rItems) const;
1171 
1173  virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) override;
1174  virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark ) override;
1175 
1178 
1179  SwWW8Writer& GetWriter() const { return *m_pWriter; }
1180  SvStream& Strm() const { return m_pWriter->Strm(); }
1181 
1183  virtual void SaveData( sal_uLong nStt, sal_uLong nEnd ) override;
1184 
1186  virtual void RestoreData() override;
1187 
1189  virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
1190  const SwFrameFormat& rFormat, const SwFrameFormat& rLeftHeaderFormat, const SwFrameFormat& rLeftFooterFormat, const SwFrameFormat& rFirstPageFormat,
1191  sal_uInt8 nBreakCode, bool bEvenAndOddHeaders) override;
1192 
1193  virtual ExportFormat GetExportFormat() const override { return ExportFormat::DOC; }
1194 
1195 protected:
1197  virtual void OutputGrfNode( const SwGrfNode& ) override;
1198 
1200  virtual void OutputOLENode( const SwOLENode& ) override;
1201 
1202  virtual void OutputLinkedOLE( const OUString& ) override;
1203 
1204  virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) override;
1205 
1206 private:
1207  WW8Export(const WW8Export&) = delete;
1208  WW8Export& operator=(const WW8Export&) = delete;
1209 };
1210 
1211 class WW8_WrPlcSubDoc // double Plc for Footnotes/Endnotes and Postits
1212 {
1213 private:
1214  WW8_WrPlcSubDoc(const WW8_WrPlcSubDoc&) = delete;
1215  WW8_WrPlcSubDoc& operator=(const WW8_WrPlcSubDoc&) = delete;
1216 protected:
1217  std::vector<WW8_CP> aCps;
1218  std::vector<const void*> aContent; // PTRARR of SwFormatFootnote/PostIts/..
1219  std::vector<const SwFrameFormat*> aSpareFormats; // a backup for aContent: if there's no SdrObject, stores the fmt directly here
1220  std::unique_ptr<WW8_WrPlc0> pTextPos; // positions of the individual texts
1221 
1222  WW8_WrPlcSubDoc();
1223  virtual ~WW8_WrPlcSubDoc();
1224 
1225  bool WriteGenericText( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_CP& rCount );
1226  void WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_FC& rTextStt,
1227  sal_Int32& rTextCnt, WW8_FC& rRefStt, sal_Int32& rRefCnt ) const;
1228 
1229  virtual const std::vector<sal_uInt32>* GetShapeIdArr() const;
1230 };
1231 
1232 // double Plc for Footnotes/Endnotes
1234 {
1235 private:
1237 
1238  WW8_WrPlcFootnoteEdn(const WW8_WrPlcFootnoteEdn&) = delete;
1240 public:
1241  explicit WW8_WrPlcFootnoteEdn( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
1242 
1243  bool WriteText( WW8Export& rWrt );
1244  void WritePlc( WW8Export& rWrt ) const;
1245 
1246  void Append( WW8_CP nCp, const SwFormatFootnote& rFootnote );
1247 };
1248 
1250 {
1252  OUString msSimpleText;
1253  OUString msOwner;
1254  OUString m_sInitials;
1257  bool m_bIgnoreEmpty = true;
1258  WW8_Annotation(const SwPostItField* pPostIt, WW8_CP nRangeStart, WW8_CP nRangeEnd);
1259  explicit WW8_Annotation(const SwRedlineData* pRedline);
1261  bool HasRange() const;
1262 };
1263 
1264 class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc // double Plc for Postits
1265 {
1266 private:
1267  WW8_WrPlcAnnotations(const WW8_WrPlcAnnotations&) = delete;
1270 
1271  std::map<const OUString, std::pair<WW8_CP, bool>> m_aRangeStartPositions;
1272 public:
1274  virtual ~WW8_WrPlcAnnotations() override;
1275 
1276  void AddRangeStartPosition(const OUString& rName, WW8_CP nStartCp, bool bIgnoreEmpty);
1277  void Append( WW8_CP nCp, const SwPostItField* pPostIt );
1278  void Append( WW8_CP nCp, const SwRedlineData* pRedLine );
1279  bool IsNewRedlineComment( const SwRedlineData* pRedLine );
1280  bool WriteText( WW8Export& rWrt );
1281  void WritePlc( WW8Export& rWrt ) const;
1282 };
1283 
1284 class WW8_WrPlcTextBoxes : public WW8_WrPlcSubDoc // double Plc for Textboxes
1285 { // Frame/DrawTextboxes!
1286 private:
1288  std::vector<sal_uInt32> aShapeIds; // VARARR of ShapeIds for the SwFrameFormats
1289  virtual const std::vector<sal_uInt32>* GetShapeIdArr() const override;
1290 
1291  WW8_WrPlcTextBoxes(const WW8_WrPlcTextBoxes&) = delete;
1292  WW8_WrPlcTextBoxes& operator=(WW8_WrPlcTextBoxes const &) = delete;
1293 public:
1294  explicit WW8_WrPlcTextBoxes( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
1295 
1296  bool WriteText( WW8Export& rWrt );
1297  void WritePlc( WW8Export& rWrt ) const;
1298  void Append( const SdrObject& rObj, sal_uInt32 nShapeId );
1299  void Append( const SwFrameFormat* pFormat, sal_uInt32 nShapeId );
1300  sal_uInt16 Count() const { return aContent.size(); }
1301  sal_uInt16 GetPos( const void* p ) const
1302  {
1303  std::vector<const void*>::const_iterator it
1304  = std::find( aContent.begin(), aContent.end(), p );
1305  return it == aContent.end() ? USHRT_MAX : it - aContent.begin();
1306  }
1307 };
1308 
1309 class WW8_WrPlcPn // Plc for Page Numbers
1310 {
1311 private:
1313  // Plc for Chpx and Papx ( incl PN-Plc )
1314  std::vector<std::unique_ptr<WW8_WrFkp>> m_Fkps;
1315  sal_uInt16 nFkpStartPage;
1317 
1318  WW8_WrPlcPn(const WW8_WrPlcPn&) = delete;
1319  WW8_WrPlcPn& operator=(const WW8_WrPlcPn&) = delete;
1320 public:
1321  WW8_WrPlcPn( WW8Export& rWrt, ePLCFT ePl, WW8_FC nStartFc );
1322  ~WW8_WrPlcPn();
1323  void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const sal_uInt8* pSprms = nullptr);
1324  void WriteFkps();
1325  void WritePlc();
1327 };
1328 
1329 // class WW8_WrPlc1 is only used for fields
1331 {
1332 private:
1333  std::vector<WW8_CP> aPos;
1334  std::unique_ptr<sal_uInt8[]> pData; // content ( structures )
1336  sal_uInt16 nStructSiz;
1337 
1338  WW8_WrPlc1(const WW8_WrPlc1&) = delete;
1339  WW8_WrPlc1& operator=(const WW8_WrPlc1&) = delete;
1340 protected:
1341  sal_uInt16 Count() const { return aPos.size(); }
1342  void Write( SvStream& rStrm );
1343  WW8_CP Prev() const;
1344 public:
1345  explicit WW8_WrPlc1( sal_uInt16 nStructSz );
1346  ~WW8_WrPlc1();
1347  void Append( WW8_CP nCp, const void* pData );
1348  void Finish( sal_uLong nLastCp, sal_uLong nStartCp );
1349 };
1350 
1351 // class WW8_WrPlcField is for fields
1353 {
1354 private:
1356  sal_uInt16 nResults;
1357 
1358  WW8_WrPlcField(const WW8_WrPlcField&) = delete;
1359  WW8_WrPlcField& operator=(const WW8_WrPlcField&) = delete;
1360 public:
1361  WW8_WrPlcField( sal_uInt16 nStructSz, sal_uInt8 nTTyp )
1362  : WW8_WrPlc1( nStructSz ), nTextTyp( nTTyp ), nResults(0)
1363  {}
1364  void Write( WW8Export& rWrt );
1365  void ResultAdded() { ++nResults; }
1366  sal_uInt16 ResultCount() const { return nResults; }
1367 };
1368 
1370 {
1371 private:
1372  WW8_WrMagicTable(const WW8_WrMagicTable&) = delete;
1373  WW8_WrMagicTable& operator=(const WW8_WrMagicTable&) = delete;
1374 public:
1376  void Append( WW8_CP nCp, sal_uLong nData );
1377  void Write( WW8Export& rWrt );
1378 };
1379 
1381 {
1382 public:
1383  ww8::Frame maFly; // surrounding FlyFrames
1384  sal_uLong mnPos; // FilePos of the graphics
1385  sal_uInt16 mnWid; // Width of the graphics
1386  sal_uInt16 mnHei; // Height of the graphics
1387 
1388  GraphicDetails(const ww8::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
1389  : maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei)
1390  {}
1391 
1392  bool operator==(const GraphicDetails& rIn) const
1393  {
1394  return (
1395  (mnWid == rIn.mnWid) && (mnHei == rIn.mnHei) &&
1396  (maFly.RefersToSameFrameAs(rIn.maFly))
1397  );
1398  }
1399 };
1400 
1401 // class SwWW8WrGrf collects graphics and issues them
1403 {
1404 private:
1407 
1408  std::vector<GraphicDetails> maDetails;
1409  sal_uInt16 mnIdx; // index in file positions
1410 
1411  static void WritePICFHeader(SvStream& rStrm, const ww8::Frame &rFly,
1412  sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight,
1413  const SwAttrSet* pAttrSet = nullptr);
1414  void WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem);
1415  void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd,
1416  const ww8::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight);
1417 
1418  static void WritePICBulletFHeader(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight);
1419  void WriteGrfForBullet(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight);
1420 
1421  SwWW8WrGrf(const SwWW8WrGrf&) = delete;
1422  SwWW8WrGrf& operator=(const SwWW8WrGrf&) = delete;
1423 public:
1424  explicit SwWW8WrGrf( WW8Export& rW ) : rWrt( rW ), mnIdx( 0 ) {}
1425  void Insert(const ww8::Frame &rFly);
1426  void Write();
1428  { return (mnIdx < maDetails.size()) ? maDetails[mnIdx++].mnPos : 0; }
1429 };
1430 
1435 {
1436 private:
1438  MSWordAttrIter(const MSWordAttrIter&) = delete;
1439  MSWordAttrIter& operator=(const MSWordAttrIter&) = delete;
1440 protected:
1442 public:
1443  explicit MSWordAttrIter( MSWordExportBase& rExport );
1444  virtual ~MSWordAttrIter();
1445 
1446  virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const = 0;
1447  virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const = 0;
1448  };
1449 
1452 {
1453 private:
1456  std::vector<EECharAttrib> aTextAtrArr;
1457  std::vector<const EECharAttrib*> aChrTextAtrArr;
1458  std::vector<rtl_TextEncoding> aChrSetArr;
1459  sal_Int32 nPara;
1460  sal_Int32 nCurrentSwPos;
1461  sal_Int32 nTmpSwPos; // for HasItem()
1462  rtl_TextEncoding eNdChrSet;
1463  sal_uInt16 nScript;
1465 
1466  sal_Int32 SearchNext( sal_Int32 nStartPos );
1467  void SetCharSet(const EECharAttrib& rTextAttr, bool bStart);
1468 
1469  void SetItemsThatDifferFromStandard(bool bCharAttr, SfxItemSet& rSet);
1470 
1471  MSWord_SdrAttrIter(const MSWord_SdrAttrIter&) = delete;
1473 public:
1474  MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj,
1475  sal_uInt8 nType );
1476  void NextPara( sal_Int32 nPar );
1477  void OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>* pWhichsToIgnore = nullptr);
1478  void OutEEField(const SfxPoolItem& rHt);
1479 
1480  bool IsTextAttr(sal_Int32 nSwPos);
1481 
1482  void NextPos() { if ( nCurrentSwPos < SAL_MAX_INT32 ) nCurrentSwPos = SearchNext( nCurrentSwPos + 1 ); }
1483 
1484  void OutAttr( sal_Int32 nSwPos );
1485  virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const override;
1486  virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const override;
1487  sal_Int32 WhereNext() const { return nCurrentSwPos; }
1488  rtl_TextEncoding GetNextCharSet() const;
1489  rtl_TextEncoding GetNodeCharSet() const { return eNdChrSet; }
1490 };
1491 
1492 // class SwWW8AttrIter is a helper for constructing the Fkp.chpx.
1493 // Only character attributes are considered; paragraph attributes do not need this treatment.
1494 // The paragraph and text attributes of the Writer are passed, and
1495 // Where() returns the next position where the attributes change.
1496 // IsTextAtr() tells if, at the position returned by Where(), there is
1497 // an attribute without end and with \xff in the text.
1498 // Using OutAttr(), the attributes on the passed SwPos are returned.
1500 {
1501 private:
1502  const SwTextNode& rNd;
1503 
1505  sw::util::CharRuns::const_iterator maCharRunIter;
1506 
1507  rtl_TextEncoding meChrSet;
1508  sal_uInt16 mnScript;
1510 
1512  sal_Int32 nCurrentSwPos;
1514 
1516 
1518 
1521 
1522  sal_Int32 SearchNext( sal_Int32 nStartPos );
1523 
1524  void OutSwFormatRefMark(const SwFormatRefMark& rAttr);
1525 
1526  void IterToCurrent();
1527 
1528  SwWW8AttrIter(const SwWW8AttrIter&) = delete;
1529  SwWW8AttrIter& operator=(const SwWW8AttrIter&) = delete;
1530 
1531  void handleToggleProperty(SfxItemSet& rExportSet, const SwFormatCharFormat* pCharFormatItem, sal_uInt16 nWhich, const SfxPoolItem* pValue);
1532 public:
1533  SwWW8AttrIter( MSWordExportBase& rWr, const SwTextNode& rNd );
1534 
1535  bool IsTextAttr( sal_Int32 nSwPos ) const;
1536  bool IsExportableAttr(sal_Int32 nSwPos) const;
1537  bool IncludeEndOfParaCRInRedlineProperties(sal_Int32 nPos) const;
1538  bool IsDropCap( int nSwPos );
1539  bool RequiresImplicitBookmark();
1540 
1541  void NextPos() { if ( nCurrentSwPos < SAL_MAX_INT32 ) nCurrentSwPos = SearchNext( nCurrentSwPos + 1 ); }
1542 
1543  void OutAttr(sal_Int32 nSwPos, bool bWriteCombinedChars, bool bPostponeSingleUse = false);
1544  virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const override;
1545  virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const override;
1546  int OutAttrWithRange(const SwTextNode& rNode, sal_Int32 nPos);
1548  const SwRedlineData* GetRunLevelRedline( sal_Int32 nPos );
1549  FlyProcessingState OutFlys(sal_Int32 nSwPos);
1550  bool HasFlysAt(sal_Int32 nSwPos) const;
1551 
1552  sal_Int32 WhereNext() const { return nCurrentSwPos; }
1553  sal_uInt16 GetScript() const { return mnScript; }
1554  bool IsParaRTL() const { return mbParaIsRTL; }
1555  rtl_TextEncoding GetCharSet() const { return meChrSet; }
1556  OUString GetSnippet(const OUString &rStr, sal_Int32 nCurrentPos,
1557  sal_Int32 nLen) const;
1558  const SwFormatDrop& GetSwFormatDrop() const { return mrSwFormatDrop; }
1559 
1560  bool IsWatermarkFrame();
1561  bool IsAnchorLinkedToThisNode( sal_uLong nNodePos );
1562 
1563  void SplitRun( sal_Int32 nSplitEndPos );
1564 
1565  const SwTextNode& GetNode() const { return rNd; }
1566 };
1567 
1570 {
1573  std::unique_ptr<SwFormat*[]> m_pFormatA;
1574  sal_uInt16 m_nUsedSlots;
1576  std::map<sal_uInt16, const SwNumRule*> m_aNumRules;
1577 
1579  std::vector<OString> m_aStyleIds;
1580 
1582  void BuildStylesTable();
1583 
1585  void BuildStyleIds();
1586 
1588  sal_uInt16 BuildGetSlot( const SwFormat& rFormat );
1589  sal_uInt16 BuildGetSlot( const SwNumRule& /*rNumRule*/ ) { return m_nUsedSlots++;}
1590 
1592  void GetStyleData( SwFormat* pFormat, bool& bFormatColl, sal_uInt16& nBase, sal_uInt16& nNext );
1593 
1595  void WriteProperties( const SwFormat* pFormat, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz );
1596 
1597  static sal_uInt16 GetWWId( const SwFormat& rFormat );
1598 
1599  void SetStyleDefaults( const SwFormat& rFormat, bool bPap );
1600 
1602  void OutputStyle( SwFormat* pFormat, sal_uInt16 nPos );
1603  void OutputStyle( const SwNumRule* pNumRule, sal_uInt16 nPos );
1604 
1605  MSWordStyles( const MSWordStyles& ) = delete;
1606  MSWordStyles& operator=( const MSWordStyles& ) = delete;
1607 
1608 public:
1609  MSWordStyles( MSWordExportBase& rExport, bool bListStyles = false );
1610  ~MSWordStyles();
1611 
1613  void OutputStylesTable();
1614 
1616  sal_uInt16 GetSlot( const SwFormat* pFormat ) const;
1617 
1619  static OString CreateStyleId(const OUString &rName);
1620 
1622  OString const & GetStyleId(sal_uInt16 nId) const;
1623 
1624  const SwFormat* GetSwFormat(sal_uInt16 nId) const { return m_pFormatA[nId]; }
1626  const SwNumRule* GetSwNumRule(sal_uInt16 nId) const;
1627  sal_uInt16 GetHeadingParagraphStyleId(sal_uInt16 nLevel) const { return m_aHeadingParagraphStyles[ nLevel ]; }
1628 };
1629 
1630 #define MSWORD_MAX_STYLES_LIMIT 4091
1631 
1632 sal_Int16 GetWordFirstLineOffset(const SwNumFormat &rFormat);
1633 // A bit of a bag on the side for now
1634 OUString FieldString(ww::eField eIndex);
1635 OUString BookmarkToWord(const OUString &rBookmark);
1636 
1638 {
1639  sal_uInt32 m_cvFore;
1640  sal_uInt32 m_cvBack;
1641 
1642 public:
1643  WW8SHDLong() : m_cvFore(0), m_cvBack(0) {}
1644 
1645  void Write(WW8Export & rExport);
1646  void setCvFore(sal_uInt32 cvFore) { m_cvFore = cvFore; }
1647  void setCvBack(sal_uInt32 cvBack) { m_cvBack = cvBack; }
1648 };
1649 
1650 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_WRTWW8_HXX
1651 
1652 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::map< wwFont, sal_uInt16 > maFonts
Keep track of fonts that need to be exported.
Definition: wrtww8.hxx:321
void WriteMainText()
Definition: wrtww8.cxx:2926
std::shared_ptr< NfKeywordTable > m_pKeyMap
Definition: wrtww8.hxx:473
o3tl::sorted_vector< const SwRedlineData * > maProcessedRedlines
Definition: wrtww8.hxx:1269
bool WriteGenericText(WW8Export &rWrt, sal_uInt8 nTTyp, WW8_CP &rCount)
Definition: wrtw8sty.cxx:2208
std::map< size_t, std::map< size_t, size_t > > m_ListLevelOverrides
Map of maps for list levels overrides listid -> level number -> restart value.
Definition: wrtww8.hxx:467
sal_uInt16 CurrentNumberOfColumns(const SwDoc &rDoc) const
Number of columns based on the most recent WW8_SepInfo.
Definition: wrtw8sty.cxx:1060
WW8_CP m_nRangeEnd
Definition: wrtww8.hxx:1256
sal_Int32 nCurrentSwPos
Definition: wrtww8.hxx:1460
virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner=ww8::WW8TableNodeInfoInner::Pointer_t())=0
Starts a section of nodes in the document model.
Definition: node.hxx:312
virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const override
Definition: wrtw8esh.cxx:853
OUString GetSnippet(const OUString &rStr, sal_Int32 nCurrentPos, sal_Int32 nLen) const
Definition: wrtw8nds.cxx:1740
RedlineFlags m_nOrigRedlineFlags
Remember the original redline mode.
Definition: wrtww8.hxx:487
static sal_uInt16 GetWWId(const SwFormat &rFormat)
Definition: wrtw8sty.cxx:210
static void InsUInt32(ww::bytes &rO, sal_uInt32 n)
Definition: wrtww8.cxx:1714
Exporter of the binary Word file formats.
Definition: wrtww8.hxx:987
ErrCode WriteStorageImpl()
Definition: wrtww8.cxx:3801
void OutAttr(sal_Int32 nSwPos)
Definition: wrtw8esh.cxx:1116
MSWordExportBase(SwDoc &rDocument, std::shared_ptr< SwUnoCursor > &pCurrentPam, SwPaM *pOriginalPam)
Definition: wrtww8.cxx:3847
static void Out_BorderLine(ww::bytes &rO, const ::editeng::SvxBorderLine *pLine, sal_uInt16 nDist, sal_uInt16 nSprmNo, sal_uInt16 nSprmNoVer9, bool bShadow)
Gets passed a WW8Bytes*, so the function also can be used for the table border.
Definition: ww8atr.cxx:4477
virtual AttributeOutputBase & AttrOutput() const =0
Access to the attribute output class.
virtual void OutputOLENode(const SwOLENode &)=0
Output SwOLENode.
WW8_WrPlcSubDoc & operator=(const WW8_WrPlcSubDoc &)=delete
virtual void SectionBreaksAndFrames(const SwTextNode &rNode)=0
void SetHdFtIndex(unsigned int nHdFtIndex)
Definition: wrtww8.hxx:1132
void WritePlc()
Definition: wrtww8.cxx:1051
sal_Int32 WhereNext() const
Definition: wrtww8.hxx:1487
const SwFormat * GetSwFormat(sal_uInt16 nId) const
Definition: wrtww8.hxx:1624
const sw::BroadcastingModify * m_pOutFormatNode
Definition: wrtww8.hxx:537
WW8_WrPlcField(sal_uInt16 nStructSz, sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1361
void WriteProperties(const SwFormat *pFormat, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz)
Outputs attributes of one style.
Definition: wrtw8sty.cxx:525
WW8_WrPlcAnnotations & operator=(WW8_WrPlcAnnotations const &)=delete
Class to collect and output the sections/headers/footers.
Definition: wrtww8.hxx:194
virtual void AppendSmartTags(SwTextNode &)
Definition: wrtww8.hxx:712
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:3997
std::unique_ptr< ww::bytes > pO
Buffer.
Definition: wrtww8.hxx:990
void GetCurrentItems(ww::bytes &rItems) const
Definition: wrtw8nds.cxx:891
std::unique_ptr< SvxMSExportOLEObjects > m_pOLEExp
Definition: wrtww8.hxx:474
MSWordSections & operator=(const MSWordSections &)
SvStream * pTableStrm
Definition: wrtww8.hxx:992
bool m_bLinkedTextboxesHelperInitialized
Definition: wrtww8.hxx:515
Represents the style of a paragraph.
Definition: fmtcol.hxx:56
sal_uInt16 AddRedlineAuthor(std::size_t nId)
Definition: wrtww8.cxx:1656
unsigned int GetHdFtIndex() const
Definition: wrtww8.hxx:1131
virtual ~SwWW8Writer() override
Definition: wrtww8.cxx:3958
The class that has handlers for various resource types when exporting as DOCX.
virtual sal_uLong ReplaceCr(sal_uInt8 nChar) override
ReplaceCr() is used for Pagebreaks and Pagedescs.
Definition: ww8atr.cxx:3792
void AddRangeStartPosition(const OUString &rName, WW8_CP nStartCp, bool bIgnoreEmpty)
Definition: wrtw8sty.cxx:2165
void OutSwString(const OUString &, sal_Int32 nStt, sal_Int32 nLen)
Definition: wrtww8.cxx:1833
MainTextPlcDrawObj & operator=(const MainTextPlcDrawObj &)=delete
void MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo)
Definition: wrtww8.cxx:1488
WW8_WrPlcTextBoxes & operator=(WW8_WrPlcTextBoxes const &)=delete
WW8_WrMagicTable & operator=(const WW8_WrMagicTable &)=delete
void OutEEField(const SfxPoolItem &rHt)
Definition: wrtw8esh.cxx:1098
std::unique_ptr< WW8_WrPlcField > m_pFieldHFTextBxs
Definition: wrtww8.hxx:530
std::unique_ptr< WW8Fib > pFib
File Information Block.
Definition: wrtww8.hxx:994
virtual AttributeOutputBase & AttrOutput() const override
memory leak #i120098#, to hold the reference to unnamed SotStorage obj
Definition: wrtww8.cxx:3938
sal_uInt32 GetSdrOrdNum(const SwFrameFormat &rFormat) const
Definition: wrtw8esh.cxx:949
bool m_bEndAtTextEnd
Definition: wrtww8.hxx:562
const SfxPoolItem & GetItem(sal_uInt16 nWhich) const
Definition: wrtww8.cxx:780
std::unique_ptr< WW8_WrPlcField > m_pFieldHdFt
Definition: wrtww8.hxx:525
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:35
void SetStyleDefaults(const SwFormat &rFormat, bool bPap)
Definition: wrtw8sty.cxx:448
FKP - Formatted disK Page.
Definition: wrtww8.cxx:126
void WriteStringAsPara(const OUString &rText)
Definition: wrtww8.cxx:1777
const ww8::Frame * pOldFlyFormat
Definition: wrtww8.hxx:436
rtl_TextEncoding GetNodeCharSet() const
Definition: wrtww8.hxx:1489
RndStdIds m_eNewAnchorType
Definition: wrtww8.hxx:522
bool m_bSubstituteBullets
Definition: wrtww8.hxx:565
bool m_bAddFootnoteTab
Definition: wrtww8.hxx:572
bool HasRange() const
An annotation has a range if start != end or the m_bIgnoreEmpty flag is cleared.
Definition: wrtw8sty.cxx:2155
void OutputStyle(SwFormat *pFormat, sal_uInt16 nPos)
Outputs one style - called (in a loop) from OutputStylesTable().
Definition: wrtw8sty.cxx:587
SvStream & WriteInt32(sal_Int32 nInt32)
sal_uInt16 GetId(const SwTextFormatColl &rColl) const
Return the numeric id of the style.
Definition: wrtw8sty.cxx:134
bool m_bFootnoteAtTextEnd
Definition: wrtww8.hxx:561
WW8_WrPlcFootnoteEdn & operator=(WW8_WrPlcFootnoteEdn const &)=delete
const SwFormatDrop & mrSwFormatDrop
Definition: wrtww8.hxx:1517
sal_uInt16 GetId(const SvxFontItem &rFont)
Return the numeric id of the font (and add it to the font list if needed)
Definition: wrtww8.hxx:619
bool WriteText(WW8Export &rWrt)
Definition: wrtww8.cxx:3978
virtual void OutputEndNode(const SwEndNode &)
Output SwEndNode.
Definition: wrtww8.cxx:4440
virtual void PrepareNewPageDesc(const SfxItemSet *pSet, const SwNode &rNd, const SwFormatPageDesc *pNewPgDescFormat, const SwPageDesc *pNewPgDesc, bool bExtraPageBreak=false) override
Helper method for OutputSectionBreaks() and OutputFollowPageDesc().
Definition: ww8atr.cxx:669
WW8_CP m_nRangeStart
Definition: wrtww8.hxx:1256
virtual void AppendBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen) override
Definition: wrtww8.cxx:1418
bool mbAlt
Definition: wrtww8.hxx:303
static void WriteString_xstz(SvStream &rStrm, const OUString &rStr, bool bAddZero)
Definition: wrtww8.cxx:1754
FontFamily meFamily
Definition: wrtww8.hxx:305
virtual bool FieldsQuoted() const =0
Determines if the import filter already quoted fields or not.
const SfxItemPool * pEditPool
Definition: wrtww8.hxx:1455
std::vector< const SwTOXType * > m_aTOXArr
Definition: wrtww8.hxx:455
void OutParaAttr(bool bCharAttr, const std::set< sal_uInt16 > *pWhichsToIgnore=nullptr)
Definition: wrtw8esh.cxx:1273
OUString msFamilyNm
Definition: wrtww8.hxx:301
Point * pOldFlyOffset
Definition: wrtww8.hxx:430
static sal_uLong GetSectionLineNo(const SfxItemSet *pSet, const SwNode &rNd)
Line number of the section start.
Definition: ww8atr.cxx:654
sal_uLong m_nCurStart
Definition: wrtww8.hxx:575
void OutputStylesTable()
Output the styles table.
Definition: wrtw8sty.cxx:686
void AddListLevelOverride(sal_uInt16 nListId, sal_uInt16 nLevelNum, sal_uInt16 nStartAt)
Store list level overrides (restart of list)
Definition: wrtw8num.cxx:106
void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick)
Definition: wrtw8esh.cxx:903
bool DocumentIsProtected() const
Definition: wrtww8.hxx:227
const SwRedlineData * GetParagraphLevelRedline()
Definition: wrtw8nds.cxx:1498
std::vector< sal_uInt8 > bytes
Definition: types.hxx:29
std::vector< const SwFrameFormat * > aSpareFormats
Definition: wrtww8.hxx:1219
std::unique_ptr< WW8_WrPlcField > m_pFieldMain
Definition: wrtww8.hxx:524
sal_uIntPtr sal_uLong
void WriteAsStringTable(const std::vector< OUString > &, sal_Int32 &rfcSttbf, sal_Int32 &rlcbSttbf)
Definition: wrtww8.cxx:1666
virtual void SaveData(sal_uLong nStt, sal_uLong nEnd)
Remember some of the members so that we can recurse in WriteText().
Definition: wrtww8.cxx:1892
virtual ErrCode ExportDocument_Impl()=0
Format-dependent part of the actual export.
void WriteFontTable(SvStream *pTableStream, WW8Fib &pFib)
Definition: wrtw8sty.cxx:916
const SwAttrSet * m_pStyAttr
Definition: wrtww8.hxx:536
Base class of all fields.
Definition: fldbas.hxx:289
static void WritePICBulletFHeader(SvStream &rStrm, const Graphic &rGrf, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:658
rtl_TextEncoding meChrSet
Definition: wrtww8.hxx:1507
SwWW8Writer & operator=(const SwWW8Writer &)=delete
void SetCharSet(const EECharAttrib &rTextAttr, bool bStart)
Definition: wrtw8esh.cxx:1072
bool MiserableFormFieldExportHack(const SwFrameFormat &rFrameFormat)
Definition: wrtw8esh.cxx:352
WW8_WrPct * m_pPiece
Definition: wrtww8.hxx:458
void WritePlcHdd(WW8Export &rWrt) const
Definition: wrtw8sty.cxx:2053
void WriteFootnoteEndText(WW8Export &rWrt, sal_uLong nCpStt)
Definition: wrtw8sty.cxx:1139
bool bOldWriteAll
WW8Export only.
Definition: wrtww8.hxx:439
bool m_bOutPageDescs
PageDescs (section properties) are being written.
Definition: wrtww8.hxx:553
Definition: doc.hxx:187
ePLCFT ePlc
Definition: wrtww8.hxx:1316
bool mbCharIsRTL
Definition: wrtww8.hxx:1509
sal_Int32 nPara
Definition: wrtww8.hxx:1459
const EditTextObject * pEditObj
Definition: wrtww8.hxx:1454
virtual ~PlcDrawObj()
Definition: wrtw8esh.cxx:521
sal_uLong nDataLen
Definition: wrtww8.hxx:1335
virtual void OutputLinkedOLE(const OUString &)=0
virtual bool FieldsQuoted() const override
Determines if the import filter already quoted fields or not.
Definition: wrtww8.hxx:1018
virtual bool CollapseScriptsforWordOk(sal_uInt16 nScript, sal_uInt16 nWhich)=0
Guess the script (asian/western).
std::stack< sal_Int32 > m_aCurrentCharPropStarts
To remember the position in a run.
Definition: wrtww8.hxx:470
virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const override
Definition: wrtw8esh.cxx:872
sal_uInt16 BuildGetSlot(const SwNumRule &)
Definition: wrtww8.hxx:1589
void WriteRtf(const RtfAttributeOutput *rAttrOutput) const
Definition: wrtw8sty.cxx:822
bool NeedSectionBreak(const SwNode &rNd) const
Definition: wrtw8nds.cxx:2158
sal_uInt16 m_nCharFormatStart
Definition: wrtww8.hxx:479
WW8_WrPlcTextBoxes(sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1294
virtual void WriteNumbering() override
Output the numbering table.
Definition: wrtw8num.cxx:163
std::shared_ptr< SwUnoCursor > pOldPam
Definition: wrtww8.hxx:433
static void WriteString8(SvStream &rStrm, std::u16string_view rStr, bool bAddZero, rtl_TextEncoding eCodeSet)
Definition: wrtww8.cxx:1764
virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const =0
Point * m_pFlyOffset
Definition: wrtww8.hxx:521
Content, content of frame (header, footer, fly).
Definition: fmtcntnt.hxx:31
SvxFrameDirection
Structure that is used to save some of the WW8Export/DocxExport data.
Definition: wrtww8.hxx:428
sal_uInt16 m_nStyleBeforeFly
style number of the node
Definition: wrtww8.hxx:481
OUString const & GetFamilyName() const
Definition: wrtww8.hxx:313
void ExportDopTypography(WW8DopTypography &rTypo)
Definition: wrtww8.cxx:578
sal_Int32 m_nLinkedTextboxesChainId
Definition: wrtww8.hxx:516
void SetParaBreak()
Definition: wrtww8.cxx:1402
bool bOldOutTable
Definition: wrtww8.hxx:440
WW8_CP Fc2Cp(sal_uLong nFc) const
Definition: wrtww8.hxx:1099
void BuildStyleIds()
Based on pFormatA, fill in m_aStyleIds with unique, MS-like names.
Definition: wrtw8sty.cxx:341
std::unique_ptr< WW8_WrPlcField > m_pFieldTextBxs
Definition: wrtww8.hxx:529
MSWordStyles(const MSWordStyles &)=delete
static sal_uLong FillUntil(SvStream &rStrm, sal_uLong nEndPos=0)
Definition: wrtww8.cxx:946
void OutputItemSet(const SfxItemSet &rSet, bool bPapFormat, bool bChpFormat, sal_uInt16 nScript, bool bExportParentItemSet)
Use OutputItem() on an item set according to the parameters.
Definition: ww8atr.cxx:311
void AppendFlyInFlys(const ww8::Frame &rFrameFormat, const Point &rNdTopLeft)
Definition: wrtw8esh.cxx:969
DrawObjVector & GetObjArr()
Definition: wrtww8.hxx:376
virtual const std::vector< sal_uInt32 > * GetShapeIdArr() const
Definition: wrtw8sty.cxx:2658
Used to export formatted text associated to drawings.
Definition: wrtww8.hxx:1451
friend bool operator<(const wwFont &r1, const wwFont &r2)
Definition: wrtw8sty.cxx:834
bool m_bOutFirstPage
Definition: wrtww8.hxx:554
virtual void AppendSmartTags(SwTextNode &rTextNode) override
Definition: wrtww8.cxx:1478
sal_uInt16 Count() const
Definition: wrtww8.hxx:1341
virtual bool HeaderFooterWritten() override
Definition: wrtw8sty.cxx:1055
std::vector< const wwFont * > AsVector() const
Convert from fast insertion map to linear vector in the order that we want to write.
Definition: wrtw8sty.cxx:906
void Write(WW8Export &rExport)
Definition: wrtww8.cxx:4075
std::map< const css::embed::XEmbeddedObject *, sal_Int32 > WW8OleMap
Definition: wrtww8.hxx:131
const SwNumRule * GetSwNumRule(sal_uInt16 nId) const
Get numbering rule of the nId-th style.
Definition: wrtw8sty.cxx:714
::std::optional< sal_uInt16 > oPgRestartNo
Definition: wrtww8.hxx:178
SfxMedium * GetMedia()
Definition: wrtww8.hxx:978
sal_uInt8 nTextTyp
Definition: wrtww8.hxx:1355
RndStdIds eOldAnchorType
Definition: wrtww8.hxx:431
const SfxItemSet * GetCurItemSet() const
Getter for pISet.
Definition: wrtww8.hxx:728
std::unique_ptr< SwMSConvertControls > m_pOCXExp
Definition: wrtww8.hxx:475
void WritePc(WW8Export &rWrt)
Definition: wrtww8.cxx:1362
rtl_TextEncoding meChrSet
Definition: wrtww8.hxx:306
virtual const SfxPoolItem * HasTextItem(sal_uInt16 nWhich) const override
Definition: wrtw8nds.cxx:850
std::unique_ptr< WW8_WrPlcField > m_pFieldEdn
Definition: wrtww8.hxx:527
OUString FieldString(ww::eField eIndex)
Definition: ww8atr.cxx:2648
WW8_CP Fc2Cp(sal_uLong nFc) const
Definition: wrtww8.cxx:1408
virtual ExportFormat GetExportFormat() const =0
std::shared_ptr< SvxBrushItem > TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const
Definition: wrtw8nds.cxx:1691
std::unique_ptr< WW8_WrPlcField > m_pFieldAtn
Definition: wrtww8.hxx:528
OString const & GetStyleId(sal_uInt16 nId) const
Get styleId of the nId-th style (nId is its position in pFormatA).
Definition: wrtw8sty.cxx:379
IDocumentSettingAccess & getIDocumentSettingAccess()
Definition: writer.cxx:136
virtual WW8_CP GetCpOffset(const WW8Fib &) const override
Definition: wrtw8esh.cxx:860
void OutListNamesTab()
Definition: wrtw8num.cxx:627
IMarkVector m_rSortedAnnotationMarksEnd
Definition: wrtww8.hxx:587
static void SetHeaderFlag(sal_uInt8 &rHeadFootFlags, const SwFormat &rFormat, sal_uInt8 nFlag)
Definition: wrtw8sty.cxx:1198
ww8::FrameIter maFlyIter
Definition: wrtww8.hxx:1520
WW8_WrPlcAnnotations * m_pAtn
Definition: wrtww8.hxx:502
sal_uInt16 nFkpStartPage
Definition: wrtww8.hxx:1315
std::vector< sal_uInt32 > aShapeIds
Definition: wrtww8.hxx:1288
bool GetNumberFormat(const SwField &rField, OUString &rStr)
Definition: ww8atr.cxx:2572
WW8Export * m_pExport
Definition: wrtww8.hxx:936
sal_Int32 WhereNext() const
Definition: wrtww8.hxx:1552
sal_uInt16 GetScript() const
Definition: wrtww8.hxx:1553
virtual void WriteHeadersFooters(sal_uInt8 nHeadFootFlags, const SwFrameFormat &rFormat, const SwFrameFormat &rLeftHeaderFormat, const SwFrameFormat &rLeftFooterFormat, const SwFrameFormat &rFirstPageFormat, sal_uInt8 nBreakCode, bool bEvenAndOddHeaders) override
Output the actual headers and footers.
Definition: wrtw8sty.cxx:1503
void SectionProperties(const WW8_SepInfo &rSectionInfo, WW8_PdAttrDesc *pA=nullptr)
Write section properties.
Definition: wrtw8sty.cxx:1595
static void WritePICFHeader(SvStream &rStrm, const ww8::Frame &rFly, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight, const SwAttrSet *pAttrSet=nullptr)
Definition: wrtww8gr.cxx:477
void WriteText()
Iterate through the nodes and call the appropriate OutputNode() on them.
Definition: wrtww8.cxx:2781
std::vector< WW8_SepInfo > aSects
Definition: wrtww8.hxx:198
virtual ExportFormat GetExportFormat() const override
Definition: wrtww8.hxx:1193
SwEscherEx * m_pEscher
Definition: wrtww8.hxx:543
WW8Export & rWrt
Definition: wrtww8.hxx:1312
sal_uInt16 sal_Unicode
bool bOldStartTOX
Definition: wrtww8.hxx:442
WW8_WrPlcField(const WW8_WrPlcField &)=delete
std::unique_ptr< WW8_WrPlcField > m_pFieldFootnote
Definition: wrtww8.hxx:526
FieldFlags
Definition: wrtww8.hxx:141
virtual void OutputOLENode(const SwOLENode &) override
Output SwOLENode.
Definition: wrtww8gr.cxx:196
virtual ErrCode WriteMedium(SfxMedium &) override
Definition: wrtww8.cxx:3833
WW8_WrPlcSepx & operator=(const WW8_WrPlcSepx &)=delete
void WritePlc(WW8Export &rWrt) const
Definition: wrtw8esh.cxx:616
virtual void OutputField(const SwField *pField, ww::eField eFieldType, const OUString &rFieldCmd, FieldFlags nMode=FieldFlags::All) override
Write the field.
Definition: ww8atr.cxx:1787
virtual void AppendBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen)=0
SwWW8AttrIter(const SwWW8AttrIter &)=delete
bool m_bExportModeRTF
Definition: wrtww8.hxx:569
MSWordExportBase & m_rExport
Definition: wrtww8.hxx:1441
std::map< OUString, LinkedTextboxInfo > m_aLinkedTextboxesHelper
Definition: wrtww8.hxx:514
Class to collect and output the styles table.
Definition: wrtww8.hxx:1569
virtual void WriteHeadersFooters(sal_uInt8 nHeadFootFlags, const SwFrameFormat &rFormat, const SwFrameFormat &rLeftHeaderFormat, const SwFrameFormat &rLeftFooterFormat, const SwFrameFormat &rFirstPageFormat, sal_uInt8 nBreakCode, bool bEvenAndOddHeaders)=0
Output the actual headers and footers.
const SwFrameFormat * m_pFirstPageFormat
Definition: wrtww8.hxx:457
void OutputFormat(const SwFormat &rFormat, bool bPapFormat, bool bChpFormat, bool bFlyFormat=false)
Output attributes.
Definition: ww8atr.cxx:798
The class that has handlers for various resource types when exporting as RTF.
bool bIsFirstParagraph
Definition: wrtww8.hxx:179
FontPitch mePitch
Definition: wrtww8.hxx:304
std::shared_ptr< SwUnoCursor > & m_pCurPam
Definition: wrtww8.hxx:576
SwPaM * pOldEnd
Definition: wrtww8.hxx:434
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:4029
void AddLinkTarget(std::u16string_view rURL)
Definition: wrtww8.cxx:3124
WW8Export & rWrt
for access to the variables
Definition: wrtww8.hxx:1406
std::vector< WW8_CP > aPos
Definition: wrtww8.hxx:1333
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
const SvxBrushItem * GetCurrentPageBgBrush() const
Definition: wrtw8nds.cxx:1672
sal_uInt8 nTyp
Definition: wrtww8.hxx:1287
MSWordAttrIter * m_pChpIter
Definition: wrtww8.hxx:500
sal_Int32 SearchNext(sal_Int32 nStartPos)
Definition: wrtw8esh.cxx:1050
bool m_bInWriteEscher
Definition: wrtww8.hxx:558
std::vector< DrawObj > DrawObjVector
Definition: wrtww8.hxx:359
sal_uInt32 m_cvBack
Definition: wrtww8.hxx:1640
bool bOldFlyFrameAttrs
Definition: wrtww8.hxx:441
bool Append(WW8Export const &, WW8_CP nCp, const ww8::Frame &rFormat, const Point &rNdTopLeft)
Definition: wrtw8esh.cxx:877
void Append(WW8_CP nCp, const SwPostItField *pPostIt)
Definition: wrtw8sty.cxx:2171
WW8_CP mnCp
Definition: wrtww8.hxx:343
WW8_WrPlc1(const WW8_WrPlc1 &)=delete
void WritePostItBegin(ww::bytes *pO=nullptr)
Definition: ww8atr.cxx:2630
bool bOldInWriteTOX
Definition: wrtww8.hxx:443
const SwTextNode * m_pTopNodeOfHdFtPage
Top node of host page when in hd/ft.
Definition: wrtww8.hxx:469
DateTime maDateTime
Definition: wrtww8.hxx:1255
void Finish(sal_uLong nLastCp, sal_uLong nStartCp)
Definition: wrtww8.cxx:827
bool SetCurrentPageDescFromNode(const SwNode &rNd)
Definition: ww8atr.cxx:437
void OutGrf(const ww8::Frame &rFrame)
Definition: wrtww8gr.cxx:356
void Write(SvStream *pTableStram) const
Definition: wrtw8sty.cxx:790
MainTextPlcDrawObj * m_pSdrObjs
Definition: wrtww8.hxx:540
static WW8_BRCVer9 TranslateBorderLine(const ::editeng::SvxBorderLine &pLine, sal_uInt16 nDist, bool bShadow)
Definition: ww8atr.cxx:4373
void WriteChar(sal_Unicode c) override
Definition: wrtww8.cxx:1870
ww8::Frames maFlyFrames
Definition: wrtww8.hxx:1519
std::map< sal_uInt16, const SwNumRule * > m_aNumRules
Slot <-> List style map.
Definition: wrtww8.hxx:1576
bool IsNewRedlineComment(const SwRedlineData *pRedLine)
Definition: wrtw8sty.cxx:2197
virtual void AppendAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen) override
Definition: wrtww8.cxx:1461
WW8_WrPlcTextBoxes * m_pTextBxs
Definition: wrtww8.hxx:504
static void UpdateTocSectionNodeProperties(const SwSectionNode &rSectionNode)
Definition: wrtw8nds.cxx:3282
void handleToggleProperty(SfxItemSet &rExportSet, const SwFormatCharFormat *pCharFormatItem, sal_uInt16 nWhich, const SfxPoolItem *pValue)
Definition: wrtw8nds.cxx:569
void WriteGraphicNode(SvStream &rStrm, const GraphicDetails &rItem)
Definition: wrtww8gr.cxx:752
ww8::WW8TableInfo::Pointer_t m_pTableInfo
Definition: wrtww8.hxx:477
bool FormatHdFtContainsChapterField(const SwFrameFormat &rFormat) const
Definition: ww8atr.cxx:422
MSWordStyles & operator=(const MSWordStyles &)=delete
bool m_bHeaderFooterWritten
Definition: wrtww8.hxx:246
rtl_TextEncoding GetCharSet() const
Definition: wrtww8.hxx:1555
Collects and outputs fonts.
Definition: wrtww8.hxx:295
std::map< size_t, std::pair< size_t, size_t > > m_OverridingNums
overriding numdef index -> (existing numdef index, abstractnumdef index)
Definition: wrtww8.hxx:461
virtual void SetupSectionPositions(WW8_PdAttrDesc *)
Setup the pA's info.
Definition: wrtww8.hxx:777
WW8_WrPlcFootnoteEdn(const WW8_WrPlcFootnoteEdn &)=delete
sal_uInt16 DuplicateAbsNum(OUString const &rListId, SwNumRule const &rAbstractRule)
check if a new abstractNum is needed for this list
Definition: wrtw8num.cxx:61
WW8_CP Prev() const
Definition: wrtww8.cxx:806
SvxFrameDirection mnDirection
Definition: wrtww8.hxx:348
int size()
Definition: wrtww8.hxx:375
sal_uLong GetFPos()
Definition: wrtww8.hxx:1427
virtual void ExportGrfBullet(const SwTextNode &rNd) override
Definition: wrtww8.cxx:1580
virtual void DoFormText(const SwInputField *pField)=0
void Append(WW8_CP nCp, sal_uLong nData)
Definition: wrtww8.cxx:916
void WriteFkps()
Definition: wrtww8.cxx:1030
Base class for various Writer styles.
Definition: format.hxx:46
void GetSortedAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen)
Definition: wrtw8nds.cxx:2091
sal_uInt16 mnWid
Definition: wrtww8.hxx:1385
sal_uInt16 m_nFormatCollStart
Definition: wrtww8.hxx:480
void Write(WW8Export &rWrt)
Definition: wrtww8.cxx:906
void Write(WW8Export &rWrt)
Definition: wrtww8.cxx:849
~WW8_WrPlcPn()
Definition: wrtww8.cxx:969
SwMSConvertControls & GetOCXExp()
Definition: wrtww8.hxx:1047
static void WriteString16(SvStream &rStrm, const OUString &rStr, bool bAddZero)
Definition: wrtww8.cxx:1741
void OutGrfBullets(const ww8::Frame &rFrame)
Definition: wrtww8.cxx:1598
sal_uInt8 * CopyLastSprms(sal_uInt8 &rLen)
Definition: wrtww8.cxx:973
void IterToCurrent()
Definition: wrtw8nds.cxx:192
int CollectGrfsOfBullets()
Populates m_vecBulletPic with all the bullet graphics used by numberings.
Definition: wrtww8.cxx:1521
void GetId(const wwFont &rFont)
Definition: wrtww8.hxx:624
std::unique_ptr< ww::bytes > pOOld
WW8Export only.
Definition: wrtww8.hxx:432
virtual sal_uLong ReplaceCr(sal_uInt8 nChar)=0
std::vector< GraphicDetails > maDetails
Definition: wrtww8.hxx:1408
virtual void SetupSectionPositions(WW8_PdAttrDesc *pA) override
Setup the pA's info.
Definition: wrtw8sty.cxx:1459
bool IsProtected() const
Definition: wrtw8sty.cxx:1247
sal_Int32 nTmpSwPos
Definition: wrtww8.hxx:1461
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
virtual bool PreferPageBreakBefore() const override
If saving page break is preferred as a paragraph attribute (yes) or as a special character (no)...
Definition: wrtww8.hxx:1016
const SwTextNode * GetHdFtPageRoot() const
Top node of host page when in header/footer.
Definition: wrtww8.hxx:783
virtual void DoComboBox(const OUString &rName, const OUString &rHelp, const OUString &ToolTip, const OUString &rSelected, const css::uno::Sequence< OUString > &rListItems)=0
WW8_WrPlc1 & operator=(const WW8_WrPlc1 &)=delete
void NextPos()
Definition: wrtww8.hxx:1541
virtual ~MSWordSections()
Definition: wrtw8sty.cxx:1042
std::unique_ptr< WW8_WrPlcPn > m_pPapPlc
Definition: wrtww8.hxx:498
SwNumRule * DuplicateNumRuleImpl(const SwNumRule *pRule)
In case of numbering restart.
Definition: wrtw8num.cxx:43
std::shared_ptr< WW8TableInfo > Pointer_t
sal_uInt16 char * pName
virtual ~WW8_WrPlcSubDoc()
Definition: wrtw8sty.cxx:2120
void OutputSectionNode(const SwSectionNode &)
Output SwSectionNode.
Definition: wrtw8nds.cxx:3229
sal_uLong m_nCurEnd
Definition: wrtww8.hxx:575
Style of a layout element.
Definition: frmfmt.hxx:58
#define SAL_MAX_INT32
const OutlinerParaObject * mpRichText
Definition: wrtww8.hxx:1251
OUString msOwner
Definition: wrtww8.hxx:1253
SwWW8AttrIter & operator=(const SwWW8AttrIter &)=delete
sal_Int32 GetNextPos(SwWW8AttrIter const *pAttrIter, const SwTextNode &rNode, sal_Int32 nCurrentPos)
Get the next position in the text node to output.
Definition: wrtw8nds.cxx:1891
void SplitRun(sal_Int32 nSplitEndPos)
Definition: wrtw8nds.cxx:1237
virtual void RestoreData()
Restore what was saved in SaveData().
Definition: wrtww8.cxx:1924
virtual ~MSWordAttrIter()
Definition: wrtw8nds.cxx:174
void WritePlcSed(WW8Export &rWrt) const
Definition: wrtw8sty.cxx:2028
void SetCurItemSet(const SfxItemSet *pS)
Setter for pISet.
Definition: wrtww8.hxx:731
tools::SvRef< SotStorage > xEscherStg
Definition: wrtww8.hxx:1007
const SwSectionFormat * pSectionFormat
Definition: wrtww8.hxx:175
std::map< sal_uInt16, const SfxPoolItem *, sw::util::ItemSort > PoolItems
STL container of SfxPoolItems (Attributes)
void BuildStylesTable()
Create the style table, called from the constructor.
Definition: wrtw8sty.cxx:280
static sal_uInt16 NumberOfColumns(const SwDoc &rDoc, const WW8_SepInfo &rInfo)
Number of columns of the provided WW8_SepInfo.
Definition: wrtw8sty.cxx:1069
std::vector< Frame >::iterator FrameIter
STL iterator for Frames.
std::unique_ptr< WW8_WrPlcSepx > pSepx
Sections/headers/footers.
Definition: wrtww8.hxx:998
void SubstituteBullet(OUString &rNumStr, rtl_TextEncoding &rChrSet, OUString &rFontName) const
Definition: wrtw8num.cxx:656
WW8_WrPlcField & operator=(const WW8_WrPlcField &)=delete
std::vector< WW8_CP > aCps
Definition: wrtww8.hxx:1217
SwWW8WrGrf(const SwWW8WrGrf &)=delete
MSWordExportBase & operator=(const MSWordExportBase &)=delete
void NearestAnnotationMark(sal_Int32 &rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly)
Find the nearest annotation mark from the current position.
Definition: wrtw8nds.cxx:2062
void UpdatePosition(SwWW8AttrIter *pAttrIter, sal_Int32 nCurrentPos)
Update the information for GetNextPos().
Definition: wrtw8nds.cxx:1908
WW8_WrPlcSepx(const WW8_WrPlcSepx &)=delete
For the output of sections.
Definition: wrtw8sty.cxx:78
virtual const SfxPoolItem * HasTextItem(sal_uInt16 nWhich) const override
Definition: wrtw8esh.cxx:1212
virtual void WriteNumbering()=0
Output the numbering table.
sal_uInt16 m_nUniqueList
current number for creating unique list names
Definition: wrtww8.hxx:484
sal_uInt16 mnScript
Definition: wrtww8.hxx:1508
FlyProcessingState OutFlys(sal_Int32 nSwPos)
Definition: wrtw8nds.cxx:660
void WriteDocx(DocxAttributeOutput *rAttrOutput) const
Definition: wrtw8sty.cxx:803
PlcDrawObj()
Definition: wrtww8.hxx:371
virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat)=0
Return value indicates if an inherited outline numbering is suppressed.
void CheckForFacinPg(const WW8Export &rWrt) const
Definition: wrtw8sty.cxx:1264
WW8_WrPct(WW8_FC nStartFc)
Definition: wrtww8.cxx:1330
bool IsParaRTL() const
Definition: wrtww8.hxx:1554
void WriteFkpPlcUsw()
Definition: wrtww8.cxx:2978
std::unique_ptr< WW8Dop > pDop
Document Properties.
Definition: wrtww8.hxx:995
~WW8_WrPlc1()
Definition: wrtww8.cxx:802
virtual void OutputTextNode(SwTextNode &)
Output SwTextNode.
Definition: wrtw8nds.cxx:2206
bool m_bFirstTOCNodeWithSection
Definition: wrtww8.hxx:497
sw::util::CharRuns maCharRuns
Definition: wrtww8.hxx:1504
void EndCommentOutput(std::u16string_view rName)
Definition: ww8atr.cxx:1938
void OutputContentNode(SwContentNode &)
Call the right (virtual) function according to the type of the item.
Definition: wrtw8nds.cxx:3540
std::unique_ptr< WW8_WrPlc0 > pTextPos
Definition: wrtww8.hxx:1220
virtual void ExportGrfBullet(const SwTextNode &rNd)=0
bool mbDocumentIsProtected
Definition: wrtww8.hxx:197
sal_uInt16 GetPos(const void *p) const
Definition: wrtww8.hxx:1301
std::vector< rtl_TextEncoding > aChrSetArr
Definition: wrtww8.hxx:1458
virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const override
Definition: wrtw8esh.cxx:865
void WriteGrfFromGrfNode(SvStream &rStrm, const SwGrfNode &rNd, const ww8::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:632
bool WriteText(WW8Export &rWrt)
Definition: wrtww8.cxx:4013
vector_type::size_type size_type
Definition: docary.hxx:228
static void WriteShort(SvStream &rStrm, sal_Int16 nVal)
Definition: wrtww8.hxx:960
virtual bool PreferPageBreakBefore() const =0
If saving page break is preferred as a paragraph attribute (yes) or as a special character (no)...
std::unique_ptr< SwFormat *[]> m_pFormatA
Slot <-> Character and paragraph style array (0 for list styles).
Definition: wrtww8.hxx:1573
int GetGrfIndex(const SvxBrushItem &rBrush)
Returns the index of a picture bullet, used in numberings.
Definition: wrtww8.cxx:1629
const ww8::Frame * m_pParentFrame
Definition: wrtww8.hxx:518
TextTypes
Definition: wrtww8.hxx:155
std::vector< const void * > aContent
Definition: wrtww8.hxx:1218
static sal_uInt8 GetNumId(sal_uInt16 eNumType)
Converts the SVX numbering type to MSONFC.
Definition: ww8atr.cxx:727
The writer class that gets called for the WW8 filter.
Definition: wrtww8.hxx:929
rtl_TextEncoding eNdChrSet
Definition: wrtww8.hxx:1462
const WW8_SepInfo * CurrentSectionInfo()
The most recent WW8_SepInfo.
Definition: wrtw8sty.cxx:1088
void AppendBookmarkEndWithCorrection(const OUString &rName)
Definition: wrtww8.cxx:1499
void ResultAdded()
Definition: wrtww8.hxx:1365
bool HasRefToAttr(const OUString &rName)
Find the reference.
Definition: ww8atr.cxx:934
const SwRedlineData * GetRunLevelRedline(sal_Int32 nPos)
Definition: wrtw8nds.cxx:1523
void MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight, const ww8::Frame &rFrameFormat)
Nasty swap for bidi if necessary.
Definition: wrtw8esh.cxx:581
void DoComboBox(css::uno::Reference< css::beans::XPropertySet > const &xPropSet)
SvxFrameDirection GetDefaultFrameDirection() const
Definition: wrtw8nds.cxx:1601
bool RefersToSameFrameAs(const Frame &rOther) const
Does this ww8::Frame refer to the same writer content as another.
void InsInt16(sal_Int16 n)
Definition: wrtww8.hxx:1152
virtual bool HeaderFooterWritten()
Definition: wrtw8sty.cxx:1050
virtual void OutputField(const SwField *pField, ww::eField eFieldType, const OUString &rFieldCmd, FieldFlags nMode=FieldFlags::All)=0
Write the field.
SwDoc & m_rDoc
Definition: wrtww8.hxx:574
ePLCFT
Definition: ww8scan.hxx:384
OUString msSimpleText
Definition: wrtww8.hxx:1252
void AppendSep(WW8_CP nStartCp, const SwPageDesc *pPd, const SwSectionFormat *pSectionFormat, sal_uLong nLnNumRestartNo)
Definition: wrtw8sty.cxx:1106
virtual bool AddSectionBreaksForTOX() const override
Determines the Section Breaks are to be added for TOX Section.
Definition: wrtww8.hxx:1020
std::vector< sal_uLong > m_aChapterFieldLocs
Definition: wrtww8.hxx:453
std::vector< OString > m_aStyleIds
We need to build style id's for DOCX export; ideally we should roundtrip that, but this is good enoug...
Definition: wrtww8.hxx:1579
sal_uLong nLnNumRestartNo
Definition: wrtww8.hxx:177
virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner=ww8::WW8TableNodeInfoInner::Pointer_t()) override
Definition: wrtww8.cxx:1860
DrawObjVector maDrawObjs
Definition: wrtww8.hxx:365
HdFtPlcDrawObj & operator=(const HdFtPlcDrawObj &)=delete
WW8_SepInfo(const SwPageDesc *pPD, const SwSectionFormat *pFormat, sal_uLong nLnRestart,::std::optional< sal_uInt16 > oPgRestart=std::nullopt, const SwNode *pNd=nullptr, bool bIsFirstPara=false)
Definition: wrtww8.hxx:181
SwWW8Writer & GetWriter() const
Definition: wrtww8.hxx:1179
sal_Int16 GetWordFirstLineOffset(const SwNumFormat &rFormat)
Definition: wrtw8num.cxx:150
wwFont(const OUString &rFamilyName, FontPitch ePitch, FontFamily eFamily, rtl_TextEncoding eChrSet)
Definition: wrtw8sty.cxx:723
MSWord_SdrAttrIter & operator=(const MSWord_SdrAttrIter &)=delete
static void SetFooterFlag(sal_uInt8 &rHeadFootFlags, const SwFormat &rFormat, sal_uInt8 nFlag)
Definition: wrtw8sty.cxx:1208
WW8_WrPlcTextBoxes(const WW8_WrPlcTextBoxes &)=delete
static void CorrectTabStopInSet(SfxItemSet &rSet, sal_Int32 nAbsLeft)
Definition: ww8atr.cxx:702
WW8OleMap m_aOleMap
Definition: wrtww8.hxx:476
bool m_bListStyles
If list styles are requested to be exported as well.
Definition: wrtww8.hxx:1575
virtual bool AddSectionBreaksForTOX() const =0
Determines the Section Breaks are to be added for TOX Section.
void WriteGenericPlc(WW8Export &rWrt, sal_uInt8 nTTyp, WW8_FC &rTextStt, sal_Int32 &rTextCnt, WW8_FC &rRefStt, sal_Int32 &rRefCnt) const
Definition: wrtw8sty.cxx:2353
virtual void SectionBreaksAndFrames(const SwTextNode &rNode) override
Definition: wrtww8.cxx:2729
void OutputSectionBreaks(const SfxItemSet *pSet, const SwNode &rNd, bool isCellOpen=false)
Start new section.
Definition: ww8atr.cxx:477
MSWordExportBase & m_rExport
Definition: wrtww8.hxx:1571
std::vector< std::unique_ptr< WW8_WrFkp > > m_Fkps
Definition: wrtww8.hxx:1314
bool WriteText(WW8Export &rWrt)
Definition: wrtw8esh.cxx:909
void InsUInt16(sal_uInt16 n)
Definition: wrtww8.hxx:1151
unsigned int m_nHdFtIndex
Definition: wrtww8.hxx:485
bool m_bBreakBefore
Definition: wrtww8.hxx:550
void Out_CellRangeBorders(const SvxBoxItem *pBox, sal_uInt8 nStart, sal_uInt8 nLimit)
Definition: ww8atr.cxx:4595
FontPitch
virtual void OutputGrfNode(const SwGrfNode &)=0
Output SwGrfNode.
static bool HasBorderItem(const SwFormat &rFormat)
Should we output borders?
Definition: wrtw8sty.cxx:1315
const SwRangeRedline * pCurRedline
Definition: wrtww8.hxx:1511
void SetHdFtPageRoot(const SwTextNode *pNd)
Top node of host page when in header/footer.
Definition: wrtww8.hxx:780
void InsUInt32(sal_uInt32 n)
Definition: wrtww8.hxx:1153
std::unordered_map< OUString, OUString > m_TOXMarkBookmarksByURL
Definition: wrtww8.hxx:493
HdFtPlcDrawObj * m_pHFSdrObjs
Definition: wrtww8.hxx:541
void PrepareStorage()
Definition: wrtww8.cxx:3643
tools::Long SwTwips
Definition: swtypes.hxx:49
void OutHeaderFooter(WW8Export &rWrt, bool bHeader, const SwFormat &rFormat, sal_uLong &rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode)
Definition: wrtw8sty.cxx:1218
IMarkVector m_rSortedAnnotationMarksStart
Definition: wrtww8.hxx:586
void SetCurPam(sal_uLong nStt, sal_uLong nEnd)
Definition: wrtww8.cxx:1875
bool m_bOrigShowChanges
Remember the original Show Changes mode.
Definition: wrtww8.hxx:488
void GetSortedBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen)
Definition: wrtw8nds.cxx:2125
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const =0
const NfKeywordTable & GetNfKeywordTable()
Definition: wrtww8.cxx:4463
sal_Int32 WW8_CP
Definition: ww8struc.hxx:153
static OString CreateStyleId(const OUString &rName)
create style id using only ASCII characters of the style name
Definition: wrtw8sty.cxx:321
SwWW8Writer * m_pWriter
Pointer to the writer.
Definition: wrtww8.hxx:1003
std::vector< std::shared_ptr< WW8_PdAttrDesc > > m_SectionAttributes
Definition: wrtww8.hxx:244
virtual ~WW8_WrPlcAnnotations() override
Definition: wrtw8sty.cxx:2202
virtual ErrCode ExportDocument_Impl() override
Format-dependent part of the actual export.
Definition: wrtww8.cxx:3450
void setCvBack(sal_uInt32 cvBack)
Definition: wrtww8.hxx:1647
WW8_WrPlcTextBoxes * m_pHFTextBxs
Definition: wrtww8.hxx:504
virtual MSWordSections & Sections() const override
Access to the sections/headers/footres.
Definition: wrtww8.cxx:3943
sal_uInt32 mnShapeId
Definition: wrtww8.hxx:344
void WriteHeaderFooterText(const SwFormat &rFormat, bool bHeader)
Write header/footer text.
Definition: wrtw8sty.cxx:2065
~WW8_WrPct()
Definition: wrtww8.cxx:1336
virtual bool CollapseScriptsforWordOk(sal_uInt16 nScript, sal_uInt16 nWhich) override
Guess the script (asian/western).
Definition: ww8atr.cxx:149
sal_uLong nOldEnd
Definition: wrtww8.hxx:435
virtual void OutputGrfNode(const SwGrfNode &) override
Output SwGrfNode.
Definition: wrtww8gr.cxx:74
DrawObj(const ww8::Frame &rContent, WW8_CP nCp, Point aParentPos, SvxFrameDirection nDir, unsigned int nHdFtIndex)
Definition: wrtww8.hxx:352
void GatherChapterFields()
Setup the chapter fields (maChapterFieldLocs).
Definition: ww8atr.cxx:399
void Out_SwFormatBox(const SvxBoxItem &rBox, bool bShadow)
is for all boxes except in tables.
Definition: ww8atr.cxx:4519
const SwTextNode & rNd
Definition: wrtww8.hxx:1502
void AppendSection(const SwPageDesc *pPd, const SwSectionFormat *pSectionFormat, sal_uLong nLnNumRestartNo, bool bIsFirstParagraph=false)
Definition: wrtw8sty.cxx:1096
void NeedsDocumentProtected(const WW8_SepInfo &rInfo)
Definition: wrtw8sty.cxx:1241
FontFamily
bool ContentContainsChapterField(const SwFormatContent &rContent) const
Definition: ww8atr.cxx:406
sal_uInt16 GetNumberingId(const SwNumRule &rNumRule)
Return the numeric id of the numbering rule.
Definition: wrtw8num.cxx:113
GraphicDetails(const ww8::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
Definition: wrtww8.hxx:1388
virtual const std::vector< sal_uInt32 > * GetShapeIdArr() const override
Definition: wrtw8esh.cxx:944
void Finish(WW8_CP nEndCp)
Definition: wrtww8.hxx:266
void OutSwFormatRefMark(const SwFormatRefMark &rAttr)
Definition: wrtw8nds.cxx:1230
sal_uInt16 BuildGetSlot(const SwFormat &rFormat)
Get slot number during building the style table.
Definition: wrtw8sty.cxx:181
OUString m_aMainStg
Definition: wrtww8.hxx:454
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
virtual void WriteHyperlinkData(const ::sw::mark::IFieldmark &rFieldmark) override
Definition: wrtww8.cxx:4327
virtual MSWordSections & Sections() const =0
Access to the sections/headers/footres.
SwWW8WrGrf(WW8Export &rW)
Definition: wrtww8.hxx:1424
unsigned int mnHdFtIndex
Definition: wrtww8.hxx:349
bool m_bIgnoreEmpty
Definition: wrtww8.hxx:1257
OUString BookmarkToWord(const OUString &rBookmark)
Definition: wrtw8nds.cxx:1213
sal_uLong nOldStart
Definition: wrtww8.hxx:435
void Append(const SdrObject &rObj, sal_uInt32 nShapeId)
Definition: wrtw8esh.cxx:928
void OutputStartNode(const SwStartNode &)
Output SwStartNode.
Definition: wrtww8.cxx:4415
IMarkVector m_rSortedBookmarksEnd
Definition: wrtww8.hxx:585
const SwPageDesc * m_pCurrentPageDesc
Definition: wrtww8.hxx:496
virtual ~WW8Export() override
Definition: wrtww8.cxx:3934
const SwPageDesc * pPageDesc
Definition: wrtww8.hxx:174
void Append(WW8_CP nCp, const void *pData)
Definition: wrtww8.cxx:813
std::unique_ptr< SwNumRuleTable > m_pUsedNumTable
Definition: wrtww8.hxx:459
bool HasFlysAt(sal_Int32 nSwPos) const
Definition: wrtw8nds.cxx:645
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const override
Definition: wrtw8nds.cxx:896
void Append(WW8_CP nCp, const SwFormatFootnote &rFootnote)
Definition: wrtw8sty.cxx:2124
SvStream & Strm() const
Definition: wrtww8.hxx:1180
const T & GetItem(TypedWhichId< T > nWhich) const
Definition: wrtww8.hxx:630
sal_uInt8 mnTyp
Definition: wrtww8.hxx:1464
sal_uInt32 m_cvFore
Definition: wrtww8.hxx:1639
sal_uInt16 m_nLastFormatId
Style of last TextNode in normal range.
Definition: wrtww8.hxx:483
virtual ErrCode Write(SwPaM &, const css::uno::Reference< css::embed::XStorage > &, const OUString *, SfxMedium *=nullptr) override
FlyProcessingState
enum to state the present state of the fly
Definition: wrtww8.hxx:164
WW8_FC nOldFc
Definition: wrtww8.hxx:284
unsigned char sal_uInt8
Make exporting a Writer Frame easy.
std::unique_ptr< SwWW8WrGrf > m_pGrf
Definition: wrtww8.hxx:535
bool IsDropCap(int nSwPos)
Definition: wrtw8nds.cxx:821
WW8Export(SwWW8Writer *pWriter, SwDoc &rDocument, std::shared_ptr< SwUnoCursor > &pCurrentPam, SwPaM *pOriginalPam, bool bDot)
Setup the exporter.
Definition: wrtww8.cxx:3922
sal_uInt16 m_aHeadingParagraphStyles[MAXLEVEL]
Definition: wrtww8.hxx:1572
sal_uInt16 GetHeadingParagraphStyleId(sal_uInt16 nLevel) const
Definition: wrtww8.hxx:1627
void GetStyleData(SwFormat *pFormat, bool &bFormatColl, sal_uInt16 &nBase, sal_uInt16 &nNext)
Return information about one style.
Definition: wrtw8sty.cxx:552
bool IncludeEndOfParaCRInRedlineProperties(sal_Int32 nPos) const
Definition: wrtw8nds.cxx:1442
void WriteSpecialText(sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp)
Set the pCurPam appropriately and call WriteText().
Definition: wrtww8.cxx:1797
virtual void Write(Writer &rWrt) override
Definition: wrtww8.cxx:1649
bool IsWatermarkFrame()
Definition: wrtw8nds.cxx:614
void OutSprmBytes(sal_uInt8 *pBytes, sal_uInt16 nSiz)
Definition: wrtww8.hxx:1103
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:254
sal_uInt16 nScript
Definition: wrtww8.hxx:1463
bool IsTextAttr(sal_Int32 nSwPos)
Definition: wrtw8esh.cxx:1196
std::vector< EECharAttrib > aTextAtrArr
Definition: wrtww8.hxx:1456
Point maParentPos
Definition: wrtww8.hxx:346
virtual void AppendAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen)=0
sal_uLong mnPos
Definition: wrtww8.hxx:1384
sal_uInt16 nResults
Definition: wrtww8.hxx:1356
bool bLoadAllFonts
If true, all fonts are loaded before processing the document.
Definition: wrtww8.hxx:337
virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) override
Return value indicates if an inherited outline numbering is suppressed.
Definition: ww8atr.cxx:771
SvStream * pDataStrm
Streams for WW97 Export.
Definition: wrtww8.hxx:992
std::unique_ptr< WW8_WrtFactoids > m_pFactoids
Definition: wrtww8.hxx:503
bool WriteKFText(WW8Export &rWrt)
Definition: wrtw8sty.cxx:1961
MSWord_SdrAttrIter(const MSWord_SdrAttrIter &)=delete
virtual void OutputLinkedOLE(const OUString &) override
Definition: wrtww8gr.cxx:319
virtual ~WW8_WrPlcSepx() override
Definition: wrtw8sty.cxx:1046
SwWW8Writer(const OUString &rFltName, const OUString &rBaseURL)
Definition: wrtww8.cxx:3948
MSWordAttrIter & operator=(const MSWordAttrIter &)=delete
SvStream & WriteInt16(sal_Int16 nInt16)
std::pair< OUString, sal_uLong > aBookmarkPair
Definition: wrtww8.hxx:409
sw::util::CharRuns::const_iterator maCharRunIter
Definition: wrtww8.hxx:1505
bool m_bHideTabLeaderAndPageNumbers
Definition: wrtww8.hxx:568
void WriteFootnoteBegin(const SwFormatFootnote &rFootnote, ww::bytes *pO=nullptr)
Definition: ww8atr.cxx:3402
virtual void SaveData(sal_uLong nStt, sal_uLong nEnd) override
Remember some of the members so that we can recurse in WriteText().
Definition: wrtww8.cxx:1947
virtual void AppendBookmark(const OUString &rName) override
Definition: wrtww8.cxx:1493
sal_uInt8 m_nTextTyp
Definition: wrtww8.hxx:547
void NumberingDefinitions()
Write static data of SwNumRule - LSTF.
Definition: wrtw8num.cxx:201
WW8_Annotation(const SwPostItField *pPostIt, WW8_CP nRangeStart, WW8_CP nRangeEnd)
Definition: wrtw8sty.cxx:2130
ww8::Frames m_aFrames
Definition: wrtww8.hxx:495
void WriteSdrTextObj(const SdrTextObj &rObj, sal_uInt8 nTyp)
Definition: wrtw8esh.cxx:1315
void IncrementHdFtIndex()
Definition: wrtww8.hxx:1133
bool m_bOutFlyFrameAttrs
Definition: wrtww8.hxx:552
bool NearestBookmark(sal_Int32 &rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly)
Find the nearest bookmark from the current position.
Definition: wrtw8nds.cxx:2030
sal_uInt16 GetId(const SvxFontItem &rFont)
Definition: wrtw8sty.cxx:899
FIB - the File Information Block.
Definition: ww8scan.hxx:1103
std::shared_ptr< WW8TableNodeInfoInner > Pointer_t
sal_uInt16 ResultCount() const
Definition: wrtww8.hxx:1366
bool TestOleNeedsGraphic(const SwAttrSet &rSet, tools::SvRef< SotStorage > const &xOleStg, const tools::SvRef< SotStorage > &xObjStg, OUString const &rStorageName, SwOLENode *pOLENd)
Definition: wrtww8gr.cxx:85
void WriteSepx(SvStream &rStrm) const
Definition: wrtw8sty.cxx:2012
std::unique_ptr< WW8_WrPlc0 > pTextPos
Definition: wrtww8.hxx:247
sal_uInt16 GetSlot(const SwFormat *pFormat) const
Get id of the style (rFormat).
Definition: wrtw8sty.cxx:172
bool m_bInWriteTOX
Definition: wrtww8.hxx:560
virtual void AppendSection(const SwPageDesc *pPageDesc, const SwSectionFormat *pFormat, sal_uLong nLnNum) override
Definition: wrtw8nds.cxx:3369
void AppendFkpEntry(WW8_FC nEndFc, short nVarLen=0, const sal_uInt8 *pSprms=nullptr)
Definition: wrtww8.cxx:979
sal_uInt16 Count() const
Definition: wrtww8.hxx:1300
SfxMedium * mpMedium
Definition: wrtww8.hxx:937
sal_uInt16 OverrideNumRule(SwNumRule const &rExistingRule, OUString const &rListId, SwNumRule const &rAbstractRule)
Create a overriding numbering definition (if it does not yet exist)
Definition: wrtw8num.cxx:84
bool GetBookmarks(const SwTextNode &rNd, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector &rArr)
Definition: wrtw8nds.cxx:1920
std::vector< WW8_CP > aCps
Definition: wrtww8.hxx:243
OUString m_sInitials
Definition: wrtww8.hxx:1254
static void InsUInt16(ww::bytes &rO, sal_uInt16 n)
Definition: wrtww8.cxx:1706
bool GetAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector &rArr)
Definition: wrtw8nds.cxx:1968
void OutAttr(sal_Int32 nSwPos, bool bWriteCombinedChars, bool bPostponeSingleUse=false)
Definition: wrtw8nds.cxx:398
SwWW8WrGrf & operator=(const SwWW8WrGrf &)=delete
WW8_WrPlcPn & operator=(const WW8_WrPlcPn &)=delete
WW8_WrPlcFootnoteEdn(sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1241
void InitFontTable(const SwDoc &rDoc)
rDoc used only to get the initial standard font(s) in use.
Definition: wrtw8sty.cxx:860
void RestoreMacroCmds()
Definition: wrtww8.cxx:4045
void StartCommentOutput(std::u16string_view rName)
Definition: ww8atr.cxx:1932
sal_uInt16 m_nUsedSlots
Definition: wrtww8.hxx:1574
void Write()
Definition: wrtww8gr.cxx:857
WW8_WrPlcField * CurrentFieldPlc() const
Fields.
Definition: ww8atr.cxx:1755
OUString msAltNm
Definition: wrtww8.hxx:302
SwPaM * m_pOrigPam
Definition: wrtww8.hxx:577
static void InsAsString8(ww::bytes &O, std::u16string_view rStr, rtl_TextEncoding eCodeSet)
Definition: wrtww8.cxx:1731
std::unique_ptr< sal_uInt8[]> pData
Definition: wrtww8.hxx:1334
void Write(SvStream &rStrm)
Definition: wrtww8.cxx:838
sal_uInt16 mnHei
Definition: wrtww8.hxx:1386
void OutOverrideListTab()
Definition: wrtw8num.cxx:603
void ExportPoolItemsToCHP(ww8::PoolItems &rItems, sal_uInt16 nScript, const SvxFontItem *pFont, bool bWriteCombChars=false)
Export the pool items to attributes (through an attribute output class).
Definition: ww8atr.cxx:208
virtual const SfxPoolItem * HasTextItem(sal_uInt16 nWhich) const =0
SvStream & Strm()
Definition: writer.cxx:215
virtual ErrCode Write(SwPaM &, SfxMedium &, const OUString *) override
Definition: wrtww8.cxx:3838
bool OutputFollowPageDesc(const SfxItemSet *pSet, const SwTextNode *pNd)
The return value indicates, if a follow page desc is written.
Definition: ww8atr.cxx:626
std::vector< const EECharAttrib * > aChrTextAtrArr
Definition: wrtww8.hxx:1457
bool m_bFontSizeWritten
Is font size written already as part of the current character properties?
Definition: wrtww8.hxx:571
virtual bool ignoreAttributeForStyleDefaults(sal_uInt16) const
Used to filter out attributes that can be e.g. written to .doc but not to .docx.
Definition: wrtww8.hxx:689
bool InitStd97CodecUpdateMedium(::msfilter::MSCodec_Std97 &rCodec)
Definition: wrtww8.cxx:3403
void BulletDefinitions()
Write the numbering picture bullets.
Definition: wrtww8.cxx:1562
sal_uInt16 nStructSiz
Definition: wrtww8.hxx:1336
MSWordAttrIter * pOld
Definition: wrtww8.hxx:1437
sal_Int32 nCurrentSwPos
Definition: wrtww8.hxx:1512
void Insert(const ww8::Frame &rFly)
Definition: wrtww8gr.cxx:469
WW8Export & operator=(const WW8Export &)=delete
bool HasRefToFootOrEndnote(const bool isEndNote, const sal_uInt16 nSeqNo)
Definition: ww8atr.cxx:943
const SwFormat * m_pCurrentStyle
Definition: wrtww8.hxx:538
void CreateEscher()
Definition: wrtw8esh.cxx:1455
Base class for WW8Export and DocxExport.
Definition: wrtww8.hxx:449
RndStdIds
sal_Int32 mnThick
Definition: wrtww8.hxx:347
sal_Int32 SearchNext(sal_Int32 nStartPos)
Definition: wrtw8nds.cxx:258
void StoreDoc1()
Definition: wrtww8.cxx:3088
SwRedlineTable::size_type nCurRedlinePos
Definition: wrtww8.hxx:1513
bool IsExportableAttr(sal_Int32 nSwPos) const
Definition: wrtw8nds.cxx:797
SvxFrameDirection GetCurrentPageDirection() const
Right to left?
Definition: wrtw8nds.cxx:1593
const SwFormatDrop & GetSwFormatDrop() const
Definition: wrtww8.hxx:1558
Ends a section of nodes in the document model.
Definition: node.hxx:342
static OUString GetBookmarkName(sal_uInt16 nTyp, const OUString *pName, sal_uInt16 nSeqNo)
Find the bookmark name.
Definition: ww8atr.cxx:952
const SfxItemSet * m_pISet
Definition: wrtww8.hxx:456
o3tl::sorted_vector< sal_Int32 > SwSoftPageBreakList
Definition: wrtww8.hxx:132
bool mbParaIsRTL
Definition: wrtww8.hxx:1515
const SwTextNode & GetNode() const
Definition: wrtww8.hxx:1565
std::vector< CharRunEntry > CharRuns
Definition: msfilter.hxx:378
void WriteOutliner(const OutlinerParaObject &rOutliner, sal_uInt8 nTyp)
Definition: wrtw8esh.cxx:1343
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const override
Definition: wrtw8esh.cxx:1229
rtl_TextEncoding GetNextCharSet() const
Definition: wrtw8esh.cxx:1042
void SetItemsThatDifferFromStandard(bool bCharAttr, SfxItemSet &rSet)
Definition: wrtw8esh.cxx:1246
ww8::Frame maFly
Definition: wrtww8.hxx:1383
static void Out_SwFormatTableBox(ww::bytes &rO, const SvxBoxItem *rBox)
FormatBox2() is for TC structures in tables.
Definition: ww8atr.cxx:4574
const SfxPoolItem * HasItem(sal_uInt16 nWhich) const
Definition: wrtww8.cxx:758
Handles export of smart tags.
Definition: wrtww8.cxx:326
std::vector< DrawObj * > DrawObjPointerVector
Definition: wrtww8.hxx:360
MSWordAttrIter(const MSWordAttrIter &)=delete
virtual void WriteHyperlinkData(const ::sw::mark::IFieldmark &rFieldmark)=0
static bool NoPageBreakSection(const SfxItemSet *pSet)
Definition: wrtw8nds.cxx:3195
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps...
Definition: paratr.hxx:62
std::map< const OUString, std::pair< WW8_CP, bool > > m_aRangeStartPositions
Definition: wrtww8.hxx:1271
void AppendPc(WW8_FC nStartFc)
Definition: wrtww8.cxx:1341
virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const =0
const SwPageDesc * pOldPageDesc
Definition: wrtww8.hxx:437
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:4022
bool operator==(const GraphicDetails &rIn) const
Definition: wrtww8.hxx:1392
virtual void DoFormText(const SwInputField *pField) override
Definition: wrtw8esh.cxx:473
std::vector< ::sw::mark::IMark * > IMarkVector
Used to split the runs according to the bookmarks start and ends.
Definition: wrtww8.hxx:583
virtual void AppendBookmark(const OUString &rName)=0
PlcDrawObj & operator=(const PlcDrawObj &)=delete
SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const
Definition: ww8atr.cxx:4655
std::unordered_map< SwTOXMark const *, OUString > m_TOXMarkBookmarksByTOXMark
Definition: wrtww8.hxx:494
WW8_WrtBookmarks * m_pBkmks
Definition: wrtww8.hxx:471
virtual ~MSWordExportBase()
Definition: wrtww8.cxx:3908
MSWordSections(const MSWordSections &)
WW8_WrPlcPn(const WW8_WrPlcPn &)=delete
virtual void RestoreData() override
Restore what was saved in SaveData().
Definition: wrtww8.cxx:1965
sal_Int32 WW8_FC
Definition: ww8struc.hxx:152
bool IsTextAttr(sal_Int32 nSwPos) const
Definition: wrtw8nds.cxx:772
virtual void WriteFormData(const ::sw::mark::IFieldmark &rFieldmark)=0
Write the data of the form field.
int OutAttrWithRange(const SwTextNode &rNode, sal_Int32 nPos)
Definition: wrtw8nds.cxx:1341
sal_uInt8 maWW8_FFN[6]
Definition: wrtww8.hxx:300
void WriteGrfForBullet(SvStream &rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:744
The class MSWordAttrIter is a helper class to build the Fkp.chpx.
Definition: wrtww8.hxx:1434
sal_uInt16 mnIdx
Definition: wrtww8.hxx:1409
static void WriteLong(SvStream &rStrm, sal_Int32 nVal)
Definition: wrtww8.hxx:963
static void FillCount(SvStream &rStrm, sal_uLong nCount)
Definition: wrtww8.cxx:931
ww8::Frame maContent
Definition: wrtww8.hxx:345
std::unique_ptr< WW8_WrMagicTable > m_pMagicTable
Definition: wrtww8.hxx:531
bool IsInTable() const
Return whether currently exported node is in table.
Definition: wrtww8.cxx:2954
bool NeedTextNodeSplit(const SwTextNode &rNd, SwSoftPageBreakList &pList) const
Definition: wrtw8nds.cxx:2176
std::stack< MSWordSaveData > m_aSaveData
Stack to remember the nesting (see MSWordSaveData for more)
Definition: wrtww8.hxx:580
virtual void WriteChar(sal_Unicode c)=0
void NextPara(sal_Int32 nPar)
Definition: wrtw8esh.cxx:1022
virtual void AppendSection(const SwPageDesc *pPageDesc, const SwSectionFormat *pFormat, sal_uLong nLnNum)=0
virtual void WriteFormData(const ::sw::mark::IFieldmark &rFieldmark) override
Write the data of the form field.
Definition: wrtww8.cxx:4082
WW8_WrtRedlineAuthor * m_pRedlAuthors
Definition: wrtww8.hxx:472
std::unique_ptr< WW8_WrPlcPn > m_pChpPlc
Definition: wrtww8.hxx:499
wwFontHelper m_aFontHelper
Definition: wrtww8.hxx:452
SvxFrameDirection TrueFrameDirection(const SwFrameFormat &rFlyFormat) const
Right to left?
Definition: wrtw8nds.cxx:1639
IMarkVector m_rSortedBookmarksStart
Definition: wrtww8.hxx:584
static void InsAsString16(ww::bytes &rO, const OUString &rStr)
Definition: wrtww8.cxx:1724
std::vector< std::unique_ptr< WW8_WrPc > > m_Pcts
Definition: wrtww8.hxx:283
virtual void PrepareNewPageDesc(const SfxItemSet *pSet, const SwNode &rNd, const SwFormatPageDesc *pNewPgDescFormat, const SwPageDesc *pNewPgDesc, bool bExtraPageBreak=false)=0
std::unique_ptr< SvxBrushItem > getBackground()
Get background color of the document, if there is one.
Definition: wrtww8.cxx:1505
void CollectOutlineBookmarks(const SwDoc &rDoc)
Definition: wrtww8.cxx:3248
void WriteEscher()
Definition: wrtw8esh.cxx:1468
std::vector< const Graphic * > m_vecBulletPic
Vector to record all the graphics of bullets.
Definition: wrtww8.hxx:913
std::vector< aBookmarkPair > m_aImplicitBookmarks
Definition: wrtww8.hxx:492
std::vector< Frame > Frames
STL container of Frames.
static const SwSectionFormat * GetSectionFormat(const SwNode &rNd)
Format of the section.
Definition: ww8atr.cxx:641
bool m_bDot
Template or document.
Definition: wrtww8.hxx:1000
void AbstractNumberingDefinitions()
Write all Levels for all SwNumRules - LVLF.
Definition: wrtw8num.cxx:397
bool IsAnchorLinkedToThisNode(sal_uLong nNodePos)
Definition: wrtw8nds.cxx:634
static bool TransBrush(const Color &rCol, WW8_SHD &rShd)
TransBrush converts SW-Brushes to WW.
Definition: ww8atr.cxx:1584
const SwNode * pPDNd
Definition: wrtww8.hxx:176
std::unique_ptr< MSWordStyles > m_pStyles
Definition: wrtww8.hxx:501
std::unique_ptr< WW8_WrPlcFootnoteEdn > pEdn
Endnotes - structure to remember them, and output.
Definition: wrtww8.hxx:997
std::unique_ptr< WW8_WrPlcFootnoteEdn > pFootnote
Footnotes - structure to remember them, and output.
Definition: wrtww8.hxx:996
virtual ErrCode WriteStorage() override
Definition: wrtww8.cxx:3701
ErrCode ExportDocument(bool bWriteAll)
The main function to export the document.
Definition: wrtww8.cxx:3315
std::map< OUString, size_t > m_Lists
list-id -> abstractnumdef index
Definition: wrtww8.hxx:463
bool RequiresImplicitBookmark()
Definition: wrtw8nds.cxx:840
Base class of the Writer document model elements.
Definition: node.hxx:80
void NumberingLevel(SwNumRule const &rRule, sal_uInt8 nLvl)
Write one numbering level.
Definition: wrtw8num.cxx:424
void setCvFore(sal_uInt32 cvFore)
Definition: wrtww8.hxx:1646
std::unique_ptr< WW8AttributeOutput > m_pAttrOutput
Converting attributes to stream data.
Definition: wrtww8.hxx:1004