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 {
169 };
170 
172 {
175  const SwNode* pPDNd;
177  ::std::optional<sal_uInt16> oPgRestartNo;
179 
180  WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFormat* pFormat,
181  sal_uLong nLnRestart, ::std::optional<sal_uInt16> oPgRestart = std::nullopt,
182  const SwNode* pNd = nullptr, bool bIsFirstPara = false )
183  : pPageDesc( pPD ), pSectionFormat( pFormat ), pPDNd( pNd ),
184  nLnNumRestartNo( nLnRestart ), oPgRestartNo( oPgRestart ),
185  bIsFirstParagraph( bIsFirstPara )
186  {}
187 
188  bool IsProtected() const;
189 };
190 
192 // Plc for PageDescs -> Sepx ( Section Extensions )
194 {
195 protected:
197  std::vector<WW8_SepInfo> aSects;
198 
199  void CheckForFacinPg( const WW8Export& rWrt ) const;
200  void NeedsDocumentProtected(const WW8_SepInfo &rInfo);
201 
202  //No copy, no assign
203  MSWordSections( const MSWordSections& );
205 public:
206  explicit MSWordSections( MSWordExportBase& rExport );
207  virtual ~MSWordSections();
208 
209  virtual bool HeaderFooterWritten();
210 
211  void AppendSection( const SwPageDesc* pPd,
212  const SwSectionFormat* pSectionFormat,
213  sal_uLong nLnNumRestartNo,
214  bool bIsFirstParagraph = false );
215  void AppendSection( const SwFormatPageDesc& rPd,
216  const SwNode& rNd,
217  const SwSectionFormat* pSectionFormat,
218  sal_uLong nLnNumRestartNo );
219 
221  sal_uInt16 CurrentNumberOfColumns( const SwDoc &rDoc ) const;
222 
224  static sal_uInt16 NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo& rInfo );
225 
227 
230 
231  static void SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat,
232  sal_uInt8 nFlag );
233  static void SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat,
234  sal_uInt8 nFlag );
235 
237  static bool HasBorderItem( const SwFormat& rFormat );
238 };
239 
241 {
242  std::vector<WW8_CP> aCps;
243  std::vector< std::shared_ptr<WW8_PdAttrDesc> > m_SectionAttributes;
244  // hack to prevent adding sections in endnotes
246  std::unique_ptr<WW8_WrPlc0> pTextPos; // Position of the headers/footers
247 
248  WW8_WrPlcSepx( const WW8_WrPlcSepx& ) = delete;
249  WW8_WrPlcSepx& operator=( const WW8_WrPlcSepx& ) = delete;
250 
251 public:
252  explicit WW8_WrPlcSepx( MSWordExportBase& rExport );
253  virtual ~WW8_WrPlcSepx() override;
254 
255  virtual bool HeaderFooterWritten() override; // override
256 
257  void AppendSep( WW8_CP nStartCp,
258  const SwPageDesc* pPd,
259  const SwSectionFormat* pSectionFormat,
260  sal_uLong nLnNumRestartNo );
261  void AppendSep( WW8_CP nStartCp, const SwFormatPageDesc& rPd,
262  const SwNode& rNd,
263  const SwSectionFormat* pSectionFormat,
264  sal_uLong nLnNumRestartNo );
265  void Finish( WW8_CP nEndCp ) { aCps.push_back( nEndCp ); }
266 
267  bool WriteKFText( WW8Export& rWrt );
268  void WriteSepx( SvStream& rStrm ) const;
269  void WritePlcSed( WW8Export& rWrt ) const;
270  void WritePlcHdd( WW8Export& rWrt ) const;
271 
272 private:
273  void WriteFootnoteEndText( WW8Export& rWrt, sal_uLong nCpStt );
274 public:
275  void OutHeaderFooter(WW8Export& rWrt, bool bHeader,
276  const SwFormat& rFormat, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode);
277 };
278 
279 // class WW8_WrPct to construct the piece table
281 {
282  std::vector<std::unique_ptr<WW8_WrPc>> m_Pcts;
284 public:
285  explicit WW8_WrPct(WW8_FC nStartFc);
286  ~WW8_WrPct();
287  void AppendPc(WW8_FC nStartFc);
288  void WritePc( WW8Export& rWrt );
289  void SetParaBreak();
290  WW8_CP Fc2Cp( sal_uLong nFc ) const;
291 };
292 
294 class wwFont
295 {
296 //In some future land the stream could be converted to a nice stream interface
297 //and we could have harmony
298 private:
300  OUString msFamilyNm;
301  OUString msAltNm;
302  bool mbAlt;
305  rtl_TextEncoding meChrSet;
306 public:
307  wwFont( const OUString &rFamilyName, FontPitch ePitch, FontFamily eFamily,
308  rtl_TextEncoding eChrSet);
309  void Write( SvStream *pTableStram ) const;
310  void WriteDocx( DocxAttributeOutput* rAttrOutput ) const;
311  void WriteRtf( const RtfAttributeOutput* rAttrOutput ) const;
312  OUString const & GetFamilyName() const { return msFamilyNm; }
313  friend bool operator < (const wwFont &r1, const wwFont &r2);
314 };
315 
317 {
318 private:
320  std::map<wwFont, sal_uInt16> maFonts;
321 
323  std::vector< const wwFont* > AsVector() const;
324 
325 public:
328  void InitFontTable(const SwDoc& rDoc);
329  sal_uInt16 GetId(const SvxFontItem& rFont);
330  sal_uInt16 GetId(const wwFont& rFont);
331  void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib );
332  void WriteFontTable( DocxAttributeOutput& rAttrOutput );
333  void WriteFontTable( const RtfAttributeOutput& rAttrOutput );
334 
336  bool bLoadAllFonts: 1;
337 };
338 
339 class DrawObj
340 {
341 public:
342  WW8_CP mnCp; // CP-Pos of references
343  sal_uInt32 mnShapeId; // ShapeId for the SwFrameFormats
344  ww8::Frame maContent; // the frame itself
345  Point maParentPos; // Points
346  sal_Int32 mnThick; // Border Thicknesses
347  SvxFrameDirection mnDirection; // If BiDi or not
348  unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent
349  // msword hd/ft
350 
351  DrawObj(const ww8::Frame &rContent, WW8_CP nCp, Point aParentPos, SvxFrameDirection nDir,
352  unsigned int nHdFtIndex)
353  : mnCp(nCp), mnShapeId(0), maContent(rContent), maParentPos(aParentPos),
354  mnThick(0), mnDirection(nDir), mnHdFtIndex(nHdFtIndex) {}
355  void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick);
356 };
357 
358 typedef std::vector<DrawObj> DrawObjVector;
359 typedef std::vector<DrawObj *> DrawObjPointerVector;
360 
361 class PlcDrawObj // PC for DrawObjects and Text-/OLE-/GRF-Boxes
362 {
363 private:
364  DrawObjVector maDrawObjs; // vector of drawobjs
365 protected:
366  virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
367  sal_uInt32 nLen) const = 0;
368  virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const = 0;
369 public:
371  void WritePlc( WW8Export& rWrt ) const;
372  bool Append( WW8Export const &, WW8_CP nCp, const ww8::Frame& rFormat,
373  const Point& rNdTopLeft );
374  int size() { return maDrawObjs.size(); };
376  virtual ~PlcDrawObj();
377 private:
378  PlcDrawObj(const PlcDrawObj&) = delete;
379  PlcDrawObj& operator=(const PlcDrawObj&) = delete;
380 };
381 
383 {
384 public:
386 private:
387  virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
388  sal_uInt32 nLen) const override;
389  virtual WW8_CP GetCpOffset(const WW8Fib &) const override;
390 private:
391  MainTextPlcDrawObj(const MainTextPlcDrawObj&) = delete;
393 };
394 
396 {
397 public:
399 private:
400  virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
401  sal_uInt32 nLen) const override;
402  virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const override;
403 private:
404  HdFtPlcDrawObj(const HdFtPlcDrawObj&) = delete;
405  HdFtPlcDrawObj& operator=(const HdFtPlcDrawObj&) = delete;
406 };
407 
408 typedef std::pair<OUString, sal_uLong> aBookmarkPair;
409 
411 {
412  public:
413  virtual void Write(Writer &rWrt) override;
414 };
415 
428 {
431  std::unique_ptr<ww::bytes> pOOld;
432  std::shared_ptr<SwUnoCursor> pOldPam;
437 
438  bool bOldWriteAll : 1;
439  bool bOldOutTable : 1;
441  bool bOldStartTOX : 1;
442  bool bOldInWriteTOX : 1;
443  // m_bOutPageDescs does not have to be saved in MSWordExportBase::SaveData
444  // since it is only modified when outputting special texts.
445 };
446 
449 {
450 public:
452  std::vector<sal_uLong> m_aChapterFieldLocs;
453  OUString m_aMainStg;
454  std::vector<const SwTOXType*> m_aTOXArr;
455  const SfxItemSet* m_pISet; // for double attributes
457  WW8_WrPct* m_pPiece; // Pointer to Piece-Table
458  std::unique_ptr<SwNumRuleTable> m_pUsedNumTable; // all used NumRules
460  std::map<size_t, std::pair<size_t, size_t>> m_OverridingNums;
462  std::map<OUString, size_t> m_Lists;
463 
466  std::map < size_t, std::map<size_t, size_t> > m_ListLevelOverrides;
467 
469  std::stack< sal_Int32 > m_aCurrentCharPropStarts;
472  std::shared_ptr<NfKeywordTable> m_pKeyMap;
473  std::unique_ptr<SvxMSExportOLEObjects> m_pOLEExp;
474  std::unique_ptr<SwMSConvertControls> m_pOCXExp;
475  WW8OleMap m_aOleMap; // To remember all already exported ole objects
477 
478  sal_uInt16 m_nCharFormatStart;
479  sal_uInt16 m_nFormatCollStart;
480  sal_uInt16 m_nStyleBeforeFly;
481  sal_uInt16 m_nLastFormatId;
483  sal_uInt16 m_nUniqueList;
484  unsigned int m_nHdFtIndex;
485 
488 
489 public:
490  /* implicit bookmark vector containing pairs of node indexes and bookmark names */
491  std::vector<aBookmarkPair> m_aImplicitBookmarks;
492  ww8::Frames m_aFrames; // The floating frames in this document
495  std::unique_ptr<WW8_WrPlcPn> m_pPapPlc;
496  std::unique_ptr<WW8_WrPlcPn> m_pChpPlc;
498  std::unique_ptr<MSWordStyles> m_pStyles;
500  std::unique_ptr<WW8_WrtFactoids> m_pFactoids;
502 
503  struct LinkedTextboxInfo //help analyze textbox flow links
504  {
505  sal_Int32 nId;
506  sal_Int32 nSeq;
507  OUString sNextChain;
508  OUString sPrevChain;
509  LinkedTextboxInfo(): nId(0), nSeq(0) {}
510  };
511  std::map<OUString,LinkedTextboxInfo> m_aLinkedTextboxesHelper;
514 
515  const ww8::Frame *m_pParentFrame; // If set we are exporting content inside
516  // a frame, e.g. a graphic node
517 
518  Point* m_pFlyOffset; // for adjusting of character-bound Fly in the Writer,
519  RndStdIds m_eNewAnchorType; // that is paragraph-bound in the WW.
520 
521  std::unique_ptr<WW8_WrPlcField> m_pFieldMain; // fields in MainText
522  std::unique_ptr<WW8_WrPlcField> m_pFieldHdFt; // fields in Header/Footer
523  std::unique_ptr<WW8_WrPlcField> m_pFieldFootnote; // fields in FootNotes
524  std::unique_ptr<WW8_WrPlcField> m_pFieldEdn; // fields in EndNotes
525  std::unique_ptr<WW8_WrPlcField> m_pFieldAtn; // fields in Annotations
526  std::unique_ptr<WW8_WrPlcField> m_pFieldTextBxs; // fields in textboxes
527  std::unique_ptr<WW8_WrPlcField> m_pFieldHFTextBxs; // fields in header/footer textboxes
528  std::unique_ptr<WW8_WrMagicTable> m_pMagicTable; // keeps track of table cell positions, and
529  // marks those that contain graphics,
530  // which is required to make word display
531  // graphics inside tables
532  std::unique_ptr<SwWW8WrGrf> m_pGrf;
533  const SwAttrSet* m_pStyAttr; // StyleAttr for Tabs
534  const sw::BroadcastingModify* m_pOutFormatNode; // write Format or Node
535  const SwFormat *m_pCurrentStyle; // iff bStyDef=true, then this store the current style
536 
537  MainTextPlcDrawObj *m_pSdrObjs; // Draw-/Fly-Objects
538  HdFtPlcDrawObj *m_pHFSdrObjs; // Draw-/Fly-Objects in header or footer
539 
540  SwEscherEx* m_pEscher; // escher export class
541  // #i43447# - removed
542 // SwTwips nFlyWidth, nFlyHeight; // for adaptation of graphics
543 
545 
546  bool m_bStyDef : 1; // should Style be written?
547  bool m_bBreakBefore : 1; // Breaks are being written 2 times
548  bool m_bOutKF : 1; // Header/Footer texts are being written
549  bool m_bOutFlyFrameAttrs : 1; // Frame-attr of Flys are being written
550  bool m_bOutPageDescs : 1;
551  bool m_bOutFirstPage : 1; // write Attrset of FirstPageDesc
552  bool m_bOutTable : 1; // table is being written
553  // ( is reset e.g. for Flys in a table )
554  bool m_bOutGrf : 1; // graphics are being written
555  bool m_bInWriteEscher : 1; // in write textboxes
556  bool m_bStartTOX : 1; // true: a TOX is started
557  bool m_bInWriteTOX : 1; // true: all content are in a TOX
558  bool m_bFootnoteAtTextEnd : 1; // true: all FTN at Textend
559  bool m_bEndAtTextEnd : 1; // true: all END at Textend
560  bool m_bHasHdr : 1;
561  bool m_bHasFtr : 1;
562  bool m_bSubstituteBullets : 1; // true: SubstituteBullet() gets called
563  bool m_bTabInTOC : 1; //true for TOC field flag 'w'
564 
565  bool m_bHideTabLeaderAndPageNumbers : 1 ; // true: the 'z' field of TOC is set.
569  bool m_bAddFootnoteTab; // only one aesthetic spacing tab per footnote
570 
573  std::shared_ptr<SwUnoCursor> & m_pCurPam;
575 
577  std::stack< MSWordSaveData > m_aSaveData;
578 
580  typedef std::vector< ::sw::mark::IMark* > IMarkVector;
585 
586 public:
588  ErrCode ExportDocument( bool bWriteAll );
589 
591  void WriteText();
592 
594  bool IsInTable() const;
595 
599  void WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp );
600 
602  void ExportPoolItemsToCHP( ww8::PoolItems &rItems, sal_uInt16 nScript, const SvxFontItem *pFont, bool bWriteCombChars = false );
603 
605  sal_uInt16 GetNumberingId( const SwNumRule& rNumRule );
606 
608  sal_uInt16 GetId( const SwTextFormatColl& rColl ) const;
609 
611  sal_uInt16 GetId( const SwCharFormat* pFormat ) const;
612 
613  sal_uInt16 GetId( const SwTOXType& rTOXType );
614 
616  sal_uInt16 GetId( const SvxFontItem& rFont)
617  {
618  return m_aFontHelper.GetId(rFont);
619  }
621  void GetId( const wwFont& rFont)
622  {
623  m_aFontHelper.GetId(rFont);
624  }
625 
626  const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
627  template<class T> const T& GetItem( TypedWhichId<T> nWhich ) const
628  {
629  return static_cast<const T&>(GetItem(sal_uInt16(nWhich)));
630  }
631 
633  bool HasRefToAttr(const OUString& rName);
634  bool HasRefToFootOrEndnote(const bool isEndNote, const sal_uInt16 nSeqNo);
635 
637  static OUString GetBookmarkName( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo );
638 
640  void OutputItemSet( const SfxItemSet& rSet, bool bPapFormat, bool bChpFormat, sal_uInt16 nScript, bool bExportParentItemSet );
641 
643 
645  SvxFrameDirection TrueFrameDirection( const SwFrameFormat& rFlyFormat ) const;
646 
649 
651 
655  SwNumRule * DuplicateNumRuleImpl(const SwNumRule *pRule);
656 
658  sal_uInt16 DuplicateAbsNum(OUString const& rListId,
659  SwNumRule const& rAbstractRule);
660 
661 
664  sal_uInt16 OverrideNumRule(SwNumRule const& rExistingRule,
665  OUString const& rListId,
666  SwNumRule const& rAbstractRule);
667 
669  void AddListLevelOverride(sal_uInt16 nListId,
670  sal_uInt16 nLevelNum,
671  sal_uInt16 nStartAt);
672 
674  virtual AttributeOutputBase& AttrOutput() const = 0;
675 
677  virtual MSWordSections& Sections() const = 0;
678 
680  virtual bool FieldsQuoted() const = 0;
681 
683  virtual bool AddSectionBreaksForTOX() const = 0;
684 
686  virtual bool ignoreAttributeForStyleDefaults( sal_uInt16 /*nWhich*/ ) const { return false; }
687 
689  virtual bool PreferPageBreakBefore() const = 0;
690 
701  virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) = 0;
702 
703  virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ) = 0;
704 
705  virtual void AppendBookmark( const OUString& rName ) = 0;
706 
707  virtual void AppendAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen ) = 0;
708 
709  virtual void AppendSmartTags(SwTextNode& /*rTextNode*/) { }
710 
711  //For i120928,add this interface to export graphic of bullet
712  virtual void ExportGrfBullet(const SwTextNode& rNd) = 0;
713 
714  // FIXME probably a hack...
715  virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() ) = 0;
716 
717  // FIXME definitely a hack, must not be here - it can't do anything
718  // sensible for docx
719  virtual void WriteChar( sal_Unicode c ) = 0;
720 
722  void OutputFormat( const SwFormat& rFormat, bool bPapFormat, bool bChpFormat, bool bFlyFormat = false );
723 
725  const SfxItemSet* GetCurItemSet() const { return m_pISet; }
726 
728  void SetCurItemSet( const SfxItemSet* pS ) { m_pISet = pS; }
729 
731  virtual void SaveData( sal_uLong nStt, sal_uLong nEnd );
732 
734  virtual void RestoreData();
735 
737  bool OutputFollowPageDesc( const SfxItemSet* pSet,
738  const SwTextNode* pNd );
739 
741  void WriteHeaderFooterText( const SwFormat& rFormat, bool bHeader);
742 
744  static const SwSectionFormat* GetSectionFormat( const SwNode& rNd );
745 
747  static sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd );
748 
750  void OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd, bool isCellOpen = false );
751 
755  void SectionProperties( const WW8_SepInfo& rSectionInfo, WW8_PdAttrDesc* pA = nullptr );
756 
758  virtual void WriteNumbering() = 0;
759 
761  void NumberingDefinitions();
762 
765 
767  void NumberingLevel(SwNumRule const& rRule, sal_uInt8 nLvl);
768 
769  // Convert the bullet according to the font.
770  void SubstituteBullet( OUString& rNumStr, rtl_TextEncoding& rChrSet,
771  OUString& rFontName ) const;
772 
774  virtual void SetupSectionPositions( WW8_PdAttrDesc* /*pA*/ ) {}
775 
777  void SetHdFtPageRoot( const SwTextNode *pNd ) { m_pTopNodeOfHdFtPage = pNd; }
778 
781 
783  virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
784  const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const SwFrameFormat& rFirstPageFormat,
785  sal_uInt8 nBreakCode) = 0;
786 
788  virtual void OutputField( const SwField* pField, ww::eField eFieldType,
789  const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) = 0;
790 
792  virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) = 0;
793  virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark ) = 0;
794 
795  virtual void DoComboBox(const OUString &rName,
796  const OUString &rHelp,
797  const OUString &ToolTip,
798  const OUString &rSelected,
799  const css::uno::Sequence<OUString> &rListItems) = 0;
800 
801  virtual void DoFormText(const SwInputField * pField) = 0;
802 
803  static bool NoPageBreakSection( const SfxItemSet *pSet );
804 
805  // Compute the number format for WW dates
806  bool GetNumberFormat(const SwField& rField, OUString& rStr);
807 
808  virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) = 0;
809 
810  const SfxPoolItem* HasItem( sal_uInt16 nWhich ) const;
811 
813  int GetGrfIndex(const SvxBrushItem& rBrush);
814 
815  enum ExportFormat { DOC = 0, RTF = 1, DOCX = 2};
816  virtual ExportFormat GetExportFormat() const = 0;
817 
818 protected:
820  virtual ErrCode ExportDocument_Impl() = 0;
821 
823  sal_Int32 GetNextPos( SwWW8AttrIter const * pAttrIter, const SwTextNode& rNode, sal_Int32 nCurrentPos );
824 
826  void UpdatePosition( SwWW8AttrIter* pAttrIter, sal_Int32 nCurrentPos );
827 
829  virtual void OutputTextNode( SwTextNode& );
830 
832  void GatherChapterFields();
833 
834  void AddLinkTarget( const OUString& rURL );
835  void CollectOutlineBookmarks( const SwDoc &rDoc );
836 
837  bool SetCurrentPageDescFromNode(const SwNode &rNd);
838  bool ContentContainsChapterField(const SwFormatContent &rContent) const;
839  bool FormatHdFtContainsChapterField(const SwFrameFormat &rFormat) const;
840 
841  virtual void SectionBreaksAndFrames( const SwTextNode& rNode ) = 0;
842 
843  virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
844  const SwNode& rNd,
845  const SwFormatPageDesc* pNewPgDescFormat,
846  const SwPageDesc* pNewPgDesc ) = 0;
847 
849  virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) = 0;
850 
852  void OutputStartNode( const SwStartNode& );
853 
855  virtual void OutputEndNode( const SwEndNode& );
856 
858  virtual void OutputGrfNode( const SwGrfNode& ) = 0;
859 
861  virtual void OutputOLENode( const SwOLENode& ) = 0;
862 
863  virtual void OutputLinkedOLE( const OUString& ) = 0;
864 
866  void OutputSectionNode( const SwSectionNode& );
867  static void UpdateTocSectionNodeProperties(const SwSectionNode& rSectionNode);
868 
869  virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) = 0;
870 
875 
879  bool NearestBookmark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly );
880 
881  void GetSortedBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen );
882 
883  bool GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt, sal_Int32 nEnd,
884  IMarkVector& rArr );
885 
888  void NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly );
889 
890  void GetSortedAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen );
891 
892  bool GetAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nStt, sal_Int32 nEnd,
893  IMarkVector& rArr );
894 
896 
897  void SetCurPam(sal_uLong nStt, sal_uLong nEnd);
898 
900  std::unique_ptr<SvxBrushItem> getBackground();
902  int CollectGrfsOfBullets();
904  void BulletDefinitions();
905 
906  bool NeedSectionBreak( const SwNode& rNd ) const;
907  bool NeedTextNodeSplit( const SwTextNode& rNd, SwSoftPageBreakList& pList ) const;
908 
909  std::vector<const Graphic*> m_vecBulletPic;
910 
911 public:
912  MSWordExportBase(SwDoc& rDocument, std::shared_ptr<SwUnoCursor> & pCurrentPam, SwPaM* pOriginalPam);
913  virtual ~MSWordExportBase();
914 
915  // TODO move as much as possible here from WW8Export! ;-)
916 
917  static void CorrectTabStopInSet( SfxItemSet& rSet, sal_Int32 nAbsLeft );
918 
919 private:
920  MSWordExportBase( const MSWordExportBase& ) = delete;
921  MSWordExportBase& operator=( const MSWordExportBase& ) = delete;
922 };
923 
925 class SwWW8Writer: public StgWriter
926 {
927 // friends to get access to m_pExport
928 // FIXME avoid that, this is probably not what we want
929 // (if yes, remove the friends, and provide here a GetExport() method)
930 friend void WW8_WrtRedlineAuthor::Write(Writer &rWrt);
931 
934 
935 public:
936  SwWW8Writer(const OUString& rFltName, const OUString& rBaseURL);
937  virtual ~SwWW8Writer() override;
938 
939  virtual ErrCode WriteStorage() override;
940  virtual ErrCode WriteMedium( SfxMedium& ) override;
941 
942  // TODO most probably we want to be able to get these in
943  // MSExportFilterBase
945 
946 public:
947  static void InsUInt16(ww::bytes &rO, sal_uInt16 n);
948  static void InsUInt32(ww::bytes &rO, sal_uInt32 n);
949  static void InsAsString16(ww::bytes &rO, const OUString& rStr);
950  static void InsAsString8(ww::bytes & O, std::u16string_view rStr,
951  rtl_TextEncoding eCodeSet);
952 
953  static sal_uLong FillUntil( SvStream& rStrm, sal_uLong nEndPos = 0 );
954  static void FillCount( SvStream& rStrm, sal_uLong nCount );
955 
956  static void WriteShort( SvStream& rStrm, sal_Int16 nVal ) { rStrm.WriteInt16( nVal ); }
957  static void WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal );
958 
959  static void WriteLong( SvStream& rStrm, sal_Int32 nVal ) { rStrm.WriteInt32( nVal ); }
960  static void WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal );
961 
962  static void WriteString16(SvStream& rStrm, const OUString& rStr,
963  bool bAddZero);
964  static void WriteString8(SvStream& rStrm, std::u16string_view rStr,
965  bool bAddZero, rtl_TextEncoding eCodeSet);
966 
967  static void WriteString_xstz(SvStream& rStrm, const OUString& rStr, bool bAddZero);
968 
970 
971  using StgWriter::Write;
972  virtual ErrCode Write( SwPaM&, SfxMedium&, const OUString* ) override;
973  //Seems not an expected to provide method to access the private member
974  SfxMedium* GetMedia() { return mpMedium; }
975 
976 private:
977  SwWW8Writer(const SwWW8Writer&) = delete;
978  SwWW8Writer& operator=(const SwWW8Writer&) = delete;
980 };
981 
984 {
985 public:
986  std::unique_ptr<ww::bytes> pO;
987 
989 
990  std::unique_ptr<WW8Fib> pFib;
991  std::unique_ptr<WW8Dop> pDop;
992  std::unique_ptr<WW8_WrPlcFootnoteEdn> pFootnote;
993  std::unique_ptr<WW8_WrPlcFootnoteEdn> pEdn;
994  std::unique_ptr<WW8_WrPlcSepx> pSepx;
995 
996  bool m_bDot;
997 
998 protected:
1000  std::unique_ptr<WW8AttributeOutput> m_pAttrOutput;
1001 
1002 private:
1004 
1005 public:
1007  virtual AttributeOutputBase& AttrOutput() const override;
1008 
1010  virtual MSWordSections& Sections() const override;
1011 
1012  virtual bool PreferPageBreakBefore() const override { return true; }
1013 
1014  virtual bool FieldsQuoted() const override { return false; }
1015 
1016  virtual bool AddSectionBreaksForTOX() const override { return false; }
1017 private:
1019  virtual ErrCode ExportDocument_Impl() override;
1020 
1021  void PrepareStorage();
1022  void WriteFkpPlcUsw();
1023  void WriteMainText();
1024  void StoreDoc1();
1025 
1027  virtual void WriteNumbering() override;
1028 
1029  void OutOverrideListTab();
1030  void OutListNamesTab();
1031 
1032  void RestoreMacroCmds();
1033 
1034  void DoComboBox(css::uno::Reference<css::beans::XPropertySet> const & xPropSet);
1035 
1036 public:
1037 
1039  virtual void SetupSectionPositions( WW8_PdAttrDesc* pA ) override;
1040 
1041  bool MiserableFormFieldExportHack(const SwFrameFormat& rFrameFormat);
1042 
1045 
1046  sal_uInt16 AddRedlineAuthor( std::size_t nId );
1047 
1048  void WriteFootnoteBegin( const SwFormatFootnote& rFootnote, ww::bytes* pO = nullptr );
1049  void WritePostItBegin( ww::bytes* pO = nullptr );
1050  const SvxBrushItem* GetCurrentPageBgBrush() const;
1051  std::shared_ptr<SvxBrushItem> TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const;
1052 
1053  void AppendFlyInFlys(const ww8::Frame& rFrameFormat, const Point& rNdTopLeft);
1054  void WriteOutliner(const OutlinerParaObject& rOutliner, sal_uInt8 nTyp);
1055  void WriteSdrTextObj(const SdrTextObj& rObj, sal_uInt8 nTyp);
1056 
1057  sal_uInt32 GetSdrOrdNum( const SwFrameFormat& rFormat ) const;
1058  void CreateEscher();
1059  void WriteEscher();
1060 
1062  virtual void OutputField( const SwField* pField, ww::eField eFieldType,
1063  const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) override;
1064 
1065  void StartCommentOutput( std::u16string_view rName );
1066  void EndCommentOutput( std::u16string_view rName );
1067  void OutGrf(const ww8::Frame &rFrame);
1068  bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const& xOleStg,
1069  const tools::SvRef<SotStorage>& xObjStg, OUString const& rStorageName,
1070  SwOLENode* pOLENd);
1071 
1072  virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ) override;
1073  virtual void AppendBookmark( const OUString& rName ) override;
1074  void AppendBookmarkEndWithCorrection( const OUString& rName );
1075 
1076  virtual void AppendAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen ) override;
1077 
1078  virtual void AppendSmartTags(SwTextNode& rTextNode) override;
1079 
1080  virtual void ExportGrfBullet(const SwTextNode& rNd) override;
1081  void OutGrfBullets(const ww8::Frame &rFrame);
1082 
1083  void MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo);
1084 
1085  void WriteAsStringTable(const std::vector<OUString>&, sal_Int32& rfcSttbf,
1086  sal_Int32& rlcbSttbf);
1087 
1088  virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) override;
1089 
1090  virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() ) override;
1091  void WriteChar( sal_Unicode c ) override;
1092 
1093  void OutSwString(const OUString&, sal_Int32 nStt, sal_Int32 nLen);
1094 
1095  WW8_CP Fc2Cp( sal_uLong nFc ) const { return m_pPiece->Fc2Cp( nFc ); }
1096 
1097  // some partly static semi-internal function declarations
1098 
1099  void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz )
1100  { pO->insert( pO->end(), pBytes, pBytes+nSiz ); }
1101 
1102  virtual void SectionBreaksAndFrames( const SwTextNode& rNode ) override;
1103 
1105  // #i76300#
1106  virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
1107  const SwNode& rNd,
1108  const SwFormatPageDesc* pNewPgDescFormat,
1109  const SwPageDesc* pNewPgDesc ) override;
1110 
1111  static void Out_BorderLine(ww::bytes& rO, const ::editeng::SvxBorderLine* pLine,
1112  sal_uInt16 nDist, sal_uInt16 nSprmNo, sal_uInt16 nSprmNoVer9,
1113  bool bShadow);
1114 
1115  void Out_SwFormatBox(const SvxBoxItem& rBox, bool bShadow);
1116  static void Out_SwFormatTableBox( ww::bytes& rO, const SvxBoxItem * rBox );
1117  void Out_CellRangeBorders(const SvxBoxItem * pBox, sal_uInt8 nStart,
1118  sal_uInt8 nLimit);
1119  static bool TransBrush(const Color& rCol, WW8_SHD& rShd);
1120  static WW8_BRCVer9 TranslateBorderLine(const ::editeng::SvxBorderLine& pLine,
1121  sal_uInt16 nDist, bool bShadow);
1122 
1123  // #i77805# - new return value indicates, if an inherited outline numbering is suppressed
1124  virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) override;
1125 
1126  unsigned int GetHdFtIndex() const { return m_nHdFtIndex; }
1127  void SetHdFtIndex(unsigned int nHdFtIndex) { m_nHdFtIndex = nHdFtIndex; }
1129 
1135  static sal_uInt8 GetNumId( sal_uInt16 eNumType );
1136 
1138  virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) override;
1139 
1140  SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const;
1141 
1143  void MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight,
1144  const ww8::Frame &rFrameFormat);
1145 
1146  void InsUInt16( sal_uInt16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }
1147  void InsInt16(sal_Int16 n) { InsUInt16(sal_uInt16(n)); }
1148  void InsUInt32( sal_uInt32 n ) { SwWW8Writer::InsUInt32( *pO, n ); }
1149  void WriteStringAsPara( const OUString& rText );
1150 
1152  WW8Export( SwWW8Writer *pWriter,
1153  SwDoc& rDocument, std::shared_ptr<SwUnoCursor> & pCurrentPam, SwPaM* pOriginalPam,
1154  bool bDot );
1155  virtual ~WW8Export() override;
1156 
1157  virtual void DoComboBox(const OUString &rName,
1158  const OUString &rHelp,
1159  const OUString &ToolTip,
1160  const OUString &rSelected,
1161  const css::uno::Sequence<OUString> &rListItems) override;
1162 
1163  virtual void DoFormText(const SwInputField * pField) override;
1164 
1165  void GetCurrentItems(ww::bytes &rItems) const;
1166 
1168  virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) override;
1169  virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark ) override;
1170 
1173 
1174  SwWW8Writer& GetWriter() const { return *m_pWriter; }
1175  SvStream& Strm() const { return m_pWriter->Strm(); }
1176 
1178  virtual void SaveData( sal_uLong nStt, sal_uLong nEnd ) override;
1179 
1181  virtual void RestoreData() override;
1182 
1184  virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
1185  const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const SwFrameFormat& rFirstPageFormat,
1186  sal_uInt8 nBreakCode) override;
1187 
1188  virtual ExportFormat GetExportFormat() const override { return ExportFormat::DOC; }
1189 
1190 protected:
1192  virtual void OutputGrfNode( const SwGrfNode& ) override;
1193 
1195  virtual void OutputOLENode( const SwOLENode& ) override;
1196 
1197  virtual void OutputLinkedOLE( const OUString& ) override;
1198 
1199  virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) override;
1200 
1201 private:
1202  WW8Export(const WW8Export&) = delete;
1203  WW8Export& operator=(const WW8Export&) = delete;
1204 };
1205 
1206 class WW8_WrPlcSubDoc // double Plc for Footnotes/Endnotes and Postits
1207 {
1208 private:
1209  WW8_WrPlcSubDoc(const WW8_WrPlcSubDoc&) = delete;
1210  WW8_WrPlcSubDoc& operator=(const WW8_WrPlcSubDoc&) = delete;
1211 protected:
1212  std::vector<WW8_CP> aCps;
1213  std::vector<const void*> aContent; // PTRARR of SwFormatFootnote/PostIts/..
1214  std::vector<const SwFrameFormat*> aSpareFormats; // a backup for aContent: if there's no SdrObject, stores the fmt directly here
1215  std::unique_ptr<WW8_WrPlc0> pTextPos; // positions of the individual texts
1216 
1217  WW8_WrPlcSubDoc();
1218  virtual ~WW8_WrPlcSubDoc();
1219 
1220  bool WriteGenericText( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_CP& rCount );
1221  void WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_FC& rTextStt,
1222  sal_Int32& rTextCnt, WW8_FC& rRefStt, sal_Int32& rRefCnt ) const;
1223 
1224  virtual const std::vector<sal_uInt32>* GetShapeIdArr() const;
1225 };
1226 
1227 // double Plc for Footnotes/Endnotes
1229 {
1230 private:
1232 
1233  WW8_WrPlcFootnoteEdn(const WW8_WrPlcFootnoteEdn&) = delete;
1235 public:
1236  explicit WW8_WrPlcFootnoteEdn( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
1237 
1238  bool WriteText( WW8Export& rWrt );
1239  void WritePlc( WW8Export& rWrt ) const;
1240 
1241  void Append( WW8_CP nCp, const SwFormatFootnote& rFootnote );
1242 };
1243 
1245 {
1247  OUString msSimpleText;
1248  OUString msOwner;
1249  OUString m_sInitials;
1252  bool m_bIgnoreEmpty = true;
1253  WW8_Annotation(const SwPostItField* pPostIt, WW8_CP nRangeStart, WW8_CP nRangeEnd);
1254  explicit WW8_Annotation(const SwRedlineData* pRedline);
1256  bool HasRange() const;
1257 };
1258 
1259 class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc // double Plc for Postits
1260 {
1261 private:
1262  WW8_WrPlcAnnotations(const WW8_WrPlcAnnotations&) = delete;
1265 
1266  std::map<const OUString, std::pair<WW8_CP, bool>> m_aRangeStartPositions;
1267 public:
1269  virtual ~WW8_WrPlcAnnotations() override;
1270 
1271  void AddRangeStartPosition(const OUString& rName, WW8_CP nStartCp, bool bIgnoreEmpty);
1272  void Append( WW8_CP nCp, const SwPostItField* pPostIt );
1273  void Append( WW8_CP nCp, const SwRedlineData* pRedLine );
1274  bool IsNewRedlineComment( const SwRedlineData* pRedLine );
1275  bool WriteText( WW8Export& rWrt );
1276  void WritePlc( WW8Export& rWrt ) const;
1277 };
1278 
1279 class WW8_WrPlcTextBoxes : public WW8_WrPlcSubDoc // double Plc for Textboxes
1280 { // Frame/DrawTextboxes!
1281 private:
1283  std::vector<sal_uInt32> aShapeIds; // VARARR of ShapeIds for the SwFrameFormats
1284  virtual const std::vector<sal_uInt32>* GetShapeIdArr() const override;
1285 
1286  WW8_WrPlcTextBoxes(const WW8_WrPlcTextBoxes&) = delete;
1287  WW8_WrPlcTextBoxes& operator=(WW8_WrPlcTextBoxes const &) = delete;
1288 public:
1289  explicit WW8_WrPlcTextBoxes( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
1290 
1291  bool WriteText( WW8Export& rWrt );
1292  void WritePlc( WW8Export& rWrt ) const;
1293  void Append( const SdrObject& rObj, sal_uInt32 nShapeId );
1294  void Append( const SwFrameFormat* pFormat, sal_uInt32 nShapeId );
1295  sal_uInt16 Count() const { return aContent.size(); }
1296  sal_uInt16 GetPos( const void* p ) const
1297  {
1298  std::vector<const void*>::const_iterator it
1299  = std::find( aContent.begin(), aContent.end(), p );
1300  return it == aContent.end() ? USHRT_MAX : it - aContent.begin();
1301  }
1302 };
1303 
1304 class WW8_WrPlcPn // Plc for Page Numbers
1305 {
1306 private:
1308  // Plc for Chpx and Papx ( incl PN-Plc )
1309  std::vector<std::unique_ptr<WW8_WrFkp>> m_Fkps;
1310  sal_uInt16 nFkpStartPage;
1312 
1313  WW8_WrPlcPn(const WW8_WrPlcPn&) = delete;
1314  WW8_WrPlcPn& operator=(const WW8_WrPlcPn&) = delete;
1315 public:
1316  WW8_WrPlcPn( WW8Export& rWrt, ePLCFT ePl, WW8_FC nStartFc );
1317  ~WW8_WrPlcPn();
1318  void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const sal_uInt8* pSprms = nullptr);
1319  void WriteFkps();
1320  void WritePlc();
1322 };
1323 
1324 // class WW8_WrPlc1 is only used for fields
1326 {
1327 private:
1328  std::vector<WW8_CP> aPos;
1329  std::unique_ptr<sal_uInt8[]> pData; // content ( structures )
1331  sal_uInt16 nStructSiz;
1332 
1333  WW8_WrPlc1(const WW8_WrPlc1&) = delete;
1334  WW8_WrPlc1& operator=(const WW8_WrPlc1&) = delete;
1335 protected:
1336  sal_uInt16 Count() const { return aPos.size(); }
1337  void Write( SvStream& rStrm );
1338  WW8_CP Prev() const;
1339 public:
1340  explicit WW8_WrPlc1( sal_uInt16 nStructSz );
1341  ~WW8_WrPlc1();
1342  void Append( WW8_CP nCp, const void* pData );
1343  void Finish( sal_uLong nLastCp, sal_uLong nStartCp );
1344 };
1345 
1346 // class WW8_WrPlcField is for fields
1348 {
1349 private:
1351  sal_uInt16 nResults;
1352 
1353  WW8_WrPlcField(const WW8_WrPlcField&) = delete;
1354  WW8_WrPlcField& operator=(const WW8_WrPlcField&) = delete;
1355 public:
1356  WW8_WrPlcField( sal_uInt16 nStructSz, sal_uInt8 nTTyp )
1357  : WW8_WrPlc1( nStructSz ), nTextTyp( nTTyp ), nResults(0)
1358  {}
1359  void Write( WW8Export& rWrt );
1360  void ResultAdded() { ++nResults; }
1361  sal_uInt16 ResultCount() const { return nResults; }
1362 };
1363 
1365 {
1366 private:
1367  WW8_WrMagicTable(const WW8_WrMagicTable&) = delete;
1368  WW8_WrMagicTable& operator=(const WW8_WrMagicTable&) = delete;
1369 public:
1371  void Append( WW8_CP nCp, sal_uLong nData );
1372  void Write( WW8Export& rWrt );
1373 };
1374 
1376 {
1377 public:
1378  ww8::Frame maFly; // surrounding FlyFrames
1379  sal_uLong mnPos; // FilePos of the graphics
1380  sal_uInt16 mnWid; // Width of the graphics
1381  sal_uInt16 mnHei; // Height of the graphics
1382 
1383  GraphicDetails(const ww8::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
1384  : maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei)
1385  {}
1386 
1387  bool operator==(const GraphicDetails& rIn) const
1388  {
1389  return (
1390  (mnWid == rIn.mnWid) && (mnHei == rIn.mnHei) &&
1391  (maFly.RefersToSameFrameAs(rIn.maFly))
1392  );
1393  }
1394 };
1395 
1396 // class SwWW8WrGrf collects graphics and issues them
1398 {
1399 private:
1402 
1403  std::vector<GraphicDetails> maDetails;
1404  sal_uInt16 mnIdx; // index in file positions
1405 
1406  static void WritePICFHeader(SvStream& rStrm, const ww8::Frame &rFly,
1407  sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight,
1408  const SwAttrSet* pAttrSet = nullptr);
1409  void WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem);
1410  void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd,
1411  const ww8::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight);
1412 
1413  static void WritePICBulletFHeader(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight);
1414  void WriteGrfForBullet(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight);
1415 
1416  SwWW8WrGrf(const SwWW8WrGrf&) = delete;
1417  SwWW8WrGrf& operator=(const SwWW8WrGrf&) = delete;
1418 public:
1419  explicit SwWW8WrGrf( WW8Export& rW ) : rWrt( rW ), mnIdx( 0 ) {}
1420  void Insert(const ww8::Frame &rFly);
1421  void Write();
1423  { return (mnIdx < maDetails.size()) ? maDetails[mnIdx++].mnPos : 0; }
1424 };
1425 
1430 {
1431 private:
1433  MSWordAttrIter(const MSWordAttrIter&) = delete;
1434  MSWordAttrIter& operator=(const MSWordAttrIter&) = delete;
1435 protected:
1437 public:
1438  explicit MSWordAttrIter( MSWordExportBase& rExport );
1439  virtual ~MSWordAttrIter();
1440 
1441  virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const = 0;
1442  virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const = 0;
1443  };
1444 
1447 {
1448 private:
1451  std::vector<EECharAttrib> aTextAtrArr;
1452  std::vector<const EECharAttrib*> aChrTextAtrArr;
1453  std::vector<rtl_TextEncoding> aChrSetArr;
1454  sal_Int32 nPara;
1455  sal_Int32 nCurrentSwPos;
1456  sal_Int32 nTmpSwPos; // for HasItem()
1457  rtl_TextEncoding eNdChrSet;
1458  sal_uInt16 nScript;
1460 
1461  sal_Int32 SearchNext( sal_Int32 nStartPos );
1462  void SetCharSet(const EECharAttrib& rTextAttr, bool bStart);
1463 
1464  void SetItemsThatDifferFromStandard(bool bCharAttr, SfxItemSet& rSet);
1465 
1466  MSWord_SdrAttrIter(const MSWord_SdrAttrIter&) = delete;
1468 public:
1469  MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj,
1470  sal_uInt8 nType );
1471  void NextPara( sal_Int32 nPar );
1472  void OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>* pWhichsToIgnore = nullptr);
1473  void OutEEField(const SfxPoolItem& rHt);
1474 
1475  bool IsTextAttr(sal_Int32 nSwPos);
1476 
1477  void NextPos() { if ( nCurrentSwPos < SAL_MAX_INT32 ) nCurrentSwPos = SearchNext( nCurrentSwPos + 1 ); }
1478 
1479  void OutAttr( sal_Int32 nSwPos );
1480  virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const override;
1481  virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const override;
1482  sal_Int32 WhereNext() const { return nCurrentSwPos; }
1483  rtl_TextEncoding GetNextCharSet() const;
1484  rtl_TextEncoding GetNodeCharSet() const { return eNdChrSet; }
1485 };
1486 
1487 // class SwWW8AttrIter is a helper for constructing the Fkp.chpx.
1488 // Only character attributes are considered; paragraph attributes do not need this treatment.
1489 // The paragraph and text attributes of the Writer are passed, and
1490 // Where() returns the next position where the attributes change.
1491 // IsTextAtr() tells if, at the position returned by Where(), there is
1492 // an attribute without end and with \xff in the text.
1493 // Using OutAttr(), the attributes on the passed SwPos are returned.
1495 {
1496 private:
1497  const SwTextNode& rNd;
1498 
1500  sw::util::CharRuns::const_iterator maCharRunIter;
1501 
1502  rtl_TextEncoding meChrSet;
1503  sal_uInt16 mnScript;
1505 
1507  sal_Int32 nCurrentSwPos;
1509 
1511 
1513 
1516 
1517  sal_Int32 SearchNext( sal_Int32 nStartPos );
1518 
1519  void OutSwFormatRefMark(const SwFormatRefMark& rAttr);
1520 
1521  void IterToCurrent();
1522 
1523  SwWW8AttrIter(const SwWW8AttrIter&) = delete;
1524  SwWW8AttrIter& operator=(const SwWW8AttrIter&) = delete;
1525 
1526  void handleToggleProperty(SfxItemSet& rExportSet, const SwFormatCharFormat* pCharFormatItem, sal_uInt16 nWhich, const SfxPoolItem* pValue);
1527 public:
1528  SwWW8AttrIter( MSWordExportBase& rWr, const SwTextNode& rNd );
1529 
1530  bool IsTextAttr( sal_Int32 nSwPos ) const;
1531  bool IsExportableAttr(sal_Int32 nSwPos) const;
1532  bool IncludeEndOfParaCRInRedlineProperties(sal_Int32 nPos) const;
1533  bool IsDropCap( int nSwPos );
1534  bool RequiresImplicitBookmark();
1535 
1536  void NextPos() { if ( nCurrentSwPos < SAL_MAX_INT32 ) nCurrentSwPos = SearchNext( nCurrentSwPos + 1 ); }
1537 
1538  void OutAttr( sal_Int32 nSwPos, bool bWriteCombinedChars );
1539  virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const override;
1540  virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const override;
1541  int OutAttrWithRange(const SwTextNode& rNode, sal_Int32 nPos);
1543  const SwRedlineData* GetRunLevelRedline( sal_Int32 nPos );
1544  FlyProcessingState OutFlys(sal_Int32 nSwPos);
1545  bool HasFlysAt(sal_Int32 nSwPos) const;
1546 
1547  sal_Int32 WhereNext() const { return nCurrentSwPos; }
1548  sal_uInt16 GetScript() const { return mnScript; }
1549  bool IsParaRTL() const { return mbParaIsRTL; }
1550  rtl_TextEncoding GetCharSet() const { return meChrSet; }
1551  OUString GetSnippet(const OUString &rStr, sal_Int32 nCurrentPos,
1552  sal_Int32 nLen) const;
1553  const SwFormatDrop& GetSwFormatDrop() const { return mrSwFormatDrop; }
1554 
1555  bool IsWatermarkFrame();
1556  bool IsAnchorLinkedToThisNode( sal_uLong nNodePos );
1557 
1558  void SplitRun( sal_Int32 nSplitEndPos );
1559 
1560  const SwTextNode& GetNode() const { return rNd; }
1561 };
1562 
1565 {
1568  std::unique_ptr<SwFormat*[]> m_pFormatA;
1569  sal_uInt16 m_nUsedSlots;
1571  std::map<sal_uInt16, const SwNumRule*> m_aNumRules;
1572 
1574  std::vector<OString> m_aStyleIds;
1575 
1577  void BuildStylesTable();
1578 
1580  void BuildStyleIds();
1581 
1583  sal_uInt16 BuildGetSlot( const SwFormat& rFormat );
1584  sal_uInt16 BuildGetSlot( const SwNumRule& /*rNumRule*/ ) { return m_nUsedSlots++;}
1585 
1587  void GetStyleData( SwFormat* pFormat, bool& bFormatColl, sal_uInt16& nBase, sal_uInt16& nNext );
1588 
1590  void WriteProperties( const SwFormat* pFormat, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz );
1591 
1592  static sal_uInt16 GetWWId( const SwFormat& rFormat );
1593 
1594  void SetStyleDefaults( const SwFormat& rFormat, bool bPap );
1595 
1597  void OutputStyle( SwFormat* pFormat, sal_uInt16 nPos );
1598  void OutputStyle( const SwNumRule* pNumRule, sal_uInt16 nPos );
1599 
1600  MSWordStyles( const MSWordStyles& ) = delete;
1601  MSWordStyles& operator=( const MSWordStyles& ) = delete;
1602 
1603 public:
1604  MSWordStyles( MSWordExportBase& rExport, bool bListStyles = false );
1605  ~MSWordStyles();
1606 
1608  void OutputStylesTable();
1609 
1611  sal_uInt16 GetSlot( const SwFormat* pFormat ) const;
1612 
1614  static OString CreateStyleId(const OUString &rName);
1615 
1617  OString const & GetStyleId(sal_uInt16 nId) const;
1618 
1619  const SwFormat* GetSwFormat(sal_uInt16 nId) const { return m_pFormatA[nId]; }
1621  const SwNumRule* GetSwNumRule(sal_uInt16 nId) const;
1622  sal_uInt16 GetHeadingParagraphStyleId(sal_uInt16 nLevel) const { return m_aHeadingParagraphStyles[ nLevel ]; }
1623 };
1624 
1625 #define MSWORD_MAX_STYLES_LIMIT 4091
1626 
1627 sal_Int16 GetWordFirstLineOffset(const SwNumFormat &rFormat);
1628 // A bit of a bag on the side for now
1629 OUString FieldString(ww::eField eIndex);
1630 OUString BookmarkToWord(const OUString &rBookmark);
1631 
1633 {
1634  sal_uInt32 m_cvFore;
1635  sal_uInt32 m_cvBack;
1636 
1637 public:
1638  WW8SHDLong() : m_cvFore(0), m_cvBack(0) {}
1639 
1640  void Write(WW8Export & rExport);
1641  void setCvFore(sal_uInt32 cvFore) { m_cvFore = cvFore; }
1642  void setCvBack(sal_uInt32 cvBack) { m_cvBack = cvBack; }
1643 };
1644 
1645 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_WRTWW8_HXX
1646 
1647 /* 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:320
void WriteMainText()
Definition: wrtww8.cxx:2926
std::shared_ptr< NfKeywordTable > m_pKeyMap
Definition: wrtww8.hxx:472
o3tl::sorted_vector< const SwRedlineData * > maProcessedRedlines
Definition: wrtww8.hxx:1264
bool WriteGenericText(WW8Export &rWrt, sal_uInt8 nTTyp, WW8_CP &rCount)
Definition: wrtw8sty.cxx:2133
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:466
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:1251
sal_Int32 nCurrentSwPos
Definition: wrtww8.hxx:1455
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:1720
RedlineFlags m_nOrigRedlineFlags
Remember the original redline mode.
Definition: wrtww8.hxx:486
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:983
ErrCode WriteStorageImpl()
Definition: wrtww8.cxx:3780
void OutAttr(sal_Int32 nSwPos)
Definition: wrtw8esh.cxx:1116
MSWordExportBase(SwDoc &rDocument, std::shared_ptr< SwUnoCursor > &pCurrentPam, SwPaM *pOriginalPam)
Definition: wrtww8.cxx:3826
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:4409
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:1127
void WritePlc()
Definition: wrtww8.cxx:1051
sal_Int32 WhereNext() const
Definition: wrtww8.hxx:1482
const SwFormat * GetSwFormat(sal_uInt16 nId) const
Definition: wrtww8.hxx:1619
const sw::BroadcastingModify * m_pOutFormatNode
Definition: wrtww8.hxx:534
WW8_WrPlcField(sal_uInt16 nStructSz, sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1356
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:193
virtual void AppendSmartTags(SwTextNode &)
Definition: wrtww8.hxx:709
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:3976
std::unique_ptr< ww::bytes > pO
Buffer.
Definition: wrtww8.hxx:986
void GetCurrentItems(ww::bytes &rItems) const
Definition: wrtw8nds.cxx:879
std::unique_ptr< SvxMSExportOLEObjects > m_pOLEExp
Definition: wrtww8.hxx:473
MSWordSections & operator=(const MSWordSections &)
SvStream * pTableStrm
Definition: wrtww8.hxx:988
bool m_bLinkedTextboxesHelperInitialized
Definition: wrtww8.hxx:512
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:1126
virtual ~SwWW8Writer() override
Definition: wrtww8.cxx:3937
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:3746
void AddRangeStartPosition(const OUString &rName, WW8_CP nStartCp, bool bIgnoreEmpty)
Definition: wrtw8sty.cxx:2090
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:527
std::unique_ptr< WW8Fib > pFib
File Information Block.
Definition: wrtww8.hxx:990
virtual AttributeOutputBase & AttrOutput() const override
memory leak #i120098#, to hold the reference to unnamed SotStorage obj
Definition: wrtww8.cxx:3917
sal_uInt32 GetSdrOrdNum(const SwFrameFormat &rFormat) const
Definition: wrtw8esh.cxx:949
bool m_bEndAtTextEnd
Definition: wrtww8.hxx:559
const SfxPoolItem & GetItem(sal_uInt16 nWhich) const
Definition: wrtww8.cxx:780
std::unique_ptr< WW8_WrPlcField > m_pFieldHdFt
Definition: wrtww8.hxx:522
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:435
rtl_TextEncoding GetNodeCharSet() const
Definition: wrtww8.hxx:1484
RndStdIds m_eNewAnchorType
Definition: wrtww8.hxx:519
bool m_bSubstituteBullets
Definition: wrtww8.hxx:562
bool m_bAddFootnoteTab
Definition: wrtww8.hxx:569
bool HasRange() const
An annotation has a range if start != end or the m_bIgnoreEmpty flag is cleared.
Definition: wrtw8sty.cxx:2080
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:558
WW8_WrPlcFootnoteEdn & operator=(WW8_WrPlcFootnoteEdn const &)=delete
const SwFormatDrop & mrSwFormatDrop
Definition: wrtww8.hxx:1512
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:616
bool WriteText(WW8Export &rWrt)
Definition: wrtww8.cxx:3957
virtual void OutputEndNode(const SwEndNode &)
Output SwEndNode.
Definition: wrtww8.cxx:4419
WW8_CP m_nRangeStart
Definition: wrtww8.hxx:1251
virtual void AppendBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen) override
Definition: wrtww8.cxx:1418
bool mbAlt
Definition: wrtww8.hxx:302
static void WriteString_xstz(SvStream &rStrm, const OUString &rStr, bool bAddZero)
Definition: wrtww8.cxx:1754
FontFamily meFamily
Definition: wrtww8.hxx:304
virtual bool FieldsQuoted() const =0
Determines if the import filter already quoted fields or not.
const SfxItemPool * pEditPool
Definition: wrtww8.hxx:1450
std::vector< const SwTOXType * > m_aTOXArr
Definition: wrtww8.hxx:454
void OutParaAttr(bool bCharAttr, const std::set< sal_uInt16 > *pWhichsToIgnore=nullptr)
Definition: wrtw8esh.cxx:1273
OUString msFamilyNm
Definition: wrtww8.hxx:300
Point * pOldFlyOffset
Definition: wrtww8.hxx:429
static sal_uLong GetSectionLineNo(const SfxItemSet *pSet, const SwNode &rNd)
Line number of the section start.
Definition: ww8atr.cxx:632
sal_uLong m_nCurStart
Definition: wrtww8.hxx:572
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:226
const SwRedlineData * GetParagraphLevelRedline()
Definition: wrtw8nds.cxx:1478
std::vector< sal_uInt8 > bytes
Definition: types.hxx:29
std::vector< const SwFrameFormat * > aSpareFormats
Definition: wrtww8.hxx:1214
std::unique_ptr< WW8_WrPlcField > m_pFieldMain
Definition: wrtww8.hxx:521
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:533
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:1502
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:457
void WritePlcHdd(WW8Export &rWrt) const
Definition: wrtw8sty.cxx:1978
void WriteFootnoteEndText(WW8Export &rWrt, sal_uLong nCpStt)
Definition: wrtw8sty.cxx:1139
bool bOldWriteAll
WW8Export only.
Definition: wrtww8.hxx:438
bool m_bOutPageDescs
PageDescs (section properties) are being written.
Definition: wrtww8.hxx:550
Definition: doc.hxx:187
ePLCFT ePlc
Definition: wrtww8.hxx:1311
bool mbCharIsRTL
Definition: wrtww8.hxx:1504
sal_Int32 nPara
Definition: wrtww8.hxx:1454
const EditTextObject * pEditObj
Definition: wrtww8.hxx:1449
virtual ~PlcDrawObj()
Definition: wrtw8esh.cxx:521
sal_uLong nDataLen
Definition: wrtww8.hxx:1330
virtual void OutputLinkedOLE(const OUString &)=0
virtual bool FieldsQuoted() const override
Determines if the import filter already quoted fields or not.
Definition: wrtww8.hxx:1014
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:469
virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const override
Definition: wrtw8esh.cxx:872
sal_uInt16 BuildGetSlot(const SwNumRule &)
Definition: wrtww8.hxx:1584
void WriteRtf(const RtfAttributeOutput *rAttrOutput) const
Definition: wrtw8sty.cxx:822
bool NeedSectionBreak(const SwNode &rNd) const
Definition: wrtw8nds.cxx:2138
sal_uInt16 m_nCharFormatStart
Definition: wrtww8.hxx:478
WW8_WrPlcTextBoxes(sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1289
virtual void WriteNumbering() override
Output the numbering table.
Definition: wrtw8num.cxx:163
std::shared_ptr< SwUnoCursor > pOldPam
Definition: wrtww8.hxx:432
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:518
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:427
sal_uInt16 m_nStyleBeforeFly
style number of the node
Definition: wrtww8.hxx:480
OUString const & GetFamilyName() const
Definition: wrtww8.hxx:312
void ExportDopTypography(WW8DopTypography &rTypo)
Definition: wrtww8.cxx:578
sal_Int32 m_nLinkedTextboxesChainId
Definition: wrtww8.hxx:513
void SetParaBreak()
Definition: wrtww8.cxx:1402
bool bOldOutTable
Definition: wrtww8.hxx:439
WW8_CP Fc2Cp(sal_uLong nFc) const
Definition: wrtww8.hxx:1095
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:526
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:375
virtual const std::vector< sal_uInt32 > * GetShapeIdArr() const
Definition: wrtw8sty.cxx:2583
Used to export formatted text associated to drawings.
Definition: wrtww8.hxx:1446
friend bool operator<(const wwFont &r1, const wwFont &r2)
Definition: wrtw8sty.cxx:834
bool m_bOutFirstPage
Definition: wrtww8.hxx:551
virtual void AppendSmartTags(SwTextNode &rTextNode) override
Definition: wrtww8.cxx:1478
sal_uInt16 Count() const
Definition: wrtww8.hxx:1336
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:4054
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:177
SfxMedium * GetMedia()
Definition: wrtww8.hxx:974
sal_uInt8 nTextTyp
Definition: wrtww8.hxx:1350
RndStdIds eOldAnchorType
Definition: wrtww8.hxx:430
const SfxItemSet * GetCurItemSet() const
Getter for pISet.
Definition: wrtww8.hxx:725
std::unique_ptr< SwMSConvertControls > m_pOCXExp
Definition: wrtww8.hxx:474
void WritePc(WW8Export &rWrt)
Definition: wrtww8.cxx:1362
rtl_TextEncoding meChrSet
Definition: wrtww8.hxx:305
virtual const SfxPoolItem * HasTextItem(sal_uInt16 nWhich) const override
Definition: wrtw8nds.cxx:838
std::unique_ptr< WW8_WrPlcField > m_pFieldEdn
Definition: wrtww8.hxx:524
OUString FieldString(ww::eField eIndex)
Definition: ww8atr.cxx:2619
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:1671
std::unique_ptr< WW8_WrPlcField > m_pFieldAtn
Definition: wrtww8.hxx:525
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:584
static void SetHeaderFlag(sal_uInt8 &rHeadFootFlags, const SwFormat &rFormat, sal_uInt8 nFlag)
Definition: wrtw8sty.cxx:1198
ww8::FrameIter maFlyIter
Definition: wrtww8.hxx:1515
WW8_WrPlcAnnotations * m_pAtn
Definition: wrtww8.hxx:499
sal_uInt16 nFkpStartPage
Definition: wrtww8.hxx:1310
std::vector< sal_uInt32 > aShapeIds
Definition: wrtww8.hxx:1283
bool GetNumberFormat(const SwField &rField, OUString &rStr)
Definition: ww8atr.cxx:2543
WW8Export * m_pExport
Definition: wrtww8.hxx:932
sal_Int32 WhereNext() const
Definition: wrtww8.hxx:1547
sal_uInt16 GetScript() const
Definition: wrtww8.hxx:1548
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 AddLinkTarget(const OUString &rURL)
Definition: wrtww8.cxx:3124
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:197
virtual ExportFormat GetExportFormat() const override
Definition: wrtww8.hxx:1188
SwEscherEx * m_pEscher
Definition: wrtww8.hxx:540
WW8Export & rWrt
Definition: wrtww8.hxx:1307
sal_uInt16 sal_Unicode
bool bOldStartTOX
Definition: wrtww8.hxx:441
WW8_WrPlcField(const WW8_WrPlcField &)=delete
std::unique_ptr< WW8_WrPlcField > m_pFieldFootnote
Definition: wrtww8.hxx:523
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:3812
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:1765
virtual void AppendBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen)=0
SwWW8AttrIter(const SwWW8AttrIter &)=delete
bool m_bExportModeRTF
Definition: wrtww8.hxx:566
MSWordExportBase & m_rExport
Definition: wrtww8.hxx:1436
std::map< OUString, LinkedTextboxInfo > m_aLinkedTextboxesHelper
Definition: wrtww8.hxx:511
Class to collect and output the styles table.
Definition: wrtww8.hxx:1564
const SwFrameFormat * m_pFirstPageFormat
Definition: wrtww8.hxx:456
void OutputFormat(const SwFormat &rFormat, bool bPapFormat, bool bChpFormat, bool bFlyFormat=false)
Output attributes.
Definition: ww8atr.cxx:776
The class that has handlers for various resource types when exporting as RTF.
bool bIsFirstParagraph
Definition: wrtww8.hxx:178
FontPitch mePitch
Definition: wrtww8.hxx:303
std::shared_ptr< SwUnoCursor > & m_pCurPam
Definition: wrtww8.hxx:573
SwPaM * pOldEnd
Definition: wrtww8.hxx:433
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:4008
WW8Export & rWrt
for access to the variables
Definition: wrtww8.hxx:1401
std::vector< WW8_CP > aPos
Definition: wrtww8.hxx:1328
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
const SvxBrushItem * GetCurrentPageBgBrush() const
Definition: wrtw8nds.cxx:1652
sal_uInt8 nTyp
Definition: wrtww8.hxx:1282
MSWordAttrIter * m_pChpIter
Definition: wrtww8.hxx:497
sal_Int32 SearchNext(sal_Int32 nStartPos)
Definition: wrtw8esh.cxx:1050
bool m_bInWriteEscher
Definition: wrtww8.hxx:555
std::vector< DrawObj > DrawObjVector
Definition: wrtww8.hxx:358
sal_uInt32 m_cvBack
Definition: wrtww8.hxx:1635
bool bOldFlyFrameAttrs
Definition: wrtww8.hxx:440
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:2096
WW8_CP mnCp
Definition: wrtww8.hxx:342
WW8_WrPlc1(const WW8_WrPlc1 &)=delete
void WritePostItBegin(ww::bytes *pO=nullptr)
Definition: ww8atr.cxx:2601
bool bOldInWriteTOX
Definition: wrtww8.hxx:442
const SwTextNode * m_pTopNodeOfHdFtPage
Top node of host page when in hd/ft.
Definition: wrtww8.hxx:468
DateTime maDateTime
Definition: wrtww8.hxx:1250
void Finish(sal_uLong nLastCp, sal_uLong nStartCp)
Definition: wrtww8.cxx:827
bool SetCurrentPageDescFromNode(const SwNode &rNd)
Definition: ww8atr.cxx:424
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:537
static WW8_BRCVer9 TranslateBorderLine(const ::editeng::SvxBorderLine &pLine, sal_uInt16 nDist, bool bShadow)
Definition: ww8atr.cxx:4305
void WriteChar(sal_Unicode c) override
Definition: wrtww8.cxx:1870
ww8::Frames maFlyFrames
Definition: wrtww8.hxx:1514
std::map< sal_uInt16, const SwNumRule * > m_aNumRules
Slot <-> List style map.
Definition: wrtww8.hxx:1571
bool IsNewRedlineComment(const SwRedlineData *pRedLine)
Definition: wrtw8sty.cxx:2122
virtual void AppendAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen) override
Definition: wrtww8.cxx:1461
WW8_WrPlcTextBoxes * m_pTextBxs
Definition: wrtww8.hxx:501
static void UpdateTocSectionNodeProperties(const SwSectionNode &rSectionNode)
Definition: wrtw8nds.cxx:3253
void handleToggleProperty(SfxItemSet &rExportSet, const SwFormatCharFormat *pCharFormatItem, sal_uInt16 nWhich, const SfxPoolItem *pValue)
Definition: wrtw8nds.cxx:562
void WriteGraphicNode(SvStream &rStrm, const GraphicDetails &rItem)
Definition: wrtww8gr.cxx:752
ww8::WW8TableInfo::Pointer_t m_pTableInfo
Definition: wrtww8.hxx:476
bool FormatHdFtContainsChapterField(const SwFrameFormat &rFormat) const
Definition: ww8atr.cxx:409
MSWordStyles & operator=(const MSWordStyles &)=delete
bool m_bHeaderFooterWritten
Definition: wrtww8.hxx:245
rtl_TextEncoding GetCharSet() const
Definition: wrtww8.hxx:1550
Collects and outputs fonts.
Definition: wrtww8.hxx:294
std::map< size_t, std::pair< size_t, size_t > > m_OverridingNums
overriding numdef index -> (existing numdef index, abstractnumdef index)
Definition: wrtww8.hxx:460
virtual void SetupSectionPositions(WW8_PdAttrDesc *)
Setup the pA's info.
Definition: wrtww8.hxx:774
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:347
int size()
Definition: wrtww8.hxx:374
sal_uLong GetFPos()
Definition: wrtww8.hxx:1422
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:2071
sal_uInt16 mnWid
Definition: wrtww8.hxx:1380
sal_uInt16 m_nFormatCollStart
Definition: wrtww8.hxx:479
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:1043
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:621
std::unique_ptr< ww::bytes > pOOld
WW8Export only.
Definition: wrtww8.hxx:431
virtual sal_uLong ReplaceCr(sal_uInt8 nChar)=0
std::vector< GraphicDetails > maDetails
Definition: wrtww8.hxx:1403
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:1456
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:1012
const SwTextNode * GetHdFtPageRoot() const
Top node of host page when in header/footer.
Definition: wrtww8.hxx:780
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:1536
virtual ~MSWordSections()
Definition: wrtw8sty.cxx:1042
std::unique_ptr< WW8_WrPlcPn > m_pPapPlc
Definition: wrtww8.hxx:495
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:2045
void OutputSectionNode(const SwSectionNode &)
Output SwSectionNode.
Definition: wrtw8nds.cxx:3200
sal_uLong m_nCurEnd
Definition: wrtww8.hxx:572
Style of a layout element.
Definition: frmfmt.hxx:58
#define SAL_MAX_INT32
const OutlinerParaObject * mpRichText
Definition: wrtww8.hxx:1246
OUString msOwner
Definition: wrtww8.hxx:1248
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:1871
void SplitRun(sal_Int32 nSplitEndPos)
Definition: wrtw8nds.cxx:1225
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:1953
void SetCurItemSet(const SfxItemSet *pS)
Setter for pISet.
Definition: wrtww8.hxx:728
tools::SvRef< SotStorage > xEscherStg
Definition: wrtww8.hxx:1003
const SwSectionFormat * pSectionFormat
Definition: wrtww8.hxx:174
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:994
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:1212
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:2042
void UpdatePosition(SwWW8AttrIter *pAttrIter, sal_Int32 nCurrentPos)
Update the information for GetNextPos().
Definition: wrtw8nds.cxx:1888
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:483
sal_uInt16 mnScript
Definition: wrtww8.hxx:1503
FlyProcessingState OutFlys(sal_Int32 nSwPos)
Definition: wrtw8nds.cxx:653
void WriteDocx(DocxAttributeOutput *rAttrOutput) const
Definition: wrtw8sty.cxx:803
PlcDrawObj()
Definition: wrtww8.hxx:370
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:1549
void WriteFkpPlcUsw()
Definition: wrtww8.cxx:2978
std::unique_ptr< WW8Dop > pDop
Document Properties.
Definition: wrtww8.hxx:991
~WW8_WrPlc1()
Definition: wrtww8.cxx:802
virtual void OutputTextNode(SwTextNode &)
Output SwTextNode.
Definition: wrtw8nds.cxx:2186
bool m_bFirstTOCNodeWithSection
Definition: wrtww8.hxx:494
sw::util::CharRuns maCharRuns
Definition: wrtww8.hxx:1499
void EndCommentOutput(std::u16string_view rName)
Definition: ww8atr.cxx:1909
void OutputContentNode(SwContentNode &)
Call the right (virtual) function according to the type of the item.
Definition: wrtw8nds.cxx:3511
std::unique_ptr< WW8_WrPlc0 > pTextPos
Definition: wrtww8.hxx:1215
virtual void ExportGrfBullet(const SwTextNode &rNd)=0
bool mbDocumentIsProtected
Definition: wrtww8.hxx:196
sal_uInt16 GetPos(const void *p) const
Definition: wrtww8.hxx:1296
std::vector< rtl_TextEncoding > aChrSetArr
Definition: wrtww8.hxx:1453
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:3992
vector_type::size_type size_type
Definition: docary.hxx:228
static void WriteShort(SvStream &rStrm, sal_Int16 nVal)
Definition: wrtww8.hxx:956
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:1568
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:515
TextTypes
Definition: wrtww8.hxx:155
std::vector< const void * > aContent
Definition: wrtww8.hxx:1213
static sal_uInt8 GetNumId(sal_uInt16 eNumType)
Converts the SVX numbering type to MSONFC.
Definition: ww8atr.cxx:704
The writer class that gets called for the WW8 filter.
Definition: wrtww8.hxx:925
rtl_TextEncoding eNdChrSet
Definition: wrtww8.hxx:1457
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:1360
bool HasRefToAttr(const OUString &rName)
Find the reference.
Definition: ww8atr.cxx:912
const SwRedlineData * GetRunLevelRedline(sal_Int32 nPos)
Definition: wrtw8nds.cxx:1503
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:1581
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:1147
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:571
ePLCFT
Definition: ww8scan.hxx:384
OUString msSimpleText
Definition: wrtww8.hxx:1247
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:1016
std::vector< sal_uLong > m_aChapterFieldLocs
Definition: wrtww8.hxx:452
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:1574
sal_uLong nLnNumRestartNo
Definition: wrtww8.hxx:176
virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner=ww8::WW8TableNodeInfoInner::Pointer_t()) override
Definition: wrtww8.cxx:1860
DrawObjVector maDrawObjs
Definition: wrtww8.hxx:364
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:180
SwWW8Writer & GetWriter() const
Definition: wrtww8.hxx:1174
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:679
WW8OleMap m_aOleMap
Definition: wrtww8.hxx:475
bool m_bListStyles
If list styles are requested to be exported as well.
Definition: wrtww8.hxx:1570
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:2278
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:464
MSWordExportBase & m_rExport
Definition: wrtww8.hxx:1566
std::vector< std::unique_ptr< WW8_WrFkp > > m_Fkps
Definition: wrtww8.hxx:1309
bool WriteText(WW8Export &rWrt)
Definition: wrtw8esh.cxx:909
void InsUInt16(sal_uInt16 n)
Definition: wrtww8.hxx:1146
unsigned int m_nHdFtIndex
Definition: wrtww8.hxx:484
bool m_bBreakBefore
Definition: wrtww8.hxx:547
void Out_CellRangeBorders(const SvxBoxItem *pBox, sal_uInt8 nStart, sal_uInt8 nLimit)
Definition: ww8atr.cxx:4527
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:1506
void SetHdFtPageRoot(const SwTextNode *pNd)
Top node of host page when in header/footer.
Definition: wrtww8.hxx:777
void InsUInt32(sal_uInt32 n)
Definition: wrtww8.hxx:1148
HdFtPlcDrawObj * m_pHFSdrObjs
Definition: wrtww8.hxx:538
void PrepareStorage()
Definition: wrtww8.cxx:3622
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:583
void SetCurPam(sal_uLong nStt, sal_uLong nEnd)
Definition: wrtww8.cxx:1875
bool m_bOrigShowChanges
Remember the original Show Changes mode.
Definition: wrtww8.hxx:487
void GetSortedBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen)
Definition: wrtw8nds.cxx:2105
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const =0
const NfKeywordTable & GetNfKeywordTable()
Definition: wrtww8.cxx:4442
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:999
std::vector< std::shared_ptr< WW8_PdAttrDesc > > m_SectionAttributes
Definition: wrtww8.hxx:243
virtual ~WW8_WrPlcAnnotations() override
Definition: wrtw8sty.cxx:2127
virtual ErrCode ExportDocument_Impl() override
Format-dependent part of the actual export.
Definition: wrtww8.cxx:3429
void setCvBack(sal_uInt32 cvBack)
Definition: wrtww8.hxx:1642
WW8_WrPlcTextBoxes * m_pHFTextBxs
Definition: wrtww8.hxx:501
virtual MSWordSections & Sections() const override
Access to the sections/headers/footres.
Definition: wrtww8.cxx:3922
sal_uInt32 mnShapeId
Definition: wrtww8.hxx:343
void WriteHeaderFooterText(const SwFormat &rFormat, bool bHeader)
Write header/footer text.
Definition: wrtw8sty.cxx:1990
~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:434
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:351
void GatherChapterFields()
Setup the chapter fields (maChapterFieldLocs).
Definition: ww8atr.cxx:386
void Out_SwFormatBox(const SvxBoxItem &rBox, bool bShadow)
is for all boxes except in tables.
Definition: ww8atr.cxx:4451
const SwTextNode & rNd
Definition: wrtww8.hxx:1497
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:393
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:1383
virtual const std::vector< sal_uInt32 > * GetShapeIdArr() const override
Definition: wrtw8esh.cxx:944
void Finish(WW8_CP nEndCp)
Definition: wrtww8.hxx:265
void OutSwFormatRefMark(const SwFormatRefMark &rAttr)
Definition: wrtw8nds.cxx:1218
sal_uInt16 BuildGetSlot(const SwFormat &rFormat)
Get slot number during building the style table.
Definition: wrtw8sty.cxx:181
OUString m_aMainStg
Definition: wrtww8.hxx:453
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:80
virtual void WriteHyperlinkData(const ::sw::mark::IFieldmark &rFieldmark) override
Definition: wrtww8.cxx:4306
virtual MSWordSections & Sections() const =0
Access to the sections/headers/footres.
SwWW8WrGrf(WW8Export &rW)
Definition: wrtww8.hxx:1419
unsigned int mnHdFtIndex
Definition: wrtww8.hxx:348
bool m_bIgnoreEmpty
Definition: wrtww8.hxx:1252
OUString BookmarkToWord(const OUString &rBookmark)
Definition: wrtw8nds.cxx:1201
sal_uLong nOldStart
Definition: wrtww8.hxx:434
void Append(const SdrObject &rObj, sal_uInt32 nShapeId)
Definition: wrtw8esh.cxx:928
void OutputStartNode(const SwStartNode &)
Output SwStartNode.
Definition: wrtww8.cxx:4394
IMarkVector m_rSortedBookmarksEnd
Definition: wrtww8.hxx:582
const SwPageDesc * m_pCurrentPageDesc
Definition: wrtww8.hxx:493
virtual ~WW8Export() override
Definition: wrtww8.cxx:3913
const SwPageDesc * pPageDesc
Definition: wrtww8.hxx:173
void Append(WW8_CP nCp, const void *pData)
Definition: wrtww8.cxx:813
std::unique_ptr< SwNumRuleTable > m_pUsedNumTable
Definition: wrtww8.hxx:458
bool HasFlysAt(sal_Int32 nSwPos) const
Definition: wrtw8nds.cxx:638
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const override
Definition: wrtw8nds.cxx:884
void Append(WW8_CP nCp, const SwFormatFootnote &rFootnote)
Definition: wrtw8sty.cxx:2049
SvStream & Strm() const
Definition: wrtww8.hxx:1175
const T & GetItem(TypedWhichId< T > nWhich) const
Definition: wrtww8.hxx:627
sal_uInt8 mnTyp
Definition: wrtww8.hxx:1459
sal_uInt32 m_cvFore
Definition: wrtww8.hxx:1634
sal_uInt16 m_nLastFormatId
Style of last TextNode in normal range.
Definition: wrtww8.hxx:482
virtual void PrepareNewPageDesc(const SfxItemSet *pSet, const SwNode &rNd, const SwFormatPageDesc *pNewPgDescFormat, const SwPageDesc *pNewPgDesc) override
Helper method for OutputSectionBreaks() and OutputFollowPageDesc().
Definition: ww8atr.cxx:647
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:283
unsigned char sal_uInt8
Make exporting a Writer Frame easy.
std::unique_ptr< SwWW8WrGrf > m_pGrf
Definition: wrtww8.hxx:532
bool IsDropCap(int nSwPos)
Definition: wrtw8nds.cxx:809
WW8Export(SwWW8Writer *pWriter, SwDoc &rDocument, std::shared_ptr< SwUnoCursor > &pCurrentPam, SwPaM *pOriginalPam, bool bDot)
Setup the exporter.
Definition: wrtww8.cxx:3901
sal_uInt16 m_aHeadingParagraphStyles[MAXLEVEL]
Definition: wrtww8.hxx:1567
sal_uInt16 GetHeadingParagraphStyleId(sal_uInt16 nLevel) const
Definition: wrtww8.hxx:1622
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:1422
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:607
void OutSprmBytes(sal_uInt8 *pBytes, sal_uInt16 nSiz)
Definition: wrtww8.hxx:1099
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:254
sal_uInt16 nScript
Definition: wrtww8.hxx:1458
bool IsTextAttr(sal_Int32 nSwPos)
Definition: wrtw8esh.cxx:1196
std::vector< EECharAttrib > aTextAtrArr
Definition: wrtww8.hxx:1451
Point maParentPos
Definition: wrtww8.hxx:345
virtual void AppendAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen)=0
sal_uLong mnPos
Definition: wrtww8.hxx:1379
sal_uInt16 nResults
Definition: wrtww8.hxx:1351
bool bLoadAllFonts
If true, all fonts are loaded before processing the document.
Definition: wrtww8.hxx:336
virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) override
Return value indicates if an inherited outline numbering is suppressed.
Definition: ww8atr.cxx:749
SvStream * pDataStrm
Streams for WW97 Export.
Definition: wrtww8.hxx:988
std::unique_ptr< WW8_WrtFactoids > m_pFactoids
Definition: wrtww8.hxx:500
bool WriteKFText(WW8Export &rWrt)
Definition: wrtw8sty.cxx:1886
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:3927
MSWordAttrIter & operator=(const MSWordAttrIter &)=delete
SvStream & WriteInt16(sal_Int16 nInt16)
std::pair< OUString, sal_uLong > aBookmarkPair
Definition: wrtww8.hxx:408
sw::util::CharRuns::const_iterator maCharRunIter
Definition: wrtww8.hxx:1500
bool m_bHideTabLeaderAndPageNumbers
Definition: wrtww8.hxx:565
void WriteFootnoteBegin(const SwFormatFootnote &rFootnote, ww::bytes *pO=nullptr)
Definition: ww8atr.cxx:3373
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:544
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:2055
ww8::Frames m_aFrames
Definition: wrtww8.hxx:492
void WriteSdrTextObj(const SdrTextObj &rObj, sal_uInt8 nTyp)
Definition: wrtw8esh.cxx:1315
void IncrementHdFtIndex()
Definition: wrtww8.hxx:1128
bool m_bOutFlyFrameAttrs
Definition: wrtww8.hxx:549
bool NearestBookmark(sal_Int32 &rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly)
Find the nearest bookmark from the current position.
Definition: wrtw8nds.cxx:2010
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:1361
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:1937
std::unique_ptr< WW8_WrPlc0 > pTextPos
Definition: wrtww8.hxx:246
sal_uInt16 GetSlot(const SwFormat *pFormat) const
Get id of the style (rFormat).
Definition: wrtw8sty.cxx:172
bool m_bInWriteTOX
Definition: wrtww8.hxx:557
virtual void AppendSection(const SwPageDesc *pPageDesc, const SwSectionFormat *pFormat, sal_uLong nLnNum) override
Definition: wrtw8nds.cxx:3340
void AppendFkpEntry(WW8_FC nEndFc, short nVarLen=0, const sal_uInt8 *pSprms=nullptr)
Definition: wrtww8.cxx:979
sal_uInt16 Count() const
Definition: wrtww8.hxx:1295
SfxMedium * mpMedium
Definition: wrtww8.hxx:933
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:1900
std::vector< WW8_CP > aCps
Definition: wrtww8.hxx:242
OUString m_sInitials
Definition: wrtww8.hxx:1249
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:1948
SwWW8WrGrf & operator=(const SwWW8WrGrf &)=delete
WW8_WrPlcPn & operator=(const WW8_WrPlcPn &)=delete
WW8_WrPlcFootnoteEdn(sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1236
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:4024
void StartCommentOutput(std::u16string_view rName)
Definition: ww8atr.cxx:1903
sal_uInt16 m_nUsedSlots
Definition: wrtww8.hxx:1569
void Write()
Definition: wrtww8gr.cxx:857
WW8_WrPlcField * CurrentFieldPlc() const
Fields.
Definition: ww8atr.cxx:1733
OUString msAltNm
Definition: wrtww8.hxx:301
SwPaM * m_pOrigPam
Definition: wrtww8.hxx:574
virtual void PrepareNewPageDesc(const SfxItemSet *pSet, const SwNode &rNd, const SwFormatPageDesc *pNewPgDescFormat, const SwPageDesc *pNewPgDesc)=0
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:1329
void Write(SvStream &rStrm)
Definition: wrtww8.cxx:838
sal_uInt16 mnHei
Definition: wrtww8.hxx:1381
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:3817
bool OutputFollowPageDesc(const SfxItemSet *pSet, const SwTextNode *pNd)
The return value indicates, if a follow page desc is written.
Definition: ww8atr.cxx:604
std::vector< const EECharAttrib * > aChrTextAtrArr
Definition: wrtww8.hxx:1452
bool m_bFontSizeWritten
Is font size written already as part of the current character properties?
Definition: wrtww8.hxx:568
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:686
bool InitStd97CodecUpdateMedium(::msfilter::MSCodec_Std97 &rCodec)
Definition: wrtww8.cxx:3382
void BulletDefinitions()
Write the numbering picture bullets.
Definition: wrtww8.cxx:1562
sal_uInt16 nStructSiz
Definition: wrtww8.hxx:1331
MSWordAttrIter * pOld
Definition: wrtww8.hxx:1432
sal_Int32 nCurrentSwPos
Definition: wrtww8.hxx:1507
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:921
const SwFormat * m_pCurrentStyle
Definition: wrtww8.hxx:535
void CreateEscher()
Definition: wrtw8esh.cxx:1455
Base class for WW8Export and DocxExport.
Definition: wrtww8.hxx:448
RndStdIds
sal_Int32 mnThick
Definition: wrtww8.hxx:346
sal_Int32 SearchNext(sal_Int32 nStartPos)
Definition: wrtw8nds.cxx:258
void StoreDoc1()
Definition: wrtww8.cxx:3088
SwRedlineTable::size_type nCurRedlinePos
Definition: wrtww8.hxx:1508
bool IsExportableAttr(sal_Int32 nSwPos) const
Definition: wrtw8nds.cxx:785
SvxFrameDirection GetCurrentPageDirection() const
Right to left?
Definition: wrtw8nds.cxx:1573
const SwFormatDrop & GetSwFormatDrop() const
Definition: wrtww8.hxx:1553
virtual void WriteHeadersFooters(sal_uInt8 nHeadFootFlags, const SwFrameFormat &rFormat, const SwFrameFormat &rLeftFormat, const SwFrameFormat &rFirstPageFormat, sal_uInt8 nBreakCode)=0
Output the actual headers and footers.
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:930
virtual void WriteHeadersFooters(sal_uInt8 nHeadFootFlags, const SwFrameFormat &rFormat, const SwFrameFormat &rLeftFormat, const SwFrameFormat &rFirstPageFormat, sal_uInt8 nBreakCode) override
Output the actual headers and footers.
Definition: wrtw8sty.cxx:1503
const SfxItemSet * m_pISet
Definition: wrtww8.hxx:455
o3tl::sorted_vector< sal_Int32 > SwSoftPageBreakList
Definition: wrtww8.hxx:132
bool mbParaIsRTL
Definition: wrtww8.hxx:1510
const SwTextNode & GetNode() const
Definition: wrtww8.hxx:1560
std::vector< CharRunEntry > CharRuns
Definition: msfilter.hxx:374
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:1378
static void Out_SwFormatTableBox(ww::bytes &rO, const SvxBoxItem *rBox)
FormatBox2() is for TC structures in tables.
Definition: ww8atr.cxx:4506
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:359
MSWordAttrIter(const MSWordAttrIter &)=delete
virtual void WriteHyperlinkData(const ::sw::mark::IFieldmark &rFieldmark)=0
static bool NoPageBreakSection(const SfxItemSet *pSet)
Definition: wrtw8nds.cxx:3166
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:1266
void AppendPc(WW8_FC nStartFc)
Definition: wrtww8.cxx:1341
virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const =0
const SwPageDesc * pOldPageDesc
Definition: wrtww8.hxx:436
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:4001
bool operator==(const GraphicDetails &rIn) const
Definition: wrtww8.hxx:1387
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:580
virtual void AppendBookmark(const OUString &rName)=0
PlcDrawObj & operator=(const PlcDrawObj &)=delete
SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const
Definition: ww8atr.cxx:4587
WW8_WrtBookmarks * m_pBkmks
Definition: wrtww8.hxx:470
virtual ~MSWordExportBase()
Definition: wrtww8.cxx:3887
MSWordSections(const MSWordSections &)
void OutAttr(sal_Int32 nSwPos, bool bWriteCombinedChars)
Definition: wrtw8nds.cxx:398
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:760
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:1321
sal_uInt8 maWW8_FFN[6]
Definition: wrtww8.hxx:299
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:1429
sal_uInt16 mnIdx
Definition: wrtww8.hxx:1404
static void WriteLong(SvStream &rStrm, sal_Int32 nVal)
Definition: wrtww8.hxx:959
static void FillCount(SvStream &rStrm, sal_uLong nCount)
Definition: wrtww8.cxx:931
ww8::Frame maContent
Definition: wrtww8.hxx:344
std::unique_ptr< WW8_WrMagicTable > m_pMagicTable
Definition: wrtww8.hxx:528
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:2156
std::stack< MSWordSaveData > m_aSaveData
Stack to remember the nesting (see MSWordSaveData for more)
Definition: wrtww8.hxx:577
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:4061
WW8_WrtRedlineAuthor * m_pRedlAuthors
Definition: wrtww8.hxx:471
std::unique_ptr< WW8_WrPlcPn > m_pChpPlc
Definition: wrtww8.hxx:496
wwFontHelper m_aFontHelper
Definition: wrtww8.hxx:451
SvxFrameDirection TrueFrameDirection(const SwFrameFormat &rFlyFormat) const
Right to left?
Definition: wrtw8nds.cxx:1619
IMarkVector m_rSortedBookmarksStart
Definition: wrtww8.hxx:581
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:282
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:3227
void WriteEscher()
Definition: wrtw8esh.cxx:1468
std::vector< const Graphic * > m_vecBulletPic
Vector to record all the graphics of bullets.
Definition: wrtww8.hxx:909
std::vector< aBookmarkPair > m_aImplicitBookmarks
Definition: wrtww8.hxx:491
std::vector< Frame > Frames
STL container of Frames.
static const SwSectionFormat * GetSectionFormat(const SwNode &rNd)
Format of the section.
Definition: ww8atr.cxx:619
bool m_bDot
Template or document.
Definition: wrtww8.hxx:996
void AbstractNumberingDefinitions()
Write all Levels for all SwNumRules - LVLF.
Definition: wrtw8num.cxx:397
bool IsAnchorLinkedToThisNode(sal_uLong nNodePos)
Definition: wrtw8nds.cxx:627
static bool TransBrush(const Color &rCol, WW8_SHD &rShd)
TransBrush converts SW-Brushes to WW.
Definition: ww8atr.cxx:1562
const SwNode * pPDNd
Definition: wrtww8.hxx:175
std::unique_ptr< MSWordStyles > m_pStyles
Definition: wrtww8.hxx:498
std::unique_ptr< WW8_WrPlcFootnoteEdn > pEdn
Endnotes - structure to remember them, and output.
Definition: wrtww8.hxx:993
std::unique_ptr< WW8_WrPlcFootnoteEdn > pFootnote
Footnotes - structure to remember them, and output.
Definition: wrtww8.hxx:992
virtual ErrCode WriteStorage() override
Definition: wrtww8.cxx:3680
ErrCode ExportDocument(bool bWriteAll)
The main function to export the document.
Definition: wrtww8.cxx:3294
std::map< OUString, size_t > m_Lists
list-id -> abstractnumdef index
Definition: wrtww8.hxx:462
bool RequiresImplicitBookmark()
Definition: wrtw8nds.cxx:828
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:1641
std::unique_ptr< WW8AttributeOutput > m_pAttrOutput
Converting attributes to stream data.
Definition: wrtww8.hxx:1000