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) override;
89
90 // Access to (anyway) private buffers, used by the sdr exporter
91 OStringBuffer& RunText();
92 OString MoveCharacterProperties(bool aAutoWriteRtlLtr = false);
93
95 void RawText(const OUString& rText, rtl_TextEncoding eCharSet) override;
96
98 void StartRuby(const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby) override;
99
101 void EndRuby(const SwTextNode& rNode, sal_Int32 nPos) override;
102
104 bool StartURL(const OUString& rUrl, const OUString& rTarget) override;
105
107 bool EndURL(bool isAtEndOfParagraph) override;
108
109 void FieldVanish(const OUString& rText, ww::eField eType,
110 OUString const* pBookmarkName) override;
111
115 void Redline(const SwRedlineData* pRedline) override;
116
117 void FormatDrop(const SwTextNode& rNode, const SwFormatDrop& rSwFormatDrop, sal_uInt16 nStyle,
119 ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override;
120
122 void ParagraphStyle(sal_uInt16 nStyle) override;
123
124 void TableInfoCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
125 void TableInfoRow(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
126 void TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
127 void
128 TableDefaultBorders(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
129 void TableBackgrounds(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
130 void TableRowRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
131 void TableCellRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
132 void TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
133 void TableCanSplit(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
134 void TableBidi(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
135 void TableVerticalCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
136 void TableNodeInfoInner(ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner) override;
137 void TableOrientation(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
138 void TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
139 void TableRowEnd(sal_uInt32 nDepth) override;
140
142 void StartStyles() override;
143
145 void EndStyles(sal_uInt16 nNumberOfStyles) override;
146
148 void DefaultStyle() override;
149
151 void StartStyle(const OUString& rName, StyleType eType, sal_uInt16 nBase, sal_uInt16 nNext,
152 sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nId, bool bAutoUpdate) override;
153
155 void EndStyle() override;
156
158 void StartStyleProperties(bool bParProp, sal_uInt16 nStyle) override;
159
161 void EndStyleProperties(bool bParProp) override;
162
164 void OutlineNumbering(sal_uInt8 nLvl) override;
165
168 void PageBreakBefore(bool bBreak) override;
169
172 void SectionBreak(sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo* pSectionInfo = nullptr,
173 bool bExtraPageBreak = false) override;
174
176 void StartSection() override;
177
179 void EndSection() override;
180
182 void SectionFormProtection(bool bProtected) override;
183
185 void SectionLineNumbering(sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo) override;
186
188 void SectionTitlePage() override;
189
191 void SectionPageBorders(const SwFrameFormat* pFormat,
192 const SwFrameFormat* pFirstPageFormat) override;
193
195 void SectionBiDi(bool bBiDi) override;
196
199 void SectionPageNumbering(sal_uInt16 nNumType,
200 const ::std::optional<sal_uInt16>& oPageRestartNumber) override;
201
203 void SectionType(sal_uInt8 nBreakCode) override;
204
205 void SectFootnoteEndnotePr() override;
206
207 void WriteFootnoteEndnotePr(bool bFootnote, const SwEndNoteInfo& rInfo);
208
210 void NumberingDefinition(sal_uInt16 nId, const SwNumRule& rRule) override;
211
213 void StartAbstractNumbering(sal_uInt16 nId) override;
214
216 void EndAbstractNumbering() override;
217
219 void
220 NumberingLevel(sal_uInt8 nLevel, sal_uInt16 nStart, sal_uInt16 nNumberingType,
221 SvxAdjust eAdjust, const sal_uInt8* pNumLvlPos, sal_uInt8 nFollow,
222 const wwFont* pFont, const SfxItemSet* pOutSet, sal_Int16 nIndentAt,
223 sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos,
224 const OUString& rNumberingString,
225 const SvxBrushItem* pBrush) override; //For i120928,to export graphic of bullet
226
227 void WriteField_Impl(const SwField* pField, ww::eField eType, const OUString& rFieldCmd,
228 FieldFlags nMode);
229 void WriteBookmarks_Impl(std::vector<OUString>& rStarts, std::vector<OUString>& rEnds);
230 void WriteAnnotationMarks_Impl(std::vector<OUString>& rStarts, std::vector<OUString>& rEnds);
231 void WriteHeaderFooter_Impl(const SwFrameFormat& rFormat, bool bHeader, const char* pStr,
232 bool bTitlepg);
233 void WriteBookmarkInActParagraph(const OUString& /*rName*/, sal_Int32 /*nFirstRunPos*/,
234 sal_Int32 /*nLastRunPos*/) override{};
235
236protected:
238 void OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Point& rNdTopLeft) override;
239
241 void CharCaseMap(const SvxCaseMapItem& rCaseMap) override;
242
244 void CharColor(const SvxColorItem& rColor) override;
245
247 void CharContour(const SvxContourItem& rContour) override;
248
250 void CharCrossedOut(const SvxCrossedOutItem& rCrossedOut) override;
251
253 void CharEscapement(const SvxEscapementItem& rEscapement) override;
254
256 void CharFont(const SvxFontItem& rFont) override;
257
259 void CharFontSize(const SvxFontHeightItem& rFontSize) override;
260
262 void CharKerning(const SvxKerningItem& rKerning) override;
263
265 void CharLanguage(const SvxLanguageItem& rLanguage) override;
266
268 void CharPosture(const SvxPostureItem& rPosture) override;
269
271 void CharShadow(const SvxShadowedItem& rShadow) override;
272
274 void CharUnderline(const SvxUnderlineItem& rUnderline) override;
275
277 void CharWeight(const SvxWeightItem& rWeight) override;
278
280 void CharAutoKern(const SvxAutoKernItem& rAutoKern) override;
281
283 void CharAnimatedText(const SvxBlinkItem& rBlink) override;
284
286 void CharBackground(const SvxBrushItem& rBrush) override;
287
289 void CharFontCJK(const SvxFontItem& rFont) override;
290
292 void CharFontSizeCJK(const SvxFontHeightItem& rFontSize) override;
293
295 void CharLanguageCJK(const SvxLanguageItem& rLanguageItem) override;
296
298 void CharPostureCJK(const SvxPostureItem& rPosture) override;
299
301 void CharWeightCJK(const SvxWeightItem& rWeight) override;
302
304 void CharFontCTL(const SvxFontItem& rFont) override;
305
307 void CharFontSizeCTL(const SvxFontHeightItem& rFontSize) override;
308
310 void CharLanguageCTL(const SvxLanguageItem& rLanguageItem) override;
311
313 void CharPostureCTL(const SvxPostureItem& rPosture) override;
314
316 void CharWeightCTL(const SvxWeightItem& rWeight) override;
317
319 void CharBidiRTL(const SfxPoolItem& rItem) override;
320
322 void CharIdctHint(const SfxPoolItem& rItem) override;
323
325 void CharRotate(const SvxCharRotateItem& rRotate) override;
326
328 void CharEmphasisMark(const SvxEmphasisMarkItem& rEmphasisMark) override;
329
331 void CharTwoLines(const SvxTwoLinesItem& rTwoLines) override;
332
334 void CharScaleWidth(const SvxCharScaleWidthItem& rScaleWidth) override;
335
337 void CharRelief(const SvxCharReliefItem& rRelief) override;
338
340 void CharHidden(const SvxCharHiddenItem& rHidden) override;
341
343 void CharBorder(const ::editeng::SvxBorderLine* pAllBorder, sal_uInt16 nDist,
344 bool bShadow) override;
345
347 void CharHighlight(const SvxBrushItem& rBrush) override;
348
350 void TextINetFormat(const SwFormatINetFormat& rURL) override;
351
353 void TextCharFormat(const SwFormatCharFormat& rCharFormat) override;
354
356 void TextFootnote_Impl(const SwFormatFootnote& rFootnote) override;
357
359 void ParaLineSpacing_Impl(short nSpace, short nMulti) override;
360
362 void ParaAdjust(const SvxAdjustItem& rAdjust) override;
363
365 void ParaSplit(const SvxFormatSplitItem& rSplit) override;
366
368 void ParaWidows(const SvxWidowsItem& rWidows) override;
369
371 void ParaTabStop(const SvxTabStopItem& rTabStop) override;
372
374 void ParaHyphenZone(const SvxHyphenZoneItem& rHyphenZone) override;
375
377 void ParaNumRule_Impl(const SwTextNode* pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) override;
378
380 void ParaScriptSpace(const SfxBoolItem& rScriptSpace) override;
381
383 void ParaHangingPunctuation(const SfxBoolItem& rItem) override;
384
386 void ParaForbiddenRules(const SfxBoolItem& rItem) override;
387
389 void ParaVerticalAlign(const SvxParaVertAlignItem& rAlign) override;
390
392 void ParaSnapToGrid(const SvxParaGridItem& rItem) override;
393
395 void FormatFrameSize(const SwFormatFrameSize& rSize) override;
396
398 void FormatPaperBin(const SvxPaperBinItem& rItem) override;
399
401 void FormatLRSpace(const SvxLRSpaceItem& rLRSpace) override;
402
404 void FormatULSpace(const SvxULSpaceItem& rULSpace) override;
405
407 void FormatSurround(const SwFormatSurround& rSurround) override;
408
410 void FormatVertOrientation(const SwFormatVertOrient& rFlyVert) override;
411
413 void FormatHorizOrientation(const SwFormatHoriOrient& rFlyHori) override;
414
416 void FormatAnchor(const SwFormatAnchor& rAnchor) override;
417
419 void FormatBackground(const SvxBrushItem& rBrush) override;
420
422 void FormatFillStyle(const XFillStyleItem& rFillStyle) override;
423
425 void FormatFillGradient(const XFillGradientItem& rFillGradient) override;
426
428 void FormatBox(const SvxBoxItem& rBox) override;
429
431 void FormatColumns_Impl(sal_uInt16 nCols, const SwFormatCol& rCol, bool bEven,
432 SwTwips nPageSize) override;
433
435 void FormatKeep(const SvxFormatKeepItem& rItem) override;
436
438 void FormatTextGrid(const SwTextGridItem& rItem) override;
439
441 void FormatLineNumbering(const SwFormatLineNumber& rNumbering) override;
442
444 void FormatFrameDirection(const SvxFrameDirectionItem& rDirection) override;
445
447 void ParaGrabBag(const SfxGrabBagItem& rItem) override;
448
450 void CharGrabBag(const SfxGrabBagItem& rItem) override;
451
453 void ParaOutlineLevel(const SfxUInt16Item& rItem) override;
454
456 void WriteExpand(const SwField* pField) override;
457
458 void RefField(const SwField& rField, const OUString& rRef) override;
459 void HiddenField(const SwField& rField) override;
460 void SetField(const SwField& rField, ww::eField eType, const OUString& rCmd) override;
461 void PostitField(const SwField* pField) override;
462 bool DropdownField(const SwField* pField) override;
463 bool PlaceholderField(const SwField* pField) override;
464
465 void SectionRtlGutter(const SfxBoolItem& rRtlGutter) override;
466
467 void TextLineBreak(const SwFormatLineBreak& rLineBreak) override;
468
469private:
472
473 OStringBuffer m_aTabStop;
474
477
479 void FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode);
480 void FlyFrameOLE(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
481 const Size& rSize);
482 void FlyFrameOLEReplacement(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
483 const Size& rSize);
485 bool FlyFrameOLEMath(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
486 const Size& rSize);
487
488 /*
489 * Table methods.
490 */
491 void InitTableHelper(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
492 void StartTable();
493 void StartTableRow(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
494 void StartTableCell();
495 void TableCellProperties(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
496 void EndTableCell();
497 void EndTableRow();
498 void EndTable();
499
502
503 void WriteTextFootnoteNumStr(const SwFormatFootnote& rFootnote);
504
505 /*
506 * Current style name and its ID.
507 */
508 OUString m_rStyleName;
509 sal_uInt16 m_nStyleId;
510 /*
511 * Current list ID.
512 */
513 sal_uInt16 m_nListId;
514 /*
515 * This is needed because the call order is: run text, run properties, paragraph properties.
516 * What we need is the opposite.
517 */
520 /*
521 * This is written after runs.
522 */
523 OStringBuffer m_aAfterRuns;
524 /*
525 * Same for colors and stylesheets: first we just want to output colors,
526 * need to buffer the stylesheet table to output it after the color one.
527 */
528 OStringBuffer m_aStylesheet;
529 /*
530 * This one just holds the style commands in the current style.
531 */
532 OStringBuffer m_aStyles;
533 /*
534 * This is the same as m_aStyles but the contents of it is Assoc.
535 */
536 OStringBuffer m_aStylesAssocHich;
537 OStringBuffer m_aStylesAssocDbch;
538 OStringBuffer m_aStylesAssocRtlch;
539 OStringBuffer m_aStylesAssocLtrch;
540
542 sal_uInt16 m_nScript;
544
548 std::map<OString, sal_Int32> m_rOpenedAnnotationMarksIds;
549
550 /*
551 * The current table helper.
552 */
553 std::unique_ptr<SwWriteTable> m_pTableWrt;
554
555 /*
556 * Remember if we are in an open cell, or not.
557 */
559
560 /*
561 * Remember the current table depth.
562 */
563 sal_uInt32 m_nTableDepth;
564
565 /*
566 * Remember if we wrote a \cell or not.
567 */
569
570 /*
571 * For late output of row definitions.
572 */
573 OStringBuffer m_aRowDefs;
574
575 /*
576 * Is a column break needed after the next \par?
577 */
579
580 /*
581 * If section breaks should be buffered to m_aSectionBreaks
582 */
584 OStringBuffer m_aSectionBreaks;
585
586 /*
587 * If section headers (and footers) should be buffered to
588 * m_aSectionHeaders.
589 */
591 OStringBuffer m_aSectionHeaders;
592
593 /*
594 * Support for starting multiple tables at the same cell.
595 * If the current table is the last started one.
596 */
598 /*
599 * List of already started but not yet defined tables (need to be defined
600 * after the nested tables).
601 */
602 std::vector<OString> m_aTables;
603 /*
604 * If cell info is already output.
605 */
607
610
612 std::map<sal_uInt32, sal_uInt32> m_aCells;
613
615
618
620
622
624 std::map<sal_uInt16, const SwPostItField*> m_aPostitFields;
625
628
629 std::vector<std::pair<OString, OString>> m_aFlyProperties;
630
631 std::optional<css::drawing::FillStyle> m_oFillStyle;
632
634 std::stack<OUString> m_aURLs;
635
644
646
647public:
648 explicit RtfAttributeOutput(RtfExport& rExport);
649
651
653 MSWordExportBase& GetExport() override;
654
655 // These are used by wwFont::WriteRtf()
657 void StartFont(const OUString& rFamilyName) const;
658
660 void EndFont() const;
661
663 void FontAlternateName(const OUString& rName) const;
664
666 void FontCharset(sal_uInt8 nCharSet) const;
667
669 void FontFamilyType(FontFamily eFamily, const wwFont& rFont) const;
670
672 void FontPitchType(FontPitch ePitch) const;
673
674 void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) override;
675
677 void writeTextFrame(const ww8::Frame& rFrame, bool bTextBox = false);
678
679 OStringBuffer& GetTabStop() { return m_aTabStop; }
680
681 const SwPageDesc* GetPrevPageDesc() const { return m_pPrevPageDesc; }
682};
683
684#endif // INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
685
686/* 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.
void SectFootnoteEndnotePr() override
for footnote/endnote section properties
OStringBuffer m_aStylesAssocRtlch
void HiddenField(const SwField &rField) override
void FontAlternateName(const OUString &rName) const
Alternate name for the font.
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 WriteField_Impl(const SwField *pField, ww::eField eType, const OUString &rFieldCmd, FieldFlags nMode)
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.
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 StartFont(const OUString &rFamilyName) const
Start the font.
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 StartStyle(const OUString &rName, StyleType eType, sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nId, bool bAutoUpdate) override
Start of a style in the styles table.
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 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 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.
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 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) override
All the numbering level information.
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 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 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:292
FlyAnchors.
Definition: fmtanchr.hxx:37
If SwFormatDrop is a Client, it is the CharFormat that describes the font for the DropCaps.
Definition: paratr.hxx:63
SfxPoolItem subclass that wraps an SwLineBreakClear.
Style of a layout element.
Definition: frmfmt.hxx:62
< 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:84
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:89
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