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