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