LibreOffice Module sw (master)  1
wrtww8.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WRTWW8_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_WW8_WRTWW8_HXX
22 
23 #include <sot/storage.hxx>
24 #include <tools/solar.h>
25 #include <tools/gen.hxx>
26 #include <editeng/editdata.hxx>
27 
28 #include <shellio.hxx>
29 
30 #include "ww8struc.hxx"
31 #include "ww8scan.hxx"
32 #include "fields.hxx"
33 #include "types.hxx"
34 #include "writerhelper.hxx"
35 #include <msfilter.hxx>
36 #include <expfld.hxx>
37 #include "WW8TableInfo.hxx"
38 
39 #include <vcl/graph.hxx>
40 
41 #include <o3tl/optional.hxx>
42 #include <o3tl/typed_flags_set.hxx>
43 
44 #include <cstddef>
45 #include <memory>
46 #include <map>
47 #include <vector>
48 
49 
50 class SvxBrushItem;
51 class EditTextObject;
52 
53 // some forward declarations
54 class SwWW8AttrIter;
55 namespace msfilter
56 {
57  class MSCodec_Std97;
58 }
59 
60 namespace editeng { class SvxBorderLine; }
61 
64 class RtfAttributeOutput;
65 class BitmapPalette;
66 class SwEscherEx;
67 class DateTime;
68 namespace vcl { class Font; }
69 class MSWordExportBase;
70 class SdrObject;
71 class SdrTextObj;
72 class SfxItemSet;
73 class SvStream;
74 class SvxFontItem;
75 class SvxBoxItem;
76 class SwAttrSet;
77 class SwCharFormat;
78 class SwContentNode;
79 class SwField;
80 class SwFormat;
81 class SwFormatContent;
82 class SwFormatFootnote;
83 class SwFrameFormat;
84 class SwGrfNode;
85 class SwModify;
86 class SwNumFormat;
87 class SwNumRule;
88 class SwNumRuleTable;
89 class SwPageDesc;
90 class SwFormatPageDesc;
91 class SwOLENode;
92 class SwPostItField;
93 class SwRedlineData;
94 class SwSectionFormat;
95 class SwSectionNode;
96 class SwTableNode;
97 class SwTOXType;
98 class SwTextFormatColl;
99 class SwTextNode;
100 class SwWW8WrGrf;
101 class SwWW8Writer;
102 class MSWordStyles;
103 class WW8AttributeOutput;
104 class WW8Export;
105 class MSWordAttrIter;
106 class WW8_WrFkp;
107 class WW8_WrPlc0;
108 class WW8_WrPlc1;
109 class WW8_WrPlcField;
110 class WW8_WrMagicTable;
112 class WW8_WrPlcPn;
114 class WW8_WrtFactoids;
115 class MSWordSections;
116 class WW8_WrPlcTextBoxes;
117 class WW8_WrPct; // administration
118 class WW8_WrtBookmarks;
121 class SwMSConvertControls;
122 class WW8_WrPc;
123 
124 namespace com { namespace sun { namespace star { namespace embed {
125 class XEmbeddedObject;
126 } } } }
127 typedef std::map<const css::embed::XEmbeddedObject*, sal_Int32> WW8OleMap;
128 struct WW8_PdAttrDesc;
129 class SvxBrushItem;
130 namespace sw
131 {
132 namespace mark
133 {
134 class IFieldmark;
135 }
136 }
137 typedef std::set< sal_Int32 > SwSoftPageBreakList;
138 
139 #define GRF_MAGIC_1 0x12 // 3 magic bytes for PicLocFc attribute
140 #define GRF_MAGIC_2 0x34
141 #define GRF_MAGIC_3 0x56
142 #define GRF_MAGIC_321 0x563412L
143 
144 #define OLE_PREVIEW_AS_EMF //If we want to export ole2 previews as emf in ww8+
145 
146 enum class FieldFlags : sal_uInt8 // for InsertField- Method
147 {
148  NONE = 0x00,
149  Start = 0x01,
150  CmdStart = 0x02,
151  CmdEnd = 0x04,
152  End = 0x10,
153  Close = 0x20,
154  All = 0x37
155 };
156 namespace o3tl {
157  template<> struct typed_flags<FieldFlags> : is_typed_flags<FieldFlags, 0x37> {};
158 }
159 
160 enum TextTypes //enums for TextTypes
161 {
162  TXT_MAINTEXT = 0, /*TXT_FTNEDN = 1,*/ TXT_HDFT = 2, TXT_FTN = 3,
164 };
165 
170 {
174 };
175 
177 {
180  const SwNode* pPDNd;
182  ::o3tl::optional<sal_uInt16> const oPgRestartNo;
183  bool const bIsFirstParagraph;
184 
185  WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFormat* pFormat,
186  sal_uLong nLnRestart, ::o3tl::optional<sal_uInt16> oPgRestart = o3tl::nullopt,
187  const SwNode* pNd = nullptr, bool bIsFirstPara = false )
188  : pPageDesc( pPD ), pSectionFormat( pFormat ), pPDNd( pNd ),
189  nLnNumRestartNo( nLnRestart ), oPgRestartNo( oPgRestart ),
190  bIsFirstParagraph( bIsFirstPara )
191  {}
192 
193  bool IsProtected() const;
194 };
195 
197 // Plc for PageDescs -> Sepx ( Section Extensions )
199 {
200 protected:
202  std::vector<WW8_SepInfo> aSects;
203 
204  void CheckForFacinPg( const WW8Export& rWrt ) const;
205  void NeedsDocumentProtected(const WW8_SepInfo &rInfo);
206 
207  //No copy, no assign
208  MSWordSections( const MSWordSections& );
210 public:
211  explicit MSWordSections( MSWordExportBase& rExport );
212  virtual ~MSWordSections();
213 
214  virtual bool HeaderFooterWritten();
215 
216  void AppendSection( const SwPageDesc* pPd,
217  const SwSectionFormat* pSectionFormat,
218  sal_uLong nLnNumRestartNo,
219  bool bIsFirstParagraph = false );
220  void AppendSection( const SwFormatPageDesc& rPd,
221  const SwNode& rNd,
222  const SwSectionFormat* pSectionFormat,
223  sal_uLong nLnNumRestartNo );
224 
226  sal_uInt16 CurrentNumberOfColumns( const SwDoc &rDoc ) const;
227 
229  static sal_uInt16 NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo& rInfo );
230 
232 
235 
236  static void SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat,
237  sal_uInt8 nFlag );
238  static void SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat,
239  sal_uInt8 nFlag );
240 
242  static bool HasBorderItem( const SwFormat& rFormat );
243 };
244 
246 {
247  std::vector<WW8_CP> aCps;
248  std::vector< std::shared_ptr<WW8_PdAttrDesc> > m_SectionAttributes;
249  // hack to prevent adding sections in endnotes
251  std::unique_ptr<WW8_WrPlc0> pTextPos; // Position of the headers/footers
252 
253  WW8_WrPlcSepx( const WW8_WrPlcSepx& ) = delete;
254  WW8_WrPlcSepx& operator=( const WW8_WrPlcSepx& ) = delete;
255 
256 public:
257  explicit WW8_WrPlcSepx( MSWordExportBase& rExport );
258  virtual ~WW8_WrPlcSepx() override;
259 
260  virtual bool HeaderFooterWritten() override; // override
261 
262  void AppendSep( WW8_CP nStartCp,
263  const SwPageDesc* pPd,
264  const SwSectionFormat* pSectionFormat,
265  sal_uLong nLnNumRestartNo );
266  void AppendSep( WW8_CP nStartCp, const SwFormatPageDesc& rPd,
267  const SwNode& rNd,
268  const SwSectionFormat* pSectionFormat,
269  sal_uLong nLnNumRestartNo );
270  void Finish( WW8_CP nEndCp ) { aCps.push_back( nEndCp ); }
271 
272  bool WriteKFText( WW8Export& rWrt );
273  void WriteSepx( SvStream& rStrm ) const;
274  void WritePlcSed( WW8Export& rWrt ) const;
275  void WritePlcHdd( WW8Export& rWrt ) const;
276 
277 private:
278  void WriteFootnoteEndText( WW8Export& rWrt, sal_uLong nCpStt );
279 public:
280  void OutHeaderFooter(WW8Export& rWrt, bool bHeader,
281  const SwFormat& rFormat, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode);
282 };
283 
284 // class WW8_WrPct to construct the piece table
286 {
287  std::vector<std::unique_ptr<WW8_WrPc>> m_Pcts;
289 public:
290  explicit WW8_WrPct(WW8_FC nStartFc);
291  ~WW8_WrPct();
292  void AppendPc(WW8_FC nStartFc);
293  void WritePc( WW8Export& rWrt );
294  void SetParaBreak();
295  WW8_CP Fc2Cp( sal_uLong nFc ) const;
296 };
297 
299 class wwFont
300 {
301 //In some future land the stream could be converted to a nice stream interface
302 //and we could have harmony
303 private:
305  OUString msFamilyNm;
306  OUString msAltNm;
307  bool mbAlt;
310  rtl_TextEncoding const meChrSet;
311 public:
312  wwFont( const OUString &rFamilyName, FontPitch ePitch, FontFamily eFamily,
313  rtl_TextEncoding eChrSet);
314  void Write( SvStream *pTableStram ) const;
315  void WriteDocx( DocxAttributeOutput* rAttrOutput ) const;
316  void WriteRtf( const RtfAttributeOutput* rAttrOutput ) const;
317  OUString const & GetFamilyName() const { return msFamilyNm; }
318  friend bool operator < (const wwFont &r1, const wwFont &r2);
319 };
320 
322 {
323 private:
325  std::map<wwFont, sal_uInt16> maFonts;
326 
328  std::vector< const wwFont* > AsVector() const;
329 
330 public:
333  void InitFontTable(const SwDoc& rDoc);
334  sal_uInt16 GetId(const SvxFontItem& rFont);
335  sal_uInt16 GetId(const wwFont& rFont);
336  void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib );
337  void WriteFontTable( DocxAttributeOutput& rAttrOutput );
338  void WriteFontTable( const RtfAttributeOutput& rAttrOutput );
339 
341  bool bLoadAllFonts: 1;
342 };
343 
344 class DrawObj
345 {
346 public:
347  WW8_CP const mnCp; // CP-Pos of references
348  sal_uInt32 mnShapeId; // ShapeId for the SwFrameFormats
349  ww8::Frame maContent; // the frame itself
350  Point const maParentPos; // Points
351  sal_Int32 mnThick; // Border Thicknesses
352  SvxFrameDirection const mnDirection; // If BiDi or not
353  unsigned int const mnHdFtIndex; // 0 for main text, +1 for each subsequent
354  // msword hd/ft
355 
356  DrawObj(const ww8::Frame &rContent, WW8_CP nCp, Point aParentPos, SvxFrameDirection nDir,
357  unsigned int nHdFtIndex)
358  : mnCp(nCp), mnShapeId(0), maContent(rContent), maParentPos(aParentPos),
359  mnThick(0), mnDirection(nDir), mnHdFtIndex(nHdFtIndex) {}
360  void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick);
361 };
362 
363 typedef std::vector<DrawObj> DrawObjVector;
364 typedef std::vector<DrawObj *> DrawObjPointerVector;
365 
366 class PlcDrawObj // PC for DrawObjects and Text-/OLE-/GRF-Boxes
367 {
368 private:
369  DrawObjVector maDrawObjs; // vector of drawobjs
370 protected:
371  virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
372  sal_uInt32 nLen) const = 0;
373  virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const = 0;
374 public:
376  void WritePlc( WW8Export& rWrt ) const;
377  bool Append( WW8Export const &, WW8_CP nCp, const ww8::Frame& rFormat,
378  const Point& rNdTopLeft );
379  int size() { return maDrawObjs.size(); };
381  virtual ~PlcDrawObj();
382 private:
383  PlcDrawObj(const PlcDrawObj&) = delete;
384  PlcDrawObj& operator=(const PlcDrawObj&) = delete;
385 };
386 
388 {
389 public:
391 private:
392  virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
393  sal_uInt32 nLen) const override;
394  virtual WW8_CP GetCpOffset(const WW8Fib &) const override;
395 private:
396  MainTextPlcDrawObj(const MainTextPlcDrawObj&) = delete;
398 };
399 
401 {
402 public:
404 private:
405  virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
406  sal_uInt32 nLen) const override;
407  virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const override;
408 private:
409  HdFtPlcDrawObj(const HdFtPlcDrawObj&) = delete;
410  HdFtPlcDrawObj& operator=(const HdFtPlcDrawObj&) = delete;
411 };
412 
413 typedef std::pair<OUString, sal_uLong> aBookmarkPair;
414 
416 {
417  public:
418  virtual void Write(Writer &rWrt) override;
419 };
420 
433 {
436  std::unique_ptr<ww::bytes> pOOld;
437  std::shared_ptr<SwUnoCursor> pOldPam;
442 
443  bool bOldWriteAll : 1;
444  bool bOldOutTable : 1;
446  bool bOldStartTOX : 1;
447  bool bOldInWriteTOX : 1;
448  // m_bOutPageDescs does not have to be saved in MSWordExportBase::SaveData
449  // since it is only modified when outputting special texts.
450 };
451 
454 {
455 public:
457  std::vector<sal_uLong> m_aChapterFieldLocs;
458  OUString const m_aMainStg;
459  std::vector<const SwTOXType*> m_aTOXArr;
460  const SfxItemSet* m_pISet; // for double attributes
461  WW8_WrPct* m_pPiece; // Pointer to Piece-Table
462  std::unique_ptr<SwNumRuleTable> m_pUsedNumTable; // all used NumRules
464  std::map<size_t, std::pair<size_t, size_t>> m_OverridingNums;
466  std::map<std::pair<size_t, size_t>, size_t> m_OverridingNumsR;
468  std::map<OUString, size_t> m_Lists;
469 
471  std::map< sal_uInt16, sal_uInt16 > m_aRuleDuplicates; //map to Duplicated numrules
472  std::stack< sal_Int32 > m_aCurrentCharPropStarts;
475  std::shared_ptr<NfKeywordTable> m_pKeyMap;
476  std::unique_ptr<SvxMSExportOLEObjects> m_pOLEExp;
477  std::unique_ptr<SwMSConvertControls> m_pOCXExp;
478  WW8OleMap m_aOleMap; // To remember all already exported ole objects
480 
481  sal_uInt16 m_nCharFormatStart;
482  sal_uInt16 m_nFormatCollStart;
483  sal_uInt16 m_nStyleBeforeFly;
484  sal_uInt16 m_nLastFormatId;
486  sal_uInt16 m_nUniqueList;
487  unsigned int m_nHdFtIndex;
488 
491 
492 public:
493  /* implicit bookmark vector containing pairs of node indexes and bookmark names */
494  std::vector<aBookmarkPair> m_aImplicitBookmarks;
495  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;
504  std::unique_ptr<WW8_WrtFactoids> m_pFactoids;
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 SwModify* m_pOutFormatNode; // write Format or Node
539  const SwFormat *m_pCurrentStyle; // iff bStyDef=true, then this store the current style
540 
541  MainTextPlcDrawObj *m_pSdrObjs; // Draw-/Fly-Objects
542  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( sal_uLong nStart, sal_uLong 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 HasRefToObject( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo );
638 
640  static OUString GetBookmarkName( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo );
641 
643  void OutputItemSet( const SfxItemSet& rSet, bool bPapFormat, bool bChpFormat, sal_uInt16 nScript, bool bExportParentItemSet );
644 
646 
648  SvxFrameDirection TrueFrameDirection( const SwFrameFormat& rFlyFormat ) const;
649 
652 
654 
658  sal_uInt16 DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 nLevel, sal_uInt16 nVal );
659  SwNumRule * DuplicateNumRuleImpl(const SwNumRule *pRule);
660 
662  sal_uInt16 DuplicateAbsNum(OUString const& rListId,
663  SwNumRule const& rAbstractRule);
664 
665 
668  sal_uInt16 OverrideNumRule(SwNumRule const& rExistingRule,
669  OUString const& rListId,
670  SwNumRule const& rAbstractRule);
671 
673  virtual AttributeOutputBase& AttrOutput() const = 0;
674 
676  virtual MSWordSections& Sections() const = 0;
677 
679  virtual bool SupportsOneColumnBreak() const = 0;
680 
682  virtual bool FieldsQuoted() const = 0;
683 
685  virtual bool AddSectionBreaksForTOX() const = 0;
686 
688  virtual bool ignoreAttributeForStyleDefaults( sal_uInt16 /*nWhich*/ ) const { return false; }
689 
691  virtual bool PreferPageBreakBefore() const = 0;
692 
694  virtual bool AllowPostponedTextInTable() const { return true; }
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 ) = 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( sal_uLong nStt, sal_uLong 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, bool isTextNodeEmpty = 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& rLeftFormat, const SwFrameFormat& rFirstPageFormat,
790  sal_uInt8 nBreakCode) = 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_uLong 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( const OUString& 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 ) = 0;
852 
854  virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) = 0;
855 
857  void OutputStartNode( const SwStartNode& );
858 
860  virtual void OutputEndNode( const SwEndNode& );
861 
863  virtual void OutputGrfNode( const SwGrfNode& ) = 0;
864 
866  virtual void OutputOLENode( const SwOLENode& ) = 0;
867 
868  virtual void OutputLinkedOLE( const OUString& ) = 0;
869 
871  void OutputSectionNode( const SwSectionNode& );
872  static void UpdateTocSectionNodeProperties(const SwSectionNode& rSectionNode);
873 
874  virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) = 0;
875 
880 
884  bool NearestBookmark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly );
885 
886  void GetSortedBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen );
887 
888  bool GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt, sal_Int32 nEnd,
889  IMarkVector& rArr );
890 
893  void NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly );
894 
895  void GetSortedAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen );
896 
897  bool GetAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nStt, sal_Int32 nEnd,
898  IMarkVector& rArr );
899 
901 
902  void SetCurPam(sal_uLong nStt, sal_uLong nEnd);
903 
905  std::shared_ptr<SvxBrushItem> getBackground();
907  int CollectGrfsOfBullets();
909  void BulletDefinitions();
910 
911  bool NeedSectionBreak( const SwNode& rNd ) const;
912  bool NeedTextNodeSplit( const SwTextNode& rNd, SwSoftPageBreakList& pList ) const;
913 
914  std::vector<const Graphic*> m_vecBulletPic;
915 
916 public:
917  MSWordExportBase( SwDoc *pDocument, std::shared_ptr<SwUnoCursor> & pCurrentPam, SwPaM *pOriginalPam );
918  virtual ~MSWordExportBase();
919 
920  // TODO move as much as possible here from WW8Export! ;-)
921 
922  static void CorrectTabStopInSet( SfxItemSet& rSet, sal_Int32 nAbsLeft );
923 
924 private:
925  MSWordExportBase( const MSWordExportBase& ) = delete;
926  MSWordExportBase& operator=( const MSWordExportBase& ) = delete;
927 };
928 
930 class SwWW8Writer: public StgWriter
931 {
932 // friends to get access to m_pExport
933 // FIXME avoid that, this is probably not what we want
934 // (if yes, remove the friends, and provide here a GetExport() method)
935 friend void WW8_WrtRedlineAuthor::Write(Writer &rWrt);
936 
939 
940 public:
941  SwWW8Writer(const OUString& rFltName, const OUString& rBaseURL);
942  virtual ~SwWW8Writer() override;
943 
944  virtual ErrCode WriteStorage() override;
945  virtual ErrCode WriteMedium( SfxMedium& ) override;
946 
947  // TODO most probably we want to be able to get these in
948  // MSExportFilterBase
950 
951 public:
952  static void InsUInt16(ww::bytes &rO, sal_uInt16 n);
953  static void InsUInt32(ww::bytes &rO, sal_uInt32 n);
954  static void InsAsString16(ww::bytes &rO, const OUString& rStr);
955  static void InsAsString8(ww::bytes & O, const OUString& rStr,
956  rtl_TextEncoding eCodeSet);
957 
958  static sal_uLong FillUntil( SvStream& rStrm, sal_uLong nEndPos = 0 );
959  static void FillCount( SvStream& rStrm, sal_uLong nCount );
960 
961  static void WriteShort( SvStream& rStrm, sal_Int16 nVal ) { rStrm.WriteInt16( nVal ); }
962  static void WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal );
963 
964  static void WriteLong( SvStream& rStrm, sal_Int32 nVal ) { rStrm.WriteInt32( nVal ); }
965  static void WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal );
966 
967  static void WriteString16(SvStream& rStrm, const OUString& rStr,
968  bool bAddZero);
969  static void WriteString8(SvStream& rStrm, const OUString& rStr,
970  bool bAddZero, rtl_TextEncoding eCodeSet);
971 
972  static void WriteString_xstz(SvStream& rStrm, const OUString& rStr, bool bAddZero);
973 
975 
976  using StgWriter::Write;
977  virtual ErrCode Write( SwPaM&, SfxMedium&, const OUString* ) override;
978  //Seems not an expected to provide method to access the private member
979  SfxMedium* GetMedia() { return mpMedium; }
980 
981 private:
982  SwWW8Writer(const SwWW8Writer&) = delete;
983  SwWW8Writer& operator=(const SwWW8Writer&) = delete;
984 };
985 
988 {
989 public:
990  std::unique_ptr<ww::bytes> pO;
991 
993 
994  std::unique_ptr<WW8Fib> pFib;
995  std::unique_ptr<WW8Dop> pDop;
996  std::unique_ptr<WW8_WrPlcFootnoteEdn> pFootnote;
997  std::unique_ptr<WW8_WrPlcFootnoteEdn> pEdn;
998  std::unique_ptr<WW8_WrPlcSepx> pSepx;
999 
1000  bool const m_bDot;
1001 
1002 protected:
1004  std::unique_ptr<WW8AttributeOutput> m_pAttrOutput;
1005 
1006 private:
1008 
1009 public:
1011  virtual AttributeOutputBase& AttrOutput() const override;
1012 
1014  virtual MSWordSections& Sections() const override;
1015 
1016  virtual bool PreferPageBreakBefore() const override { return true; }
1017 
1018  virtual bool AllowPostponedTextInTable() const override { return false; }
1019 
1020  virtual bool SupportsOneColumnBreak() const override { return false; }
1021 
1022  virtual bool FieldsQuoted() const override { return false; }
1023 
1024  virtual bool AddSectionBreaksForTOX() const override { return false; }
1025 private:
1027  virtual ErrCode ExportDocument_Impl() override;
1028 
1029  void PrepareStorage();
1030  void WriteFkpPlcUsw();
1031  void WriteMainText();
1032  void StoreDoc1();
1033 
1035  virtual void WriteNumbering() override;
1036 
1037  void OutOverrideListTab();
1038  void OutListNamesTab();
1039 
1040  void RestoreMacroCmds();
1041 
1042  void DoComboBox(css::uno::Reference<css::beans::XPropertySet> const & xPropSet);
1043 
1044 public:
1045 
1047  virtual void SetupSectionPositions( WW8_PdAttrDesc* pA ) override;
1048 
1049  bool MiserableFormFieldExportHack(const SwFrameFormat& rFrameFormat);
1050 
1053 
1054  sal_uInt16 AddRedlineAuthor( std::size_t nId );
1055 
1056  void WriteFootnoteBegin( const SwFormatFootnote& rFootnote, ww::bytes* pO = nullptr );
1057  void WritePostItBegin( ww::bytes* pO = nullptr );
1058  const SvxBrushItem* GetCurrentPageBgBrush() const;
1059  std::shared_ptr<SvxBrushItem> TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const;
1060 
1061  void AppendFlyInFlys(const ww8::Frame& rFrameFormat, const Point& rNdTopLeft);
1062  void WriteOutliner(const OutlinerParaObject& rOutliner, sal_uInt8 nTyp);
1063  void WriteSdrTextObj(const SdrTextObj& rObj, sal_uInt8 nTyp);
1064 
1065  sal_uInt32 GetSdrOrdNum( const SwFrameFormat& rFormat ) const;
1066  void CreateEscher();
1067  void WriteEscher();
1068 
1070  virtual void OutputField( const SwField* pField, ww::eField eFieldType,
1071  const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) override;
1072 
1073  void StartCommentOutput( const OUString& rName );
1074  void EndCommentOutput( const OUString& rName );
1075  void OutGrf(const ww8::Frame &rFrame);
1076  bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const& xOleStg,
1077  const tools::SvRef<SotStorage>& xObjStg, OUString const& rStorageName,
1078  SwOLENode* pOLENd);
1079 
1080  virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen ) override;
1081  virtual void AppendBookmark( const OUString& rName ) override;
1082  void AppendBookmarkEndWithCorrection( const OUString& rName );
1083 
1084  virtual void AppendAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen ) override;
1085 
1086  virtual void AppendSmartTags(SwTextNode& rTextNode) override;
1087 
1088  virtual void ExportGrfBullet(const SwTextNode& rNd) override;
1089  void OutGrfBullets(const ww8::Frame &rFrame);
1090 
1091  void MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo);
1092 
1093  void WriteAsStringTable(const std::vector<OUString>&, sal_Int32& rfcSttbf,
1094  sal_Int32& rlcbSttbf);
1095 
1096  virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) override;
1097 
1098  virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() ) override;
1099  void WriteChar( sal_Unicode c ) override;
1100 
1101  void OutSwString(const OUString&, sal_Int32 nStt, sal_Int32 nLen);
1102 
1103  WW8_CP Fc2Cp( sal_uLong nFc ) const { return m_pPiece->Fc2Cp( nFc ); }
1104 
1105  // some partly static semi-internal function declarations
1106 
1107  void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz )
1108  { pO->insert( pO->end(), pBytes, pBytes+nSiz ); }
1109 
1110  virtual void SectionBreaksAndFrames( const SwTextNode& rNode ) override;
1111 
1113  // #i76300#
1114  virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
1115  const SwNode& rNd,
1116  const SwFormatPageDesc* pNewPgDescFormat,
1117  const SwPageDesc* pNewPgDesc ) override;
1118 
1119  static void Out_BorderLine(ww::bytes& rO, const ::editeng::SvxBorderLine* pLine,
1120  sal_uInt16 nDist, sal_uInt16 nSprmNo, sal_uInt16 nSprmNoVer9,
1121  bool bShadow);
1122 
1123  void Out_SwFormatBox(const SvxBoxItem& rBox, bool bShadow);
1124  static void Out_SwFormatTableBox( ww::bytes& rO, const SvxBoxItem * rBox );
1125  void Out_CellRangeBorders(const SvxBoxItem * pBox, sal_uInt8 nStart,
1126  sal_uInt8 nLimit);
1127  static bool TransBrush(const Color& rCol, WW8_SHD& rShd);
1128  static WW8_BRCVer9 TranslateBorderLine(const ::editeng::SvxBorderLine& pLine,
1129  sal_uInt16 nDist, bool bShadow);
1130 
1131  // #i77805# - new return value indicates, if an inherited outline numbering is suppressed
1132  virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) override;
1133 
1134  unsigned int GetHdFtIndex() const { return m_nHdFtIndex; }
1135  void SetHdFtIndex(unsigned int nHdFtIndex) { m_nHdFtIndex = nHdFtIndex; }
1137 
1139  static sal_uInt8 GetNumId( sal_uInt16 eNumType );
1140 
1142  virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) override;
1143 
1144  SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const;
1145 
1147  void MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight,
1148  const ww8::Frame &rFrameFormat);
1149 
1150  void InsUInt16( sal_uInt16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }
1151  void InsInt16(sal_Int16 n) { InsUInt16(sal_uInt16(n)); }
1152  void InsUInt32( sal_uInt32 n ) { SwWW8Writer::InsUInt32( *pO, n ); }
1153  void WriteStringAsPara( const OUString& rText );
1154 
1156  WW8Export( SwWW8Writer *pWriter,
1157  SwDoc *pDocument, std::shared_ptr<SwUnoCursor> & pCurrentPam, SwPaM *pOriginalPam,
1158  bool bDot );
1159  virtual ~WW8Export() override;
1160 
1161  virtual void DoComboBox(const OUString &rName,
1162  const OUString &rHelp,
1163  const OUString &ToolTip,
1164  const OUString &rSelected,
1165  const css::uno::Sequence<OUString> &rListItems) override;
1166 
1167  virtual void DoFormText(const SwInputField * pField) override;
1168 
1169  void GetCurrentItems(ww::bytes &rItems) const;
1170 
1172  virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) override;
1173  virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark ) override;
1174 
1177 
1178  SwWW8Writer& GetWriter() const { return *m_pWriter; }
1179  SvStream& Strm() const { return m_pWriter->Strm(); }
1180 
1182  virtual void SaveData( sal_uLong nStt, sal_uLong nEnd ) override;
1183 
1185  virtual void RestoreData() override;
1186 
1188  virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
1189  const SwFrameFormat& rFormat, const SwFrameFormat& rLeftFormat, const SwFrameFormat& rFirstPageFormat,
1190  sal_uInt8 nBreakCode) override;
1191 
1192  virtual ExportFormat GetExportFormat() const override { return ExportFormat::DOC; }
1193 
1194 protected:
1196  virtual void OutputGrfNode( const SwGrfNode& ) override;
1197 
1199  virtual void OutputOLENode( const SwOLENode& ) override;
1200 
1201  virtual void OutputLinkedOLE( const OUString& ) override;
1202 
1203  virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) override;
1204 
1205 private:
1206  WW8Export(const WW8Export&) = delete;
1207  WW8Export& operator=(const WW8Export&) = delete;
1208 };
1209 
1210 class WW8_WrPlcSubDoc // double Plc for Footnotes/Endnotes and Postits
1211 {
1212 private:
1213  WW8_WrPlcSubDoc(const WW8_WrPlcSubDoc&) = delete;
1214  WW8_WrPlcSubDoc& operator=(const WW8_WrPlcSubDoc&) = delete;
1215 protected:
1216  std::vector<WW8_CP> aCps;
1217  std::vector<const void*> aContent; // PTRARR of SwFormatFootnote/PostIts/..
1218  std::vector<const SwFrameFormat*> aSpareFormats; // a backup for aContent: if there's no SdrObject, stores the fmt directly here
1219  std::unique_ptr<WW8_WrPlc0> pTextPos; // positions of the individual texts
1220 
1221  WW8_WrPlcSubDoc();
1222  virtual ~WW8_WrPlcSubDoc();
1223 
1224  bool WriteGenericText( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_CP& rCount );
1225  void WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_FC& rTextStt,
1226  sal_Int32& rTextCnt, WW8_FC& rRefStt, sal_Int32& rRefCnt ) const;
1227 
1228  virtual const std::vector<sal_uInt32>* GetShapeIdArr() const;
1229 };
1230 
1231 // double Plc for Footnotes/Endnotes
1233 {
1234 private:
1236 
1237  WW8_WrPlcFootnoteEdn(const WW8_WrPlcFootnoteEdn&) = delete;
1239 public:
1240  explicit WW8_WrPlcFootnoteEdn( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
1241 
1242  bool WriteText( WW8Export& rWrt );
1243  void WritePlc( WW8Export& rWrt ) const;
1244 
1245  void Append( WW8_CP nCp, const SwFormatFootnote& rFootnote );
1246 };
1247 
1249 {
1251  OUString msSimpleText;
1252  OUString msOwner;
1253  OUString m_sInitials;
1256  bool m_bIgnoreEmpty = true;
1257  WW8_Annotation(const SwPostItField* pPostIt, WW8_CP nRangeStart, WW8_CP nRangeEnd);
1258  explicit WW8_Annotation(const SwRedlineData* pRedline);
1260  bool HasRange() const;
1261 };
1262 
1263 class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc // double Plc for Postits
1264 {
1265 private:
1266  WW8_WrPlcAnnotations(const WW8_WrPlcAnnotations&) = delete;
1268  std::set<const SwRedlineData*> maProcessedRedlines;
1269 
1270  std::map<const OUString, std::pair<WW8_CP, bool>> m_aRangeStartPositions;
1271 public:
1273  virtual ~WW8_WrPlcAnnotations() override;
1274 
1275  void AddRangeStartPosition(const OUString& rName, WW8_CP nStartCp, bool bIgnoreEmpty);
1276  void Append( WW8_CP nCp, const SwPostItField* pPostIt );
1277  void Append( WW8_CP nCp, const SwRedlineData* pRedLine );
1278  bool IsNewRedlineComment( const SwRedlineData* pRedLine );
1279  bool WriteText( WW8Export& rWrt );
1280  void WritePlc( WW8Export& rWrt ) const;
1281 };
1282 
1283 class WW8_WrPlcTextBoxes : public WW8_WrPlcSubDoc // double Plc for Textboxes
1284 { // Frame/DrawTextboxes!
1285 private:
1287  std::vector<sal_uInt32> aShapeIds; // VARARR of ShapeIds for the SwFrameFormats
1288  virtual const std::vector<sal_uInt32>* GetShapeIdArr() const override;
1289 
1290  WW8_WrPlcTextBoxes(const WW8_WrPlcTextBoxes&) = delete;
1291  WW8_WrPlcTextBoxes& operator=(WW8_WrPlcTextBoxes const &) = delete;
1292 public:
1293  explicit WW8_WrPlcTextBoxes( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
1294 
1295  bool WriteText( WW8Export& rWrt );
1296  void WritePlc( WW8Export& rWrt ) const;
1297  void Append( const SdrObject& rObj, sal_uInt32 nShapeId );
1298  void Append( const SwFrameFormat* pFormat, sal_uInt32 nShapeId );
1299  sal_uInt16 Count() const { return aContent.size(); }
1300  sal_uInt16 GetPos( const void* p ) const
1301  {
1302  std::vector<const void*>::const_iterator it
1303  = std::find( aContent.begin(), aContent.end(), p );
1304  return it == aContent.end() ? USHRT_MAX : it - aContent.begin();
1305  }
1306 };
1307 
1308 class WW8_WrPlcPn // Plc for Page Numbers
1309 {
1310 private:
1312  // Plc for Chpx and Papx ( incl PN-Plc )
1313  std::vector<std::unique_ptr<WW8_WrFkp>> m_Fkps;
1314  sal_uInt16 nFkpStartPage;
1316 
1317  WW8_WrPlcPn(const WW8_WrPlcPn&) = delete;
1318  WW8_WrPlcPn& operator=(const WW8_WrPlcPn&) = delete;
1319 public:
1320  WW8_WrPlcPn( WW8Export& rWrt, ePLCFT ePl, WW8_FC nStartFc );
1321  ~WW8_WrPlcPn();
1322  void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const sal_uInt8* pSprms = nullptr);
1323  void WriteFkps();
1324  void WritePlc();
1326 };
1327 
1328 // class WW8_WrPlc1 is only used for fields
1330 {
1331 private:
1332  std::vector<WW8_CP> aPos;
1333  std::unique_ptr<sal_uInt8[]> pData; // content ( structures )
1335  sal_uInt16 const nStructSiz;
1336 
1337  WW8_WrPlc1(const WW8_WrPlc1&) = delete;
1338  WW8_WrPlc1& operator=(const WW8_WrPlc1&) = delete;
1339 protected:
1340  sal_uInt16 Count() const { return aPos.size(); }
1341  void Write( SvStream& rStrm );
1342  WW8_CP Prev() const;
1343 public:
1344  explicit WW8_WrPlc1( sal_uInt16 nStructSz );
1345  ~WW8_WrPlc1();
1346  void Append( WW8_CP nCp, const void* pData );
1347  void Finish( sal_uLong nLastCp, sal_uLong nStartCp );
1348 };
1349 
1350 // class WW8_WrPlcField is for fields
1352 {
1353 private:
1355  sal_uInt16 nResults;
1356 
1357  WW8_WrPlcField(const WW8_WrPlcField&) = delete;
1358  WW8_WrPlcField& operator=(const WW8_WrPlcField&) = delete;
1359 public:
1360  WW8_WrPlcField( sal_uInt16 nStructSz, sal_uInt8 nTTyp )
1361  : WW8_WrPlc1( nStructSz ), nTextTyp( nTTyp ), nResults(0)
1362  {}
1363  void Write( WW8Export& rWrt );
1364  void ResultAdded() { ++nResults; }
1365  sal_uInt16 ResultCount() const { return nResults; }
1366 };
1367 
1369 {
1370 private:
1371  WW8_WrMagicTable(const WW8_WrMagicTable&) = delete;
1372  WW8_WrMagicTable& operator=(const WW8_WrMagicTable&) = delete;
1373 public:
1375  void Append( WW8_CP nCp, sal_uLong nData );
1376  void Write( WW8Export& rWrt );
1377 };
1378 
1380 {
1381 public:
1382  ww8::Frame const maFly; // surrounding FlyFrames
1383  sal_uLong mnPos; // FilePos of the graphics
1384  sal_uInt16 const mnWid; // Width of the graphics
1385  sal_uInt16 const mnHei; // Height of the graphics
1386 
1387  GraphicDetails(const ww8::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
1388  : maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei)
1389  {}
1390 
1391  bool operator==(const GraphicDetails& rIn) const
1392  {
1393  return (
1394  (mnWid == rIn.mnWid) && (mnHei == rIn.mnHei) &&
1395  (maFly.RefersToSameFrameAs(rIn.maFly))
1396  );
1397  }
1398 };
1399 
1400 // class SwWW8WrGrf collects graphics and issues them
1402 {
1403 private:
1406 
1407  std::vector<GraphicDetails> maDetails;
1408  sal_uInt16 mnIdx; // index in file positions
1409 
1410  static void WritePICFHeader(SvStream& rStrm, const ww8::Frame &rFly,
1411  sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight,
1412  const SwAttrSet* pAttrSet = nullptr);
1413  void WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem);
1414  void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd,
1415  const ww8::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight);
1416 
1417  static void WritePICBulletFHeader(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight);
1418  void WriteGrfForBullet(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight);
1419 
1420  SwWW8WrGrf(const SwWW8WrGrf&) = delete;
1421  SwWW8WrGrf& operator=(const SwWW8WrGrf&) = delete;
1422 public:
1423  explicit SwWW8WrGrf( WW8Export& rW ) : rWrt( rW ), mnIdx( 0 ) {}
1424  void Insert(const ww8::Frame &rFly);
1425  void Write();
1427  { return (mnIdx < maDetails.size()) ? maDetails[mnIdx++].mnPos : 0; }
1428 };
1429 
1434 {
1435 private:
1437  MSWordAttrIter(const MSWordAttrIter&) = delete;
1438  MSWordAttrIter& operator=(const MSWordAttrIter&) = delete;
1439 protected:
1441 public:
1442  explicit MSWordAttrIter( MSWordExportBase& rExport );
1443  virtual ~MSWordAttrIter();
1444 
1445  virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const = 0;
1446  virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const = 0;
1447  };
1448 
1451 {
1452 private:
1455  std::vector<EECharAttrib> aTextAtrArr;
1456  std::vector<const EECharAttrib*> aChrTextAtrArr;
1457  std::vector<rtl_TextEncoding> aChrSetArr;
1458  sal_Int32 nPara;
1459  sal_Int32 nCurrentSwPos;
1460  sal_Int32 nTmpSwPos; // for HasItem()
1461  rtl_TextEncoding eNdChrSet;
1462  sal_uInt16 nScript;
1464 
1465  sal_Int32 SearchNext( sal_Int32 nStartPos );
1466  void SetCharSet(const EECharAttrib& rTextAttr, bool bStart);
1467 
1468  void SetItemsThatDifferFromStandard(bool bCharAttr, SfxItemSet& rSet);
1469 
1470  MSWord_SdrAttrIter(const MSWord_SdrAttrIter&) = delete;
1472 public:
1473  MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj,
1474  sal_uInt8 nType );
1475  void NextPara( sal_Int32 nPar );
1476  void OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>* pWhichsToIgnore = nullptr);
1477  void OutEEField(const SfxPoolItem& rHt);
1478 
1479  bool IsTextAttr(sal_Int32 nSwPos);
1480 
1481  void NextPos() { if ( nCurrentSwPos < SAL_MAX_INT32 ) nCurrentSwPos = SearchNext( nCurrentSwPos + 1 ); }
1482 
1483  void OutAttr( sal_Int32 nSwPos );
1484  virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const override;
1485  virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const override;
1486  sal_Int32 WhereNext() const { return nCurrentSwPos; }
1487  rtl_TextEncoding GetNextCharSet() const;
1488  rtl_TextEncoding GetNodeCharSet() const { return eNdChrSet; }
1489 };
1490 
1491 // class SwWW8AttrIter is a helper for constructing the Fkp.chpx.
1492 // Only character attributes are considered; paragraph attributes do not need this treatment.
1493 // The paragraph and text attributes of the Writer are passed, and
1494 // Where() returns the next position where the attributes change.
1495 // IsTextAtr() tells if, at the position returned by Where(), there is
1496 // an attribute without end and with \xff in the text.
1497 // Using OutAttr(), the attributes on the passed SwPos are returned.
1499 {
1500 private:
1501  const SwTextNode& rNd;
1502 
1504  sw::util::CharRuns::const_iterator maCharRunIter;
1505 
1506  rtl_TextEncoding meChrSet;
1507  sal_uInt16 mnScript;
1509 
1511  sal_Int32 nCurrentSwPos;
1513 
1515 
1517 
1520 
1521  sal_Int32 SearchNext( sal_Int32 nStartPos );
1522 
1523  void OutSwFormatRefMark(const SwFormatRefMark& rAttr);
1524 
1525  void IterToCurrent();
1526 
1527  SwWW8AttrIter(const SwWW8AttrIter&) = delete;
1528  SwWW8AttrIter& operator=(const SwWW8AttrIter&) = delete;
1529 public:
1530  SwWW8AttrIter( MSWordExportBase& rWr, const SwTextNode& rNd );
1531 
1532  bool IsTextAttr( sal_Int32 nSwPos ) const;
1533  bool IsExportableAttr(sal_Int32 nSwPos) const;
1534  bool IncludeEndOfParaCRInRedlineProperties(sal_Int32 nPos) const;
1535  bool IsDropCap( int nSwPos );
1536  bool RequiresImplicitBookmark();
1537 
1538  void NextPos() { if ( nCurrentSwPos < SAL_MAX_INT32 ) nCurrentSwPos = SearchNext( nCurrentSwPos + 1 ); }
1539 
1540  void OutAttr( sal_Int32 nSwPos, bool bWriteCombinedChars );
1541  virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const override;
1542  virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const override;
1543  int OutAttrWithRange(const SwTextNode& rNode, sal_Int32 nPos);
1545  const SwRedlineData* GetRunLevelRedline( sal_Int32 nPos );
1546  FlyProcessingState OutFlys(sal_Int32 nSwPos);
1547  bool HasFlysAt(sal_Int32 nSwPos) const;
1548 
1549  sal_Int32 WhereNext() const { return nCurrentSwPos; }
1550  sal_uInt16 GetScript() const { return mnScript; }
1551  bool IsParaRTL() const { return mbParaIsRTL; }
1552  rtl_TextEncoding GetCharSet() const { return meChrSet; }
1553  OUString GetSnippet(const OUString &rStr, sal_Int32 nCurrentPos,
1554  sal_Int32 nLen) const;
1555  const SwFormatDrop& GetSwFormatDrop() const { return mrSwFormatDrop; }
1556 
1557  bool IsWatermarkFrame();
1558  bool IsAnchorLinkedToThisNode( sal_uLong nNodePos );
1559 
1560  void SplitRun( sal_Int32 nSplitEndPos );
1561 
1562  const SwTextNode& GetNode() const { return rNd; }
1563 };
1564 
1567 {
1570  std::unique_ptr<SwFormat*[]> m_pFormatA;
1571  sal_uInt16 m_nUsedSlots;
1572  bool const m_bListStyles;
1573  std::map<sal_uInt16, const SwNumRule*> m_aNumRules;
1574 
1576  std::vector<OString> m_aStyleIds;
1577 
1579  void BuildStylesTable();
1580 
1582  void BuildStyleIds();
1583 
1585  sal_uInt16 BuildGetSlot( const SwFormat& rFormat );
1586  sal_uInt16 BuildGetSlot( const SwNumRule& /*rNumRule*/ ) { return m_nUsedSlots++;}
1587 
1589  void GetStyleData( SwFormat* pFormat, bool& bFormatColl, sal_uInt16& nBase, sal_uInt16& nNext );
1590 
1592  void WriteProperties( const SwFormat* pFormat, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz );
1593 
1594  static sal_uInt16 GetWWId( const SwFormat& rFormat );
1595 
1596  void SetStyleDefaults( const SwFormat& rFormat, bool bPap );
1597 
1599  void OutputStyle( SwFormat* pFormat, sal_uInt16 nPos );
1600  void OutputStyle( const SwNumRule* pNumRule, sal_uInt16 nPos );
1601 
1602  MSWordStyles( const MSWordStyles& ) = delete;
1603  MSWordStyles& operator=( const MSWordStyles& ) = delete;
1604 
1605 public:
1606  MSWordStyles( MSWordExportBase& rExport, bool bListStyles = false );
1607  ~MSWordStyles();
1608 
1610  void OutputStylesTable();
1611 
1613  sal_uInt16 GetSlot( const SwFormat* pFormat ) const;
1614 
1616  static OString CreateStyleId(const OUString &rName);
1617 
1619  OString const & GetStyleId(sal_uInt16 nId) const;
1620 
1621  const SwFormat* GetSwFormat(sal_uInt16 nId) const { return m_pFormatA[nId]; }
1623  const SwNumRule* GetSwNumRule(sal_uInt16 nId) const;
1624  sal_uInt16 GetHeadingParagraphStyleId(sal_uInt16 nLevel) const { return m_aHeadingParagraphStyles[ nLevel ]; }
1625 };
1626 
1627 #define MSWORD_MAX_STYLES_LIMIT 4091
1628 
1629 sal_Int16 GetWordFirstLineOffset(const SwNumFormat &rFormat);
1630 // A bit of a bag on the side for now
1631 OUString FieldString(ww::eField eIndex);
1632 OUString BookmarkToWord(const OUString &rBookmark);
1633 
1635 {
1636  sal_uInt32 m_cvFore;
1637  sal_uInt32 m_cvBack;
1638 
1639 public:
1640  WW8SHDLong() : m_cvFore(0), m_cvBack(0) {}
1641 
1642  void Write(WW8Export & rExport);
1643  void setCvFore(sal_uInt32 cvFore) { m_cvFore = cvFore; }
1644  void setCvBack(sal_uInt32 cvBack) { m_cvBack = cvBack; }
1645 };
1646 
1647 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_WRTWW8_HXX
1648 
1649 /* 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:325
void WriteMainText()
Definition: wrtww8.cxx:2848
std::shared_ptr< NfKeywordTable > m_pKeyMap
Definition: wrtww8.hxx:475
bool WriteGenericText(WW8Export &rWrt, sal_uInt8 nTTyp, WW8_CP &rCount)
Definition: wrtw8sty.cxx:2027
sal_uInt16 CurrentNumberOfColumns(const SwDoc &rDoc) const
Number of columns based on the most recent WW8_SepInfo.
Definition: wrtw8sty.cxx:1056
WW8_CP m_nRangeEnd
Definition: wrtww8.hxx:1255
sal_Int32 nCurrentSwPos
Definition: wrtww8.hxx:1459
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:303
virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const override
Definition: wrtw8esh.cxx:852
sal_uInt16 const mnWid
Definition: wrtww8.hxx:1384
OUString GetSnippet(const OUString &rStr, sal_Int32 nCurrentPos, sal_Int32 nLen) const
Definition: wrtw8nds.cxx:1658
RedlineFlags m_nOrigRedlineFlags
Remember the original redline mode.
Definition: wrtww8.hxx:489
static sal_uInt16 GetWWId(const SwFormat &rFormat)
Definition: wrtw8sty.cxx:208
static void InsUInt32(ww::bytes &rO, sal_uInt32 n)
Definition: wrtww8.cxx:1729
Exporter of the binary Word file formats.
Definition: wrtww8.hxx:987
void OutAttr(sal_Int32 nSwPos)
Definition: wrtw8esh.cxx:1115
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:4376
ww8::Frame const maFly
Definition: wrtww8.hxx:1382
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:1135
void WritePlc()
Definition: wrtww8.cxx:1063
sal_Int32 WhereNext() const
Definition: wrtww8.hxx:1486
const SwFormat * GetSwFormat(sal_uInt16 nId) const
Definition: wrtww8.hxx:1621
WW8_WrPlcField(sal_uInt16 nStructSz, sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1360
void WriteProperties(const SwFormat *pFormat, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz)
Outputs attributes of one style.
Definition: wrtw8sty.cxx:522
WW8_WrPlcAnnotations & operator=(WW8_WrPlcAnnotations const &)=delete
Class to collect and output the sections/headers/footers.
Definition: wrtww8.hxx:198
virtual void AppendSmartTags(SwTextNode &)
Definition: wrtww8.hxx:714
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:3799
std::unique_ptr< ww::bytes > pO
Buffer.
Definition: wrtww8.hxx:990
void GetCurrentItems(ww::bytes &rItems) const
Definition: wrtw8nds.cxx:814
std::unique_ptr< SvxMSExportOLEObjects > m_pOLEExp
Definition: wrtww8.hxx:476
MSWordSections & operator=(const MSWordSections &)
SvStream * pTableStrm
Definition: wrtww8.hxx:992
bool m_bLinkedTextboxesHelperInitialized
Definition: wrtww8.hxx:516
Represents the style of a paragraph.
Definition: fmtcol.hxx:55
sal_uInt16 AddRedlineAuthor(std::size_t nId)
Definition: wrtww8.cxx:1671
unsigned int GetHdFtIndex() const
Definition: wrtww8.hxx:1134
virtual ~SwWW8Writer() override
Definition: wrtww8.cxx:3760
The class that has handlers for various resource types when exporting as DOCX.
virtual sal_uLong ReplaceCr(sal_uInt8 nChar) override
ReplaceCr() is used for Pagebreaks and Pagedescs.
Definition: ww8atr.cxx:3721
void AddRangeStartPosition(const OUString &rName, WW8_CP nStartCp, bool bIgnoreEmpty)
Definition: wrtw8sty.cxx:1984
void OutSwString(const OUString &, sal_Int32 nStt, sal_Int32 nLen)
Definition: wrtww8.cxx:1849
MainTextPlcDrawObj & operator=(const MainTextPlcDrawObj &)=delete
void MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo)
Definition: wrtww8.cxx:1499
WW8_WrPlcTextBoxes & operator=(WW8_WrPlcTextBoxes const &)=delete
WW8_WrMagicTable & operator=(const WW8_WrMagicTable &)=delete
void OutEEField(const SfxPoolItem &rHt)
Definition: wrtw8esh.cxx:1097
std::unique_ptr< WW8_WrPlcField > m_pFieldHFTextBxs
Definition: wrtww8.hxx:531
std::unique_ptr< WW8Fib > pFib
File Information Block.
Definition: wrtww8.hxx:994
virtual AttributeOutputBase & AttrOutput() const override
memory leak #i120098#, to hold the reference to unnamed SotStorage obj
Definition: wrtww8.cxx:3740
sal_uInt32 GetSdrOrdNum(const SwFrameFormat &rFormat) const
Definition: wrtw8esh.cxx:948
bool m_bEndAtTextEnd
Definition: wrtww8.hxx:563
const SfxPoolItem & GetItem(sal_uInt16 nWhich) const
Definition: wrtww8.cxx:792
bool m_bPrevTextNodeIsEmpty
Definition: wrtww8.hxx:497
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:445
FKP - Formatted disK Page.
Definition: wrtww8.cxx:120
void WriteStringAsPara(const OUString &rText)
Definition: wrtww8.cxx:1793
const ww8::Frame * pOldFlyFormat
Definition: wrtww8.hxx:440
rtl_TextEncoding GetNodeCharSet() const
Definition: wrtww8.hxx:1488
RndStdIds m_eNewAnchorType
Definition: wrtww8.hxx:523
bool m_bSubstituteBullets
Definition: wrtww8.hxx:566
bool m_bAddFootnoteTab
Definition: wrtww8.hxx:573
SvxFrameDirection const mnDirection
Definition: wrtww8.hxx:352
bool HasRange() const
An annotation has a range if start != end or the m_bIgnoreEmpty flag is cleared.
Definition: wrtw8sty.cxx:1974
void OutputStyle(SwFormat *pFormat, sal_uInt16 nPos)
Outputs one style - called (in a loop) from OutputStylesTable().
Definition: wrtw8sty.cxx:584
SvStream & WriteInt32(sal_Int32 nInt32)
sal_uInt16 GetId(const SwTextFormatColl &rColl) const
Return the numeric id of the style.
Definition: wrtw8sty.cxx:132
bool m_bFootnoteAtTextEnd
Definition: wrtww8.hxx:562
WW8_WrPlcFootnoteEdn & operator=(WW8_WrPlcFootnoteEdn const &)=delete
const SwFormatDrop & mrSwFormatDrop
Definition: wrtww8.hxx:1516
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:3780
virtual void OutputEndNode(const SwEndNode &)
Output SwEndNode.
Definition: wrtww8.cxx:4248
WW8_CP m_nRangeStart
Definition: wrtww8.hxx:1255
virtual void AppendBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen) override
Definition: wrtww8.cxx:1429
bool mbAlt
Definition: wrtww8.hxx:307
::o3tl::optional< sal_uInt16 > const oPgRestartNo
Definition: wrtww8.hxx:182
static void WriteString_xstz(SvStream &rStrm, const OUString &rStr, bool bAddZero)
Definition: wrtww8.cxx:1770
virtual bool FieldsQuoted() const =0
Determines if the import filter already quoted fields or not.
const SfxItemPool * pEditPool
Definition: wrtww8.hxx:1454
std::vector< const SwTOXType * > m_aTOXArr
Definition: wrtww8.hxx:459
void OutParaAttr(bool bCharAttr, const std::set< sal_uInt16 > *pWhichsToIgnore=nullptr)
Definition: wrtw8esh.cxx:1272
OUString msFamilyNm
Definition: wrtww8.hxx:305
Point * pOldFlyOffset
Definition: wrtww8.hxx:434
static sal_uLong GetSectionLineNo(const SfxItemSet *pSet, const SwNode &rNd)
Line number of the section start.
Definition: ww8atr.cxx:634
sal_uLong m_nCurStart
Definition: wrtww8.hxx:576
void OutputStylesTable()
Output the styles table.
Definition: wrtw8sty.cxx:683
void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick)
Definition: wrtw8esh.cxx:902
bool DocumentIsProtected() const
Definition: wrtww8.hxx:231
const SwRedlineData * GetParagraphLevelRedline()
Definition: wrtw8nds.cxx:1413
std::vector< sal_uInt8 > bytes
Definition: types.hxx:29
std::vector< const SwFrameFormat * > aSpareFormats
Definition: wrtww8.hxx:1218
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:1681
static void WriteString8(SvStream &rStrm, const OUString &rStr, bool bAddZero, rtl_TextEncoding eCodeSet)
Definition: wrtww8.cxx:1780
virtual void SaveData(sal_uLong nStt, sal_uLong nEnd)
Remember some of the members so that we can recurse in WriteText().
Definition: wrtww8.cxx:1908
virtual ErrCode ExportDocument_Impl()=0
Format-dependent part of the actual export.
void WriteFontTable(SvStream *pTableStream, WW8Fib &pFib)
Definition: wrtw8sty.cxx:912
const SwAttrSet * m_pStyAttr
Definition: wrtww8.hxx:537
Base class of all fields.
Definition: fldbas.hxx:280
static void WritePICBulletFHeader(SvStream &rStrm, const Graphic &rGrf, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:659
rtl_TextEncoding meChrSet
Definition: wrtww8.hxx:1506
SwWW8Writer & operator=(const SwWW8Writer &)=delete
void SetCharSet(const EECharAttrib &rTextAttr, bool bStart)
Definition: wrtw8esh.cxx:1071
bool MiserableFormFieldExportHack(const SwFrameFormat &rFrameFormat)
Definition: wrtw8esh.cxx:351
WW8_WrPct * m_pPiece
Definition: wrtww8.hxx:461
void WritePlcHdd(WW8Export &rWrt) const
Definition: wrtw8sty.cxx:1872
void WriteFootnoteEndText(WW8Export &rWrt, sal_uLong nCpStt)
Definition: wrtw8sty.cxx:1135
bool bOldWriteAll
WW8Export only.
Definition: wrtww8.hxx:443
bool m_bOutPageDescs
PageDescs (section properties) are being written.
Definition: wrtww8.hxx:554
Definition: doc.hxx:185
ePLCFT ePlc
Definition: wrtww8.hxx:1315
bool mbCharIsRTL
Definition: wrtww8.hxx:1508
sal_Int32 nPara
Definition: wrtww8.hxx:1458
const EditTextObject * pEditObj
Definition: wrtww8.hxx:1453
virtual ~PlcDrawObj()
Definition: wrtw8esh.cxx:520
sal_uLong nDataLen
Definition: wrtww8.hxx:1334
virtual void OutputLinkedOLE(const OUString &)=0
virtual bool FieldsQuoted() const override
Determines if the import filter already quoted fields or not.
Definition: wrtww8.hxx:1022
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:472
virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const override
Definition: wrtw8esh.cxx:871
sal_uInt16 BuildGetSlot(const SwNumRule &)
Definition: wrtww8.hxx:1586
void WriteRtf(const RtfAttributeOutput *rAttrOutput) const
Definition: wrtw8sty.cxx:819
bool NeedSectionBreak(const SwNode &rNd) const
Definition: wrtw8nds.cxx:2076
sal_uInt16 m_nCharFormatStart
Definition: wrtww8.hxx:481
WW8_WrPlcTextBoxes(sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1293
virtual void WriteNumbering() override
Output the numbering table.
Definition: wrtw8num.cxx:187
std::shared_ptr< SwUnoCursor > pOldPam
Definition: wrtww8.hxx:437
long SwTwips
Definition: swtypes.hxx:49
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:432
sal_uInt16 m_nStyleBeforeFly
style number of the node
Definition: wrtww8.hxx:483
OUString const & GetFamilyName() const
Definition: wrtww8.hxx:317
void ExportDopTypography(WW8DopTypography &rTypo)
Definition: wrtww8.cxx:591
sal_uInt8 const nTyp
Definition: wrtww8.hxx:1235
sal_Int32 m_nLinkedTextboxesChainId
Definition: wrtww8.hxx:517
Dialog to specify the properties of date form field.
void SetParaBreak()
Definition: wrtww8.cxx:1413
bool bOldOutTable
Definition: wrtww8.hxx:444
WW8_CP Fc2Cp(sal_uLong nFc) const
Definition: wrtww8.hxx:1103
void BuildStyleIds()
Based on pFormatA, fill in m_aStyleIds with unique, MS-like names.
Definition: wrtw8sty.cxx:338
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:958
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:272
void AppendFlyInFlys(const ww8::Frame &rFrameFormat, const Point &rNdTopLeft)
Definition: wrtw8esh.cxx:968
DrawObjVector & GetObjArr()
Definition: wrtww8.hxx:380
virtual const std::vector< sal_uInt32 > * GetShapeIdArr() const
Definition: wrtw8sty.cxx:2477
Used to export formatted text associated to drawings.
Definition: wrtww8.hxx:1450
friend bool operator<(const wwFont &r1, const wwFont &r2)
Definition: wrtw8sty.cxx:831
bool m_bOutFirstPage
Definition: wrtww8.hxx:555
virtual void AppendSmartTags(SwTextNode &rTextNode) override
Definition: wrtww8.cxx:1489
sal_uInt16 Count() const
Definition: wrtww8.hxx:1340
virtual bool HeaderFooterWritten() override
Definition: wrtw8sty.cxx:1051
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:902
void Write(WW8Export &rExport)
Definition: wrtww8.cxx:3877
std::map< const css::embed::XEmbeddedObject *, sal_Int32 > WW8OleMap
Definition: wrtww8.hxx:127
const SwNumRule * GetSwNumRule(sal_uInt16 nId) const
Get numbering rule of the nId-th style.
Definition: wrtw8sty.cxx:711
SfxMedium * GetMedia()
Definition: wrtww8.hxx:979
RndStdIds eOldAnchorType
Definition: wrtww8.hxx:435
const SfxItemSet * GetCurItemSet() const
Getter for pISet.
Definition: wrtww8.hxx:730
std::unique_ptr< SwMSConvertControls > m_pOCXExp
Definition: wrtww8.hxx:477
void WritePc(WW8Export &rWrt)
Definition: wrtww8.cxx:1373
virtual const SfxPoolItem * HasTextItem(sal_uInt16 nWhich) const override
Definition: wrtw8nds.cxx:773
std::unique_ptr< WW8_WrPlcField > m_pFieldEdn
Definition: wrtww8.hxx:528
OUString FieldString(ww::eField eIndex)
Definition: ww8atr.cxx:2607
WW8_CP Fc2Cp(sal_uLong nFc) const
Definition: wrtww8.cxx:1419
virtual ExportFormat GetExportFormat() const =0
std::shared_ptr< SvxBrushItem > TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const
Definition: wrtw8nds.cxx:1609
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:376
IDocumentSettingAccess & getIDocumentSettingAccess()
Definition: writer.cxx:136
sal_uInt16 const mnHei
Definition: wrtww8.hxx:1385
virtual WW8_CP GetCpOffset(const WW8Fib &) const override
Definition: wrtw8esh.cxx:859
void OutListNamesTab()
Definition: wrtw8num.cxx:645
IMarkVector m_rSortedAnnotationMarksEnd
Definition: wrtww8.hxx:588
static void SetHeaderFlag(sal_uInt8 &rHeadFootFlags, const SwFormat &rFormat, sal_uInt8 nFlag)
Definition: wrtw8sty.cxx:1194
ww8::FrameIter maFlyIter
Definition: wrtww8.hxx:1519
WW8_WrPlcAnnotations * m_pAtn
Definition: wrtww8.hxx:503
sal_uInt16 nFkpStartPage
Definition: wrtww8.hxx:1314
std::vector< sal_uInt32 > aShapeIds
Definition: wrtww8.hxx:1287
bool GetNumberFormat(const SwField &rField, OUString &rStr)
Definition: ww8atr.cxx:2531
WW8_CP const mnCp
Definition: wrtww8.hxx:347
WW8Export * m_pExport
Definition: wrtww8.hxx:937
sal_Int32 WhereNext() const
Definition: wrtww8.hxx:1549
sal_uInt16 GetScript() const
Definition: wrtww8.hxx:1550
void SectionProperties(const WW8_SepInfo &rSectionInfo, WW8_PdAttrDesc *pA=nullptr)
Write section properties.
Definition: wrtw8sty.cxx:1519
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:478
bool const m_bListStyles
If list styles are requested to be exported as well.
Definition: wrtww8.hxx:1572
void AddLinkTarget(const OUString &rURL)
Definition: wrtww8.cxx:3046
void WriteText()
Iterate through the nodes and call the appropriate OutputNode() on them.
Definition: wrtww8.cxx:2703
std::vector< WW8_SepInfo > aSects
Definition: wrtww8.hxx:202
virtual ExportFormat GetExportFormat() const override
Definition: wrtww8.hxx:1192
SwEscherEx * m_pEscher
Definition: wrtww8.hxx:544
WW8Export & rWrt
Definition: wrtww8.hxx:1311
sal_uInt16 sal_Unicode
static void InsAsString8(ww::bytes &O, const OUString &rStr, rtl_TextEncoding eCodeSet)
Definition: wrtww8.cxx:1746
bool bOldStartTOX
Definition: wrtww8.hxx:446
WW8_WrPlcField(const WW8_WrPlcField &)=delete
std::unique_ptr< WW8_WrPlcField > m_pFieldFootnote
Definition: wrtww8.hxx:527
FieldFlags
Definition: wrtww8.hxx:146
virtual void OutputOLENode(const SwOLENode &) override
Output SwOLENode.
Definition: wrtww8gr.cxx:196
virtual ErrCode WriteMedium(SfxMedium &) override
Definition: wrtww8.cxx:3634
WW8_WrPlcSepx & operator=(const WW8_WrPlcSepx &)=delete
void WritePlc(WW8Export &rWrt) const
Definition: wrtw8esh.cxx:615
virtual void OutputField(const SwField *pField, ww::eField eFieldType, const OUString &rFieldCmd, FieldFlags nMode=FieldFlags::All) override
Write the field.
Definition: ww8atr.cxx:1762
virtual void AppendBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen)=0
SwWW8AttrIter(const SwWW8AttrIter &)=delete
bool m_bExportModeRTF
Definition: wrtww8.hxx:570
MSWordExportBase & m_rExport
Definition: wrtww8.hxx:1440
std::map< OUString, LinkedTextboxInfo > m_aLinkedTextboxesHelper
Definition: wrtww8.hxx:515
Class to collect and output the styles table.
Definition: wrtww8.hxx:1566
void OutputFormat(const SwFormat &rFormat, bool bPapFormat, bool bChpFormat, bool bFlyFormat=false)
Output attributes.
Definition: ww8atr.cxx:769
MSWordExportBase(SwDoc *pDocument, std::shared_ptr< SwUnoCursor > &pCurrentPam, SwPaM *pOriginalPam)
Definition: wrtww8.cxx:3648
The class that has handlers for various resource types when exporting as RTF.
std::shared_ptr< SwUnoCursor > & m_pCurPam
Definition: wrtww8.hxx:577
SwPaM * pOldEnd
Definition: wrtww8.hxx:438
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:3831
WW8Export & rWrt
for access to the variables
Definition: wrtww8.hxx:1405
eField
Definition: fields.hxx:26
std::vector< WW8_CP > aPos
Definition: wrtww8.hxx:1332
const sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:95
const SvxBrushItem * GetCurrentPageBgBrush() const
Definition: wrtw8nds.cxx:1590
sal_uInt8 nTyp
Definition: wrtww8.hxx:1286
MSWordAttrIter * m_pChpIter
Definition: wrtww8.hxx:501
sal_Int32 SearchNext(sal_Int32 nStartPos)
Definition: wrtw8esh.cxx:1049
bool m_bInWriteEscher
Definition: wrtww8.hxx:559
std::vector< DrawObj > DrawObjVector
Definition: wrtww8.hxx:363
sal_uInt32 m_cvBack
Definition: wrtww8.hxx:1637
bool bOldFlyFrameAttrs
Definition: wrtww8.hxx:445
bool Append(WW8Export const &, WW8_CP nCp, const ww8::Frame &rFormat, const Point &rNdTopLeft)
Definition: wrtw8esh.cxx:876
void Append(WW8_CP nCp, const SwPostItField *pPostIt)
Definition: wrtw8sty.cxx:1990
WW8_WrPlc1(const WW8_WrPlc1 &)=delete
void WritePostItBegin(ww::bytes *pO=nullptr)
Definition: ww8atr.cxx:2589
bool bOldInWriteTOX
Definition: wrtww8.hxx:447
const SwTextNode * m_pTopNodeOfHdFtPage
Top node of host page when in hd/ft.
Definition: wrtww8.hxx:470
DateTime maDateTime
Definition: wrtww8.hxx:1254
void Finish(sal_uLong nLastCp, sal_uLong nStartCp)
Definition: wrtww8.cxx:839
WW8Export(SwWW8Writer *pWriter, SwDoc *pDocument, std::shared_ptr< SwUnoCursor > &pCurrentPam, SwPaM *pOriginalPam, bool bDot)
Setup the exporter.
Definition: wrtww8.cxx:3724
bool SetCurrentPageDescFromNode(const SwNode &rNd)
Definition: ww8atr.cxx:383
bool HasRefToObject(sal_uInt16 nTyp, const OUString *pName, sal_uInt16 nSeqNo)
Find the reference.
Definition: ww8atr.cxx:905
void OutGrf(const ww8::Frame &rFrame)
Definition: wrtww8gr.cxx:356
void Write(SvStream *pTableStram) const
Definition: wrtw8sty.cxx:787
MainTextPlcDrawObj * m_pSdrObjs
Definition: wrtww8.hxx:541
static WW8_BRCVer9 TranslateBorderLine(const ::editeng::SvxBorderLine &pLine, sal_uInt16 nDist, bool bShadow)
Definition: ww8atr.cxx:4271
void WriteChar(sal_Unicode c) override
Definition: wrtww8.cxx:1886
ww8::Frames maFlyFrames
Definition: wrtww8.hxx:1518
std::map< sal_uInt16, const SwNumRule * > m_aNumRules
Slot <-> List style map.
Definition: wrtww8.hxx:1573
bool IsNewRedlineComment(const SwRedlineData *pRedLine)
Definition: wrtw8sty.cxx:2016
virtual void AppendAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen) override
Definition: wrtww8.cxx:1472
WW8_WrPlcTextBoxes * m_pTextBxs
Definition: wrtww8.hxx:505
static void UpdateTocSectionNodeProperties(const SwSectionNode &rSectionNode)
Definition: wrtw8nds.cxx:3138
void WriteGraphicNode(SvStream &rStrm, const GraphicDetails &rItem)
Definition: wrtww8gr.cxx:753
ww8::WW8TableInfo::Pointer_t m_pTableInfo
Definition: wrtww8.hxx:479
bool FormatHdFtContainsChapterField(const SwFrameFormat &rFormat) const
Definition: ww8atr.cxx:368
MSWordStyles & operator=(const MSWordStyles &)=delete
bool m_bHeaderFooterWritten
Definition: wrtww8.hxx:250
rtl_TextEncoding GetCharSet() const
Definition: wrtww8.hxx:1552
Collects and outputs fonts.
Definition: wrtww8.hxx:299
std::map< size_t, std::pair< size_t, size_t > > m_OverridingNums
overriding numdef index -> (existing numdef index, abstractnumdef index)
Definition: wrtww8.hxx:464
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:79
unsigned int const mnHdFtIndex
Definition: wrtww8.hxx:353
WW8_CP Prev() const
Definition: wrtww8.cxx:818
int size()
Definition: wrtww8.hxx:379
sal_uLong GetFPos()
Definition: wrtww8.hxx:1426
virtual void ExportGrfBullet(const SwTextNode &rNd) override
Definition: wrtww8.cxx:1595
virtual void DoFormText(const SwInputField *pField)=0
rtl_TextEncoding const meChrSet
Definition: wrtww8.hxx:310
void Append(WW8_CP nCp, sal_uLong nData)
Definition: wrtww8.cxx:928
sal_uInt16 const nStructSiz
Definition: wrtww8.hxx:1335
void WriteFkps()
Definition: wrtww8.cxx:1042
Base class for various Writer styles.
Definition: format.hxx:43
void GetSortedAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen)
Definition: wrtw8nds.cxx:2009
sal_uInt16 m_nFormatCollStart
Definition: wrtww8.hxx:482
void Write(WW8Export &rWrt)
Definition: wrtww8.cxx:918
void Write(WW8Export &rWrt)
Definition: wrtww8.cxx:861
~WW8_WrPlcPn()
Definition: wrtww8.cxx:981
SwMSConvertControls & GetOCXExp()
Definition: wrtww8.hxx:1051
static void WriteString16(SvStream &rStrm, const OUString &rStr, bool bAddZero)
Definition: wrtww8.cxx:1757
void OutGrfBullets(const ww8::Frame &rFrame)
Definition: wrtww8.cxx:1613
sal_uInt8 * CopyLastSprms(sal_uInt8 &rLen)
Definition: wrtww8.cxx:985
void IterToCurrent()
Definition: wrtw8nds.cxx:174
int CollectGrfsOfBullets()
Populates m_vecBulletPic with all the bullet graphics used by numberings.
Definition: wrtww8.cxx:1533
void GetId(const wwFont &rFont)
Definition: wrtww8.hxx:625
std::unique_ptr< ww::bytes > pOOld
WW8Export only.
Definition: wrtww8.hxx:436
virtual sal_uLong ReplaceCr(sal_uInt8 nChar)=0
std::vector< GraphicDetails > maDetails
Definition: wrtww8.hxx:1407
virtual void SetupSectionPositions(WW8_PdAttrDesc *pA) override
Setup the pA's info.
Definition: wrtw8sty.cxx:1447
bool IsProtected() const
Definition: wrtw8sty.cxx:1243
sal_Int32 nTmpSwPos
Definition: wrtww8.hxx:1460
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:136
virtual bool PreferPageBreakBefore() const override
If saving page break is preferred as a paragraph attribute (yes) or as a special character (no)...
Definition: wrtww8.hxx:1016
const SwTextNode * GetHdFtPageRoot() const
Top node of host page when in header/footer.
Definition: wrtww8.hxx: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
void NextPos()
Definition: wrtww8.hxx:1538
virtual ~MSWordSections()
Definition: wrtw8sty.cxx:1038
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:1939
void OutputSectionNode(const SwSectionNode &)
Output SwSectionNode.
Definition: wrtw8nds.cxx:3085
sal_uLong m_nCurEnd
Definition: wrtww8.hxx:576
Style of a layout element.
Definition: frmfmt.hxx:57
#define SAL_MAX_INT32
const OutlinerParaObject * mpRichText
Definition: wrtww8.hxx:1250
OUString msOwner
Definition: wrtww8.hxx:1252
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:1809
void SplitRun(sal_Int32 nSplitEndPos)
Definition: wrtw8nds.cxx:1160
virtual void RestoreData()
Restore what was saved in SaveData().
Definition: wrtww8.cxx:1940
virtual ~MSWordAttrIter()
Definition: wrtw8nds.cxx:156
bool const bIsFirstParagraph
Definition: wrtww8.hxx:183
void WritePlcSed(WW8Export &rWrt) const
Definition: wrtw8sty.cxx:1847
void SetCurItemSet(const SfxItemSet *pS)
Setter for pISet.
Definition: wrtww8.hxx:733
tools::SvRef< SotStorage > xEscherStg
Definition: wrtww8.hxx:1007
const SwSectionFormat * pSectionFormat
Definition: wrtww8.hxx:179
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:277
static sal_uInt16 NumberOfColumns(const SwDoc &rDoc, const WW8_SepInfo &rInfo)
Number of columns of the provided WW8_SepInfo.
Definition: wrtw8sty.cxx:1065
std::vector< Frame >::iterator FrameIter
STL iterator for Frames.
sal_uInt8 const mnTyp
Definition: wrtww8.hxx:1463
std::unique_ptr< WW8_WrPlcSepx > pSepx
Sections/headers/footers.
Definition: wrtww8.hxx:998
void SubstituteBullet(OUString &rNumStr, rtl_TextEncoding &rChrSet, OUString &rFontName) const
Definition: wrtw8num.cxx:674
WW8_WrPlcField & operator=(const WW8_WrPlcField &)=delete
std::vector< WW8_CP > aCps
Definition: wrtww8.hxx:1216
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:1980
void UpdatePosition(SwWW8AttrIter *pAttrIter, sal_Int32 nCurrentPos)
Update the information for GetNextPos().
Definition: wrtw8nds.cxx:1826
WW8_WrPlcSepx(const WW8_WrPlcSepx &)=delete
For the output of sections.
Definition: wrtw8sty.cxx:76
virtual const SfxPoolItem * HasTextItem(sal_uInt16 nWhich) const override
Definition: wrtw8esh.cxx:1211
virtual void WriteNumbering()=0
Output the numbering table.
sal_uInt16 m_nUniqueList
current number for creating unique list names
Definition: wrtww8.hxx:486
sal_uInt16 mnScript
Definition: wrtww8.hxx:1507
FlyProcessingState OutFlys(sal_Int32 nSwPos)
Definition: wrtw8nds.cxx:585
void WriteDocx(DocxAttributeOutput *rAttrOutput) const
Definition: wrtw8sty.cxx:800
PlcDrawObj()
Definition: wrtww8.hxx:375
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:1260
WW8_WrPct(WW8_FC nStartFc)
Definition: wrtww8.cxx:1341
bool IsParaRTL() const
Definition: wrtww8.hxx:1551
void WriteFkpPlcUsw()
Definition: wrtww8.cxx:2900
const SwModify * m_pOutFormatNode
Definition: wrtww8.hxx:538
std::unique_ptr< WW8Dop > pDop
Document Properties.
Definition: wrtww8.hxx:995
~WW8_WrPlc1()
Definition: wrtww8.cxx:814
virtual void OutputTextNode(SwTextNode &)
Output SwTextNode.
Definition: wrtw8nds.cxx:2102
bool m_bFirstTOCNodeWithSection
Definition: wrtww8.hxx:498
sw::util::CharRuns maCharRuns
Definition: wrtww8.hxx:1503
void OutputContentNode(SwContentNode &)
Call the right (virtual) function according to the type of the item.
Definition: wrtw8nds.cxx:3396
std::unique_ptr< WW8_WrPlc0 > pTextPos
Definition: wrtww8.hxx:1219
virtual void ExportGrfBullet(const SwTextNode &rNd)=0
bool mbDocumentIsProtected
Definition: wrtww8.hxx:201
sal_uInt16 GetPos(const void *p) const
Definition: wrtww8.hxx:1300
std::vector< rtl_TextEncoding > aChrSetArr
Definition: wrtww8.hxx:1457
virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const override
Definition: wrtw8esh.cxx:864
void WriteGrfFromGrfNode(SvStream &rStrm, const SwGrfNode &rNd, const ww8::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:633
void OutputSectionBreaks(const SfxItemSet *pSet, const SwNode &rNd, bool isCellOpen=false, bool isTextNodeEmpty=false)
Start new section.
Definition: ww8atr.cxx:423
bool WriteText(WW8Export &rWrt)
Definition: wrtww8.cxx:3815
vector_type::size_type size_type
Definition: docary.hxx:330
static void WriteShort(SvStream &rStrm, sal_Int16 nVal)
Definition: wrtww8.hxx:961
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:1570
int GetGrfIndex(const SvxBrushItem &rBrush)
Returns the index of a picture bullet, used in numberings.
Definition: wrtww8.cxx:1644
OUString const m_aMainStg
Definition: wrtww8.hxx:458
const ww8::Frame * m_pParentFrame
Definition: wrtww8.hxx:519
TextTypes
Definition: wrtww8.hxx:160
MSWordAttrIter *const pOld
Definition: wrtww8.hxx:1436
std::vector< const void * > aContent
Definition: wrtww8.hxx:1217
static sal_uInt8 GetNumId(sal_uInt16 eNumType)
Convert the SVX numbering type to id.
Definition: ww8atr.cxx:705
The writer class that gets called for the WW8 filter.
Definition: wrtww8.hxx:930
rtl_TextEncoding eNdChrSet
Definition: wrtww8.hxx:1461
const WW8_SepInfo * CurrentSectionInfo()
The most recent WW8_SepInfo.
Definition: wrtw8sty.cxx:1084
void AppendBookmarkEndWithCorrection(const OUString &rName)
Definition: wrtww8.cxx:1510
void ResultAdded()
Definition: wrtww8.hxx:1364
const SwRedlineData * GetRunLevelRedline(sal_Int32 nPos)
Definition: wrtw8nds.cxx:1438
void MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight, const ww8::Frame &rFrameFormat)
Nasty swap for bidi if necessary.
Definition: wrtw8esh.cxx:580
void DoComboBox(css::uno::Reference< css::beans::XPropertySet > const &xPropSet)
SvxFrameDirection GetDefaultFrameDirection() const
Definition: wrtw8nds.cxx:1518
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:1151
virtual bool HeaderFooterWritten()
Definition: wrtw8sty.cxx:1046
virtual void OutputField(const SwField *pField, ww::eField eFieldType, const OUString &rFieldCmd, FieldFlags nMode=FieldFlags::All)=0
Write the field.
ePLCFT
Definition: ww8scan.hxx:381
OUString msSimpleText
Definition: wrtww8.hxx:1251
void AppendSep(WW8_CP nStartCp, const SwPageDesc *pPd, const SwSectionFormat *pSectionFormat, sal_uLong nLnNumRestartNo)
Definition: wrtw8sty.cxx:1102
virtual bool AddSectionBreaksForTOX() const override
Determines the Section Breaks are to be added for TOX Section.
Definition: wrtww8.hxx:1024
std::vector< sal_uLong > m_aChapterFieldLocs
Definition: wrtww8.hxx:457
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:1576
virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner=ww8::WW8TableNodeInfoInner::Pointer_t()) override
Definition: wrtww8.cxx:1876
std::map< sal_uInt16, sal_uInt16 > m_aRuleDuplicates
Definition: wrtww8.hxx:471
DrawObjVector maDrawObjs
Definition: wrtww8.hxx:369
HdFtPlcDrawObj & operator=(const HdFtPlcDrawObj &)=delete
SwWW8Writer & GetWriter() const
Definition: wrtww8.hxx:1178
FontFamily const meFamily
Definition: wrtww8.hxx:309
sal_Int16 GetWordFirstLineOffset(const SwNumFormat &rFormat)
Definition: wrtw8num.cxx:174
wwFont(const OUString &rFamilyName, FontPitch ePitch, FontFamily eFamily, rtl_TextEncoding eChrSet)
Definition: wrtw8sty.cxx:720
MSWord_SdrAttrIter & operator=(const MSWord_SdrAttrIter &)=delete
static void SetFooterFlag(sal_uInt8 &rHeadFootFlags, const SwFormat &rFormat, sal_uInt8 nFlag)
Definition: wrtw8sty.cxx:1204
void StartCommentOutput(const OUString &rName)
Definition: ww8atr.cxx:1900
WW8_WrPlcTextBoxes(const WW8_WrPlcTextBoxes &)=delete
virtual bool SupportsOneColumnBreak() const =0
Determines if column break with one column should be exported or not.
static void CorrectTabStopInSet(SfxItemSet &rSet, sal_Int32 nAbsLeft)
Definition: ww8atr.cxx:681
WW8OleMap m_aOleMap
Definition: wrtww8.hxx:478
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:2172
virtual void SectionBreaksAndFrames(const SwTextNode &rNode) override
Definition: wrtww8.cxx:2651
MSWordExportBase & m_rExport
Definition: wrtww8.hxx:1568
std::vector< std::unique_ptr< WW8_WrFkp > > m_Fkps
Definition: wrtww8.hxx:1313
bool WriteText(WW8Export &rWrt)
Definition: wrtw8esh.cxx:908
void InsUInt16(sal_uInt16 n)
Definition: wrtww8.hxx:1150
unsigned int m_nHdFtIndex
Definition: wrtww8.hxx:487
bool m_bBreakBefore
Definition: wrtww8.hxx:551
void Out_CellRangeBorders(const SvxBoxItem *pBox, sal_uInt8 nStart, sal_uInt8 nLimit)
Definition: ww8atr.cxx:4494
FontPitch
virtual void OutputGrfNode(const SwGrfNode &)=0
Output SwGrfNode.
static bool HasBorderItem(const SwFormat &rFormat)
Should we output borders?
Definition: wrtw8sty.cxx:1311
const SwRangeRedline * pCurRedline
Definition: wrtww8.hxx:1510
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:1152
HdFtPlcDrawObj * m_pHFSdrObjs
Definition: wrtww8.hxx:542
void PrepareStorage()
Definition: wrtww8.cxx:3544
void OutHeaderFooter(WW8Export &rWrt, bool bHeader, const SwFormat &rFormat, sal_uLong &rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode)
Definition: wrtw8sty.cxx:1214
IMarkVector m_rSortedAnnotationMarksStart
Definition: wrtww8.hxx:587
void SetCurPam(sal_uLong nStt, sal_uLong nEnd)
Definition: wrtww8.cxx:1891
bool const m_bDot
Template or document.
Definition: wrtww8.hxx:1000
bool m_bOrigShowChanges
Remember the original Show Changes mode.
Definition: wrtww8.hxx:490
void GetSortedBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen)
Definition: wrtw8nds.cxx:2043
std::shared_ptr< SvxBrushItem > getBackground()
Get background color of the document, if there is one.
Definition: wrtww8.cxx:1516
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const =0
const NfKeywordTable & GetNfKeywordTable()
Definition: wrtww8.cxx:4271
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:318
SwWW8Writer * m_pWriter
Pointer to the writer.
Definition: wrtww8.hxx:1003
std::vector< std::shared_ptr< WW8_PdAttrDesc > > m_SectionAttributes
Definition: wrtww8.hxx:248
virtual ~WW8_WrPlcAnnotations() override
Definition: wrtw8sty.cxx:2021
virtual ErrCode ExportDocument_Impl() override
Format-dependent part of the actual export.
Definition: wrtww8.cxx:3351
void setCvBack(sal_uInt32 cvBack)
Definition: wrtww8.hxx:1644
WW8_WrPlcTextBoxes * m_pHFTextBxs
Definition: wrtww8.hxx:505
virtual MSWordSections & Sections() const override
Access to the sections/headers/footres.
Definition: wrtww8.cxx:3745
sal_uInt32 mnShapeId
Definition: wrtww8.hxx:348
void WriteHeaderFooterText(const SwFormat &rFormat, bool bHeader)
Write header/footer text.
Definition: wrtw8sty.cxx:1884
~WW8_WrPct()
Definition: wrtww8.cxx:1347
virtual bool CollapseScriptsforWordOk(sal_uInt16 nScript, sal_uInt16 nWhich) override
Guess the script (asian/western).
Definition: ww8atr.cxx:147
sal_uLong nOldEnd
Definition: wrtww8.hxx:439
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:356
void GatherChapterFields()
Setup the chapter fields (maChapterFieldLocs).
Definition: ww8atr.cxx:337
void Out_SwFormatBox(const SvxBoxItem &rBox, bool bShadow)
is for all boxes except in tables.
Definition: ww8atr.cxx:4418
const SwTextNode & rNd
Definition: wrtww8.hxx:1501
void AppendSection(const SwPageDesc *pPd, const SwSectionFormat *pSectionFormat, sal_uLong nLnNumRestartNo, bool bIsFirstParagraph=false)
Definition: wrtw8sty.cxx:1092
void NeedsDocumentProtected(const WW8_SepInfo &rInfo)
Definition: wrtw8sty.cxx:1237
FontFamily
bool ContentContainsChapterField(const SwFormatContent &rContent) const
Definition: ww8atr.cxx:352
sal_uInt16 GetNumberingId(const SwNumRule &rNumRule)
Return the numeric id of the numbering rule.
Definition: wrtw8num.cxx:126
GraphicDetails(const ww8::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
Definition: wrtww8.hxx:1387
virtual const std::vector< sal_uInt32 > * GetShapeIdArr() const override
Definition: wrtw8esh.cxx:943
void Finish(WW8_CP nEndCp)
Definition: wrtww8.hxx:270
void OutSwFormatRefMark(const SwFormatRefMark &rAttr)
Definition: wrtw8nds.cxx:1153
sal_uInt16 BuildGetSlot(const SwFormat &rFormat)
Get slot number during building the style table.
Definition: wrtw8sty.cxx:179
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
virtual void WriteHyperlinkData(const ::sw::mark::IFieldmark &rFieldmark) override
Definition: wrtww8.cxx:4135
virtual MSWordSections & Sections() const =0
Access to the sections/headers/footres.
SwWW8WrGrf(WW8Export &rW)
Definition: wrtww8.hxx:1423
bool m_bIgnoreEmpty
Definition: wrtww8.hxx:1256
OUString BookmarkToWord(const OUString &rBookmark)
Definition: wrtw8nds.cxx:1136
sal_uLong nOldStart
Definition: wrtww8.hxx:439
void Append(const SdrObject &rObj, sal_uInt32 nShapeId)
Definition: wrtw8esh.cxx:927
void OutputStartNode(const SwStartNode &)
Output SwStartNode.
Definition: wrtww8.cxx:4223
IMarkVector m_rSortedBookmarksEnd
Definition: wrtww8.hxx:586
const SwPageDesc * m_pCurrentPageDesc
Definition: wrtww8.hxx:496
virtual ~WW8Export() override
Definition: wrtww8.cxx:3736
const SwPageDesc * pPageDesc
Definition: wrtww8.hxx:178
void Append(WW8_CP nCp, const void *pData)
Definition: wrtww8.cxx:825
std::unique_ptr< SwNumRuleTable > m_pUsedNumTable
Definition: wrtww8.hxx:462
bool HasFlysAt(sal_Int32 nSwPos) const
Definition: wrtw8nds.cxx:570
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const override
Definition: wrtw8nds.cxx:819
void Append(WW8_CP nCp, const SwFormatFootnote &rFootnote)
Definition: wrtw8sty.cxx:1943
SvStream & Strm() const
Definition: wrtww8.hxx:1179
const T & GetItem(TypedWhichId< T > nWhich) const
Definition: wrtww8.hxx:631
sal_uInt32 m_cvFore
Definition: wrtww8.hxx:1636
sal_uInt16 m_nLastFormatId
Style of last TextNode in normal range.
Definition: wrtww8.hxx:485
virtual void PrepareNewPageDesc(const SfxItemSet *pSet, const SwNode &rNd, const SwFormatPageDesc *pNewPgDescFormat, const SwPageDesc *pNewPgDesc) override
Helper method for OutputSectionBreaks() and OutputFollowPageDesc().
Definition: ww8atr.cxx:649
virtual ErrCode Write(SwPaM &, const css::uno::Reference< css::embed::XStorage > &, const OUString *, SfxMedium *=nullptr) override
virtual bool AllowPostponedTextInTable() const
Text in tables can be postponed except for .doc.
Definition: wrtww8.hxx:694
std::set< sal_Int32 > SwSoftPageBreakList
Definition: wrtww8.hxx:137
FlyProcessingState
enum to state the present state of the fly
Definition: wrtww8.hxx:169
WW8_FC nOldFc
Definition: wrtww8.hxx:288
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:744
sal_uInt16 m_aHeadingParagraphStyles[MAXLEVEL]
Definition: wrtww8.hxx:1569
sal_uInt16 GetHeadingParagraphStyleId(sal_uInt16 nLevel) const
Definition: wrtww8.hxx:1624
void GetStyleData(SwFormat *pFormat, bool &bFormatColl, sal_uInt16 &nBase, sal_uInt16 &nNext)
Return information about one style.
Definition: wrtw8sty.cxx:549
bool IncludeEndOfParaCRInRedlineProperties(sal_Int32 nPos) const
Definition: wrtw8nds.cxx:1357
void WriteSpecialText(sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp)
Set the pCurPam appropriately and call WriteText().
Definition: wrtww8.cxx:1813
virtual void Write(Writer &rWrt) override
Definition: wrtww8.cxx:1664
bool IsWatermarkFrame()
Definition: wrtw8nds.cxx:531
void OutSprmBytes(sal_uInt8 *pBytes, sal_uInt16 nSiz)
Definition: wrtww8.hxx:1107
const o3tl::enumarray< SvxAdjust, unsigned short > aSvxToUnoAdjust USHRT_MAX
Definition: unosett.cxx:253
sal_uInt16 nScript
Definition: wrtww8.hxx:1462
bool IsTextAttr(sal_Int32 nSwPos)
Definition: wrtw8esh.cxx:1195
std::vector< EECharAttrib > aTextAtrArr
Definition: wrtww8.hxx:1455
virtual void AppendAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen)=0
sal_uLong mnPos
Definition: wrtww8.hxx:1383
sal_uInt16 nResults
Definition: wrtww8.hxx:1355
bool bLoadAllFonts
If true, all fonts are loaded before processing the document.
Definition: wrtww8.hxx:341
virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) override
Return value indicates if an inherited outline numbering is suppressed.
Definition: ww8atr.cxx:742
SvStream * pDataStrm
Streams for WW97 Export.
Definition: wrtww8.hxx:992
std::unique_ptr< WW8_WrtFactoids > m_pFactoids
Definition: wrtww8.hxx:504
bool WriteKFText(WW8Export &rWrt)
Definition: wrtw8sty.cxx:1780
MSWord_SdrAttrIter(const MSWord_SdrAttrIter &)=delete
virtual void OutputLinkedOLE(const OUString &) override
Definition: wrtww8gr.cxx:319
virtual ~WW8_WrPlcSepx() override
Definition: wrtw8sty.cxx:1042
SwWW8Writer(const OUString &rFltName, const OUString &rBaseURL)
Definition: wrtww8.cxx:3750
MSWordAttrIter & operator=(const MSWordAttrIter &)=delete
SvStream & WriteInt16(sal_Int16 nInt16)
std::pair< OUString, sal_uLong > aBookmarkPair
Definition: wrtww8.hxx:413
sw::util::CharRuns::const_iterator maCharRunIter
Definition: wrtww8.hxx:1504
bool m_bHideTabLeaderAndPageNumbers
Definition: wrtww8.hxx:569
void WriteFootnoteBegin(const SwFormatFootnote &rFootnote, ww::bytes *pO=nullptr)
Definition: ww8atr.cxx:3347
virtual void SaveData(sal_uLong nStt, sal_uLong nEnd) override
Remember some of the members so that we can recurse in WriteText().
Definition: wrtww8.cxx:1963
virtual void AppendBookmark(const OUString &rName) override
Definition: wrtww8.cxx:1504
sal_uInt8 m_nTextTyp
Definition: wrtww8.hxx:548
void NumberingDefinitions()
Write static data of SwNumRule - LSTF.
Definition: wrtw8num.cxx:225
WW8_Annotation(const SwPostItField *pPostIt, WW8_CP nRangeStart, WW8_CP nRangeEnd)
Definition: wrtw8sty.cxx:1949
ww8::Frames m_aFrames
Definition: wrtww8.hxx:495
void WriteSdrTextObj(const SdrTextObj &rObj, sal_uInt8 nTyp)
Definition: wrtw8esh.cxx:1314
void IncrementHdFtIndex()
Definition: wrtww8.hxx:1136
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:1948
sal_uInt16 GetId(const SvxFontItem &rFont)
Definition: wrtw8sty.cxx:895
FIB - the File Information Block.
Definition: ww8scan.hxx:1096
std::shared_ptr< WW8TableNodeInfoInner > Pointer_t
sal_uInt16 ResultCount() const
Definition: wrtww8.hxx:1365
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:1831
virtual bool AllowPostponedTextInTable() const override
Text in tables can be postponed except for .doc.
Definition: wrtww8.hxx:1018
std::unique_ptr< WW8_WrPlc0 > pTextPos
Definition: wrtww8.hxx:251
sal_uInt16 GetSlot(const SwFormat *pFormat) const
Get id of the style (rFormat).
Definition: wrtw8sty.cxx:170
bool m_bInWriteTOX
Definition: wrtww8.hxx:561
virtual void AppendSection(const SwPageDesc *pPageDesc, const SwSectionFormat *pFormat, sal_uLong nLnNum) override
Definition: wrtw8nds.cxx:3225
void AppendFkpEntry(WW8_FC nEndFc, short nVarLen=0, const sal_uInt8 *pSprms=nullptr)
Definition: wrtww8.cxx:991
sal_uInt16 Count() const
Definition: wrtww8.hxx:1299
SfxMedium * mpMedium
Definition: wrtww8.hxx:938
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:102
bool GetBookmarks(const SwTextNode &rNd, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector &rArr)
Definition: wrtw8nds.cxx:1838
std::vector< WW8_CP > aCps
Definition: wrtww8.hxx:247
OUString m_sInitials
Definition: wrtww8.hxx:1253
static void InsUInt16(ww::bytes &rO, sal_uInt16 n)
Definition: wrtww8.cxx:1721
bool GetAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector &rArr)
Definition: wrtw8nds.cxx:1886
SwWW8WrGrf & operator=(const SwWW8WrGrf &)=delete
WW8_WrPlcPn & operator=(const WW8_WrPlcPn &)=delete
WW8_WrPlcFootnoteEdn(sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1240
void InitFontTable(const SwDoc &rDoc)
rDoc used only to get the initial standard font(s) in use.
Definition: wrtw8sty.cxx:857
void RestoreMacroCmds()
Definition: wrtww8.cxx:3847
sal_uInt16 m_nUsedSlots
Definition: wrtww8.hxx:1571
void Write()
Definition: wrtww8gr.cxx:858
WW8_WrPlcField * CurrentFieldPlc() const
Fields.
Definition: ww8atr.cxx:1730
OUString msAltNm
Definition: wrtww8.hxx:306
sal_uLong const nLnNumRestartNo
Definition: wrtww8.hxx:181
sal_uInt8 const nTextTyp
Definition: wrtww8.hxx:1354
SwPaM * m_pOrigPam
Definition: wrtww8.hxx:578
virtual void PrepareNewPageDesc(const SfxItemSet *pSet, const SwNode &rNd, const SwFormatPageDesc *pNewPgDescFormat, const SwPageDesc *pNewPgDesc)=0
std::unique_ptr< sal_uInt8[]> pData
Definition: wrtww8.hxx:1333
void Write(SvStream &rStrm)
Definition: wrtww8.cxx:850
Point const maParentPos
Definition: wrtww8.hxx:350
void OutOverrideListTab()
Definition: wrtw8num.cxx:621
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:206
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:3639
bool OutputFollowPageDesc(const SfxItemSet *pSet, const SwTextNode *pNd)
The return value indicates, if a follow page desc is written.
Definition: ww8atr.cxx:606
std::vector< const EECharAttrib * > aChrTextAtrArr
Definition: wrtww8.hxx:1456
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:688
bool InitStd97CodecUpdateMedium(::msfilter::MSCodec_Std97 &rCodec)
Definition: wrtww8.cxx:3304
void BulletDefinitions()
Write the numbering picture bullets.
Definition: wrtww8.cxx:1577
sal_Int32 nCurrentSwPos
Definition: wrtww8.hxx:1511
void Insert(const ww8::Frame &rFly)
Definition: wrtww8gr.cxx:470
WW8Export & operator=(const WW8Export &)=delete
const SwFormat * m_pCurrentStyle
Definition: wrtww8.hxx:539
void CreateEscher()
Definition: wrtw8esh.cxx:1454
Base class for WW8Export and DocxExport.
Definition: wrtww8.hxx:453
RndStdIds
sal_Int32 mnThick
Definition: wrtww8.hxx:351
sal_Int32 SearchNext(sal_Int32 nStartPos)
Definition: wrtw8nds.cxx:240
void StoreDoc1()
Definition: wrtww8.cxx:3010
SwRedlineTable::size_type nCurRedlinePos
Definition: wrtww8.hxx:1512
bool IsExportableAttr(sal_Int32 nSwPos) const
Definition: wrtw8nds.cxx:720
SvxFrameDirection GetCurrentPageDirection() const
Right to left?
Definition: wrtw8nds.cxx:1510
const SwFormatDrop & GetSwFormatDrop() const
Definition: wrtww8.hxx:1555
virtual void WriteHeadersFooters(sal_uInt8 nHeadFootFlags, const SwFrameFormat &rFormat, const SwFrameFormat &rLeftFormat, const SwFrameFormat &rFirstPageFormat, sal_uInt8 nBreakCode)=0
Output the actual headers and footers.
Ends a section of nodes in the document model.
Definition: node.hxx:333
static OUString GetBookmarkName(sal_uInt16 nTyp, const OUString *pName, sal_uInt16 nSeqNo)
Find the bookmark name.
Definition: ww8atr.cxx:941
virtual void WriteHeadersFooters(sal_uInt8 nHeadFootFlags, const SwFrameFormat &rFormat, const SwFrameFormat &rLeftFormat, const SwFrameFormat &rFirstPageFormat, sal_uInt8 nBreakCode) override
Output the actual headers and footers.
Definition: wrtw8sty.cxx:1491
const SfxItemSet * m_pISet
Definition: wrtww8.hxx:460
bool mbParaIsRTL
Definition: wrtww8.hxx:1514
const SwTextNode & GetNode() const
Definition: wrtww8.hxx:1562
std::vector< CharRunEntry > CharRuns
Definition: msfilter.hxx:376
void WriteOutliner(const OutlinerParaObject &rOutliner, sal_uInt8 nTyp)
Definition: wrtw8esh.cxx:1342
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const override
Definition: wrtw8esh.cxx:1228
rtl_TextEncoding GetNextCharSet() const
Definition: wrtw8esh.cxx:1041
void SetItemsThatDifferFromStandard(bool bCharAttr, SfxItemSet &rSet)
Definition: wrtw8esh.cxx:1245
static void Out_SwFormatTableBox(ww::bytes &rO, const SvxBoxItem *rBox)
FormatBox2() is for TC structures in tables.
Definition: ww8atr.cxx:4473
const SfxPoolItem * HasItem(sal_uInt16 nWhich) const
Definition: wrtww8.cxx:770
Handles export of smart tags.
Definition: wrtww8.cxx:320
std::vector< DrawObj * > DrawObjPointerVector
Definition: wrtww8.hxx:364
MSWordAttrIter(const MSWordAttrIter &)=delete
virtual void WriteHyperlinkData(const ::sw::mark::IFieldmark &rFieldmark)=0
static bool NoPageBreakSection(const SfxItemSet *pSet)
Definition: wrtw8nds.cxx:3051
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps...
Definition: paratr.hxx:50
std::map< const OUString, std::pair< WW8_CP, bool > > m_aRangeStartPositions
Definition: wrtww8.hxx:1270
void AppendPc(WW8_FC nStartFc)
Definition: wrtww8.cxx:1352
virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const =0
const SwPageDesc * pOldPageDesc
Definition: wrtww8.hxx:441
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:3824
bool operator==(const GraphicDetails &rIn) const
Definition: wrtww8.hxx:1391
virtual void DoFormText(const SwInputField *pField) override
Definition: wrtw8esh.cxx:472
std::vector< ::sw::mark::IMark * > IMarkVector
Used to split the runs according to the bookmarks start and ends.
Definition: wrtww8.hxx:584
FontPitch const mePitch
Definition: wrtww8.hxx:308
virtual void AppendBookmark(const OUString &rName)=0
PlcDrawObj & operator=(const PlcDrawObj &)=delete
SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const
Definition: ww8atr.cxx:4553
void EndCommentOutput(const OUString &rName)
Definition: ww8atr.cxx:1906
WW8_WrtBookmarks * m_pBkmks
Definition: wrtww8.hxx:473
virtual ~MSWordExportBase()
Definition: wrtww8.cxx:3710
MSWordSections(const MSWordSections &)
void OutAttr(sal_Int32 nSwPos, bool bWriteCombinedChars)
Definition: wrtw8nds.cxx:386
WW8_WrPlcPn(const WW8_WrPlcPn &)=delete
virtual void RestoreData() override
Restore what was saved in SaveData().
Definition: wrtww8.cxx:1981
sal_Int32 WW8_FC
Definition: ww8struc.hxx:152
bool IsTextAttr(sal_Int32 nSwPos) const
Definition: wrtw8nds.cxx:695
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:1256
sal_uInt8 maWW8_FFN[6]
Definition: wrtww8.hxx:304
void WriteGrfForBullet(SvStream &rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:745
The class MSWordAttrIter is a helper class to build the Fkp.chpx.
Definition: wrtww8.hxx:1433
sal_uInt16 mnIdx
Definition: wrtww8.hxx:1408
static void WriteLong(SvStream &rStrm, sal_Int32 nVal)
Definition: wrtww8.hxx:964
static void FillCount(SvStream &rStrm, sal_uLong nCount)
Definition: wrtww8.cxx:943
std::set< const SwRedlineData * > maProcessedRedlines
Definition: wrtww8.hxx:1268
ww8::Frame maContent
Definition: wrtww8.hxx:349
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:2876
bool NeedTextNodeSplit(const SwTextNode &rNd, SwSoftPageBreakList &pList) const
Definition: wrtw8nds.cxx:2094
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:1021
virtual void AppendSection(const SwPageDesc *pPageDesc, const SwSectionFormat *pFormat, sal_uLong nLnNum)=0
WW8_SepInfo(const SwPageDesc *pPD, const SwSectionFormat *pFormat, sal_uLong nLnRestart,::o3tl::optional< sal_uInt16 > oPgRestart=o3tl::nullopt, const SwNode *pNd=nullptr, bool bIsFirstPara=false)
Definition: wrtww8.hxx:185
virtual void WriteFormData(const ::sw::mark::IFieldmark &rFieldmark) override
Write the data of the form field.
Definition: wrtww8.cxx:3884
WW8_WrtRedlineAuthor * m_pRedlAuthors
Definition: wrtww8.hxx:474
std::unique_ptr< WW8_WrPlcPn > m_pChpPlc
Definition: wrtww8.hxx:500
wwFontHelper m_aFontHelper
Definition: wrtww8.hxx:456
SvxFrameDirection TrueFrameDirection(const SwFrameFormat &rFlyFormat) const
Right to left?
Definition: wrtw8nds.cxx:1557
IMarkVector m_rSortedBookmarksStart
Definition: wrtww8.hxx:585
static void InsAsString16(ww::bytes &rO, const OUString &rStr)
Definition: wrtww8.cxx:1739
SwDoc * m_pDoc
Definition: wrtww8.hxx:575
std::vector< std::unique_ptr< WW8_WrPc > > m_Pcts
Definition: wrtww8.hxx:287
std::map< std::pair< size_t, size_t >, size_t > m_OverridingNumsR
same in reverse
Definition: wrtww8.hxx:466
void CollectOutlineBookmarks(const SwDoc &rDoc)
Definition: wrtww8.cxx:3149
virtual bool SupportsOneColumnBreak() const override
Determines if column break with one column should be exported or not.
Definition: wrtww8.hxx:1020
void WriteEscher()
Definition: wrtw8esh.cxx:1467
std::vector< const Graphic * > m_vecBulletPic
Vector to record all the graphics of bullets.
Definition: wrtww8.hxx:914
std::vector< aBookmarkPair > m_aImplicitBookmarks
Definition: wrtww8.hxx:494
std::vector< Frame > Frames
STL container of Frames.
static const SwSectionFormat * GetSectionFormat(const SwNode &rNd)
Format of the section.
Definition: ww8atr.cxx:621
void AbstractNumberingDefinitions()
Write all Levels for all SwNumRules - LVLF.
Definition: wrtw8num.cxx:411
bool IsAnchorLinkedToThisNode(sal_uLong nNodePos)
Definition: wrtw8nds.cxx:551
static bool TransBrush(const Color &rCol, WW8_SHD &rShd)
TransBrush converts SW-Brushes to WW.
Definition: ww8atr.cxx:1570
const SwNode * pPDNd
Definition: wrtww8.hxx:180
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:997
std::unique_ptr< WW8_WrPlcFootnoteEdn > pFootnote
Footnotes - structure to remember them, and output.
Definition: wrtww8.hxx:996
virtual ErrCode WriteStorage() override
Definition: wrtww8.cxx:3602
ErrCode ExportDocument(bool bWriteAll)
The main function to export the document.
Definition: wrtww8.cxx:3216
std::map< OUString, size_t > m_Lists
list-id -> abstractnumdef index
Definition: wrtww8.hxx:468
bool RequiresImplicitBookmark()
Definition: wrtw8nds.cxx:763
Base class of the Writer document model elements.
Definition: node.hxx:79
void NumberingLevel(SwNumRule const &rRule, sal_uInt8 nLvl)
Write one numbering level.
Definition: wrtw8num.cxx:438
void setCvFore(sal_uInt32 cvFore)
Definition: wrtww8.hxx:1643
std::unique_ptr< WW8AttributeOutput > m_pAttrOutput
Converting attributes to stream data.
Definition: wrtww8.hxx:1004