LibreOffice Module sw (master) 1
rtfattributeoutput.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_RTFATTRIBUTEOUTPUT_HXX
21#define INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
22
23#include <memory>
24#include <com/sun/star/drawing/FillStyle.hpp>
25
27#include "rtfstringbuffer.hxx"
28
29#include <wrtswtbl.hxx>
30
31#include <rtl/strbuf.hxx>
32#include <editeng/boxitem.hxx>
33
34#include <optional>
35
36class SwGrfNode;
37class SwOLENode;
39class RtfExport;
40
43{
45 friend class SaveRunState;
46
47public:
49 void RTLAndCJKState(bool bIsRTL, sal_uInt16 nScript) override;
50
53 bool bGenerateParaId) override;
54
56 void EndParagraph(ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override;
57
59 void EmptyParagraph() override;
60
62 void SectionBreaks(const SwNode& rNode) override;
63
65 void StartParagraphProperties() override;
66
68 void EndParagraphProperties(const SfxItemSet& rParagraphMarkerProperties,
69 const SwRedlineData* pRedlineData,
70 const SwRedlineData* pRedlineParagraphMarkerDeleted,
71 const SwRedlineData* pRedlineParagraphMarkerInserted) override;
72
74 void StartRun(const SwRedlineData* pRedlineData, sal_Int32 nPos,
75 bool bSingleEmptyRun = false) override;
76
78 void EndRun(const SwTextNode* pNode, sal_Int32 nPos, sal_Int32 nLen,
79 bool bLastRun = false) override;
80
82 void StartRunProperties() override;
83
85 void EndRunProperties(const SwRedlineData* pRedlineData) override;
86
88 void RunText(const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8,
89 const OUString& rSymbolFont = OUString()) override;
90
91 // Access to (anyway) private buffers, used by the sdr exporter
92 OStringBuffer& RunText();
93 OString MoveCharacterProperties(bool aAutoWriteRtlLtr = false);
94
96 void RawText(const OUString& rText, rtl_TextEncoding eCharSet) override;
97
99 void StartRuby(const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby) override;
100
102 void EndRuby(const SwTextNode& rNode, sal_Int32 nPos) override;
103
105 bool StartURL(const OUString& rUrl, const OUString& rTarget) override;
106
108 bool EndURL(bool isAtEndOfParagraph) override;
109
110 void FieldVanish(const OUString& rText, ww::eField eType,
111 OUString const* pBookmarkName) override;
112
116 void Redline(const SwRedlineData* pRedline) override;
117
118 void FormatDrop(const SwTextNode& rNode, const SwFormatDrop& rSwFormatDrop, sal_uInt16 nStyle,
120 ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override;
121
123 void ParagraphStyle(sal_uInt16 nStyle) override;
124
125 void TableInfoCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
126 void TableInfoRow(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
127 void TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
128 void TablePositioning(SwFrameFormat* pFlyFormat);
129 void
130 TableDefaultBorders(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
131 void TableBackgrounds(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
132 void TableRowRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
133 void TableCellRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
134 void TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
135 void TableCanSplit(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
136 void TableBidi(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
137 void TableVerticalCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
138 void TableNodeInfoInner(ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner) override;
139 void TableOrientation(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
140 void TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
141 void TableRowEnd(sal_uInt32 nDepth) override;
142
144 void StartStyles() override;
145
147 void EndStyles(sal_uInt16 nNumberOfStyles) override;
148
150 void DefaultStyle() override;
151
153 void StartStyle(const OUString& rName, StyleType eType, sal_uInt16 nBase, sal_uInt16 nNext,
154 sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nSlot,
155 bool bAutoUpdate) override;
156
158 void EndStyle() override;
159
161 void StartStyleProperties(bool bParProp, sal_uInt16 nStyle) override;
162
164 void EndStyleProperties(bool bParProp) override;
165
167 void OutlineNumbering(sal_uInt8 nLvl) override;
168
171 void PageBreakBefore(bool bBreak) override;
172
175 void SectionBreak(sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo* pSectionInfo = nullptr,
176 bool bExtraPageBreak = false) override;
177
179 void StartSection() override;
180
182 void EndSection() override;
183
185 void SectionFormProtection(bool bProtected) override;
186
188 void SectionLineNumbering(sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo) override;
189
191 void SectionTitlePage() override;
192
194 void SectionPageBorders(const SwFrameFormat* pFormat,
195 const SwFrameFormat* pFirstPageFormat) override;
196
198 void SectionBiDi(bool bBiDi) override;
199
202 void SectionPageNumbering(sal_uInt16 nNumType,
203 const ::std::optional<sal_uInt16>& oPageRestartNumber) override;
204
206 void SectionType(sal_uInt8 nBreakCode) override;
207
208 void SectFootnoteEndnotePr() override;
209
210 void WriteFootnoteEndnotePr(bool bFootnote, const SwEndNoteInfo& rInfo);
211
213 void NumberingDefinition(sal_uInt16 nId, const SwNumRule& rRule) override;
214
216 void StartAbstractNumbering(sal_uInt16 nId) override;
217
219 void EndAbstractNumbering() override;
220
222 void NumberingLevel(sal_uInt8 nLevel, sal_uInt16 nStart, sal_uInt16 nNumberingType,
223 SvxAdjust eAdjust, const sal_uInt8* pNumLvlPos, sal_uInt8 nFollow,
224 const wwFont* pFont, const SfxItemSet* pOutSet, sal_Int16 nIndentAt,
225 sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos,
226 const OUString& rNumberingString,
227 const SvxBrushItem* pBrush, //For i120928,to export graphic of bullet
228 bool isLegal) override;
229
230 void WriteField_Impl(const SwField* pField, ww::eField eType, std::u16string_view rFieldCmd,
231 FieldFlags nMode);
232 void WriteBookmarks_Impl(std::vector<OUString>& rStarts, std::vector<OUString>& rEnds);
233 void WriteAnnotationMarks_Impl(std::vector<OUString>& rStarts, std::vector<OUString>& rEnds);
234 void WriteHeaderFooter_Impl(const SwFrameFormat& rFormat, bool bHeader, const char* pStr,
235 bool bTitlepg);
236 void WriteBookmarkInActParagraph(const OUString& /*rName*/, sal_Int32 /*nFirstRunPos*/,
237 sal_Int32 /*nLastRunPos*/) override{};
238
239protected:
241 void OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Point& rNdTopLeft) override;
242
244 void CharCaseMap(const SvxCaseMapItem& rCaseMap) override;
245
247 void CharColor(const SvxColorItem& rColor) override;
248
250 void CharContour(const SvxContourItem& rContour) override;
251
253 void CharCrossedOut(const SvxCrossedOutItem& rCrossedOut) override;
254
256 void CharEscapement(const SvxEscapementItem& rEscapement) override;
257
259 void CharFont(const SvxFontItem& rFont) override;
260
262 void CharFontSize(const SvxFontHeightItem& rFontSize) override;
263
265 void CharKerning(const SvxKerningItem& rKerning) override;
266
268 void CharLanguage(const SvxLanguageItem& rLanguage) override;
269
271 void CharPosture(const SvxPostureItem& rPosture) override;
272
274 void CharShadow(const SvxShadowedItem& rShadow) override;
275
277 void CharUnderline(const SvxUnderlineItem& rUnderline) override;
278
280 void CharWeight(const SvxWeightItem& rWeight) override;
281
283 void CharAutoKern(const SvxAutoKernItem& rAutoKern) override;
284
286 void CharAnimatedText(const SvxBlinkItem& rBlink) override;
287
289 void CharBackground(const SvxBrushItem& rBrush) override;
290
292 void CharFontCJK(const SvxFontItem& rFont) override;
293
295 void CharFontSizeCJK(const SvxFontHeightItem& rFontSize) override;
296
298 void CharLanguageCJK(const SvxLanguageItem& rLanguageItem) override;
299
301 void CharPostureCJK(const SvxPostureItem& rPosture) override;
302
304 void CharWeightCJK(const SvxWeightItem& rWeight) override;
305
307 void CharFontCTL(const SvxFontItem& rFont) override;
308
310 void CharFontSizeCTL(const SvxFontHeightItem& rFontSize) override;
311
313 void CharLanguageCTL(const SvxLanguageItem& rLanguageItem) override;
314
316 void CharPostureCTL(const SvxPostureItem& rPosture) override;
317
319 void CharWeightCTL(const SvxWeightItem& rWeight) override;
320
322 void CharBidiRTL(const SfxPoolItem& rItem) override;
323
325 void CharIdctHint(const SfxPoolItem& rItem) override;
326
328 void CharRotate(const SvxCharRotateItem& rRotate) override;
329
331 void CharEmphasisMark(const SvxEmphasisMarkItem& rEmphasisMark) override;
332
334 void CharTwoLines(const SvxTwoLinesItem& rTwoLines) override;
335
337 void CharScaleWidth(const SvxCharScaleWidthItem& rScaleWidth) override;
338
340 void CharRelief(const SvxCharReliefItem& rRelief) override;
341
343 void CharHidden(const SvxCharHiddenItem& rHidden) override;
344
346 void CharBorder(const ::editeng::SvxBorderLine* pAllBorder, sal_uInt16 nDist,
347 bool bShadow) override;
348
350 void CharHighlight(const SvxBrushItem& rBrush) override;
351
353 void TextINetFormat(const SwFormatINetFormat& rURL) override;
354
356 void TextCharFormat(const SwFormatCharFormat& rCharFormat) override;
357
359 void TextFootnote_Impl(const SwFormatFootnote& rFootnote) override;
360
362 void ParaLineSpacing_Impl(short nSpace, short nMulti) override;
363
365 void ParaAdjust(const SvxAdjustItem& rAdjust) override;
366
368 void ParaSplit(const SvxFormatSplitItem& rSplit) override;
369
371 void ParaWidows(const SvxWidowsItem& rWidows) override;
372
374 void ParaTabStop(const SvxTabStopItem& rTabStop) override;
375
377 void ParaHyphenZone(const SvxHyphenZoneItem& rHyphenZone) override;
378
380 void ParaNumRule_Impl(const SwTextNode* pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) override;
381
383 void ParaScriptSpace(const SfxBoolItem& rScriptSpace) override;
384
386 void ParaHangingPunctuation(const SfxBoolItem& rItem) override;
387
389 void ParaForbiddenRules(const SfxBoolItem& rItem) override;
390
392 void ParaVerticalAlign(const SvxParaVertAlignItem& rAlign) override;
393
395 void ParaSnapToGrid(const SvxParaGridItem& rItem) override;
396
398 void FormatFrameSize(const SwFormatFrameSize& rSize) override;
399
401 void FormatPaperBin(const SvxPaperBinItem& rItem) override;
402
404 virtual void FormatFirstLineIndent(const SvxFirstLineIndentItem& rFirstLine) override;
406 virtual void FormatTextLeftMargin(const SvxTextLeftMarginItem& rTextLeftMargin) override;
408 virtual void FormatRightMargin(const SvxRightMarginItem& rRightMargin) override;
409
411 void FormatLRSpace(const SvxLRSpaceItem& rLRSpace) override;
412
414 void FormatULSpace(const SvxULSpaceItem& rULSpace) override;
415
417 void FormatSurround(const SwFormatSurround& rSurround) override;
418
420 void FormatVertOrientation(const SwFormatVertOrient& rFlyVert) override;
421
423 void FormatHorizOrientation(const SwFormatHoriOrient& rFlyHori) override;
424
426 void FormatAnchor(const SwFormatAnchor& rAnchor) override;
427
429 void FormatBackground(const SvxBrushItem& rBrush) override;
430
432 void FormatFillStyle(const XFillStyleItem& rFillStyle) override;
433
435 void FormatFillGradient(const XFillGradientItem& rFillGradient) override;
436
438 void FormatBox(const SvxBoxItem& rBox) override;
439
441 void FormatColumns_Impl(sal_uInt16 nCols, const SwFormatCol& rCol, bool bEven,
442 SwTwips nPageSize) override;
443
445 void FormatKeep(const SvxFormatKeepItem& rItem) override;
446
448 void FormatTextGrid(const SwTextGridItem& rItem) override;
449
451 void FormatLineNumbering(const SwFormatLineNumber& rNumbering) override;
452
454 void FormatFrameDirection(const SvxFrameDirectionItem& rDirection) override;
455
457 void ParaGrabBag(const SfxGrabBagItem& rItem) override;
458
460 void CharGrabBag(const SfxGrabBagItem& rItem) override;
461
463 void ParaOutlineLevel(const SfxUInt16Item& rItem) override;
464
466 void WriteExpand(const SwField* pField) override;
467
468 void RefField(const SwField& rField, const OUString& rRef) override;
469 void HiddenField(const SwField& rField) override;
470 void SetField(const SwField& rField, ww::eField eType, const OUString& rCmd) override;
471 void PostitField(const SwField* pField) override;
472 bool DropdownField(const SwField* pField) override;
473 bool PlaceholderField(const SwField* pField) override;
474
475 void SectionRtlGutter(const SfxBoolItem& rRtlGutter) override;
476
477 void TextLineBreak(const SwFormatLineBreak& rLineBreak) override;
478
479private:
482
483 OStringBuffer m_aTabStop;
484
487
489 void FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode);
490 void FlyFrameOLE(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
491 const Size& rSize);
492 void FlyFrameOLEReplacement(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
493 const Size& rSize);
495 bool FlyFrameOLEMath(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
496 const Size& rSize);
497
498 /*
499 * Table methods.
500 */
501 void InitTableHelper(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
502 void StartTable();
503 void StartTableRow(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
504 void StartTableCell();
505 void TableCellProperties(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
506 void EndTableCell();
507 void EndTableRow();
508 void EndTable();
509
512
513 void WriteTextFootnoteNumStr(const SwFormatFootnote& rFootnote);
514
515 /*
516 * Current style name and its ID.
517 */
518 OUString m_rStyleName;
519 sal_uInt16 m_nStyleId;
520 /*
521 * Current list ID.
522 */
523 sal_uInt16 m_nListId;
524 /*
525 * This is needed because the call order is: run text, run properties, paragraph properties.
526 * What we need is the opposite.
527 */
530 /*
531 * This is written after runs.
532 */
533 OStringBuffer m_aAfterRuns;
534 /*
535 * Same for colors and stylesheets: first we just want to output colors,
536 * need to buffer the stylesheet table to output it after the color one.
537 */
538 OStringBuffer m_aStylesheet;
539 /*
540 * This one just holds the style commands in the current style.
541 */
542 OStringBuffer m_aStyles;
543 /*
544 * This is the same as m_aStyles but the contents of it is Assoc.
545 */
546 OStringBuffer m_aStylesAssocHich;
547 OStringBuffer m_aStylesAssocDbch;
548 OStringBuffer m_aStylesAssocRtlch;
549 OStringBuffer m_aStylesAssocLtrch;
550
552 sal_uInt16 m_nScript;
554
558 std::map<OString, sal_Int32> m_rOpenedAnnotationMarksIds;
559
560 /*
561 * The current table helper.
562 */
563 std::unique_ptr<SwWriteTable> m_pTableWrt;
564
565 /*
566 * Remember if we are in an open cell, or not.
567 */
569
570 /*
571 * Remember the current table depth.
572 */
573 sal_uInt32 m_nTableDepth;
574
575 /*
576 * Remember if we wrote a \cell or not.
577 */
579
580 /*
581 * For late output of row definitions.
582 */
583 OStringBuffer m_aRowDefs;
584
585 /*
586 * Is a column break needed after the next \par?
587 */
589
590 /*
591 * If section breaks should be buffered to m_aSectionBreaks
592 */
594 OStringBuffer m_aSectionBreaks;
595
596 /*
597 * If section headers (and footers) should be buffered to
598 * m_aSectionHeaders.
599 */
601 OStringBuffer m_aSectionHeaders;
602
603 /*
604 * Support for starting multiple tables at the same cell.
605 * If the current table is the last started one.
606 */
608 /*
609 * List of already started but not yet defined tables (need to be defined
610 * after the nested tables).
611 */
612 std::vector<OString> m_aTables;
613 /*
614 * If cell info is already output.
615 */
617
620
622 std::map<sal_uInt32, sal_uInt32> m_aCells;
623
625
628
630
632
634 std::map<sal_uInt16, const SwPostItField*> m_aPostitFields;
635
638
639 std::vector<std::pair<OString, OString>> m_aFlyProperties;
640
641 std::optional<css::drawing::FillStyle> m_oFillStyle;
642
644 std::stack<OUString> m_aURLs;
645
654
656
657public:
658 explicit RtfAttributeOutput(RtfExport& rExport);
659
661
663 MSWordExportBase& GetExport() override;
664
665 // These are used by wwFont::WriteRtf()
667 void StartFont(std::u16string_view rFamilyName) const;
668
670 void EndFont() const;
671
673 void FontAlternateName(std::u16string_view rName) const;
674
676 void FontCharset(sal_uInt8 nCharSet) const;
677
679 void FontFamilyType(FontFamily eFamily, const wwFont& rFont) const;
680
682 void FontPitchType(FontPitch ePitch) const;
683
684 void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) override;
685
687 void writeTextFrame(const ww8::Frame& rFrame, bool bTextBox = false);
688
689 OStringBuffer& GetTabStop() { return m_aTabStop; }
690
691 const SwPageDesc* GetPrevPageDesc() const { return m_pPrevPageDesc; }
692};
693
694#endif // INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
695
696/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class for WW8Export and DocxExport.
Definition: wrtww8.hxx:451
The class that has handlers for various resource types when exporting as RTF.
void OutlineNumbering(sal_uInt8 nLvl) override
Numbering rule and Id.
void RefField(const SwField &rField, const OUString &rRef) override
void TableCellRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void CharKerning(const SvxKerningItem &rKerning) override
Sfx item RES_CHRATR_KERNING.
void CharFontSizeCTL(const SvxFontHeightItem &rFontSize) override
Sfx item RES_CHRATR_CTL_FONTSIZE.
void FormatFillGradient(const XFillGradientItem &rFillGradient) override
Sfx item RES_FILL_GRADIENT.
RtfExport & m_rExport
Reference to the export, where to get the data from.
void TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void CharEscapement(const SvxEscapementItem &rEscapement) override
Sfx item RES_CHRATR_ESCAPEMENT.
virtual void FormatTextLeftMargin(const SvxTextLeftMarginItem &rTextLeftMargin) override
Sfx item RES_MARGIN_TEXTLEFT.
void SectFootnoteEndnotePr() override
for footnote/endnote section properties
OStringBuffer m_aStylesAssocRtlch
void HiddenField(const SwField &rField) override
void FormatFillStyle(const XFillStyleItem &rFillStyle) override
Sfx item RES_FILL_STYLE.
void FormatBox(const SvxBoxItem &rBox) override
Sfx item RES_BOX.
void ParaLineSpacing_Impl(short nSpace, short nMulti) override
Sfx item RES_PARATR_LINESPACING.
editeng::WordPageMargins m_aPageMargins
void CharLanguage(const SvxLanguageItem &rLanguage) override
Sfx item RES_CHRATR_LANGUAGE.
void PageBreakBefore(bool bBreak) override
Page break As a paragraph property - the paragraph should be on the next page.
void FormatULSpace(const SvxULSpaceItem &rULSpace) override
Sfx item RES_UL_SPACE.
void CharBackground(const SvxBrushItem &rBrush) override
Sfx item RES_CHRATR_BACKGROUND.
void StartRuby(const SwTextNode &rNode, sal_Int32 nPos, const SwFormatRuby &rRuby) override
Output ruby start.
void CharBorder(const ::editeng::SvxBorderLine *pAllBorder, sal_uInt16 nDist, bool bShadow) override
Sfx item RES_CHRATR_BOX.
void ParaNumRule_Impl(const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) override
Sfx item RES_PARATR_NUMRULE.
void TextCharFormat(const SwFormatCharFormat &rCharFormat) override
Sfx item RES_TXTATR_CHARFMT.
void CharHidden(const SvxCharHiddenItem &rHidden) override
Sfx item RES_CHRATR_HIDDEN.
void CharWeightCJK(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_CJK_WEIGHT.
void FlyFrameOLEReplacement(const SwFlyFrameFormat *pFlyFrameFormat, SwOLENode &rOLENode, const Size &rSize)
void CharWeightCTL(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_CTL_WEIGHT.
void NumberingLevel(sal_uInt8 nLevel, sal_uInt16 nStart, sal_uInt16 nNumberingType, SvxAdjust eAdjust, const sal_uInt8 *pNumLvlPos, sal_uInt8 nFollow, const wwFont *pFont, const SfxItemSet *pOutSet, sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos, const OUString &rNumberingString, const SvxBrushItem *pBrush, bool isLegal) override
All the numbering level information.
void FormatHorizOrientation(const SwFormatHoriOrient &rFlyHori) override
Sfx item RES_HORI_ORIENT.
bool PlaceholderField(const SwField *pField) override
void SectionTitlePage() override
Has different headers/footers for the title page.
void EndStyleProperties(bool bParProp) override
End of (paragraph or run) properties of a style.
void WriteFootnoteEndnotePr(bool bFootnote, const SwEndNoteInfo &rInfo)
sal_Int32 m_nParaAfterSpacing
If m_bParaBeforeAutoSpacing is set, value of.
sal_Int32 m_nParaBeforeSpacing
If m_bParaBeforeAutoSpacing is set, value of \sb.
void EndRuby(const SwTextNode &rNode, sal_Int32 nPos) override
Output ruby end.
bool m_bParaBeforeAutoSpacing
If original file had \sbauto.
void FontPitchType(FontPitch ePitch) const
Font pitch.
virtual void FormatFirstLineIndent(const SvxFirstLineIndentItem &rFirstLine) override
Sfx item RES_MARGIN_FIRSTLINE.
void EndRun(const SwTextNode *pNode, sal_Int32 nPos, sal_Int32 nLen, bool bLastRun=false) override
End of the text run.
MSWordExportBase & GetExport() override
Return the right export class.
void FormatAnchor(const SwFormatAnchor &rAnchor) override
Sfx item RES_ANCHOR.
void SectionPageNumbering(sal_uInt16 nNumType, const ::std::optional< sal_uInt16 > &oPageRestartNumber) override
The style of the page numbers.
void SetField(const SwField &rField, ww::eField eType, const OUString &rCmd) override
void EndAbstractNumbering() override
End of the abstract numbering definition instance.
void CharWeight(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_WEIGHT.
void StartRun(const SwRedlineData *pRedlineData, sal_Int32 nPos, bool bSingleEmptyRun=false) override
Start of the text run.
void CharPostureCTL(const SvxPostureItem &rPosture) override
Sfx item RES_CHRATR_CTL_POSTURE.
void CharUnderline(const SvxUnderlineItem &rUnderline) override
Sfx item RES_CHRATR_UNDERLINE.
void TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void FormatLRSpace(const SvxLRSpaceItem &rLRSpace) override
Sfx item RES_LR_SPACE.
void FlyFrameGraphic(const SwFlyFrameFormat *pFlyFrameFormat, const SwGrfNode *pGrfNode)
Output graphic fly frames.
void FormatVertOrientation(const SwFormatVertOrient &rFlyVert) override
Sfx item RES_VERT_ORIENT.
void WriteHeaderFooter_Impl(const SwFrameFormat &rFormat, bool bHeader, const char *pStr, bool bTitlepg)
void CharLanguageCJK(const SvxLanguageItem &rLanguageItem) override
Sfx item RES_CHRATR_CJK_LANGUAGE.
void StartAbstractNumbering(sal_uInt16 nId) override
Start of the abstract numbering definition instance.
void CharFontSize(const SvxFontHeightItem &rFontSize) override
Sfx item RES_CHRATR_FONTSIZE.
void WriteTextFootnoteNumStr(const SwFormatFootnote &rFootnote)
void FormatPaperBin(const SvxPaperBinItem &rItem) override
Sfx item RES_PAPER_BIN.
void CharAnimatedText(const SvxBlinkItem &rBlink) override
Sfx item RES_CHRATR_BLINK.
void EndStyle() override
End of a style in the styles table.
void writeTextFrame(const ww8::Frame &rFrame, bool bTextBox=false)
Handles just the {\shptxt ...} part of a shape export.
void ParaVerticalAlign(const SvxParaVertAlignItem &rAlign) override
Sfx item RES_PARATR_VERTALIGN.
void CharShadow(const SvxShadowedItem &rShadow) override
Sfx item RES_CHRATR_SHADOWED.
bool StartURL(const OUString &rUrl, const OUString &rTarget) override
Output URL start.
~RtfAttributeOutput() override
void CharFontCJK(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_CJK_FONT.
RtfStringBuffer m_aRunText
void FormatColumns_Impl(sal_uInt16 nCols, const SwFormatCol &rCol, bool bEven, SwTwips nPageSize) override
Sfx item RES_COL.
void CharScaleWidth(const SvxCharScaleWidthItem &rScaleWidth) override
Sfx item RES_CHRATR_SCALEW.
bool m_bParaAfterAutoSpacing
If original file had \saauto.
void TableRowEnd(sal_uInt32 nDepth) override
bool DropdownField(const SwField *pField) override
void TableRowRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void StartRunProperties() override
Called before we start outputting the attributes.
void TableCellProperties(const ww8::WW8TableNodeInfoInner::Pointer_t &pTableTextNodeInfoInner)
OStringBuffer m_aStylesAssocLtrch
void PostitField(const SwField *pField) override
void FontAlternateName(std::u16string_view rName) const
Alternate name for the font.
void ParagraphStyle(sal_uInt16 nStyle) override
Output style.
std::map< sal_uInt16, const SwPostItField * > m_aPostitFields
Maps ID's to postit fields, used in atrfstart/end and atnref.
void FormatFrameDirection(const SvxFrameDirectionItem &rDirection) override
Sfx item RES_FRAMEDIR.
void EndParagraph(ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override
End of the paragraph.
void WriteBookmarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
void DefaultStyle() override
Write default style.
void CharBidiRTL(const SfxPoolItem &rItem) override
Sfx item RES_CHRATR_BidiRTL.
void CharPosture(const SvxPostureItem &rPosture) override
Sfx item RES_CHRATR_POSTURE.
std::vector< OString > m_aTables
void CharContour(const SvxContourItem &rContour) override
Sfx item Sfx item RES_CHRATR_CONTOUR.
bool EndURL(bool isAtEndOfParagraph) override
Output URL end.
bool m_bTableRowEnded
If we ended a table row without starting a new one.
std::map< OString, sal_Int32 > m_rOpenedAnnotationMarksIds
Maps annotation mark names to ID's.
std::vector< std::pair< OString, OString > > m_aFlyProperties
std::optional< css::drawing::FillStyle > m_oFillStyle
void StartStyleProperties(bool bParProp, sal_uInt16 nStyle) override
Start of (paragraph or run) properties of a style.
void WriteField_Impl(const SwField *pField, ww::eField eType, std::u16string_view rFieldCmd, FieldFlags nMode)
void CharFontCTL(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_CTL_FONT.
void CharGrabBag(const SfxGrabBagItem &rItem) override
Sfx item RES_CHRATR_GRABBAG.
bool FlyFrameOLEMath(const SwFlyFrameFormat *pFlyFrameFormat, SwOLENode &rOLENode, const Size &rSize)
Math export.
OStringBuffer m_aSectionBreaks
OString MoveCharacterProperties(bool aAutoWriteRtlLtr=false)
void TableInfoRow(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void ParaAdjust(const SvxAdjustItem &rAdjust) override
Sfx item RES_PARATR_ADJUST.
RtfAttributeOutput(RtfExport &rExport)
void SectionBreaks(const SwNode &rNode) override
Called in order to output section breaks.
virtual void FormatRightMargin(const SvxRightMarginItem &rRightMargin) override
Sfx item RES_MARGIN_RIGHT.
void TextINetFormat(const SwFormatINetFormat &rURL) override
Sfx item RES_TXTATR_INETFMT.
void OutputFlyFrame_Impl(const ww8::Frame &rFrame, const Point &rNdTopLeft) override
Output frames - the implementation.
void ParaScriptSpace(const SfxBoolItem &rScriptSpace) override
Sfx item RES_PARATR_SCRIPTSPACE.
void CharTwoLines(const SvxTwoLinesItem &rTwoLines) override
Sfx item RES_CHRATR_TWO_LINES.
void CharCrossedOut(const SvxCrossedOutItem &rCrossedOut) override
Sfx item RES_CHRATR_CROSSEDOUT.
void FormatBackground(const SvxBrushItem &rBrush) override
Sfx item RES_BACKGROUND.
void TableCanSplit(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void CharFont(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_FONT.
void TableOrientation(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void CharColor(const SvxColorItem &rColor) override
Sfx item Sfx item RES_CHRATR_COLOR.
void WriteBookmarkInActParagraph(const OUString &, sal_Int32, sal_Int32) override
Insert a bookmark inside the currently processed paragraph.
void StartSection() override
Start of the section properties.
void EndParagraphProperties(const SfxItemSet &rParagraphMarkerProperties, const SwRedlineData *pRedlineData, const SwRedlineData *pRedlineParagraphMarkerDeleted, const SwRedlineData *pRedlineParagraphMarkerInserted) override
Called after we end outputting the attributes.
sal_Int32 m_nCurrentAnnotationMarkId
bool m_bSingleEmptyRun
If we're in a paragraph that has a single empty run only.
void FormatSurround(const SwFormatSurround &rSurround) override
Sfx item RES_SURROUND.
void FontFamilyType(FontFamily eFamily, const wwFont &rFont) const
Font family.
void FormatFrameSize(const SwFormatFrameSize &rSize) override
Sfx item RES_FRM_SIZE.
OStringBuffer m_aStylesAssocHich
void WriteAnnotationMarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
void TextLineBreak(const SwFormatLineBreak &rLineBreak) override
RES_TXTATR_LINEBREAK, i.e. clearing breaks.
void FieldVanish(const OUString &rText, ww::eField eType, OUString const *pBookmarkName) override
OStringBuffer m_aSectionHeaders
void SectionRtlGutter(const SfxBoolItem &rRtlGutter) override
RES_RTL_GUTTER.
std::unique_ptr< SwWriteTable > m_pTableWrt
void ParaHangingPunctuation(const SfxBoolItem &rItem) override
Sfx item RES_PARATR_HANGINGPUNCTUATION.
std::map< sal_uInt32, sal_uInt32 > m_aCells
Number of cells from the table definition, by depth.
void TextFootnote_Impl(const SwFormatFootnote &rFootnote) override
Sfx item RES_TXTATR_FTN.
void SectionFormProtection(bool bProtected) override
Protection of forms.
void ParaSplit(const SvxFormatSplitItem &rSplit) override
Sfx item RES_PARATR_SPLIT.
void CharRotate(const SvxCharRotateItem &rRotate) override
Sfx item RES_CHRATR_ROTATE.
void RawText(const OUString &rText, rtl_TextEncoding eCharSet) override
Output text (without markup).
void SectionType(sal_uInt8 nBreakCode) override
The type of breaking.
void FormatDrop(const SwTextNode &rNode, const SwFormatDrop &rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override
void CharFontSizeCJK(const SvxFontHeightItem &rFontSize) override
Sfx item RES_CHRATR_CJK_FONTSIZE.
void NumberingDefinition(sal_uInt16 nId, const SwNumRule &rRule) override
Definition of a numbering instance.
OStringBuffer & GetTabStop()
void CharCaseMap(const SvxCaseMapItem &rCaseMap) override
Sfx item Sfx item RES_CHRATR_CASEMAP.
void StartFont(std::u16string_view rFamilyName) const
Start the font.
void WriteExpand(const SwField *pField) override
Write the expanded field.
void ParaGrabBag(const SfxGrabBagItem &rItem) override
Sfx item RES_PARATR_GRABBAG.
void CharIdctHint(const SfxPoolItem &rItem) override
Sfx item RES_CHRATR_IdctHint.
void StartParagraphProperties() override
Called before we start outputting the attributes.
void TableBidi(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void EndSection() override
End of the section properties.
void FormatLineNumbering(const SwFormatLineNumber &rNumbering) override
Sfx item RES_LINENUMBER.
void ParaWidows(const SvxWidowsItem &rWidows) override
Sfx item RES_PARATR_WIDOWS.
void BulletDefinition(int nId, const Graphic &rGraphic, Size aSize) override
Exports the definition (image, size) of a single numbering picture bullet.
void CharPostureCJK(const SvxPostureItem &rPosture) override
Sfx item RES_CHRATR_CJK_POSTURE.
void EndStyles(sal_uInt16 nNumberOfStyles) override
End of the styles table.
const SwPageDesc * GetPrevPageDesc() const
void InitTableHelper(const ww8::WW8TableNodeInfoInner::Pointer_t &pTableTextNodeInfoInner)
void Redline(const SwRedlineData *pRedline) override
Output redlining.
const Size * m_pFlyFrameSize
When exporting fly frames, this holds the real size of the frame.
void EmptyParagraph() override
Empty paragraph.
void StartTableRow(const ww8::WW8TableNodeInfoInner::Pointer_t &pTableTextNodeInfoInner)
void EndRunProperties(const SwRedlineData *pRedlineData) override
Called after we end outputting the attributes.
void CharHighlight(const SvxBrushItem &rBrush) override
Sfx item RES_CHRATR_HIGHLIGHT.
void ParaOutlineLevel(const SfxUInt16Item &rItem) override
Sfx item RES_PARATR_OUTLINELEVEL.
const SwPageDesc * m_pPrevPageDesc
Access to the page style of the previous paragraph.
void TableInfoCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
sal_Int32 StartParagraph(ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, bool bGenerateParaId) override
Start of the paragraph.
void CharRelief(const SvxCharReliefItem &rRelief) override
Sfx item RES_CHRATR_RELIEF.
void EndFont() const
End the font.
void FontCharset(sal_uInt8 nCharSet) const
Font charset.
std::stack< OUString > m_aURLs
If we're in the process of exporting a hyperlink, then its URL.
void FormatKeep(const SvxFormatKeepItem &rItem) override
Sfx item RES_KEEP.
void CharEmphasisMark(const SvxEmphasisMarkItem &rEmphasisMark) override
Sfx item RES_CHRATR_EMPHASIS_MARK.
void ParaTabStop(const SvxTabStopItem &rTabStop) override
Sfx item RES_PARATR_TABSTOP.
void TableVerticalCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void CharLanguageCTL(const SvxLanguageItem &rLanguageItem) override
Sfx item RES_CHRATR_CTL_LANGUAGE.
OStringBuffer m_aStylesAssocDbch
void ParaHyphenZone(const SvxHyphenZoneItem &rHyphenZone) override
Sfx item RES_PARATR_HYPHENZONE.
void CharAutoKern(const SvxAutoKernItem &rAutoKern) override
Sfx item RES_CHRATR_AUTOKERN.
void ParaSnapToGrid(const SvxParaGridItem &rItem) override
Sfx item RES_PARATR_SNAPTOGRID.
void ParaForbiddenRules(const SfxBoolItem &rItem) override
Sfx item RES_PARATR_FORBIDDEN_RULES.
void TableBackgrounds(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void TableDefaultBorders(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void TableNodeInfoInner(ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner) override
void SectionBiDi(bool bBiDi) override
Columns populated from right/numbers on the right side?
void FlyFrameOLE(const SwFlyFrameFormat *pFlyFrameFormat, SwOLENode &rOLENode, const Size &rSize)
void StartStyles() override
Start of the styles table.
void SectionLineNumbering(sal_uLong nRestartNo, const SwLineNumberInfo &rLnNumInfo) override
Numbering of the lines in the document.
void StartStyle(const OUString &rName, StyleType eType, sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nSlot, bool bAutoUpdate) override
Start of a style in the styles table.
void TablePositioning(SwFrameFormat *pFlyFormat)
void FinishTableRowCell(const ww8::WW8TableNodeInfoInner::Pointer_t &pInner)
End cell, row, and even the entire table if necessary.
OStringBuffer & RunText()
void RTLAndCJKState(bool bIsRTL, sal_uInt16 nScript) override
Export the state of RTL/CJK.
void FormatTextGrid(const SwTextGridItem &rItem) override
Sfx item RES_TEXTGRID.
void SectionBreak(sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo *pSectionInfo=nullptr, bool bExtraPageBreak=false) override
Write a section break msword::ColumnBreak or msword::PageBreak.
void SectionPageBorders(const SwFrameFormat *pFormat, const SwFrameFormat *pFirstPageFormat) override
Description of the page borders.
The class that does all the actual RTF export-related work.
Definition: rtfexport.hxx:37
Contains a buffered string or graphic during RTF export.
Wrapper around OStringBuffers, so less hexdump of graphics have to be kept in memory during RTF expor...
save the current run state around exporting things that contain paragraphs themselves like text frame...
Base class of all fields.
Definition: fldbas.hxx:296
FlyAnchors.
Definition: fmtanchr.hxx:37
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
Defines the horizontal position of a fly frame.
Definition: fmtornt.hxx:73
SfxPoolItem subclass that wraps an SwLineBreakClear.
Contains the line numbering properties of this paragraph.
Definition: fmtline.hxx:33
Defines the vertical position of a fly frame.
Definition: fmtornt.hxx:37
Style of a layout element.
Definition: frmfmt.hxx:72
< purpose of derivation from SwClient: character style for displaying the numbers.
Definition: lineinfo.hxx:39
Base class of the Writer document model elements.
Definition: node.hxx:98
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
Make exporting a Writer Frame easy.
std::shared_ptr< WW8TableNodeInfoInner > Pointer_t
std::shared_ptr< WW8TableNodeInfo > Pointer_t
Collects and outputs fonts.
Definition: wrtww8.hxx:297
FontPitch
FontFamily
static bool bFootnote
Definition: insfnote.cxx:33
StyleType
sal_uIntPtr sal_uLong
SvxAdjust
tools::Long SwTwips
Definition: swtypes.hxx:51
unsigned char sal_uInt8
FieldFlags
Definition: wrtww8.hxx:143