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