LibreOffice Module sw (master) 1
wrtww8.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_WRTWW8_HXX
21#define INCLUDED_SW_SOURCE_FILTER_WW8_WRTWW8_HXX
22
23#include <sot/storage.hxx>
24#include <svl/nfkeytab.hxx>
25#include <tools/solar.h>
26#include <tools/gen.hxx>
27#include <editeng/editdata.hxx>
30
31#include <shellio.hxx>
32
33#include "ww8struc.hxx"
34#include "ww8scan.hxx"
35#include "types.hxx"
36#include "writerhelper.hxx"
37#include <msfilter.hxx>
38#include <expfld.hxx>
39#include "WW8TableInfo.hxx"
40#include <calbck.hxx>
42
43#include <vcl/graph.hxx>
44
45#include <optional>
48
49#include <cstddef>
50#include <memory>
51#include <map>
52#include <string_view>
53#include <vector>
54
55
56class SvxBrushItem;
57class EditTextObject;
58
59// some forward declarations
60class SwWW8AttrIter;
61namespace msfilter
62{
63 class MSCodec_Std97;
64}
65
66namespace editeng { class SvxBorderLine; }
67
71class BitmapPalette;
72class SwEscherEx;
73class DateTime;
74namespace vcl { class Font; }
76class SdrObject;
77class SdrTextObj;
78class SfxItemSet;
79class SvStream;
80class SvxFontItem;
81class SvxBoxItem;
82class SwAttrSet;
83class SwCharFormat;
84class SwContentNode;
85class SwField;
86class SwFormat;
87class SwFormatContent;
89class SwFrameFormat;
90class SwGrfNode;
91class SwNumFormat;
92class SwNumRule;
93class SwNumRuleTable;
94class SwPageDesc;
96class SwOLENode;
97class SwPostItField;
98class SwRedlineData;
99class SwSectionFormat;
100class SwSectionNode;
101class SwTableNode;
102class SwTOXType;
103class SwTextFormatColl;
104class SwTextNode;
105class SwWW8WrGrf;
106class SwWW8Writer;
107class MSWordStyles;
109class WW8Export;
110class MSWordAttrIter;
111class WW8_WrFkp;
112class WW8_WrPlc0;
113class WW8_WrPlc1;
114class WW8_WrPlcField;
115class WW8_WrMagicTable;
117class WW8_WrPlcPn;
119class WW8_WrtFactoids;
120class MSWordSections;
122class WW8_WrPct; // administration
123class WW8_WrtBookmarks;
126class WW8_WrPc;
127struct WW8_PdAttrDesc;
128class SvxBrushItem;
129namespace sw::mark { class IFieldmark; }
130namespace com::sun::star::embed { class XEmbeddedObject; }
131
132typedef std::map<const css::embed::XEmbeddedObject*, sal_Int32> WW8OleMap;
134
135#define GRF_MAGIC_1 0x12 // 3 magic bytes for PicLocFc attribute
136#define GRF_MAGIC_2 0x34
137#define GRF_MAGIC_3 0x56
138#define GRF_MAGIC_321 0x563412L
139
140#define OLE_PREVIEW_AS_EMF //If we want to export ole2 previews as emf in ww8+
141
142enum class FieldFlags : sal_uInt8 // for InsertField- Method
143{
144 NONE = 0x00,
145 Start = 0x01,
146 CmdStart = 0x02,
147 CmdEnd = 0x04,
148 End = 0x10,
149 Close = 0x20,
150 All = 0x37
151};
152namespace o3tl {
153 template<> struct typed_flags<FieldFlags> : is_typed_flags<FieldFlags, 0x37> {};
154}
155
156enum TextTypes //enums for TextTypes
157{
158 TXT_MAINTEXT = 0, /*TXT_FTNEDN = 1,*/ TXT_HDFT = 2, TXT_FTN = 3,
161
166{
172
174{
177 const SwNode* pPDNd;
179 ::std::optional<sal_uInt16> oPgRestartNo;
181
182 WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFormat* pFormat,
183 sal_uLong nLnRestart, ::std::optional<sal_uInt16> oPgRestart = std::nullopt,
184 const SwNode* pNd = nullptr, bool bIsFirstPara = false )
185 : pPageDesc( pPD ), pSectionFormat( pFormat ), pPDNd( pNd ),
186 nLnNumRestartNo( nLnRestart ), oPgRestartNo( oPgRestart ),
187 bIsFirstParagraph( bIsFirstPara )
188 {}
189
190 bool IsProtected() const;
191};
192
194// Plc for PageDescs -> Sepx ( Section Extensions )
196{
197protected:
199 std::vector<WW8_SepInfo> m_aSects;
200
201 void CheckForFacinPg( const WW8Export& rWrt ) const;
202 void NeedsDocumentProtected(const WW8_SepInfo &rInfo);
203
204 //No copy, no assign
207public:
208 explicit MSWordSections( MSWordExportBase& rExport );
209 virtual ~MSWordSections();
210
211 virtual bool HeaderFooterWritten();
212
213 void AppendSection( const SwPageDesc* pPd,
214 const SwSectionFormat* pSectionFormat,
215 sal_uLong nLnNumRestartNo,
216 bool bIsFirstParagraph = false );
217 void AppendSection( const SwFormatPageDesc& rPd,
218 const SwNode& rNd,
219 const SwSectionFormat* pSectionFormat,
220 sal_uLong nLnNumRestartNo );
221
223 sal_uInt16 CurrentNumberOfColumns( const SwDoc &rDoc ) const;
224
226 static const SwFormatCol& GetFormatCol(const SwDoc &rDoc, const WW8_SepInfo& rInfo);
227
229
232
233 static void SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat,
234 sal_uInt8 nFlag );
235 static void SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFormat& rFormat,
236 sal_uInt8 nFlag );
237
239 static bool HasBorderItem( const SwFormat& rFormat );
240};
241
243{
244 std::vector<WW8_CP> m_aCps;
245 std::vector< std::shared_ptr<WW8_PdAttrDesc> > m_SectionAttributes;
246 // hack to prevent adding sections in endnotes
248 std::unique_ptr<WW8_WrPlc0> m_pTextPos; // Position of the headers/footers
249
250 WW8_WrPlcSepx( const WW8_WrPlcSepx& ) = delete;
252
253public:
254 explicit WW8_WrPlcSepx( MSWordExportBase& rExport );
255 virtual ~WW8_WrPlcSepx() override;
256
257 virtual bool HeaderFooterWritten() override; // override
258
259 void AppendSep( WW8_CP nStartCp,
260 const SwPageDesc* pPd,
261 const SwSectionFormat* pSectionFormat,
262 sal_uLong nLnNumRestartNo );
263 void AppendSep( WW8_CP nStartCp, const SwFormatPageDesc& rPd,
264 const SwNode& rNd,
265 const SwSectionFormat* pSectionFormat,
266 sal_uLong nLnNumRestartNo );
267 void Finish( WW8_CP nEndCp ) { m_aCps.push_back( nEndCp ); }
268
269 bool WriteKFText( WW8Export& rWrt );
270 void WriteSepx( SvStream& rStrm ) const;
271 void WritePlcSed( WW8Export& rWrt ) const;
272 void WritePlcHdd( WW8Export& rWrt ) const;
273
274private:
275 void WriteFootnoteEndText( WW8Export& rWrt, sal_uLong nCpStt );
276public:
277 void OutHeaderFooter(WW8Export& rWrt, bool bHeader,
278 const SwFormat& rFormat, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode);
279};
280
281// class WW8_WrPct to construct the piece table
283{
284 std::vector<std::unique_ptr<WW8_WrPc>> m_Pcts;
286public:
287 explicit WW8_WrPct(WW8_FC nStartFc);
288 ~WW8_WrPct();
289 void AppendPc(WW8_FC nStartFc);
290 void WritePc( WW8Export& rWrt );
291 void SetParaBreak();
292 WW8_CP Fc2Cp( sal_uLong nFc ) const;
293};
294
297{
298//In some future land the stream could be converted to a nice stream interface
299//and we could have harmony
300private:
302 OUString msFamilyNm;
303 OUString msAltNm;
304 bool mbAlt;
307 rtl_TextEncoding meChrSet;
308public:
309 wwFont( std::u16string_view rFamilyName, FontPitch ePitch, FontFamily eFamily,
310 rtl_TextEncoding eChrSet);
311 void Write( SvStream *pTableStram ) const;
312 void WriteDocx( DocxAttributeOutput* rAttrOutput ) const;
313 void WriteRtf( const RtfAttributeOutput* rAttrOutput ) const;
314 OUString const & GetFamilyName() const { return msFamilyNm; }
315 friend bool operator < (const wwFont &r1, const wwFont &r2);
316};
317
319{
320private:
322 std::map<wwFont, sal_uInt16> maFonts;
323
325 std::vector< const wwFont* > AsVector() const;
326
327public:
330 void InitFontTable(const SwDoc& rDoc);
331 sal_uInt16 GetId(const SvxFontItem& rFont);
332 sal_uInt16 GetId(const wwFont& rFont);
333 void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib );
334 void WriteFontTable( DocxAttributeOutput& rAttrOutput );
335 void WriteFontTable( const RtfAttributeOutput& rAttrOutput );
336
339};
340
342{
343public:
344 WW8_CP mnCp; // CP-Pos of references
345 sal_uInt32 mnShapeId; // ShapeId for the SwFrameFormats
346 ww8::Frame maContent; // the frame itself
348 sal_Int32 mnThick; // Border Thicknesses
350 unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent
351 // msword hd/ft
352
353 DrawObj(const ww8::Frame &rContent, WW8_CP nCp, Point aParentPos, SvxFrameDirection nDir,
354 unsigned int nHdFtIndex)
355 : mnCp(nCp), mnShapeId(0), maContent(rContent), maParentPos(aParentPos),
356 mnThick(0), mnDirection(nDir), mnHdFtIndex(nHdFtIndex) {}
357 void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick);
358};
359
360typedef std::vector<DrawObj> DrawObjVector;
361typedef std::vector<DrawObj *> DrawObjPointerVector;
362
363class PlcDrawObj // PC for DrawObjects and Text-/OLE-/GRF-Boxes
364{
365private:
366 DrawObjVector maDrawObjs; // vector of drawobjs
367protected:
368 virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
369 sal_uInt32 nLen) const = 0;
370 virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const = 0;
371public:
373 void WritePlc( WW8Export& rWrt ) const;
374 bool Append( WW8Export const &, WW8_CP nCp, const ww8::Frame& rFormat,
375 const Point& rNdTopLeft );
376 int size() { return maDrawObjs.size(); };
378 virtual ~PlcDrawObj();
379private:
380 PlcDrawObj(const PlcDrawObj&) = delete;
381 PlcDrawObj& operator=(const PlcDrawObj&) = delete;
382};
383
385{
386public:
388private:
389 virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
390 sal_uInt32 nLen) const override;
391 virtual WW8_CP GetCpOffset(const WW8Fib &) const override;
392private:
395};
396
398{
399public:
401private:
402 virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart,
403 sal_uInt32 nLen) const override;
404 virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const override;
405private:
408};
409
410typedef std::pair<OUString, SwNodeOffset> aBookmarkPair;
411
413{
414 public:
415 virtual void Write(Writer &rWrt) override;
416};
417
430{
433 std::unique_ptr<ww::bytes> pOOld;
434 std::shared_ptr<SwUnoCursor> pOldPam;
439
440 bool bOldWriteAll : 1;
441 bool bOldOutTable : 1;
443 bool bOldStartTOX : 1;
445 // m_bOutPageDescs does not have to be saved in MSWordExportBase::SaveData
446 // since it is only modified when outputting special texts.
447};
448
451{
452public:
454 std::vector<SwNodeOffset> m_aChapterFieldLocs;
455 OUString m_aMainStg;
456 std::vector<const SwTOXType*> m_aTOXArr;
457 const SfxItemSet* m_pISet; // for double attributes
459 std::unique_ptr<WW8_WrPct> m_pPiece; // Pointer to Piece-Table
460 std::unique_ptr<SwNumRuleTable> m_pUsedNumTable; // all used NumRules
462 std::map<size_t, std::pair<size_t, size_t>> m_OverridingNums;
464 std::map<OUString, size_t> m_Lists;
465
468 std::map < size_t, std::map<size_t, size_t> > m_ListLevelOverrides;
469
471 std::stack< sal_Int32 > m_aCurrentCharPropStarts;
472 std::unique_ptr<WW8_WrtBookmarks> m_pBkmks;
473 std::unique_ptr<WW8_WrtRedlineAuthor> m_pRedlAuthors;
474 std::shared_ptr<NfKeywordTable> m_pKeyMap;
475 std::optional<SvxMSExportOLEObjects> m_oOLEExp;
476 std::unique_ptr<SwMSConvertControls> m_pOCXExp;
477 WW8OleMap m_aOleMap; // To remember all already exported ole objects
479
482 sal_uInt16 m_nStyleBeforeFly;
484 sal_uInt16 m_nLastFormatId;
485 sal_uInt16 m_nUniqueList;
486 unsigned int m_nHdFtIndex;
487
490
491public:
492 /* implicit bookmark vector containing pairs of node indexes and bookmark names */
493 std::vector<aBookmarkPair> m_aImplicitBookmarks;
494 std::unordered_map<OUString, OUString> m_TOXMarkBookmarksByURL;
495 std::unordered_map<SwTOXMark const*, OUString> m_TOXMarkBookmarksByTOXMark;
496 ww8::Frames m_aFrames; // The floating frames in this document
500 std::unique_ptr<WW8_WrPlcPn> m_pPapPlc;
501 std::unique_ptr<WW8_WrPlcPn> m_pChpPlc;
503 std::unique_ptr<MSWordStyles> m_pStyles;
504 std::unique_ptr<WW8_WrPlcAnnotations> m_pAtn;
505 std::unique_ptr<WW8_WrtFactoids> m_pFactoids;
506 std::unique_ptr<WW8_WrPlcTextBoxes> m_pTextBxs, m_pHFTextBxs;
507
508 struct LinkedTextboxInfo //help analyze textbox flow links
509 {
510 sal_Int32 nId;
511 sal_Int32 nSeq;
512 OUString sNextChain;
513 OUString sPrevChain;
515 };
516 std::map<OUString,LinkedTextboxInfo> m_aLinkedTextboxesHelper;
519
520 const ww8::Frame *m_pParentFrame; // If set we are exporting content inside
521 // a frame, e.g. a graphic node
522
523 Point* m_pFlyOffset; // for adjusting of character-bound Fly in the Writer,
524 RndStdIds m_eNewAnchorType; // that is paragraph-bound in the WW.
525
526 std::unique_ptr<WW8_WrPlcField> m_pFieldMain; // fields in MainText
527 std::unique_ptr<WW8_WrPlcField> m_pFieldHdFt; // fields in Header/Footer
528 std::unique_ptr<WW8_WrPlcField> m_pFieldFootnote; // fields in FootNotes
529 std::unique_ptr<WW8_WrPlcField> m_pFieldEdn; // fields in EndNotes
530 std::unique_ptr<WW8_WrPlcField> m_pFieldAtn; // fields in Annotations
531 std::unique_ptr<WW8_WrPlcField> m_pFieldTextBxs; // fields in textboxes
532 std::unique_ptr<WW8_WrPlcField> m_pFieldHFTextBxs; // fields in header/footer textboxes
533 std::unique_ptr<WW8_WrMagicTable> m_pMagicTable; // keeps track of table cell positions, and
534 // marks those that contain graphics,
535 // which is required to make word display
536 // graphics inside tables
537 std::unique_ptr<SwWW8WrGrf> m_pGrf;
538 const SwAttrSet* m_pStyAttr; // StyleAttr for Tabs
539 const sw::BroadcastingModify* m_pOutFormatNode; // write Format or Node
540 const SwFormat *m_pCurrentStyle; // iff bStyDef=true, then this store the current style
541
542 std::unique_ptr<MainTextPlcDrawObj> m_pSdrObjs; // Draw-/Fly-Objects
543 std::unique_ptr<HdFtPlcDrawObj> m_pHFSdrObjs; // Draw-/Fly-Objects in header or footer
544
545 SwEscherEx* m_pEscher; // escher export class
546 // #i43447# - removed
547// SwTwips nFlyWidth, nFlyHeight; // for adaptation of graphics
548
550
551 bool m_bStyDef : 1; // should Style be written?
552 bool m_bBreakBefore : 1; // Breaks are being written 2 times
553 bool m_bOutKF : 1; // Header/Footer texts are being written
554 bool m_bOutFlyFrameAttrs : 1; // Frame-attr of Flys are being written
556 bool m_bOutFirstPage : 1; // write Attrset of FirstPageDesc
557 bool m_bOutTable : 1; // table is being written
558 // ( is reset e.g. for Flys in a table )
559 bool m_bOutGrf : 1; // graphics are being written
560 bool m_bInWriteEscher : 1; // in write textboxes
561 bool m_bStartTOX : 1; // true: a TOX is started
562 bool m_bInWriteTOX : 1; // true: all content are in a TOX
563 bool m_bFootnoteAtTextEnd : 1; // true: all FTN at Textend
564 bool m_bEndAtTextEnd : 1; // true: all END at Textend
565 bool m_bHasHdr : 1;
566 bool m_bHasFtr : 1;
567 bool m_bSubstituteBullets : 1; // true: SubstituteBullet() gets called
568 bool m_bTabInTOC : 1; //true for TOC field flag 'w'
569
570 bool m_bHideTabLeaderAndPageNumbers : 1 ; // true: the 'z' field of TOC is set.
574 bool m_bAddFootnoteTab; // only one aesthetic spacing tab per footnote
575
578 std::shared_ptr<SwUnoCursor> & m_pCurPam;
580
582 std::stack< MSWordSaveData > m_aSaveData;
583
585 typedef std::vector< ::sw::mark::IMark* > IMarkVector;
590
591public:
593 ErrCode ExportDocument( bool bWriteAll );
594
596 void WriteText();
597
599 bool IsInTable() const;
600
604 void WriteSpecialText( SwNodeOffset nStart, SwNodeOffset nEnd, sal_uInt8 nTTyp );
605
607 void ExportPoolItemsToCHP( ww8::PoolItems &rItems, sal_uInt16 nScript, const SvxFontItem *pFont, bool bWriteCombChars = false );
608
610 sal_uInt16 GetNumberingId( const SwNumRule& rNumRule );
611
613 sal_uInt16 GetId( const SwTextFormatColl& rColl ) const;
614
616 sal_uInt16 GetId( const SwCharFormat* pFormat ) const;
617
618 sal_uInt16 GetId( const SwTOXType& rTOXType );
619
621 sal_uInt16 GetId( const SvxFontItem& rFont)
622 {
623 return m_aFontHelper.GetId(rFont);
624 }
626 void GetId( const wwFont& rFont)
627 {
628 m_aFontHelper.GetId(rFont);
629 }
630
631 const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
632 template<class T> const T& GetItem( TypedWhichId<T> nWhich ) const
633 {
634 return static_cast<const T&>(GetItem(sal_uInt16(nWhich)));
635 }
636
638 bool HasRefToAttr(const OUString& rName);
639 bool HasRefToFootOrEndnote(const bool isEndNote, const sal_uInt16 nSeqNo);
640
642 static OUString GetBookmarkName( sal_uInt16 nTyp, const OUString* pName, sal_uInt16 nSeqNo );
643
645 void OutputItemSet( const SfxItemSet& rSet, bool bPapFormat, bool bChpFormat, sal_uInt16 nScript, bool bExportParentItemSet );
646
648
650 SvxFrameDirection TrueFrameDirection( const SwFrameFormat& rFlyFormat ) const;
651
654
656
660 sal_uInt16 DuplicateNumRule(const SwNumRule* pRule, sal_uInt8 nLevel, sal_uInt16 nVal);
662
664 sal_uInt16 DuplicateAbsNum(OUString const& rListId,
665 SwNumRule const& rAbstractRule);
666
667
670 sal_uInt16 OverrideNumRule(SwNumRule const& rExistingRule,
671 OUString const& rListId,
672 SwNumRule const& rAbstractRule);
673
675 void AddListLevelOverride(sal_uInt16 nListId,
676 sal_uInt16 nLevelNum,
677 sal_uInt16 nStartAt);
678
680 virtual AttributeOutputBase& AttrOutput() const = 0;
681
683 virtual MSWordSections& Sections() const = 0;
684
686 virtual bool FieldsQuoted() const = 0;
687
689 virtual bool AddSectionBreaksForTOX() const = 0;
690
692 virtual bool ignoreAttributeForStyleDefaults( sal_uInt16 /*nWhich*/ ) const { return false; }
693
695 virtual bool PreferPageBreakBefore() const = 0;
696
707 virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) = 0;
708
709 virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen, const SwRedlineData* pSwRedline = nullptr ) = 0;
710
711 virtual void AppendBookmark( const OUString& rName ) = 0;
712
713 virtual void AppendAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen ) = 0;
714
715 virtual void AppendSmartTags(SwTextNode& /*rTextNode*/) { }
716
717 //For i120928,add this interface to export graphic of bullet
718 virtual void ExportGrfBullet(const SwTextNode& rNd) = 0;
719
720 // FIXME probably a hack...
722
723 // FIXME definitely a hack, must not be here - it can't do anything
724 // sensible for docx
725 virtual void WriteChar( sal_Unicode c ) = 0;
726
728 void OutputFormat( const SwFormat& rFormat, bool bPapFormat, bool bChpFormat, bool bFlyFormat = false );
729
731 const SfxItemSet* GetCurItemSet() const { return m_pISet; }
732
734 void SetCurItemSet( const SfxItemSet* pS ) { m_pISet = pS; }
735
737 virtual void SaveData( SwNodeOffset nStt, SwNodeOffset nEnd );
738
740 virtual void RestoreData();
741
743 bool OutputFollowPageDesc( const SfxItemSet* pSet,
744 const SwTextNode* pNd );
745
747 void WriteHeaderFooterText( const SwFormat& rFormat, bool bHeader);
748
750 static const SwSectionFormat* GetSectionFormat( const SwNode& rNd );
751
753 static sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd );
754
756 void OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd, bool isCellOpen = false );
757
761 void SectionProperties( const WW8_SepInfo& rSectionInfo, WW8_PdAttrDesc* pA = nullptr );
762
764 virtual void WriteNumbering() = 0;
765
768
771
773 void NumberingLevel(SwNumRule const& rRule, sal_uInt8 nLvl);
774
775 // Convert the bullet according to the font.
776 void SubstituteBullet( OUString& rNumStr, rtl_TextEncoding& rChrSet,
777 OUString& rFontName ) const;
778
780 virtual void SetupSectionPositions( WW8_PdAttrDesc* /*pA*/ ) {}
781
783 void SetHdFtPageRoot( const SwTextNode *pNd ) { m_pTopNodeOfHdFtPage = pNd; }
784
787
789 virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
790 const SwFrameFormat& rFormat, const SwFrameFormat& rLeftHeaderFormat, const SwFrameFormat& rLeftFooterFormat, const SwFrameFormat& rFirstPageFormat,
791 sal_uInt8 nBreakCode, bool bEvenAndOddHeaders) = 0;
792
794 virtual void OutputField( const SwField* pField, ww::eField eFieldType,
795 const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) = 0;
796
798 virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) = 0;
799 virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark ) = 0;
800
801 virtual void DoComboBox(const OUString &rName,
802 const OUString &rHelp,
803 const OUString &ToolTip,
804 const OUString &rSelected,
805 const css::uno::Sequence<OUString> &rListItems) = 0;
806
807 virtual void DoFormText(const SwInputField * pField) = 0;
808
809 static bool NoPageBreakSection( const SfxItemSet *pSet );
810
811 // Compute the number format for WW dates
812 bool GetNumberFormat(const SwField& rField, OUString& rStr);
813
814 virtual sal_uInt64 ReplaceCr( sal_uInt8 nChar ) = 0;
815
816 const SfxPoolItem* HasItem( sal_uInt16 nWhich ) const;
817 template<class T> const T* HasItem(TypedWhichId<T> nWhich) const
818 {
819 return static_cast<const T*>(HasItem(sal_uInt16(nWhich)));
820 }
821
823 int GetGrfIndex(const SvxBrushItem& rBrush);
824
826
827 enum ExportFormat { DOC = 0, RTF = 1, DOCX = 2};
828 virtual ExportFormat GetExportFormat() const = 0;
829
830protected:
833
835 sal_Int32 GetNextPos( SwWW8AttrIter const * pAttrIter, const SwTextNode& rNode, sal_Int32 nCurrentPos );
836
838 void UpdatePosition( SwWW8AttrIter* pAttrIter, sal_Int32 nCurrentPos );
839
841 virtual void OutputTextNode( SwTextNode& );
842
844 void GatherChapterFields();
845
846 void AddLinkTarget( std::u16string_view rURL );
847 void CollectOutlineBookmarks( const SwDoc &rDoc );
848
849 bool SetCurrentPageDescFromNode(const SwNode &rNd);
850 bool ContentContainsChapterField(const SwFormatContent &rContent) const;
851 bool FormatHdFtContainsChapterField(const SwFrameFormat &rFormat) const;
852
853 virtual void SectionBreaksAndFrames( const SwTextNode& rNode ) = 0;
854
855 virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
856 const SwNode& rNd,
857 const SwFormatPageDesc* pNewPgDescFormat,
858 const SwPageDesc* pNewPgDesc,
859 bool bExtraPageBreak = false ) = 0;
860
862 virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) = 0;
863
865 void OutputStartNode( const SwStartNode& );
866
868 virtual void OutputEndNode( const SwEndNode& );
869
871 virtual void OutputGrfNode( const SwGrfNode& ) = 0;
872
874 virtual void OutputOLENode( const SwOLENode& ) = 0;
875
876 virtual void OutputLinkedOLE( const OUString& ) = 0;
877
879 void OutputSectionNode( const SwSectionNode& );
880 static void UpdateTocSectionNodeProperties(const SwSectionNode& rSectionNode);
881
882 virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) = 0;
883
888
892 bool NearestBookmark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly );
893
894 void GetSortedBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen );
895
896 bool GetBookmarks( const SwTextNode& rNd, sal_Int32 nStt, sal_Int32 nEnd,
897 IMarkVector& rArr );
898
901 void NearestAnnotationMark( sal_Int32& rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly );
902
903 void GetSortedAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen );
904
905 bool GetAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nStt, sal_Int32 nEnd,
906 IMarkVector& rArr );
907
909
910 void SetCurPam(SwNodeOffset nStt, SwNodeOffset nEnd);
911
913 std::unique_ptr<SvxBrushItem> getBackground();
917 void BulletDefinitions();
918
919 bool NeedSectionBreak( const SwNode& rNd ) const;
920 bool NeedTextNodeSplit( const SwTextNode& rNd, SwSoftPageBreakList& pList ) const;
921
922 std::vector<const Graphic*> m_vecBulletPic;
923
924public:
925 MSWordExportBase(SwDoc& rDocument, std::shared_ptr<SwUnoCursor> & pCurrentPam, SwPaM* pOriginalPam);
926 virtual ~MSWordExportBase();
927
928 // TODO move as much as possible here from WW8Export! ;-)
929
930 static void CorrectTabStopInSet( SfxItemSet& rSet, sal_Int32 nAbsLeft );
931
932private:
935};
936
939{
940// friends to get access to m_pExport
941// FIXME avoid that, this is probably not what we want
942// (if yes, remove the friends, and provide here a GetExport() method)
944
947
948public:
949 SwWW8Writer(std::u16string_view rFltName, const OUString& rBaseURL);
950 virtual ~SwWW8Writer() override;
951
952 virtual ErrCode WriteStorage() override;
953 virtual ErrCode WriteMedium( SfxMedium& ) override;
954
955 // TODO most probably we want to be able to get these in
956 // MSExportFilterBase
958
959public:
960 static void InsUInt16(ww::bytes &rO, sal_uInt16 n);
961 static void InsUInt32(ww::bytes &rO, sal_uInt32 n);
962 static void InsAsString16(ww::bytes &rO, const OUString& rStr);
963 static void InsAsString8(ww::bytes & O, std::u16string_view rStr,
964 rtl_TextEncoding eCodeSet);
965
966 static sal_uLong FillUntil( SvStream& rStrm, sal_uLong nEndPos = 0 );
967 static void FillCount( SvStream& rStrm, sal_uLong nCount );
968
969 static void WriteShort( SvStream& rStrm, sal_Int16 nVal ) { rStrm.WriteInt16( nVal ); }
970 static void WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal );
971
972 static void WriteLong( SvStream& rStrm, sal_Int32 nVal ) { rStrm.WriteInt32( nVal ); }
973 static void WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal );
974
975 static void WriteString16(SvStream& rStrm, const OUString& rStr,
976 bool bAddZero);
977 static void WriteString8(SvStream& rStrm, std::u16string_view rStr,
978 bool bAddZero, rtl_TextEncoding eCodeSet);
979
980 static void WriteString_xstz(SvStream& rStrm, const OUString& rStr, bool bAddZero);
981
983
984 using StgWriter::Write;
985 virtual ErrCode Write( SwPaM&, SfxMedium&, const OUString* ) override;
986 //Seems not an expected to provide method to access the private member
988
989private:
990 SwWW8Writer(const SwWW8Writer&) = delete;
993};
994
997{
998public:
999 std::unique_ptr<ww::bytes> m_pO;
1000
1002
1003 std::unique_ptr<WW8Fib> m_pFib;
1004 std::unique_ptr<WW8Dop> m_pDop;
1005 std::unique_ptr<WW8_WrPlcFootnoteEdn> m_pFootnote;
1006 std::unique_ptr<WW8_WrPlcFootnoteEdn> m_pEdn;
1007 std::unique_ptr<WW8_WrPlcSepx> m_pSepx;
1008
1009 bool m_bDot;
1010
1011protected:
1013 std::unique_ptr<WW8AttributeOutput> m_pAttrOutput;
1014
1015private:
1017
1018public:
1020 virtual AttributeOutputBase& AttrOutput() const override;
1021
1023 virtual MSWordSections& Sections() const override;
1024
1025 virtual bool PreferPageBreakBefore() const override { return true; }
1026
1027 virtual bool FieldsQuoted() const override { return false; }
1028
1029 virtual bool AddSectionBreaksForTOX() const override { return false; }
1030private:
1032 virtual ErrCode ExportDocument_Impl() override;
1033
1034 void PrepareStorage();
1035 void WriteFkpPlcUsw();
1036 void WriteMainText();
1037 void StoreDoc1();
1038
1040 virtual void WriteNumbering() override;
1041
1042 void OutOverrideListTab();
1043 void OutListNamesTab();
1044
1045 void RestoreMacroCmds();
1046
1047 void DoComboBox(css::uno::Reference<css::beans::XPropertySet> const & xPropSet);
1048
1049public:
1050
1052 virtual void SetupSectionPositions( WW8_PdAttrDesc* pA ) override;
1053
1054 bool MiserableFormFieldExportHack(const SwFrameFormat& rFrameFormat);
1055
1058
1059 sal_uInt16 AddRedlineAuthor( std::size_t nId );
1060
1061 void WriteFootnoteBegin( const SwFormatFootnote& rFootnote, ww::bytes* pO = nullptr );
1062 void WritePostItBegin( ww::bytes* pO = nullptr );
1063 const SvxBrushItem* GetCurrentPageBgBrush() const;
1064 std::shared_ptr<SvxBrushItem> TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const;
1065
1066 void AppendFlyInFlys(const ww8::Frame& rFrameFormat, const Point& rNdTopLeft);
1067 void WriteOutliner(const OutlinerParaObject& rOutliner, sal_uInt8 nTyp);
1068 void WriteSdrTextObj(const SdrTextObj& rObj, sal_uInt8 nTyp);
1069
1070 sal_uInt32 GetSdrOrdNum( const SwFrameFormat& rFormat ) const;
1071 void CreateEscher();
1072 void WriteEscher();
1073
1075 virtual void OutputField( const SwField* pField, ww::eField eFieldType,
1076 const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) override;
1077
1078 void StartCommentOutput( std::u16string_view rName );
1079 void EndCommentOutput( std::u16string_view rName );
1080 void OutGrf(const ww8::Frame &rFrame);
1081 bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const& xOleStg,
1082 const tools::SvRef<SotStorage>& xObjStg, OUString const& rStorageName,
1083 SwOLENode* pOLENd);
1084
1085 virtual void AppendBookmarks( const SwTextNode& rNd, sal_Int32 nCurrentPos, sal_Int32 nLen, const SwRedlineData* pRedlineData = nullptr ) override;
1086 virtual void AppendBookmark( const OUString& rName ) override;
1087 void AppendBookmarkEndWithCorrection( const OUString& rName );
1088
1089 virtual void AppendAnnotationMarks( const SwWW8AttrIter& rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen ) override;
1090
1091 virtual void AppendSmartTags(SwTextNode& rTextNode) override;
1092
1093 virtual void ExportGrfBullet(const SwTextNode& rNd) override;
1094 void OutGrfBullets(const ww8::Frame &rFrame);
1095
1096 void MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo);
1097
1098 void WriteAsStringTable(const std::vector<OUString>&, sal_Int32& rfcSttbf,
1099 sal_Int32& rlcbSttbf);
1100
1101 virtual sal_uInt64 ReplaceCr( sal_uInt8 nChar ) override;
1102
1103 virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() ) override;
1104 void WriteChar( sal_Unicode c ) override;
1105
1106 void OutSwString(const OUString&, sal_Int32 nStt, sal_Int32 nLen);
1107
1108 WW8_CP Fc2Cp( sal_uLong nFc ) const { return m_pPiece->Fc2Cp( nFc ); }
1109
1110 // some partly static semi-internal function declarations
1111
1112 void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz )
1113 { m_pO->insert( m_pO->end(), pBytes, pBytes+nSiz ); }
1114
1115 virtual void SectionBreaksAndFrames( const SwTextNode& rNode ) override;
1116
1118 // #i76300#
1119 virtual void PrepareNewPageDesc( const SfxItemSet* pSet,
1120 const SwNode& rNd,
1121 const SwFormatPageDesc* pNewPgDescFormat,
1122 const SwPageDesc* pNewPgDesc,
1123 bool bExtraPageBreak = false ) override;
1124
1125 static void Out_BorderLine(ww::bytes& rO, const ::editeng::SvxBorderLine* pLine,
1126 sal_uInt16 nDist, sal_uInt16 nSprmNo, sal_uInt16 nSprmNoVer9,
1127 bool bShadow);
1128
1129 void Out_SwFormatBox(const SvxBoxItem& rBox, bool bShadow);
1130 static void Out_SwFormatTableBox( ww::bytes& rO, const SvxBoxItem * rBox );
1131 void Out_CellRangeBorders(const SvxBoxItem * pBox, sal_uInt8 nStart,
1132 sal_uInt8 nLimit);
1133 static bool TransBrush(const Color& rCol, WW8_SHD& rShd);
1134 static WW8_BRCVer9 TranslateBorderLine(const ::editeng::SvxBorderLine& pLine,
1135 sal_uInt16 nDist, bool bShadow);
1136
1137 // #i77805# - new return value indicates, if an inherited outline numbering is suppressed
1138 virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) override;
1139
1140 unsigned int GetHdFtIndex() const { return m_nHdFtIndex; }
1141 void SetHdFtIndex(unsigned int nHdFtIndex) { m_nHdFtIndex = nHdFtIndex; }
1143
1149 static sal_uInt8 GetNumId( sal_uInt16 eNumType );
1150
1152 virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) override;
1153
1154 SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const;
1155
1157 void MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight,
1158 const ww8::Frame &rFrameFormat);
1159
1160 void InsUInt16( sal_uInt16 n ) { SwWW8Writer::InsUInt16( *m_pO, n ); }
1161 void InsInt16(sal_Int16 n) { InsUInt16(sal_uInt16(n)); }
1162 void InsUInt32( sal_uInt32 n ) { SwWW8Writer::InsUInt32( *m_pO, n ); }
1163 void WriteStringAsPara( const OUString& rText );
1164
1166 WW8Export( SwWW8Writer *pWriter,
1167 SwDoc& rDocument, std::shared_ptr<SwUnoCursor> & pCurrentPam, SwPaM* pOriginalPam,
1168 bool bDot );
1169 virtual ~WW8Export() override;
1170
1171 virtual void DoComboBox(const OUString &rName,
1172 const OUString &rHelp,
1173 const OUString &ToolTip,
1174 const OUString &rSelected,
1175 const css::uno::Sequence<OUString> &rListItems) override;
1176
1177 virtual void DoFormText(const SwInputField * pField) override;
1178
1179 void GetCurrentItems(ww::bytes &rItems) const;
1180
1182 virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) override;
1183 virtual void WriteHyperlinkData( const ::sw::mark::IFieldmark& rFieldmark ) override;
1184
1187
1188 SwWW8Writer& GetWriter() const { return *m_pWriter; }
1189 SvStream& Strm() const { return m_pWriter->Strm(); }
1190
1192 virtual void SaveData( SwNodeOffset nStt, SwNodeOffset nEnd ) override;
1193
1195 virtual void RestoreData() override;
1196
1198 virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
1199 const SwFrameFormat& rFormat, const SwFrameFormat& rLeftHeaderFormat, const SwFrameFormat& rLeftFooterFormat, const SwFrameFormat& rFirstPageFormat,
1200 sal_uInt8 nBreakCode, bool bEvenAndOddHeaders) override;
1201
1202 virtual ExportFormat GetExportFormat() const override { return ExportFormat::DOC; }
1203
1204protected:
1206 virtual void OutputGrfNode( const SwGrfNode& ) override;
1207
1209 virtual void OutputOLENode( const SwOLENode& ) override;
1210
1211 virtual void OutputLinkedOLE( const OUString& ) override;
1212
1213 virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) override;
1214
1215private:
1216 WW8Export(const WW8Export&) = delete;
1217 WW8Export& operator=(const WW8Export&) = delete;
1218};
1219
1220class WW8_WrPlcSubDoc // double Plc for Footnotes/Endnotes and Postits
1221{
1222private:
1225protected:
1226 std::vector<WW8_CP> m_aCps;
1227 std::vector<const void*> m_aContent; // PTRARR of SwFormatFootnote/PostIts/..
1228 std::vector<const SwFrameFormat*> m_aSpareFormats; // a backup for aContent: if there's no SdrObject, stores the fmt directly here
1229 std::unique_ptr<WW8_WrPlc0> m_pTextPos; // positions of the individual texts
1230
1232 virtual ~WW8_WrPlcSubDoc();
1233
1234 bool WriteGenericText( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_CP& rCount );
1235 void WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_FC& rTextStt,
1236 sal_Int32& rTextCnt, WW8_FC& rRefStt, sal_Int32& rRefCnt ) const;
1237
1238 virtual const std::vector<sal_uInt32>* GetShapeIdArr() const;
1239};
1240
1241// double Plc for Footnotes/Endnotes
1243{
1244private:
1246
1249public:
1250 explicit WW8_WrPlcFootnoteEdn( sal_uInt8 nTTyp ) : m_nTyp( nTTyp ) {}
1251
1252 bool WriteText( WW8Export& rWrt );
1253 void WritePlc( WW8Export& rWrt ) const;
1254
1255 void Append( WW8_CP nCp, const SwFormatFootnote& rFootnote );
1256};
1257
1259{
1262 OUString msOwner;
1263 OUString m_sInitials;
1266 bool m_bIgnoreEmpty = true;
1267 WW8_Annotation(const SwPostItField* pPostIt, WW8_CP nRangeStart, WW8_CP nRangeEnd);
1268 explicit WW8_Annotation(const SwRedlineData* pRedline);
1270 bool HasRange() const;
1271};
1272
1273class WW8_WrPlcAnnotations : public WW8_WrPlcSubDoc // double Plc for Postits
1274{
1275private:
1279
1280 std::map<const OUString, std::pair<WW8_CP, bool>> m_aRangeStartPositions;
1281public:
1283 virtual ~WW8_WrPlcAnnotations() override;
1284
1285 void AddRangeStartPosition(const OUString& rName, WW8_CP nStartCp, bool bIgnoreEmpty);
1286 void Append( WW8_CP nCp, const SwPostItField* pPostIt );
1287 void Append( WW8_CP nCp, const SwRedlineData* pRedLine );
1288 bool IsNewRedlineComment( const SwRedlineData* pRedLine );
1289 bool WriteText( WW8Export& rWrt );
1290 void WritePlc( WW8Export& rWrt ) const;
1291};
1292
1293class WW8_WrPlcTextBoxes : public WW8_WrPlcSubDoc // double Plc for Textboxes
1294{ // Frame/DrawTextboxes!
1295private:
1297 std::vector<sal_uInt32> m_aShapeIds; // VARARR of ShapeIds for the SwFrameFormats
1298 virtual const std::vector<sal_uInt32>* GetShapeIdArr() const override;
1299
1302public:
1303 explicit WW8_WrPlcTextBoxes( sal_uInt8 nTTyp ) : m_nTyp( nTTyp ) {}
1304
1305 bool WriteText( WW8Export& rWrt );
1306 void WritePlc( WW8Export& rWrt ) const;
1307 void Append( const SdrObject& rObj, sal_uInt32 nShapeId );
1308 void Append( const SwFrameFormat* pFormat, sal_uInt32 nShapeId );
1309 sal_uInt16 Count() const { return m_aContent.size(); }
1310 sal_uInt16 GetPos( const void* p ) const
1311 {
1312 std::vector<const void*>::const_iterator it
1313 = std::find( m_aContent.begin(), m_aContent.end(), p );
1314 return it == m_aContent.end() ? USHRT_MAX : it - m_aContent.begin();
1315 }
1316};
1317
1318class WW8_WrPlcPn // Plc for Page Numbers
1319{
1320private:
1322 // Plc for Chpx and Papx ( incl PN-Plc )
1323 std::vector<std::unique_ptr<WW8_WrFkp>> m_Fkps;
1326
1327 WW8_WrPlcPn(const WW8_WrPlcPn&) = delete;
1329public:
1330 WW8_WrPlcPn( WW8Export& rWrt, ePLCFT ePl, WW8_FC nStartFc );
1331 ~WW8_WrPlcPn();
1332 void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const sal_uInt8* pSprms = nullptr);
1333 void WriteFkps();
1334 void WritePlc();
1336};
1337
1338// class WW8_WrPlc1 is only used for fields
1340{
1341private:
1342 std::vector<WW8_CP> m_aPos;
1343 std::unique_ptr<sal_uInt8[]> m_pData; // content ( structures )
1345 sal_uInt16 m_nStructSiz;
1346
1347 WW8_WrPlc1(const WW8_WrPlc1&) = delete;
1349protected:
1350 sal_uInt16 Count() const { return m_aPos.size(); }
1351 void Write( SvStream& rStrm );
1352 WW8_CP Prev() const;
1353public:
1354 explicit WW8_WrPlc1( sal_uInt16 nStructSz );
1355 ~WW8_WrPlc1();
1356 void Append( WW8_CP nCp, const void* pData );
1357 void Finish( sal_uLong nLastCp, sal_uLong nStartCp );
1358};
1359
1360// class WW8_WrPlcField is for fields
1362{
1363private:
1365 sal_uInt16 m_nResults;
1366
1369public:
1370 WW8_WrPlcField( sal_uInt16 nStructSz, sal_uInt8 nTTyp )
1371 : WW8_WrPlc1( nStructSz ), m_nTextTyp( nTTyp ), m_nResults(0)
1372 {}
1373 void Write( WW8Export& rWrt );
1375 sal_uInt16 ResultCount() const { return m_nResults; }
1376};
1377
1379{
1380private:
1383public:
1385 void Append( WW8_CP nCp, sal_uLong nData );
1386 void Write( WW8Export& rWrt );
1387};
1388
1390{
1391public:
1392 ww8::Frame maFly; // surrounding FlyFrames
1393 sal_uLong mnPos; // FilePos of the graphics
1394 sal_uInt16 mnWid; // Width of the graphics
1395 sal_uInt16 mnHei; // Height of the graphics
1396
1397 GraphicDetails(const ww8::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
1398 : maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei)
1399 {}
1400
1401 bool operator==(const GraphicDetails& rIn) const
1402 {
1403 return (
1404 (mnWid == rIn.mnWid) && (mnHei == rIn.mnHei) &&
1406 );
1407 }
1408};
1409
1410// class SwWW8WrGrf collects graphics and issues them
1412{
1413private:
1416
1417 std::vector<GraphicDetails> maDetails;
1418 sal_uInt16 mnIdx; // index in file positions
1419
1420 static void WritePICFHeader(SvStream& rStrm, const ww8::Frame &rFly,
1421 sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight,
1422 const SwAttrSet* pAttrSet = nullptr);
1423 void WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem);
1424 void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd,
1425 const ww8::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight);
1426
1427 static void WritePICBulletFHeader(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight);
1428 void WriteGrfForBullet(SvStream& rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight);
1429
1430 SwWW8WrGrf(const SwWW8WrGrf&) = delete;
1432public:
1433 explicit SwWW8WrGrf( WW8Export& rW ) : m_rWrt( rW ), mnIdx( 0 ) {}
1434 void Insert(const ww8::Frame &rFly);
1435 void Write();
1437 { return (mnIdx < maDetails.size()) ? maDetails[mnIdx++].mnPos : 0; }
1438};
1439
1444{
1445private:
1449protected:
1451public:
1452 explicit MSWordAttrIter( MSWordExportBase& rExport );
1453 virtual ~MSWordAttrIter();
1454
1455 virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const = 0;
1456 template<class T> const T* HasTextItem( TypedWhichId<T> nWhich ) const
1457 {
1458 return static_cast<const T*>(HasTextItem(sal_uInt16(nWhich)));
1459 }
1460 virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const = 0;
1461};
1462
1465{
1466private:
1469 std::vector<EECharAttrib> m_aTextAtrArr;
1470 std::vector<const EECharAttrib*> m_aChrTextAtrArr;
1471 std::vector<rtl_TextEncoding> m_aChrSetArr;
1472 sal_Int32 m_nPara;
1474 sal_Int32 m_nTmpSwPos; // for HasItem()
1475 rtl_TextEncoding m_eNdChrSet;
1476 sal_uInt16 m_nScript;
1478
1479 sal_Int32 SearchNext( sal_Int32 nStartPos );
1480 void SetCharSet(const EECharAttrib& rTextAttr, bool bStart);
1481
1482 void SetItemsThatDifferFromStandard(bool bCharAttr, SfxItemSet& rSet);
1483
1486public:
1487 MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj,
1488 sal_uInt8 nType );
1489 void NextPara( sal_Int32 nPar );
1490 void OutParaAttr(bool bCharAttr, const std::set<sal_uInt16>* pWhichsToIgnore = nullptr);
1491 void OutEEField(const SfxPoolItem& rHt);
1492
1493 bool IsTextAttr(sal_Int32 nSwPos);
1494
1496
1497 void OutAttr( sal_Int32 nSwPos );
1498 virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const override;
1499 virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const override;
1500 sal_Int32 WhereNext() const { return m_nCurrentSwPos; }
1501 rtl_TextEncoding GetNextCharSet() const;
1502 rtl_TextEncoding GetNodeCharSet() const { return m_eNdChrSet; }
1503};
1504
1505// class SwWW8AttrIter is a helper for constructing the Fkp.chpx.
1506// Only character attributes are considered; paragraph attributes do not need this treatment.
1507// The paragraph and text attributes of the Writer are passed, and
1508// Where() returns the next position where the attributes change.
1509// IsTextAtr() tells if, at the position returned by Where(), there is
1510// an attribute without end and with \xff in the text.
1511// Using OutAttr(), the attributes on the passed SwPos are returned.
1513{
1514private:
1516
1518 sw::util::CharRuns::const_iterator maCharRunIter;
1519
1520 rtl_TextEncoding meChrSet;
1521 sal_uInt16 mnScript;
1523
1527
1529
1531
1534
1535 sal_Int32 SearchNext( sal_Int32 nStartPos );
1536
1537 void OutSwFormatRefMark(const SwFormatRefMark& rAttr);
1538
1539 void IterToCurrent();
1540
1543
1544 void handleToggleProperty(SfxItemSet& rExportSet, const SwFormatCharFormat* pCharFormatItem, sal_uInt16 nWhich, const SfxPoolItem* pValue);
1545public:
1546 SwWW8AttrIter( MSWordExportBase& rWr, const SwTextNode& rNd );
1547
1548 bool IsTextAttr( sal_Int32 nSwPos ) const;
1549 bool IsExportableAttr(sal_Int32 nSwPos) const;
1550 bool IncludeEndOfParaCRInRedlineProperties(sal_Int32 nPos) const;
1551 bool IsDropCap( int nSwPos );
1553
1555
1556 void OutAttr(sal_Int32 nSwPos, bool bWriteCombinedChars);
1557 virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const override;
1558 virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const override;
1559 int OutAttrWithRange(const SwTextNode& rNode, sal_Int32 nPos);
1561 const SwRedlineData* GetRunLevelRedline( sal_Int32 nPos );
1562 FlyProcessingState OutFlys(sal_Int32 nSwPos);
1563 bool HasFlysAt(sal_Int32 nSwPos) const;
1564
1565 sal_Int32 WhereNext() const { return m_nCurrentSwPos; }
1566 sal_uInt16 GetScript() const { return mnScript; }
1567 bool IsParaRTL() const { return mbParaIsRTL; }
1568 rtl_TextEncoding GetCharSet() const { return meChrSet; }
1569 OUString GetSnippet(const OUString &rStr, sal_Int32 nCurrentPos,
1570 sal_Int32 nLen) const;
1572
1573 bool IsWatermarkFrame();
1574 bool IsAnchorLinkedToThisNode( SwNodeOffset nNodePos );
1575
1576 void SplitRun( sal_Int32 nSplitEndPos );
1577
1578 const SwTextNode& GetNode() const { return m_rNode; }
1579};
1580
1583{
1586
1588 {
1589 const SwFormat* format = nullptr;
1590 const SwNumRule* num_rule = nullptr;
1592 sal_uInt16 ww_id = ww::stiUser;
1593 OUString ww_name;
1594 OString style_id;
1595
1596 MapEntry() = default;
1597 MapEntry(const SwFormat* f) : format(f) { if (f) ww_id = GetWWId(*f); }
1598 MapEntry(const SwNumRule* r) : num_rule(r) {}
1599 };
1600 std::vector<MapEntry> m_aStyles;
1602
1604 void BuildStylesTable();
1605
1607 void BuildWwNames();
1608
1610 void BuildStyleIds();
1611
1613 void GetStyleData( const SwFormat* pFormat, bool& bFormatColl, sal_uInt16& nBase, sal_uInt16& nNext, sal_uInt16& nLink );
1614
1616 void WriteProperties( const SwFormat* pFormat, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz );
1617
1618 static sal_uInt16 GetWWId( const SwFormat& rFormat );
1619
1620 void SetStyleDefaults( const SwFormat& rFormat, bool bPap );
1621
1623 void OutputStyle( sal_uInt16 nSlot );
1624
1625 MSWordStyles( const MSWordStyles& ) = delete;
1627
1628public:
1629 MSWordStyles( MSWordExportBase& rExport, bool bListStyles = false );
1630 ~MSWordStyles();
1631
1633 void OutputStylesTable();
1634
1636 sal_uInt16 GetSlot( const SwFormat* pFormat ) const;
1637
1639 static OString CreateStyleId(std::u16string_view aName);
1640
1642 OString const & GetStyleId(sal_uInt16 nSlot) const;
1644 OUString GetStyleWWName(SwFormat const* pFormat) const;
1645
1646 const SwFormat* GetSwFormat(sal_uInt16 nSlot) const { return m_aStyles[nSlot].format; }
1648 const SwNumRule* GetSwNumRule(sal_uInt16 nSlot) const { return m_aStyles[nSlot].num_rule; }
1649 sal_uInt16 GetHeadingParagraphStyleId(sal_uInt16 nLevel) const { return m_aHeadingParagraphStyles[ nLevel ]; }
1650};
1651
1652#define MSWORD_MAX_STYLES_LIMIT 4091
1653
1654sal_Int16 GetWordFirstLineOffset(const SwNumFormat &rFormat);
1655// A bit of a bag on the side for now
1656OUString FieldString(ww::eField eIndex);
1657OUString BookmarkToWord(std::u16string_view rBookmark, bool* pIsMove = nullptr, bool* pIsFrom = nullptr);
1658
1660{
1661 sal_uInt32 m_cvFore;
1662 sal_uInt32 m_cvBack;
1663
1664public:
1666
1667 void Write(WW8Export & rExport);
1668 void setCvFore(sal_uInt32 cvFore) { m_cvFore = cvFore; }
1669 void setCvBack(sal_uInt32 cvBack) { m_cvBack = cvBack; }
1670};
1671
1672#endif // INCLUDED_SW_SOURCE_FILTER_WW8_WRTWW8_HXX
1673
1674/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
The class that has handlers for various resource types when exporting as DOCX.
DrawObj(const ww8::Frame &rContent, WW8_CP nCp, Point aParentPos, SvxFrameDirection nDir, unsigned int nHdFtIndex)
Definition: wrtww8.hxx:353
ww8::Frame maContent
Definition: wrtww8.hxx:346
sal_uInt32 mnShapeId
Definition: wrtww8.hxx:345
SvxFrameDirection mnDirection
Definition: wrtww8.hxx:349
WW8_CP mnCp
Definition: wrtww8.hxx:344
unsigned int mnHdFtIndex
Definition: wrtww8.hxx:350
Point maParentPos
Definition: wrtww8.hxx:347
sal_Int32 mnThick
Definition: wrtww8.hxx:348
void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick)
Definition: wrtw8esh.cxx:895
GraphicDetails(const ww8::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
Definition: wrtww8.hxx:1397
sal_uInt16 mnWid
Definition: wrtww8.hxx:1394
sal_uLong mnPos
Definition: wrtww8.hxx:1393
ww8::Frame maFly
Definition: wrtww8.hxx:1392
sal_uInt16 mnHei
Definition: wrtww8.hxx:1395
bool operator==(const GraphicDetails &rIn) const
Definition: wrtww8.hxx:1401
HdFtPlcDrawObj & operator=(const HdFtPlcDrawObj &)=delete
virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const override
Definition: wrtw8esh.cxx:857
HdFtPlcDrawObj(const HdFtPlcDrawObj &)=delete
virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const override
Definition: wrtw8esh.cxx:864
The class MSWordAttrIter is a helper class to build the Fkp.chpx.
Definition: wrtww8.hxx:1444
virtual ~MSWordAttrIter()
Definition: wrtw8nds.cxx:177
MSWordAttrIter * m_pOld
Definition: wrtww8.hxx:1446
MSWordAttrIter & operator=(const MSWordAttrIter &)=delete
MSWordExportBase & m_rExport
Definition: wrtww8.hxx:1450
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const =0
const T * HasTextItem(TypedWhichId< T > nWhich) const
Definition: wrtww8.hxx:1456
MSWordAttrIter(const MSWordAttrIter &)=delete
virtual const SfxPoolItem * HasTextItem(sal_uInt16 nWhich) const =0
Base class for WW8Export and DocxExport.
Definition: wrtww8.hxx:451
bool m_bExportModeRTF
Definition: wrtww8.hxx:571
std::unique_ptr< WW8_WrtRedlineAuthor > m_pRedlAuthors
Definition: wrtww8.hxx:473
bool m_bBreakBefore
Definition: wrtww8.hxx:552
virtual void WriteFormData(const ::sw::mark::IFieldmark &rFieldmark)=0
Write the data of the form field.
bool m_bEndAtTextEnd
Definition: wrtww8.hxx:564
Point * m_pFlyOffset
Definition: wrtww8.hxx:523
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:314
void WriteText()
Iterate through the nodes and call the appropriate OutputNode() on them.
Definition: wrtww8.cxx:2900
SvxFrameDirection TrueFrameDirection(const SwFrameFormat &rFlyFormat) const
Right to left?
Definition: wrtw8nds.cxx:1669
RndStdIds m_eNewAnchorType
Definition: wrtww8.hxx:524
void GetSortedAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen)
Definition: wrtw8nds.cxx:2118
virtual void SectionBreaksAndFrames(const SwTextNode &rNode)=0
sal_uInt8 m_nTextTyp
Definition: wrtww8.hxx:549
virtual void WriteHeadersFooters(sal_uInt8 nHeadFootFlags, const SwFrameFormat &rFormat, const SwFrameFormat &rLeftHeaderFormat, const SwFrameFormat &rLeftFooterFormat, const SwFrameFormat &rFirstPageFormat, sal_uInt8 nBreakCode, bool bEvenAndOddHeaders)=0
Output the actual headers and footers.
std::stack< MSWordSaveData > m_aSaveData
Stack to remember the nesting (see MSWordSaveData for more)
Definition: wrtww8.hxx:582
const SfxItemSet * GetCurItemSet() const
Getter for pISet.
Definition: wrtww8.hxx:731
void GetId(const wwFont &rFont)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: wrtww8.hxx:626
std::unique_ptr< WW8_WrPlcField > m_pFieldAtn
Definition: wrtww8.hxx:530
bool OutputFollowPageDesc(const SfxItemSet *pSet, const SwTextNode *pNd)
The return value indicates, if a follow page desc is written.
Definition: ww8atr.cxx:677
static void CorrectTabStopInSet(SfxItemSet &rSet, sal_Int32 nAbsLeft)
Definition: ww8atr.cxx:753
virtual bool CollapseScriptsforWordOk(sal_uInt16 nScript, sal_uInt16 nWhich)=0
Guess the script (asian/western).
virtual ErrCode ExportDocument_Impl()=0
Format-dependent part of the actual export.
void CollectOutlineBookmarks(const SwDoc &rDoc)
Definition: wrtww8.cxx:3334
sal_uInt16 m_nStyleBeforeFly
style number of the node
Definition: wrtww8.hxx:482
bool m_bInWriteEscher
Definition: wrtww8.hxx:560
IMarkVector m_rSortedBookmarksEnd
Definition: wrtww8.hxx:587
bool HasRefToFootOrEndnote(const bool isEndNote, const sal_uInt16 nSeqNo)
Definition: ww8atr.cxx:1032
void SubstituteBullet(OUString &rNumStr, rtl_TextEncoding &rChrSet, OUString &rFontName) const
Definition: wrtw8num.cxx:628
void WriteHeaderFooterText(const SwFormat &rFormat, bool bHeader)
Write header/footer text.
Definition: wrtw8sty.cxx:2119
virtual void WriteChar(sal_Unicode c)=0
bool m_bFootnoteAtTextEnd
Definition: wrtww8.hxx:563
int CollectGrfsOfBullets()
Populates m_vecBulletPic with all the bullet graphics used by numberings.
Definition: wrtww8.cxx:1526
IMarkVector m_rSortedBookmarksStart
Definition: wrtww8.hxx:586
bool IsInTable() const
Return whether currently exported node is in table.
Definition: wrtww8.cxx:3074
bool m_bOrigShowChanges
Remember the original Show Changes mode.
Definition: wrtww8.hxx:489
const sw::BroadcastingModify * m_pOutFormatNode
Definition: wrtww8.hxx:539
sal_uInt16 m_nUniqueList
current number for creating unique list names
Definition: wrtww8.hxx:485
virtual void OutputEndNode(const SwEndNode &)
Output SwEndNode.
Definition: wrtww8.cxx:4514
std::unique_ptr< MainTextPlcDrawObj > m_pSdrObjs
Definition: wrtww8.hxx:542
std::unique_ptr< WW8_WrPct > m_pPiece
Definition: wrtww8.hxx:459
std::unique_ptr< WW8_WrPlcTextBoxes > m_pHFTextBxs
Definition: wrtww8.hxx:506
sal_uInt16 DuplicateNumRule(const SwNumRule *pRule, sal_uInt8 nLevel, sal_uInt16 nVal)
In case of numbering restart.
Definition: wrtw8num.cxx:57
bool NeedSectionBreak(const SwNode &rNd) const
Definition: wrtw8nds.cxx:2185
void UpdatePosition(SwWW8AttrIter *pAttrIter, sal_Int32 nCurrentPos)
Update the information for GetNextPos().
Definition: wrtw8nds.cxx:1936
SwNumRule * DuplicateNumRuleImpl(const SwNumRule *pRule)
Definition: wrtw8num.cxx:41
virtual void WriteNumbering()=0
Output the numbering table.
sal_Int32 GetNextPos(SwWW8AttrIter const *pAttrIter, const SwTextNode &rNode, sal_Int32 nCurrentPos)
Get the next position in the text node to output.
Definition: wrtw8nds.cxx:1919
SwEscherEx * m_pEscher
Definition: wrtww8.hxx:545
virtual void SaveData(SwNodeOffset nStt, SwNodeOffset nEnd)
Remember some of the members so that we can recurse in WriteText().
Definition: wrtww8.cxx:1897
RedlineFlags m_nOrigRedlineFlags
Remember the original redline mode.
Definition: wrtww8.hxx:488
std::vector< const Graphic * > m_vecBulletPic
Vector to record all the graphics of bullets.
Definition: wrtww8.hxx:922
void AddListLevelOverride(sal_uInt16 nListId, sal_uInt16 nLevelNum, sal_uInt16 nStartAt)
Store list level overrides (restart of list)
Definition: wrtw8num.cxx:115
std::unique_ptr< SvxBrushItem > getBackground()
Get background color of the document, if there is one.
Definition: wrtww8.cxx:1510
ErrCode ExportDocument(bool bWriteAll)
The main function to export the document.
Definition: wrtww8.cxx:3401
void GetSortedBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen)
Definition: wrtw8nds.cxx:2152
sal_Int32 m_nLinkedTextboxesChainId
Definition: wrtww8.hxx:518
void OutputSectionNode(const SwSectionNode &)
Output SwSectionNode.
Definition: wrtw8nds.cxx:3300
std::vector< const SwTOXType * > m_aTOXArr
Definition: wrtww8.hxx:456
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:93
void WriteSpecialText(SwNodeOffset nStart, SwNodeOffset nEnd, sal_uInt8 nTTyp)
Set the pCurPam appropriately and call WriteText().
Definition: wrtww8.cxx:1802
std::stack< sal_Int32 > m_aCurrentCharPropStarts
To remember the position in a run.
Definition: wrtww8.hxx:471
std::unique_ptr< SwWW8WrGrf > m_pGrf
Definition: wrtww8.hxx:537
bool GetNumberFormat(const SwField &rField, OUString &rStr)
Definition: ww8atr.cxx:2709
void OutputContentNode(SwContentNode &)
Call the right (virtual) function according to the type of the item.
Definition: wrtw8nds.cxx:3625
std::vector< SwNodeOffset > m_aChapterFieldLocs
Definition: wrtww8.hxx:454
bool m_bAddFootnoteTab
Definition: wrtww8.hxx:574
std::unique_ptr< WW8_WrPlcField > m_pFieldTextBxs
Definition: wrtww8.hxx:531
std::unique_ptr< WW8_WrtBookmarks > m_pBkmks
Definition: wrtww8.hxx:472
std::shared_ptr< NfKeywordTable > m_pKeyMap
Definition: wrtww8.hxx:474
IMarkVector m_rSortedAnnotationMarksStart
Definition: wrtww8.hxx:588
virtual void OutputGrfNode(const SwGrfNode &)=0
Output SwGrfNode.
bool m_bSubstituteBullets
Definition: wrtww8.hxx:567
const SwPageDesc * m_pPreviousSectionPageDesc
Definition: wrtww8.hxx:498
std::unique_ptr< MSWordStyles > m_pStyles
Definition: wrtww8.hxx:503
bool m_bLinkedTextboxesHelperInitialized
Definition: wrtww8.hxx:517
std::vector< aBookmarkPair > m_aImplicitBookmarks
Definition: wrtww8.hxx:493
ww8::WW8TableInfo::Pointer_t m_pTableInfo
Definition: wrtww8.hxx:478
const NfKeywordTable & GetNfKeywordTable()
Definition: wrtww8.cxx:4537
std::map< size_t, std::pair< size_t, size_t > > m_OverridingNums
overriding numdef index -> (existing numdef index, abstractnumdef index)
Definition: wrtww8.hxx:462
virtual void AppendSection(const SwPageDesc *pPageDesc, const SwSectionFormat *pFormat, sal_uLong nLnNum)=0
virtual void WriteHyperlinkData(const ::sw::mark::IFieldmark &rFieldmark)=0
sal_uInt16 m_nCharFormatStart
Definition: wrtww8.hxx:480
virtual bool PreferPageBreakBefore() const =0
If saving page break is preferred as a paragraph attribute (yes) or as a special character (no).
bool FormatHdFtContainsChapterField(const SwFrameFormat &rFormat) const
Definition: ww8atr.cxx:433
static void UpdateTocSectionNodeProperties(const SwSectionNode &rSectionNode)
Definition: wrtw8nds.cxx:3353
virtual void OutputLinkedOLE(const OUString &)=0
std::vector< ::sw::mark::IMark * > IMarkVector
Used to split the runs according to the bookmarks start and ends.
Definition: wrtww8.hxx:585
const SfxPoolItem * HasItem(sal_uInt16 nWhich) const
Definition: wrtww8.cxx:762
bool NearestBookmark(sal_Int32 &rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly)
Find the nearest bookmark from the current position.
Definition: wrtw8nds.cxx:2057
void NumberingLevel(SwNumRule const &rRule, sal_uInt8 nLvl)
Write one numbering level.
Definition: wrtw8num.cxx:411
bool ContentContainsChapterField(const SwFormatContent &rContent) const
Definition: ww8atr.cxx:417
SwNodeOffset m_nCurEnd
Definition: wrtww8.hxx:577
virtual void RestoreData()
Restore what was saved in SaveData().
Definition: wrtww8.cxx:1929
wwFontHelper m_aFontHelper
Definition: wrtww8.hxx:453
bool m_bInWriteTOX
Definition: wrtww8.hxx:562
virtual MSWordSections & Sections() const =0
Access to the sections/headers/footres.
void OutputStartNode(const SwStartNode &)
Output SwStartNode.
Definition: wrtww8.cxx:4489
const SfxPoolItem & GetItem(sal_uInt16 nWhich) const
Definition: wrtww8.cxx:784
bool SetCurrentPageDescFromNode(const SwNode &rNd)
Definition: ww8atr.cxx:448
const T * HasItem(TypedWhichId< T > nWhich) const
Definition: wrtww8.hxx:817
SvxFrameDirection GetCurrentPageDirection() const
Right to left?
Definition: wrtw8nds.cxx:1623
std::optional< SvxMSExportOLEObjects > m_oOLEExp
Definition: wrtww8.hxx:475
virtual bool AddSectionBreaksForTOX() const =0
Determines the Section Breaks are to be added for TOX Section.
OUString m_aMainStg
Definition: wrtww8.hxx:455
const SwAttrSet * m_pStyAttr
Definition: wrtww8.hxx:538
std::unique_ptr< WW8_WrMagicTable > m_pMagicTable
Definition: wrtww8.hxx:533
virtual void OutputField(const SwField *pField, ww::eField eFieldType, const OUString &rFieldCmd, FieldFlags nMode=FieldFlags::All)=0
Write the field.
std::unique_ptr< WW8_WrPlcField > m_pFieldMain
Definition: wrtww8.hxx:526
int GetGrfIndex(const SvxBrushItem &rBrush)
Returns the index of a picture bullet, used in numberings.
Definition: wrtww8.cxx:1634
std::unique_ptr< WW8_WrPlcField > m_pFieldEdn
Definition: wrtww8.hxx:529
virtual void AppendSmartTags(SwTextNode &)
Definition: wrtww8.hxx:715
virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat)=0
Return value indicates if an inherited outline numbering is suppressed.
void AddLinkTarget(std::u16string_view rURL)
Definition: wrtww8.cxx:3244
static sal_uLong GetSectionLineNo(const SfxItemSet *pSet, const SwNode &rNd)
Line number of the section start.
Definition: ww8atr.cxx:705
const SwTextNode * GetHdFtPageRoot() const
Top node of host page when in header/footer.
Definition: wrtww8.hxx:786
void OutputSectionBreaks(const SfxItemSet *pSet, const SwNode &rNd, bool isCellOpen=false)
Start new section.
Definition: ww8atr.cxx:488
void GatherChapterFields()
Setup the chapter fields (maChapterFieldLocs).
Definition: ww8atr.cxx:410
bool m_bOutFirstPage
Definition: wrtww8.hxx:556
virtual void AppendBookmark(const OUString &rName)=0
SwNodeOffset m_nCurStart
Definition: wrtww8.hxx:577
virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner=ww8::WW8TableNodeInfoInner::Pointer_t())=0
virtual void OutputOLENode(const SwOLENode &)=0
Output SwOLENode.
MSWordExportBase & operator=(const MSWordExportBase &)=delete
bool m_bFontSizeWritten
Is font size written already as part of the current character properties?
Definition: wrtww8.hxx:573
unsigned int m_nHdFtIndex
Definition: wrtww8.hxx:486
const SwPageDesc * m_pCurrentPageDesc
Definition: wrtww8.hxx:497
WW8OleMap m_aOleMap
Definition: wrtww8.hxx:477
sal_uInt16 m_nFormatCollStart
Definition: wrtww8.hxx:481
std::unique_ptr< WW8_WrPlcField > m_pFieldHdFt
Definition: wrtww8.hxx:527
void NearestAnnotationMark(sal_Int32 &rNearest, const sal_Int32 nCurrentPos, bool bNextPositionOnly)
Find the nearest annotation mark from the current position.
Definition: wrtw8nds.cxx:2089
std::unique_ptr< SwMSConvertControls > m_pOCXExp
Definition: wrtww8.hxx:476
std::unique_ptr< WW8_WrtFactoids > m_pFactoids
Definition: wrtww8.hxx:505
void SectionProperties(const WW8_SepInfo &rSectionInfo, WW8_PdAttrDesc *pA=nullptr)
Write section properties.
Definition: wrtw8sty.cxx:1640
bool GetBookmarks(const SwTextNode &rNd, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector &rArr)
Definition: wrtw8nds.cxx:1948
virtual void DoFormText(const SwInputField *pField)=0
sal_uInt16 GetNumberingId(const SwNumRule &rNumRule)
Return the numeric id of the numbering rule.
Definition: wrtw8num.cxx:122
bool NeedTextNodeSplit(const SwTextNode &rNd, SwSoftPageBreakList &pList) const
Definition: wrtw8nds.cxx:2203
MSWordExportBase(const MSWordExportBase &)=delete
const T & GetItem(TypedWhichId< T > nWhich) const
Definition: wrtww8.hxx:632
const SfxItemSet * m_pISet
Definition: wrtww8.hxx:457
const SwFormat * m_pCurrentStyle
Definition: wrtww8.hxx:540
const ww8::Frame * m_pParentFrame
Definition: wrtww8.hxx:520
bool GetAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nStt, sal_Int32 nEnd, IMarkVector &rArr)
Definition: wrtw8nds.cxx:1995
void OutputFormat(const SwFormat &rFormat, bool bPapFormat, bool bChpFormat, bool bFlyFormat=false)
Output attributes.
Definition: ww8atr.cxx:887
const SwFrameFormat * m_pFirstPageFormat
Definition: wrtww8.hxx:458
virtual void OutputTextNode(SwTextNode &)
Output SwTextNode.
Definition: wrtw8nds.cxx:2252
std::unique_ptr< SwNumRuleTable > m_pUsedNumTable
Definition: wrtww8.hxx:460
virtual void AppendAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen)=0
sal_uInt16 m_nLastFormatId
Style of last TextNode in normal range.
Definition: wrtww8.hxx:484
static OUString GetBookmarkName(sal_uInt16 nTyp, const OUString *pName, sal_uInt16 nSeqNo)
Find the bookmark name.
Definition: ww8atr.cxx:1041
SvxFrameDirection GetDefaultFrameDirection() const
Definition: wrtw8nds.cxx:1631
bool m_bOutPageDescs
PageDescs (section properties) are being written.
Definition: wrtww8.hxx:555
void SetHdFtPageRoot(const SwTextNode *pNd)
Top node of host page when in header/footer.
Definition: wrtww8.hxx:783
std::unordered_map< OUString, OUString > m_TOXMarkBookmarksByURL
Definition: wrtww8.hxx:494
bool HasRefToAttr(const OUString &rName)
Find the reference.
Definition: ww8atr.cxx:1023
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:621
std::unique_ptr< WW8_WrPlcField > m_pFieldHFTextBxs
Definition: wrtww8.hxx:532
virtual AttributeOutputBase & AttrOutput() const =0
Access to the attribute output class.
std::unordered_map< SwTOXMark const *, OUString > m_TOXMarkBookmarksByTOXMark
Definition: wrtww8.hxx:495
const SwTextNode * m_pTopNodeOfHdFtPage
Top node of host page when in hd/ft.
Definition: wrtww8.hxx:470
virtual ~MSWordExportBase()
Definition: wrtww8.cxx:3986
std::map< OUString, size_t > m_Lists
list-id -> abstractnumdef index
Definition: wrtww8.hxx:464
std::shared_ptr< SwUnoCursor > & m_pCurPam
Definition: wrtww8.hxx:578
tools::Long GetParaTabStopOffset() const
Definition: ww8atr.cxx:778
sal_uInt16 DuplicateAbsNum(OUString const &rListId, SwNumRule const &rAbstractRule)
check if a new abstractNum is needed for this list
Definition: wrtw8num.cxx:70
virtual void AppendBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen, const SwRedlineData *pSwRedline=nullptr)=0
virtual void PrepareNewPageDesc(const SfxItemSet *pSet, const SwNode &rNd, const SwFormatPageDesc *pNewPgDescFormat, const SwPageDesc *pNewPgDesc, bool bExtraPageBreak=false)=0
std::map< OUString, LinkedTextboxInfo > m_aLinkedTextboxesHelper
Definition: wrtww8.hxx:516
MSWordExportBase(SwDoc &rDocument, std::shared_ptr< SwUnoCursor > &pCurrentPam, SwPaM *pOriginalPam)
Definition: wrtww8.cxx:3932
std::unique_ptr< WW8_WrPlcField > m_pFieldFootnote
Definition: wrtww8.hxx:528
static const SwSectionFormat * GetSectionFormat(const SwNode &rNd)
Format of the section.
Definition: ww8atr.cxx:692
void AbstractNumberingDefinitions()
Write all Levels for all SwNumRules - LVLF.
Definition: wrtw8num.cxx:384
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:692
virtual void SetupSectionPositions(WW8_PdAttrDesc *)
Setup the pA's info.
Definition: wrtww8.hxx:780
void SetCurItemSet(const SfxItemSet *pS)
Setter for pISet.
Definition: wrtww8.hxx:734
bool m_bFirstTOCNodeWithSection
Definition: wrtww8.hxx:499
SwPaM * m_pOrigPam
Definition: wrtww8.hxx:579
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:211
std::unique_ptr< WW8_WrPlcPn > m_pPapPlc
Definition: wrtww8.hxx:500
std::unique_ptr< HdFtPlcDrawObj > m_pHFSdrObjs
Definition: wrtww8.hxx:543
virtual ExportFormat GetExportFormat() const =0
void BulletDefinitions()
Write the numbering picture bullets.
Definition: wrtww8.cxx:1567
IMarkVector m_rSortedAnnotationMarksEnd
Definition: wrtww8.hxx:589
std::unique_ptr< WW8_WrPlcTextBoxes > m_pTextBxs
Definition: wrtww8.hxx:506
MSWordAttrIter * m_pChpIter
Definition: wrtww8.hxx:502
virtual void DoComboBox(const OUString &rName, const OUString &rHelp, const OUString &ToolTip, const OUString &rSelected, const css::uno::Sequence< OUString > &rListItems)=0
std::map< size_t, std::map< size_t, size_t > > m_ListLevelOverrides
Map of maps for list levels overrides listid -> level number -> restart value.
Definition: wrtww8.hxx:468
std::unique_ptr< WW8_WrPlcPn > m_pChpPlc
Definition: wrtww8.hxx:501
void NumberingDefinitions()
Write static data of SwNumRule - LSTF.
Definition: wrtw8num.cxx:210
virtual bool FieldsQuoted() const =0
Determines if the import filter already quoted fields or not.
bool m_bOutFlyFrameAttrs
Definition: wrtww8.hxx:554
SwDoc & m_rDoc
Definition: wrtww8.hxx:576
ww8::Frames m_aFrames
Definition: wrtww8.hxx:496
void SetCurPam(SwNodeOffset nStt, SwNodeOffset nEnd)
Definition: wrtww8.cxx:1880
sal_uInt16 GetId(const SwTextFormatColl &rColl) const
Return the numeric id of the style.
Definition: wrtw8sty.cxx:177
virtual void ExportGrfBullet(const SwTextNode &rNd)=0
virtual sal_uInt64 ReplaceCr(sal_uInt8 nChar)=0
std::unique_ptr< WW8_WrPlcAnnotations > m_pAtn
Definition: wrtww8.hxx:504
static bool NoPageBreakSection(const SfxItemSet *pSet)
Definition: wrtw8nds.cxx:3267
bool m_bHideTabLeaderAndPageNumbers
Definition: wrtww8.hxx:570
Class to collect and output the sections/headers/footers.
Definition: wrtww8.hxx:196
bool mbDocumentIsProtected
Definition: wrtww8.hxx:198
const WW8_SepInfo * CurrentSectionInfo()
The most recent WW8_SepInfo.
Definition: wrtw8sty.cxx:1137
bool DocumentIsProtected() const
Definition: wrtww8.hxx:228
MSWordSections & operator=(const MSWordSections &)
sal_uInt16 CurrentNumberOfColumns(const SwDoc &rDoc) const
Number of columns based on the most recent WW8_SepInfo.
Definition: wrtw8sty.cxx:1111
MSWordSections(const MSWordSections &)
static bool HasBorderItem(const SwFormat &rFormat)
Should we output borders?
Definition: wrtw8sty.cxx:1360
virtual ~MSWordSections()
Definition: wrtw8sty.cxx:1093
void AppendSection(const SwPageDesc *pPd, const SwSectionFormat *pSectionFormat, sal_uLong nLnNumRestartNo, bool bIsFirstParagraph=false)
Definition: wrtw8sty.cxx:1145
static void SetFooterFlag(sal_uInt8 &rHeadFootFlags, const SwFormat &rFormat, sal_uInt8 nFlag)
Definition: wrtw8sty.cxx:1255
void NeedsDocumentProtected(const WW8_SepInfo &rInfo)
Definition: wrtw8sty.cxx:1286
std::vector< WW8_SepInfo > m_aSects
Definition: wrtww8.hxx:199
static void SetHeaderFlag(sal_uInt8 &rHeadFootFlags, const SwFormat &rFormat, sal_uInt8 nFlag)
Definition: wrtw8sty.cxx:1247
virtual bool HeaderFooterWritten()
Definition: wrtw8sty.cxx:1101
void CheckForFacinPg(const WW8Export &rWrt) const
Definition: wrtw8sty.cxx:1309
static const SwFormatCol & GetFormatCol(const SwDoc &rDoc, const WW8_SepInfo &rInfo)
Number of columns of the provided WW8_SepInfo.
Definition: wrtw8sty.cxx:1120
Class to collect and output the styles table.
Definition: wrtww8.hxx:1583
static OString CreateStyleId(std::u16string_view aName)
create style id using only ASCII characters of the style name
Definition: wrtw8sty.cxx:424
MSWordStyles & operator=(const MSWordStyles &)=delete
void GetStyleData(const SwFormat *pFormat, bool &bFormatColl, sal_uInt16 &nBase, sal_uInt16 &nNext, sal_uInt16 &nLink)
Return information about one style.
Definition: wrtw8sty.cxx:639
MSWordExportBase & m_rExport
Definition: wrtww8.hxx:1584
void BuildStyleIds()
Based on style names, fill in unique, MS-like names.
Definition: wrtw8sty.cxx:429
void WriteProperties(const SwFormat *pFormat, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz)
Outputs attributes of one style.
Definition: wrtw8sty.cxx:612
void BuildStylesTable()
Create the style table, called from the constructor.
Definition: wrtw8sty.cxx:313
void OutputStyle(sal_uInt16 nSlot)
Outputs one style - called (in a loop) from OutputStylesTable().
Definition: wrtw8sty.cxx:678
sal_uInt16 GetHeadingParagraphStyleId(sal_uInt16 nLevel) const
Definition: wrtww8.hxx:1649
OUString GetStyleWWName(SwFormat const *pFormat) const
the awful TOC field references names, not styleIds
Definition: wrtw8sty.cxx:461
OString const & GetStyleId(sal_uInt16 nSlot) const
Get styleId of the nSlot-th style (nSlot is its position in m_aStyles).
Definition: wrtw8sty.cxx:455
void SetStyleDefaults(const SwFormat &rFormat, bool bPap)
Definition: wrtw8sty.cxx:535
static sal_uInt16 GetWWId(const SwFormat &rFormat)
Definition: wrtw8sty.cxx:244
void OutputStylesTable()
Output the styles table.
Definition: wrtw8sty.cxx:752
sal_uInt16 GetSlot(const SwFormat *pFormat) const
Get slot of the style (rFormat).
Definition: wrtw8sty.cxx:210
const SwNumRule * GetSwNumRule(sal_uInt16 nSlot) const
Get numbering rule of the nSlot-th style.
Definition: wrtww8.hxx:1648
MSWordStyles(const MSWordStyles &)=delete
std::vector< MapEntry > m_aStyles
Slot <-> Character/paragraph/list style array.
Definition: wrtww8.hxx:1600
void BuildWwNames()
Generate proper Word names, taking mapping between special types into account.
Definition: wrtw8sty.cxx:371
bool m_bListStyles
If list styles are requested to be exported as well.
Definition: wrtww8.hxx:1601
sal_uInt16 m_aHeadingParagraphStyles[MAXLEVEL]
Definition: wrtww8.hxx:1585
const SwFormat * GetSwFormat(sal_uInt16 nSlot) const
Definition: wrtww8.hxx:1646
Used to export formatted text associated to drawings.
Definition: wrtww8.hxx:1465
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const override
Definition: wrtw8esh.cxx:1227
void SetCharSet(const EECharAttrib &rTextAttr, bool bStart)
Definition: wrtw8esh.cxx:1064
void OutAttr(sal_Int32 nSwPos)
Definition: wrtw8esh.cxx:1108
rtl_TextEncoding GetNextCharSet() const
Definition: wrtw8esh.cxx:1034
void OutParaAttr(bool bCharAttr, const std::set< sal_uInt16 > *pWhichsToIgnore=nullptr)
Definition: wrtw8esh.cxx:1271
rtl_TextEncoding GetNodeCharSet() const
Definition: wrtww8.hxx:1502
MSWord_SdrAttrIter(const MSWord_SdrAttrIter &)=delete
virtual const SfxPoolItem * HasTextItem(sal_uInt16 nWhich) const override
Definition: wrtw8esh.cxx:1210
MSWord_SdrAttrIter & operator=(const MSWord_SdrAttrIter &)=delete
std::vector< EECharAttrib > m_aTextAtrArr
Definition: wrtww8.hxx:1469
sal_Int32 SearchNext(sal_Int32 nStartPos)
Definition: wrtw8esh.cxx:1042
sal_Int32 m_nCurrentSwPos
Definition: wrtww8.hxx:1473
std::vector< const EECharAttrib * > m_aChrTextAtrArr
Definition: wrtww8.hxx:1470
std::vector< rtl_TextEncoding > m_aChrSetArr
Definition: wrtww8.hxx:1471
void NextPara(sal_Int32 nPar)
Definition: wrtw8esh.cxx:1014
bool IsTextAttr(sal_Int32 nSwPos)
Definition: wrtw8esh.cxx:1194
sal_Int32 m_nTmpSwPos
Definition: wrtww8.hxx:1474
void SetItemsThatDifferFromStandard(bool bCharAttr, SfxItemSet &rSet)
Definition: wrtw8esh.cxx:1244
sal_Int32 m_nPara
Definition: wrtww8.hxx:1472
sal_uInt8 mnTyp
Definition: wrtww8.hxx:1477
sal_uInt16 m_nScript
Definition: wrtww8.hxx:1476
void OutEEField(const SfxPoolItem &rHt)
Definition: wrtw8esh.cxx:1090
sal_Int32 WhereNext() const
Definition: wrtww8.hxx:1500
const SfxItemPool * m_pEditPool
Definition: wrtww8.hxx:1468
const EditTextObject * m_pEditObj
Definition: wrtww8.hxx:1467
rtl_TextEncoding m_eNdChrSet
Definition: wrtww8.hxx:1475
MainTextPlcDrawObj(const MainTextPlcDrawObj &)=delete
MainTextPlcDrawObj & operator=(const MainTextPlcDrawObj &)=delete
virtual WW8_CP GetCpOffset(const WW8Fib &) const override
Definition: wrtw8esh.cxx:852
virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const override
Definition: wrtw8esh.cxx:845
DrawObjVector & GetObjArr()
Definition: wrtww8.hxx:377
virtual void RegisterWithFib(WW8Fib &rFib, sal_uInt32 nStart, sal_uInt32 nLen) const =0
virtual WW8_CP GetCpOffset(const WW8Fib &rFib) const =0
PlcDrawObj()
Definition: wrtww8.hxx:372
void WritePlc(WW8Export &rWrt) const
Definition: wrtw8esh.cxx:608
int size()
Definition: wrtww8.hxx:376
bool Append(WW8Export const &, WW8_CP nCp, const ww8::Frame &rFormat, const Point &rNdTopLeft)
Definition: wrtw8esh.cxx:869
DrawObjVector maDrawObjs
Definition: wrtww8.hxx:366
PlcDrawObj & operator=(const PlcDrawObj &)=delete
PlcDrawObj(const PlcDrawObj &)=delete
virtual ~PlcDrawObj()
Definition: wrtw8esh.cxx:513
The class that has handlers for various resource types when exporting as RTF.
virtual ErrCode Write(SwPaM &, const css::uno::Reference< css::embed::XStorage > &, const OUString *, SfxMedium *=nullptr) override
SvStream & WriteInt32(sal_Int32 nInt32)
SvStream & WriteInt16(sal_Int16 nInt16)
Represents the style of a text portion.
Definition: charfmt.hxx:27
Definition: doc.hxx:197
Ends a section of nodes in the document model.
Definition: node.hxx:378
Base class of all fields.
Definition: fldbas.hxx:296
Content, content of frame (header, footer, fly).
Definition: fmtcntnt.hxx:32
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps.
Definition: paratr.hxx:72
SfxPoolItem subclass for footnotes and endnotes, stored in the anchor text node.
Definition: fmtftn.hxx:47
Pagedescriptor Client of SwPageDesc that is "described" by the attribute.
Definition: fmtpdsc.hxx:36
Base class for various Writer styles.
Definition: format.hxx:47
Style of a layout element.
Definition: frmfmt.hxx:72
Base class of the Writer document model elements.
Definition: node.hxx:98
PaM is Point and Mark: a selection of the document model.
Definition: pam.hxx:188
vector_type::size_type size_type
Definition: docary.hxx:223
A section node represents the start of a section on the UI, i.e.
Definition: node.hxx:575
Starts a section of nodes in the document model.
Definition: node.hxx:348
Represents the style of a paragraph.
Definition: fmtcol.hxx:61
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
bool mbParaIsRTL
Definition: wrtww8.hxx:1528
bool IsParaRTL() const
Definition: wrtww8.hxx:1567
sal_uInt16 GetScript() const
Definition: wrtww8.hxx:1566
const SwFormatDrop & GetSwFormatDrop() const
Definition: wrtww8.hxx:1571
sal_Int32 m_nCurrentSwPos
Definition: wrtww8.hxx:1525
bool IsAnchorLinkedToThisNode(SwNodeOffset nNodePos)
Definition: wrtw8nds.cxx:625
bool IncludeEndOfParaCRInRedlineProperties(sal_Int32 nPos) const
Definition: wrtw8nds.cxx:1475
sw::util::CharRuns::const_iterator maCharRunIter
Definition: wrtww8.hxx:1518
void NextPos()
Definition: wrtww8.hxx:1554
sal_Int32 WhereNext() const
Definition: wrtww8.hxx:1565
void OutAttr(sal_Int32 nSwPos, bool bWriteCombinedChars)
Definition: wrtw8nds.cxx:398
bool mbCharIsRTL
Definition: wrtww8.hxx:1522
virtual const SfxPoolItem * HasTextItem(sal_uInt16 nWhich) const override
Definition: wrtw8nds.cxx:842
SwWW8AttrIter & operator=(const SwWW8AttrIter &)=delete
FlyProcessingState OutFlys(sal_Int32 nSwPos)
Definition: wrtw8nds.cxx:651
const SwRedlineData * GetRunLevelRedline(sal_Int32 nPos)
Definition: wrtw8nds.cxx:1556
bool IsTextAttr(sal_Int32 nSwPos) const
Definition: wrtw8nds.cxx:764
bool IsDropCap(int nSwPos)
Definition: wrtw8nds.cxx:813
void SplitRun(sal_Int32 nSplitEndPos)
Definition: wrtw8nds.cxx:1255
rtl_TextEncoding GetCharSet() const
Definition: wrtww8.hxx:1568
bool HasFlysAt(sal_Int32 nSwPos) const
Definition: wrtw8nds.cxx:636
OUString GetSnippet(const OUString &rStr, sal_Int32 nCurrentPos, sal_Int32 nLen) const
Definition: wrtw8nds.cxx:1765
SwRedlineTable::size_type m_nCurRedlinePos
Definition: wrtww8.hxx:1526
virtual const SfxPoolItem & GetItem(sal_uInt16 nWhich) const override
Definition: wrtw8nds.cxx:888
int OutAttrWithRange(const SwTextNode &rNode, sal_Int32 nPos)
Definition: wrtw8nds.cxx:1374
SwWW8AttrIter(const SwWW8AttrIter &)=delete
bool IsExportableAttr(sal_Int32 nSwPos) const
Definition: wrtw8nds.cxx:789
ww8::FrameIter maFlyIter
Definition: wrtww8.hxx:1533
rtl_TextEncoding meChrSet
Definition: wrtww8.hxx:1520
bool IsWatermarkFrame()
Definition: wrtw8nds.cxx:605
sal_Int32 SearchNext(sal_Int32 nStartPos)
Definition: wrtw8nds.cxx:261
const SwFormatDrop & mrSwFormatDrop
Definition: wrtww8.hxx:1530
void IterToCurrent()
Definition: wrtw8nds.cxx:195
const SwRangeRedline * m_pCurRedline
Definition: wrtww8.hxx:1524
sw::util::CharRuns maCharRuns
Definition: wrtww8.hxx:1517
const SwTextNode & m_rNode
Definition: wrtww8.hxx:1515
const SwRedlineData * GetParagraphLevelRedline()
Definition: wrtw8nds.cxx:1531
void OutSwFormatRefMark(const SwFormatRefMark &rAttr)
Definition: wrtw8nds.cxx:1248
void handleToggleProperty(SfxItemSet &rExportSet, const SwFormatCharFormat *pCharFormatItem, sal_uInt16 nWhich, const SfxPoolItem *pValue)
Definition: wrtw8nds.cxx:562
ww8::Frames maFlyFrames
Definition: wrtww8.hxx:1532
sal_uInt16 mnScript
Definition: wrtww8.hxx:1521
bool RequiresImplicitBookmark()
Definition: wrtw8nds.cxx:832
const SwTextNode & GetNode() const
Definition: wrtww8.hxx:1578
sal_uInt16 mnIdx
Definition: wrtww8.hxx:1418
void WriteGraphicNode(SvStream &rStrm, const GraphicDetails &rItem)
Definition: wrtww8gr.cxx:744
sal_uLong GetFPos()
Definition: wrtww8.hxx:1436
SwWW8WrGrf(WW8Export &rW)
Definition: wrtww8.hxx:1433
SwWW8WrGrf & operator=(const SwWW8WrGrf &)=delete
void WriteGrfForBullet(SvStream &rStrm, const Graphic &rGrf, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:736
void WriteGrfFromGrfNode(SvStream &rStrm, const SwGrfNode &rNd, const ww8::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:624
SwWW8WrGrf(const SwWW8WrGrf &)=delete
WW8Export & m_rWrt
for access to the variables
Definition: wrtww8.hxx:1415
static void WritePICBulletFHeader(SvStream &rStrm, const Graphic &rGrf, sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight)
Definition: wrtww8gr.cxx:650
void Write()
Definition: wrtww8gr.cxx:849
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:474
std::vector< GraphicDetails > maDetails
Definition: wrtww8.hxx:1417
void Insert(const ww8::Frame &rFly)
Definition: wrtww8gr.cxx:466
The writer class that gets called for the WW8 filter.
Definition: wrtww8.hxx:939
static sal_uLong FillUntil(SvStream &rStrm, sal_uLong nEndPos=0)
Definition: wrtww8.cxx:950
static void InsUInt32(ww::bytes &rO, sal_uInt32 n)
Definition: wrtww8.cxx:1719
static void WriteString8(SvStream &rStrm, std::u16string_view rStr, bool bAddZero, rtl_TextEncoding eCodeSet)
Definition: wrtww8.cxx:1769
virtual ErrCode WriteStorage() override
Definition: wrtww8.cxx:3784
static void InsAsString16(ww::bytes &rO, const OUString &rStr)
Definition: wrtww8.cxx:1729
ErrCode WriteStorageImpl()
Definition: wrtww8.cxx:3886
static void FillCount(SvStream &rStrm, sal_uLong nCount)
Definition: wrtww8.cxx:935
SfxMedium * GetMedia()
Definition: wrtww8.hxx:987
static void WriteString_xstz(SvStream &rStrm, const OUString &rStr, bool bAddZero)
Definition: wrtww8.cxx:1759
static void InsUInt16(ww::bytes &rO, sal_uInt16 n)
Definition: wrtww8.cxx:1711
virtual ErrCode Write(SwPaM &, SfxMedium &, const OUString *) override
Definition: wrtww8.cxx:3923
virtual ErrCode WriteMedium(SfxMedium &) override
Definition: wrtww8.cxx:3918
static void InsAsString8(ww::bytes &O, std::u16string_view rStr, rtl_TextEncoding eCodeSet)
Definition: wrtww8.cxx:1736
WW8Export * m_pExport
Definition: wrtww8.hxx:945
SwWW8Writer & operator=(const SwWW8Writer &)=delete
static void WriteLong(SvStream &rStrm, sal_Int32 nVal)
Definition: wrtww8.hxx:972
bool InitStd97CodecUpdateMedium(::msfilter::MSCodec_Std97 &rCodec)
Definition: wrtww8.cxx:3489
SfxMedium * mpMedium
Definition: wrtww8.hxx:946
static void WriteString16(SvStream &rStrm, const OUString &rStr, bool bAddZero)
Definition: wrtww8.cxx:1746
static void WriteShort(SvStream &rStrm, sal_Int16 nVal)
Definition: wrtww8.hxx:969
virtual ~SwWW8Writer() override
Definition: wrtww8.cxx:4035
SwWW8Writer(std::u16string_view rFltName, const OUString &rBaseURL)
Definition: wrtww8.cxx:4026
SwWW8Writer(const SwWW8Writer &)=delete
Exporter of the binary Word file formats.
Definition: wrtww8.hxx:997
void IncrementHdFtIndex()
Definition: wrtww8.hxx:1142
SvStream & Strm() const
Definition: wrtww8.hxx:1189
virtual void OutputField(const SwField *pField, ww::eField eFieldType, const OUString &rFieldCmd, FieldFlags nMode=FieldFlags::All) override
Write the field.
Definition: ww8atr.cxx:1881
void Out_CellRangeBorders(const SvxBoxItem *pBox, sal_uInt8 nStart, sal_uInt8 nLimit)
Definition: ww8atr.cxx:4806
static bool TransBrush(const Color &rCol, WW8_SHD &rShd)
TransBrush converts SW-Brushes to WW.
Definition: ww8atr.cxx:1678
void WriteEscher()
Definition: wrtw8esh.cxx:1466
void WriteSdrTextObj(const SdrTextObj &rObj, sal_uInt8 nTyp)
Definition: wrtw8esh.cxx:1313
void Out_SwFormatBox(const SvxBoxItem &rBox, bool bShadow)
is for all boxes except in tables.
Definition: ww8atr.cxx:4730
void DoComboBox(css::uno::Reference< css::beans::XPropertySet > const &xPropSet)
std::unique_ptr< WW8AttributeOutput > m_pAttrOutput
Converting attributes to stream data.
Definition: wrtww8.hxx:1013
std::unique_ptr< WW8_WrPlcSepx > m_pSepx
Sections/headers/footers.
Definition: wrtww8.hxx:1007
virtual MSWordSections & Sections() const override
Access to the sections/headers/footres.
Definition: wrtww8.cxx:4021
void OutSprmBytes(sal_uInt8 *pBytes, sal_uInt16 nSiz)
Definition: wrtww8.hxx:1112
void InsUInt16(sal_uInt16 n)
Definition: wrtww8.hxx:1160
void InsInt16(sal_Int16 n)
Definition: wrtww8.hxx:1161
tools::SvRef< SotStorage > m_xEscherStg
Definition: wrtww8.hxx:1016
SwMSConvertControls & GetOCXExp()
Definition: wrtww8.hxx:1056
virtual void SaveData(SwNodeOffset nStt, SwNodeOffset nEnd) override
Remember some of the members so that we can recurse in WriteText().
Definition: wrtww8.cxx:1952
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:4688
WW8Export(SwWW8Writer *pWriter, SwDoc &rDocument, std::shared_ptr< SwUnoCursor > &pCurrentPam, SwPaM *pOriginalPam, bool bDot)
Setup the exporter.
Definition: wrtww8.cxx:4000
virtual void OutputGrfNode(const SwGrfNode &) override
Output SwGrfNode.
Definition: wrtww8gr.cxx:75
virtual ~WW8Export() override
Definition: wrtww8.cxx:4012
void WritePostItBegin(ww::bytes *pO=nullptr)
Definition: ww8atr.cxx:2781
virtual ErrCode ExportDocument_Impl() override
Format-dependent part of the actual export.
Definition: wrtww8.cxx:3536
void WriteStringAsPara(const OUString &rText)
Definition: wrtww8.cxx:1782
bool m_bDot
Template or document.
Definition: wrtww8.hxx:1009
void OutGrf(const ww8::Frame &rFrame)
Definition: wrtww8gr.cxx:353
void WriteOutliner(const OutlinerParaObject &rOutliner, sal_uInt8 nTyp)
Definition: wrtw8esh.cxx:1337
void RestoreMacroCmds()
Definition: wrtww8.cxx:4122
virtual void WriteNumbering() override
Output the numbering table.
Definition: wrtw8num.cxx:172
void CreateEscher()
Definition: wrtw8esh.cxx:1453
virtual void WriteFormData(const ::sw::mark::IFieldmark &rFieldmark) override
Write the data of the form field.
Definition: wrtww8.cxx:4159
SwWW8Writer * m_pWriter
Pointer to the writer.
Definition: wrtww8.hxx:1012
virtual void OutputOLENode(const SwOLENode &) override
Output SwOLENode.
Definition: wrtww8gr.cxx:193
void WriteChar(sal_Unicode c) override
Definition: wrtww8.cxx:1875
virtual sal_uInt64 ReplaceCr(sal_uInt8 nChar) override
ReplaceCr() is used for Pagebreaks and Pagedescs.
Definition: ww8atr.cxx:3967
virtual void ExportGrfBullet(const SwTextNode &rNd) override
Definition: wrtww8.cxx:1585
void InsUInt32(sal_uInt32 n)
Definition: wrtww8.hxx:1162
virtual bool DisallowInheritingOutlineNumbering(const SwFormat &rFormat) override
Return value indicates if an inherited outline numbering is suppressed.
Definition: ww8atr.cxx:860
void WriteFkpPlcUsw()
Definition: wrtww8.cxx:3098
bool TestOleNeedsGraphic(const SwAttrSet &rSet, tools::SvRef< SotStorage > const &xOleStg, const tools::SvRef< SotStorage > &xObjStg, OUString const &rStorageName, SwOLENode *pOLENd)
Definition: wrtww8gr.cxx:86
SvStream * m_pTableStrm
Definition: wrtww8.hxx:1001
WW8_WrPlcField * CurrentFieldPlc() const
Fields.
Definition: ww8atr.cxx:1849
SvStream * m_pDataStrm
Streams for WW97 Export.
Definition: wrtww8.hxx:1001
virtual void AppendSection(const SwPageDesc *pPageDesc, const SwSectionFormat *pFormat, sal_uLong nLnNum) override
Definition: wrtw8nds.cxx:3440
void SetHdFtIndex(unsigned int nHdFtIndex)
Definition: wrtww8.hxx:1141
void MiserableRTLFrameFormatHack(SwTwips &rLeft, SwTwips &rRight, const ww8::Frame &rFrameFormat)
Nasty swap for bidi if necessary.
Definition: wrtw8esh.cxx:573
void StoreDoc1()
Definition: wrtww8.cxx:3208
virtual ExportFormat GetExportFormat() const override
Definition: wrtww8.hxx:1202
virtual void AppendBookmark(const OUString &rName) override
Definition: wrtww8.cxx:1498
bool MiserableFormFieldExportHack(const SwFrameFormat &rFrameFormat)
Definition: wrtw8esh.cxx:344
virtual bool FieldsQuoted() const override
Determines if the import filter already quoted fields or not.
Definition: wrtww8.hxx:1027
const SvxBrushItem * GetCurrentPageBgBrush() const
Definition: wrtw8nds.cxx:1702
sal_uInt16 AddRedlineAuthor(std::size_t nId)
Definition: wrtww8.cxx:1661
std::unique_ptr< WW8_WrPlcFootnoteEdn > m_pFootnote
Footnotes - structure to remember them, and output.
Definition: wrtww8.hxx:1005
void AppendFlyInFlys(const ww8::Frame &rFrameFormat, const Point &rNdTopLeft)
Definition: wrtw8esh.cxx:961
void ExportDopTypography(WW8DopTypography &rTypo)
Definition: wrtww8.cxx:582
virtual void DoComboBox(const OUString &rName, const OUString &rHelp, const OUString &ToolTip, const OUString &rSelected, const css::uno::Sequence< OUString > &rListItems) override
virtual void AppendAnnotationMarks(const SwWW8AttrIter &rAttrs, sal_Int32 nCurrentPos, sal_Int32 nLen) override
Definition: wrtww8.cxx:1466
void PrepareStorage()
Definition: wrtww8.cxx:3726
std::unique_ptr< WW8Dop > m_pDop
Document Properties.
Definition: wrtww8.hxx:1004
unsigned int GetHdFtIndex() const
Definition: wrtww8.hxx:1140
static WW8_BRCVer9 TranslateBorderLine(const ::editeng::SvxBorderLine &pLine, sal_uInt16 nDist, bool bShadow)
Definition: ww8atr.cxx:4584
std::unique_ptr< WW8Fib > m_pFib
File Information Block.
Definition: wrtww8.hxx:1003
void WriteAsStringTable(const std::vector< OUString > &, sal_Int32 &rfcSttbf, sal_Int32 &rlcbSttbf)
Definition: wrtww8.cxx:1671
virtual void AppendSmartTags(SwTextNode &rTextNode) override
Definition: wrtww8.cxx:1483
virtual void PrepareNewPageDesc(const SfxItemSet *pSet, const SwNode &rNd, const SwFormatPageDesc *pNewPgDescFormat, const SwPageDesc *pNewPgDesc, bool bExtraPageBreak=false) override
Helper method for OutputSectionBreaks() and OutputFollowPageDesc().
Definition: ww8atr.cxx:720
std::shared_ptr< SvxBrushItem > TrueFrameBgBrush(const SwFrameFormat &rFlyFormat) const
Definition: wrtw8nds.cxx:1719
void OutOverrideListTab()
Definition: wrtw8num.cxx:573
virtual void AppendBookmarks(const SwTextNode &rNd, sal_Int32 nCurrentPos, sal_Int32 nLen, const SwRedlineData *pRedlineData=nullptr) override
Definition: wrtww8.cxx:1422
SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const
Definition: ww8atr.cxx:4865
virtual AttributeOutputBase & AttrOutput() const override
memory leak #i120098#, to hold the reference to unnamed SotStorage obj
Definition: wrtww8.cxx:4016
void StartCommentOutput(std::u16string_view rName)
Definition: ww8atr.cxx:2026
virtual bool AddSectionBreaksForTOX() const override
Determines the Section Breaks are to be added for TOX Section.
Definition: wrtww8.hxx:1029
virtual void WriteHeadersFooters(sal_uInt8 nHeadFootFlags, const SwFrameFormat &rFormat, const SwFrameFormat &rLeftHeaderFormat, const SwFrameFormat &rLeftFooterFormat, const SwFrameFormat &rFirstPageFormat, sal_uInt8 nBreakCode, bool bEvenAndOddHeaders) override
Output the actual headers and footers.
Definition: wrtw8sty.cxx:1548
void GetCurrentItems(ww::bytes &rItems) const
Definition: wrtw8nds.cxx:883
virtual void SectionBreaksAndFrames(const SwTextNode &rNode) override
Definition: wrtww8.cxx:2848
sal_uInt32 GetSdrOrdNum(const SwFrameFormat &rFormat) const
Definition: wrtw8esh.cxx:941
static sal_uInt8 GetNumId(sal_uInt16 eNumType)
Converts the SVX numbering type to MSONFC.
Definition: ww8atr.cxx:793
WW8Export & operator=(const WW8Export &)=delete
virtual void DoFormText(const SwInputField *pField) override
Definition: wrtw8esh.cxx:465
static void Out_SwFormatTableBox(ww::bytes &rO, const SvxBoxItem *rBox)
FormatBox2() is for TC structures in tables.
Definition: ww8atr.cxx:4785
virtual void OutputLinkedOLE(const OUString &) override
Definition: wrtww8gr.cxx:316
void OutGrfBullets(const ww8::Frame &rFrame)
Definition: wrtww8.cxx:1603
WW8_CP Fc2Cp(sal_uLong nFc) const
Definition: wrtww8.hxx:1108
void WriteFootnoteBegin(const SwFormatFootnote &rFootnote, ww::bytes *pO=nullptr)
Definition: ww8atr.cxx:3578
void OutListNamesTab()
Definition: wrtw8num.cxx:599
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:1025
SwWW8Writer & GetWriter() const
Definition: wrtww8.hxx:1188
WW8Export(const WW8Export &)=delete
void AppendBookmarkEndWithCorrection(const OUString &rName)
Definition: wrtww8.cxx:1504
virtual void SetupSectionPositions(WW8_PdAttrDesc *pA) override
Setup the pA's info.
Definition: wrtw8sty.cxx:1504
virtual void WriteHyperlinkData(const ::sw::mark::IFieldmark &rFieldmark) override
Definition: wrtww8.cxx:4401
std::unique_ptr< ww::bytes > m_pO
Buffer.
Definition: wrtww8.hxx:999
void WriteMainText()
Definition: wrtww8.cxx:3046
virtual void WriteCR(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner=ww8::WW8TableNodeInfoInner::Pointer_t()) override
Definition: wrtww8.cxx:1865
virtual void RestoreData() override
Restore what was saved in SaveData().
Definition: wrtww8.cxx:1970
void EndCommentOutput(std::u16string_view rName)
Definition: ww8atr.cxx:2032
std::unique_ptr< WW8_WrPlcFootnoteEdn > m_pEdn
Endnotes - structure to remember them, and output.
Definition: wrtww8.hxx:1006
void OutSwString(const OUString &, sal_Int32 nStt, sal_Int32 nLen)
Definition: wrtww8.cxx:1838
void MoveFieldMarks(WW8_CP nFrom, WW8_CP nTo)
Definition: wrtww8.cxx:1493
virtual bool CollapseScriptsforWordOk(sal_uInt16 nScript, sal_uInt16 nWhich) override
Guess the script (asian/western).
Definition: ww8atr.cxx:152
FIB - the File Information Block.
Definition: ww8scan.hxx:1106
sal_uInt32 m_cvBack
Definition: wrtww8.hxx:1662
void setCvBack(sal_uInt32 cvBack)
Definition: wrtww8.hxx:1669
void setCvFore(sal_uInt32 cvFore)
Definition: wrtww8.hxx:1668
sal_uInt32 m_cvFore
Definition: wrtww8.hxx:1661
void Write(WW8Export &rExport)
Definition: wrtww8.cxx:4152
FKP - Formatted disK Page.
Definition: wrtww8.cxx:128
void Append(WW8_CP nCp, sal_uLong nData)
Definition: wrtww8.cxx:920
WW8_WrMagicTable(const WW8_WrMagicTable &)=delete
WW8_WrMagicTable & operator=(const WW8_WrMagicTable &)=delete
void Write(WW8Export &rWrt)
Definition: wrtww8.cxx:910
void SetParaBreak()
Definition: wrtww8.cxx:1406
~WW8_WrPct()
Definition: wrtww8.cxx:1340
WW8_WrPct(WW8_FC nStartFc)
Definition: wrtww8.cxx:1334
std::vector< std::unique_ptr< WW8_WrPc > > m_Pcts
Definition: wrtww8.hxx:284
void WritePc(WW8Export &rWrt)
Definition: wrtww8.cxx:1366
void AppendPc(WW8_FC nStartFc)
Definition: wrtww8.cxx:1345
WW8_CP Fc2Cp(sal_uLong nFc) const
Definition: wrtww8.cxx:1412
WW8_FC m_nOldFc
Definition: wrtww8.hxx:285
WW8_WrPlc1 & operator=(const WW8_WrPlc1 &)=delete
sal_uLong m_nDataLen
Definition: wrtww8.hxx:1344
~WW8_WrPlc1()
Definition: wrtww8.cxx:806
std::vector< WW8_CP > m_aPos
Definition: wrtww8.hxx:1342
sal_uInt16 m_nStructSiz
Definition: wrtww8.hxx:1345
WW8_CP Prev() const
Definition: wrtww8.cxx:810
void Write(SvStream &rStrm)
Definition: wrtww8.cxx:842
std::unique_ptr< sal_uInt8[]> m_pData
Definition: wrtww8.hxx:1343
void Append(WW8_CP nCp, const void *pData)
Definition: wrtww8.cxx:817
sal_uInt16 Count() const
Definition: wrtww8.hxx:1350
WW8_WrPlc1(const WW8_WrPlc1 &)=delete
void Finish(sal_uLong nLastCp, sal_uLong nStartCp)
Definition: wrtww8.cxx:831
void AddRangeStartPosition(const OUString &rName, WW8_CP nStartCp, bool bIgnoreEmpty)
Definition: wrtw8sty.cxx:2227
virtual ~WW8_WrPlcAnnotations() override
Definition: wrtw8sty.cxx:2264
WW8_WrPlcAnnotations(const WW8_WrPlcAnnotations &)=delete
o3tl::sorted_vector< const SwRedlineData * > maProcessedRedlines
Definition: wrtww8.hxx:1278
void Append(WW8_CP nCp, const SwPostItField *pPostIt)
Definition: wrtw8sty.cxx:2233
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:4099
bool WriteText(WW8Export &rWrt)
Definition: wrtww8.cxx:4090
bool IsNewRedlineComment(const SwRedlineData *pRedLine)
Definition: wrtw8sty.cxx:2259
std::map< const OUString, std::pair< WW8_CP, bool > > m_aRangeStartPositions
Definition: wrtww8.hxx:1280
WW8_WrPlcAnnotations & operator=(WW8_WrPlcAnnotations const &)=delete
WW8_WrPlcField(const WW8_WrPlcField &)=delete
void Write(WW8Export &rWrt)
Definition: wrtww8.cxx:853
WW8_WrPlcField(sal_uInt16 nStructSz, sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1370
void ResultAdded()
Definition: wrtww8.hxx:1374
sal_uInt16 ResultCount() const
Definition: wrtww8.hxx:1375
sal_uInt16 m_nResults
Definition: wrtww8.hxx:1365
WW8_WrPlcField & operator=(const WW8_WrPlcField &)=delete
sal_uInt8 m_nTextTyp
Definition: wrtww8.hxx:1364
WW8_WrPlcFootnoteEdn & operator=(WW8_WrPlcFootnoteEdn const &)=delete
WW8_WrPlcFootnoteEdn(const WW8_WrPlcFootnoteEdn &)=delete
WW8_WrPlcFootnoteEdn(sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1250
bool WriteText(WW8Export &rWrt)
Definition: wrtww8.cxx:4055
void Append(WW8_CP nCp, const SwFormatFootnote &rFootnote)
Definition: wrtw8sty.cxx:2186
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:4074
std::vector< std::unique_ptr< WW8_WrFkp > > m_Fkps
Definition: wrtww8.hxx:1323
~WW8_WrPlcPn()
Definition: wrtww8.cxx:973
ePLCFT m_ePlc
Definition: wrtww8.hxx:1325
sal_uInt8 * CopyLastSprms(sal_uInt8 &rLen)
Definition: wrtww8.cxx:977
void WritePlc()
Definition: wrtww8.cxx:1055
void AppendFkpEntry(WW8_FC nEndFc, short nVarLen=0, const sal_uInt8 *pSprms=nullptr)
Definition: wrtww8.cxx:983
sal_uInt16 m_nFkpStartPage
Definition: wrtww8.hxx:1324
WW8_WrPlcPn & operator=(const WW8_WrPlcPn &)=delete
WW8Export & m_rWrt
Definition: wrtww8.hxx:1321
WW8_WrPlcPn(const WW8_WrPlcPn &)=delete
void WriteFkps()
Definition: wrtww8.cxx:1034
std::unique_ptr< WW8_WrPlc0 > m_pTextPos
Definition: wrtww8.hxx:248
WW8_WrPlcSepx(const WW8_WrPlcSepx &)=delete
void OutHeaderFooter(WW8Export &rWrt, bool bHeader, const SwFormat &rFormat, sal_uLong &rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode)
Definition: wrtw8sty.cxx:1263
void WritePlcSed(WW8Export &rWrt) const
Definition: wrtw8sty.cxx:2082
virtual bool HeaderFooterWritten() override
Definition: wrtw8sty.cxx:1106
void WriteSepx(SvStream &rStrm) const
Definition: wrtw8sty.cxx:2066
std::vector< std::shared_ptr< WW8_PdAttrDesc > > m_SectionAttributes
Definition: wrtww8.hxx:245
void AppendSep(WW8_CP nStartCp, const SwPageDesc *pPd, const SwSectionFormat *pSectionFormat, sal_uLong nLnNumRestartNo)
Definition: wrtw8sty.cxx:1155
void Finish(WW8_CP nEndCp)
Definition: wrtww8.hxx:267
WW8_WrPlcSepx & operator=(const WW8_WrPlcSepx &)=delete
void WritePlcHdd(WW8Export &rWrt) const
Definition: wrtw8sty.cxx:2107
bool WriteKFText(WW8Export &rWrt)
Definition: wrtw8sty.cxx:2015
bool m_bHeaderFooterWritten
Definition: wrtww8.hxx:247
virtual ~WW8_WrPlcSepx() override
Definition: wrtw8sty.cxx:1097
void WriteFootnoteEndText(WW8Export &rWrt, sal_uLong nCpStt)
Definition: wrtw8sty.cxx:1188
std::vector< WW8_CP > m_aCps
Definition: wrtww8.hxx:244
std::vector< const void * > m_aContent
Definition: wrtww8.hxx:1227
virtual ~WW8_WrPlcSubDoc()
Definition: wrtw8sty.cxx:2182
WW8_WrPlcSubDoc & operator=(const WW8_WrPlcSubDoc &)=delete
WW8_WrPlcSubDoc(const WW8_WrPlcSubDoc &)=delete
void WriteGenericPlc(WW8Export &rWrt, sal_uInt8 nTTyp, WW8_FC &rTextStt, sal_Int32 &rTextCnt, WW8_FC &rRefStt, sal_Int32 &rRefCnt) const
Definition: wrtw8sty.cxx:2415
std::vector< WW8_CP > m_aCps
Definition: wrtww8.hxx:1226
virtual const std::vector< sal_uInt32 > * GetShapeIdArr() const
Definition: wrtw8sty.cxx:2720
std::unique_ptr< WW8_WrPlc0 > m_pTextPos
Definition: wrtww8.hxx:1229
std::vector< const SwFrameFormat * > m_aSpareFormats
Definition: wrtww8.hxx:1228
bool WriteGenericText(WW8Export &rWrt, sal_uInt8 nTTyp, WW8_CP &rCount)
Definition: wrtw8sty.cxx:2270
void Append(const SdrObject &rObj, sal_uInt32 nShapeId)
Definition: wrtw8esh.cxx:920
WW8_WrPlcTextBoxes & operator=(WW8_WrPlcTextBoxes const &)=delete
std::vector< sal_uInt32 > m_aShapeIds
Definition: wrtww8.hxx:1297
sal_uInt16 Count() const
Definition: wrtww8.hxx:1309
WW8_WrPlcTextBoxes(const WW8_WrPlcTextBoxes &)=delete
sal_uInt16 GetPos(const void *p) const
Definition: wrtww8.hxx:1310
WW8_WrPlcTextBoxes(sal_uInt8 nTTyp)
Definition: wrtww8.hxx:1303
bool WriteText(WW8Export &rWrt)
Definition: wrtw8esh.cxx:901
sal_uInt8 m_nTyp
Definition: wrtww8.hxx:1296
virtual const std::vector< sal_uInt32 > * GetShapeIdArr() const override
Definition: wrtw8esh.cxx:936
void WritePlc(WW8Export &rWrt) const
Definition: wrtww8.cxx:4106
Handles export of smart tags.
Definition: wrtww8.cxx:328
virtual void Write(Writer &rWrt) override
Definition: wrtww8.cxx:1654
SvStream & Strm()
Definition: writer.cxx:193
IDocumentSettingAccess & getIDocumentSettingAccess()
Definition: writer.cxx:115
Make exporting a Writer Frame easy.
bool RefersToSameFrameAs(const Frame &rOther) const
Does this ww8::Frame refer to the same writer content as another.
std::shared_ptr< WW8TableInfo > Pointer_t
std::shared_ptr< WW8TableNodeInfoInner > Pointer_t
std::map< wwFont, sal_uInt16 > maFonts
Keep track of fonts that need to be exported.
Definition: wrtww8.hxx:322
void InitFontTable(const SwDoc &rDoc)
rDoc used only to get the initial standard font(s) in use.
Definition: wrtw8sty.cxx:911
sal_uInt16 GetId(const SvxFontItem &rFont)
Definition: wrtw8sty.cxx:950
void WriteFontTable(SvStream *pTableStream, WW8Fib &pFib)
Definition: wrtw8sty.cxx:967
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:957
bool m_bLoadAllFonts
If true, all fonts are loaded before processing the document.
Definition: wrtww8.hxx:338
Collects and outputs fonts.
Definition: wrtww8.hxx:297
OUString msFamilyNm
Definition: wrtww8.hxx:302
void WriteRtf(const RtfAttributeOutput *rAttrOutput) const
Definition: wrtw8sty.cxx:873
bool mbAlt
Definition: wrtww8.hxx:304
void Write(SvStream *pTableStram) const
Definition: wrtw8sty.cxx:841
void WriteDocx(DocxAttributeOutput *rAttrOutput) const
Definition: wrtw8sty.cxx:854
rtl_TextEncoding meChrSet
Definition: wrtww8.hxx:307
friend bool operator<(const wwFont &r1, const wwFont &r2)
Definition: wrtw8sty.cxx:885
OUString const & GetFamilyName() const
Definition: wrtww8.hxx:314
FontFamily meFamily
Definition: wrtww8.hxx:306
OUString msAltNm
Definition: wrtww8.hxx:303
wwFont(std::u16string_view rFamilyName, FontPitch ePitch, FontFamily eFamily, rtl_TextEncoding eChrSet)
Definition: wrtw8sty.cxx:774
FontPitch mePitch
Definition: wrtww8.hxx:305
sal_uInt8 maWW8_FFN[6]
Definition: wrtww8.hxx:301
const char * pS
FontPitch
FontFamily
SvxFrameDirection
void * p
sal_Int64 n
NONE
Close
void SvStream & rStrm
std::vector< CharRunEntry > CharRuns
Definition: msfilter.hxx:383
long Long
std::vector< Frame > Frames
STL container of Frames.
std::map< sal_uInt16, const SfxPoolItem *, sw::util::ItemSort > PoolItems
STL container of SfxPoolItems (Attributes)
std::vector< Frame >::iterator FrameIter
STL iterator for Frames.
@ stiUser
Definition: wwstyles.hxx:133
std::vector< sal_uInt8 > bytes
Definition: types.hxx:29
::std::array< OUString, NF_KEYWORD_ENTRIES_COUNT > NfKeywordTable
sal_uIntPtr sal_uLong
Structure that is used to save some of the WW8Export/DocxExport data.
Definition: wrtww8.hxx:430
RndStdIds eOldAnchorType
Definition: wrtww8.hxx:432
bool bOldStartTOX
Definition: wrtww8.hxx:443
SwNodeOffset nOldStart
Definition: wrtww8.hxx:436
std::shared_ptr< SwUnoCursor > pOldPam
Definition: wrtww8.hxx:434
bool bOldOutTable
Definition: wrtww8.hxx:441
Point * pOldFlyOffset
Definition: wrtww8.hxx:431
SwNodeOffset nOldEnd
Definition: wrtww8.hxx:436
bool bOldWriteAll
WW8Export only.
Definition: wrtww8.hxx:440
const ww8::Frame * pOldFlyFormat
Definition: wrtww8.hxx:437
bool bOldInWriteTOX
Definition: wrtww8.hxx:444
const SwPageDesc * pOldPageDesc
Definition: wrtww8.hxx:438
bool bOldFlyFrameAttrs
Definition: wrtww8.hxx:442
SwPaM * pOldEnd
Definition: wrtww8.hxx:435
std::unique_ptr< ww::bytes > pOOld
WW8Export only.
Definition: wrtww8.hxx:433
const SwFormat * format
Definition: wrtww8.hxx:1589
MapEntry(const SwFormat *f)
Definition: wrtww8.hxx:1597
MapEntry(const SwNumRule *r)
Definition: wrtww8.hxx:1598
sal_uInt16 ww_id
We need to build style id's for DOCX export; ideally we should roundtrip that, but this is good enoug...
Definition: wrtww8.hxx:1592
const SwNumRule * num_rule
Definition: wrtww8.hxx:1590
bool m_bIgnoreEmpty
Definition: wrtww8.hxx:1266
const OutlinerParaObject * mpRichText
Definition: wrtww8.hxx:1260
OUString msOwner
Definition: wrtww8.hxx:1262
WW8_CP m_nRangeEnd
Definition: wrtww8.hxx:1265
WW8_CP m_nRangeStart
Definition: wrtww8.hxx:1265
DateTime maDateTime
Definition: wrtww8.hxx:1264
OUString msSimpleText
Definition: wrtww8.hxx:1261
bool HasRange() const
An annotation has a range if start != end or the m_bIgnoreEmpty flag is cleared.
Definition: wrtw8sty.cxx:2217
WW8_Annotation(const SwPostItField *pPostIt, WW8_CP nRangeStart, WW8_CP nRangeEnd)
Definition: wrtw8sty.cxx:2192
OUString m_sInitials
Definition: wrtww8.hxx:1263
For the output of sections.
Definition: wrtw8sty.cxx:81
sal_uLong nLnNumRestartNo
Definition: wrtww8.hxx:178
::std::optional< sal_uInt16 > oPgRestartNo
Definition: wrtww8.hxx:179
const SwSectionFormat * pSectionFormat
Definition: wrtww8.hxx:176
bool IsProtected() const
Definition: wrtw8sty.cxx:1292
bool bIsFirstParagraph
Definition: wrtww8.hxx:180
const SwPageDesc * pPageDesc
Definition: wrtww8.hxx:175
WW8_SepInfo(const SwPageDesc *pPD, const SwSectionFormat *pFormat, sal_uLong nLnRestart, ::std::optional< sal_uInt16 > oPgRestart=std::nullopt, const SwNode *pNd=nullptr, bool bIsFirstPara=false)
Definition: wrtww8.hxx:182
const SwNode * pPDNd
Definition: wrtww8.hxx:177
RndStdIds
tools::Long SwTwips
Definition: swtypes.hxx:51
constexpr sal_uInt8 MAXLEVEL
Definition: swtypes.hxx:92
unsigned char sal_uInt8
#define SAL_MAX_INT32
sal_uInt16 sal_Unicode
FlyProcessingState
enum to state the present state of the fly
Definition: wrtww8.hxx:166
@ FLY_POSTPONED
Definition: wrtww8.hxx:169
@ FLY_NONE
Definition: wrtww8.hxx:167
@ FLY_NOT_PROCESSED
Definition: wrtww8.hxx:170
@ FLY_PROCESSED
Definition: wrtww8.hxx:168
o3tl::sorted_vector< sal_Int32 > SwSoftPageBreakList
Definition: wrtww8.hxx:133
std::vector< DrawObj * > DrawObjPointerVector
Definition: wrtww8.hxx:361
OUString BookmarkToWord(std::u16string_view rBookmark, bool *pIsMove=nullptr, bool *pIsFrom=nullptr)
Definition: wrtw8nds.cxx:1213
std::pair< OUString, SwNodeOffset > aBookmarkPair
Definition: wrtww8.hxx:410
sal_Int16 GetWordFirstLineOffset(const SwNumFormat &rFormat)
Definition: wrtw8num.cxx:159
FieldFlags
Definition: wrtww8.hxx:143
OUString FieldString(ww::eField eIndex)
Definition: ww8atr.cxx:2799
std::vector< DrawObj > DrawObjVector
Definition: wrtww8.hxx:360
std::map< const css::embed::XEmbeddedObject *, sal_Int32 > WW8OleMap
Definition: wrtww8.hxx:132
TextTypes
Definition: wrtww8.hxx:157
@ TXT_FTN
Definition: wrtww8.hxx:158
@ TXT_HFTXTBOX
Definition: wrtww8.hxx:159
@ TXT_ATN
Definition: wrtww8.hxx:159
@ TXT_TXTBOX
Definition: wrtww8.hxx:159
@ TXT_EDN
Definition: wrtww8.hxx:159
@ TXT_MAINTEXT
Definition: wrtww8.hxx:158
@ TXT_HDFT
Definition: wrtww8.hxx:158
ePLCFT
Definition: ww8scan.hxx:385
sal_Int32 WW8_CP
Definition: ww8struc.hxx:153
sal_Int32 WW8_FC
Definition: ww8struc.hxx:152