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
129 TableDefaultBorders(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
130 void TableBackgrounds(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
131 void TableRowRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
132 void TableCellRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
133 void TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
134 void TableCanSplit(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
135 void TableBidi(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
136 void TableVerticalCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
137 void TableNodeInfoInner(ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner) override;
138 void TableOrientation(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
139 void TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override;
140 void TableRowEnd(sal_uInt32 nDepth) override;
141
143 void StartStyles() override;
144
146 void EndStyles(sal_uInt16 nNumberOfStyles) override;
147
149 void DefaultStyle() override;
150
152 void StartStyle(const OUString& rName, StyleType eType, sal_uInt16 nBase, sal_uInt16 nNext,
153 sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nSlot,
154 bool bAutoUpdate) override;
155
157 void EndStyle() override;
158
160 void StartStyleProperties(bool bParProp, sal_uInt16 nStyle) override;
161
163 void EndStyleProperties(bool bParProp) override;
164
166 void OutlineNumbering(sal_uInt8 nLvl) override;
167
170 void PageBreakBefore(bool bBreak) override;
171
174 void SectionBreak(sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo* pSectionInfo = nullptr,
175 bool bExtraPageBreak = false) override;
176
178 void StartSection() override;
179
181 void EndSection() override;
182
184 void SectionFormProtection(bool bProtected) override;
185
187 void SectionLineNumbering(sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo) override;
188
190 void SectionTitlePage() override;
191
193 void SectionPageBorders(const SwFrameFormat* pFormat,
194 const SwFrameFormat* pFirstPageFormat) override;
195
197 void SectionBiDi(bool bBiDi) override;
198
201 void SectionPageNumbering(sal_uInt16 nNumType,
202 const ::std::optional<sal_uInt16>& oPageRestartNumber) override;
203
205 void SectionType(sal_uInt8 nBreakCode) override;
206
207 void SectFootnoteEndnotePr() override;
208
209 void WriteFootnoteEndnotePr(bool bFootnote, const SwEndNoteInfo& rInfo);
210
212 void NumberingDefinition(sal_uInt16 nId, const SwNumRule& rRule) override;
213
215 void StartAbstractNumbering(sal_uInt16 nId) override;
216
218 void EndAbstractNumbering() override;
219
221 void
222 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) override; //For i120928,to export graphic of bullet
228
229 void WriteField_Impl(const SwField* pField, ww::eField eType, const OUString& rFieldCmd,
230 FieldFlags nMode);
231 void WriteBookmarks_Impl(std::vector<OUString>& rStarts, std::vector<OUString>& rEnds);
232 void WriteAnnotationMarks_Impl(std::vector<OUString>& rStarts, std::vector<OUString>& rEnds);
233 void WriteHeaderFooter_Impl(const SwFrameFormat& rFormat, bool bHeader, const char* pStr,
234 bool bTitlepg);
235 void WriteBookmarkInActParagraph(const OUString& /*rName*/, sal_Int32 /*nFirstRunPos*/,
236 sal_Int32 /*nLastRunPos*/) override{};
237
238protected:
240 void OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Point& rNdTopLeft) override;
241
243 void CharCaseMap(const SvxCaseMapItem& rCaseMap) override;
244
246 void CharColor(const SvxColorItem& rColor) override;
247
249 void CharContour(const SvxContourItem& rContour) override;
250
252 void CharCrossedOut(const SvxCrossedOutItem& rCrossedOut) override;
253
255 void CharEscapement(const SvxEscapementItem& rEscapement) override;
256
258 void CharFont(const SvxFontItem& rFont) override;
259
261 void CharFontSize(const SvxFontHeightItem& rFontSize) override;
262
264 void CharKerning(const SvxKerningItem& rKerning) override;
265
267 void CharLanguage(const SvxLanguageItem& rLanguage) override;
268
270 void CharPosture(const SvxPostureItem& rPosture) override;
271
273 void CharShadow(const SvxShadowedItem& rShadow) override;
274
276 void CharUnderline(const SvxUnderlineItem& rUnderline) override;
277
279 void CharWeight(const SvxWeightItem& rWeight) override;
280
282 void CharAutoKern(const SvxAutoKernItem& rAutoKern) override;
283
285 void CharAnimatedText(const SvxBlinkItem& rBlink) override;
286
288 void CharBackground(const SvxBrushItem& rBrush) override;
289
291 void CharFontCJK(const SvxFontItem& rFont) override;
292
294 void CharFontSizeCJK(const SvxFontHeightItem& rFontSize) override;
295
297 void CharLanguageCJK(const SvxLanguageItem& rLanguageItem) override;
298
300 void CharPostureCJK(const SvxPostureItem& rPosture) override;
301
303 void CharWeightCJK(const SvxWeightItem& rWeight) override;
304
306 void CharFontCTL(const SvxFontItem& rFont) override;
307
309 void CharFontSizeCTL(const SvxFontHeightItem& rFontSize) override;
310
312 void CharLanguageCTL(const SvxLanguageItem& rLanguageItem) override;
313
315 void CharPostureCTL(const SvxPostureItem& rPosture) override;
316
318 void CharWeightCTL(const SvxWeightItem& rWeight) override;
319
321 void CharBidiRTL(const SfxPoolItem& rItem) override;
322
324 void CharIdctHint(const SfxPoolItem& rItem) override;
325
327 void CharRotate(const SvxCharRotateItem& rRotate) override;
328
330 void CharEmphasisMark(const SvxEmphasisMarkItem& rEmphasisMark) override;
331
333 void CharTwoLines(const SvxTwoLinesItem& rTwoLines) override;
334
336 void CharScaleWidth(const SvxCharScaleWidthItem& rScaleWidth) override;
337
339 void CharRelief(const SvxCharReliefItem& rRelief) override;
340
342 void CharHidden(const SvxCharHiddenItem& rHidden) override;
343
345 void CharBorder(const ::editeng::SvxBorderLine* pAllBorder, sal_uInt16 nDist,
346 bool bShadow) override;
347
349 void CharHighlight(const SvxBrushItem& rBrush) override;
350
352 void TextINetFormat(const SwFormatINetFormat& rURL) override;
353
355 void TextCharFormat(const SwFormatCharFormat& rCharFormat) override;
356
358 void TextFootnote_Impl(const SwFormatFootnote& rFootnote) override;
359
361 void ParaLineSpacing_Impl(short nSpace, short nMulti) override;
362
364 void ParaAdjust(const SvxAdjustItem& rAdjust) override;
365
367 void ParaSplit(const SvxFormatSplitItem& rSplit) override;
368
370 void ParaWidows(const SvxWidowsItem& rWidows) override;
371
373 void ParaTabStop(const SvxTabStopItem& rTabStop) override;
374
376 void ParaHyphenZone(const SvxHyphenZoneItem& rHyphenZone) override;
377
379 void ParaNumRule_Impl(const SwTextNode* pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) override;
380
382 void ParaScriptSpace(const SfxBoolItem& rScriptSpace) override;
383
385 void ParaHangingPunctuation(const SfxBoolItem& rItem) override;
386
388 void ParaForbiddenRules(const SfxBoolItem& rItem) override;
389
391 void ParaVerticalAlign(const SvxParaVertAlignItem& rAlign) override;
392
394 void ParaSnapToGrid(const SvxParaGridItem& rItem) override;
395
397 void FormatFrameSize(const SwFormatFrameSize& rSize) override;
398
400 void FormatPaperBin(const SvxPaperBinItem& rItem) override;
401
403 void FormatLRSpace(const SvxLRSpaceItem& rLRSpace) override;
404
406 void FormatULSpace(const SvxULSpaceItem& rULSpace) override;
407
409 void FormatSurround(const SwFormatSurround& rSurround) override;
410
412 void FormatVertOrientation(const SwFormatVertOrient& rFlyVert) override;
413
415 void FormatHorizOrientation(const SwFormatHoriOrient& rFlyHori) override;
416
418 void FormatAnchor(const SwFormatAnchor& rAnchor) override;
419
421 void FormatBackground(const SvxBrushItem& rBrush) override;
422
424 void FormatFillStyle(const XFillStyleItem& rFillStyle) override;
425
427 void FormatFillGradient(const XFillGradientItem& rFillGradient) override;
428
430 void FormatBox(const SvxBoxItem& rBox) override;
431
433 void FormatColumns_Impl(sal_uInt16 nCols, const SwFormatCol& rCol, bool bEven,
434 SwTwips nPageSize) override;
435
437 void FormatKeep(const SvxFormatKeepItem& rItem) override;
438
440 void FormatTextGrid(const SwTextGridItem& rItem) override;
441
443 void FormatLineNumbering(const SwFormatLineNumber& rNumbering) override;
444
446 void FormatFrameDirection(const SvxFrameDirectionItem& rDirection) override;
447
449 void ParaGrabBag(const SfxGrabBagItem& rItem) override;
450
452 void CharGrabBag(const SfxGrabBagItem& rItem) override;
453
455 void ParaOutlineLevel(const SfxUInt16Item& rItem) override;
456
458 void WriteExpand(const SwField* pField) override;
459
460 void RefField(const SwField& rField, const OUString& rRef) override;
461 void HiddenField(const SwField& rField) override;
462 void SetField(const SwField& rField, ww::eField eType, const OUString& rCmd) override;
463 void PostitField(const SwField* pField) override;
464 bool DropdownField(const SwField* pField) override;
465 bool PlaceholderField(const SwField* pField) override;
466
467 void SectionRtlGutter(const SfxBoolItem& rRtlGutter) override;
468
469 void TextLineBreak(const SwFormatLineBreak& rLineBreak) override;
470
471private:
474
475 OStringBuffer m_aTabStop;
476
479
481 void FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode);
482 void FlyFrameOLE(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
483 const Size& rSize);
484 void FlyFrameOLEReplacement(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
485 const Size& rSize);
487 bool FlyFrameOLEMath(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
488 const Size& rSize);
489
490 /*
491 * Table methods.
492 */
493 void InitTableHelper(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
494 void StartTable();
495 void StartTableRow(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
496 void StartTableCell();
497 void TableCellProperties(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
498 void EndTableCell();
499 void EndTableRow();
500 void EndTable();
501
504
505 void WriteTextFootnoteNumStr(const SwFormatFootnote& rFootnote);
506
507 /*
508 * Current style name and its ID.
509 */
510 OUString m_rStyleName;
511 sal_uInt16 m_nStyleId;
512 /*
513 * Current list ID.
514 */
515 sal_uInt16 m_nListId;
516 /*
517 * This is needed because the call order is: run text, run properties, paragraph properties.
518 * What we need is the opposite.
519 */
522 /*
523 * This is written after runs.
524 */
525 OStringBuffer m_aAfterRuns;
526 /*
527 * Same for colors and stylesheets: first we just want to output colors,
528 * need to buffer the stylesheet table to output it after the color one.
529 */
530 OStringBuffer m_aStylesheet;
531 /*
532 * This one just holds the style commands in the current style.
533 */
534 OStringBuffer m_aStyles;
535 /*
536 * This is the same as m_aStyles but the contents of it is Assoc.
537 */
538 OStringBuffer m_aStylesAssocHich;
539 OStringBuffer m_aStylesAssocDbch;
540 OStringBuffer m_aStylesAssocRtlch;
541 OStringBuffer m_aStylesAssocLtrch;
542
544 sal_uInt16 m_nScript;
546
550 std::map<OString, sal_Int32> m_rOpenedAnnotationMarksIds;
551
552 /*
553 * The current table helper.
554 */
555 std::unique_ptr<SwWriteTable> m_pTableWrt;
556
557 /*
558 * Remember if we are in an open cell, or not.
559 */
561
562 /*
563 * Remember the current table depth.
564 */
565 sal_uInt32 m_nTableDepth;
566
567 /*
568 * Remember if we wrote a \cell or not.
569 */
571
572 /*
573 * For late output of row definitions.
574 */
575 OStringBuffer m_aRowDefs;
576
577 /*
578 * Is a column break needed after the next \par?
579 */
581
582 /*
583 * If section breaks should be buffered to m_aSectionBreaks
584 */
586 OStringBuffer m_aSectionBreaks;
587
588 /*
589 * If section headers (and footers) should be buffered to
590 * m_aSectionHeaders.
591 */
593 OStringBuffer m_aSectionHeaders;
594
595 /*
596 * Support for starting multiple tables at the same cell.
597 * If the current table is the last started one.
598 */
600 /*
601 * List of already started but not yet defined tables (need to be defined
602 * after the nested tables).
603 */
604 std::vector<OString> m_aTables;
605 /*
606 * If cell info is already output.
607 */
609
612
614 std::map<sal_uInt32, sal_uInt32> m_aCells;
615
617
620
622
624
626 std::map<sal_uInt16, const SwPostItField*> m_aPostitFields;
627
630
631 std::vector<std::pair<OString, OString>> m_aFlyProperties;
632
633 std::optional<css::drawing::FillStyle> m_oFillStyle;
634
636 std::stack<OUString> m_aURLs;
637
646
648
649public:
650 explicit RtfAttributeOutput(RtfExport& rExport);
651
653
655 MSWordExportBase& GetExport() override;
656
657 // These are used by wwFont::WriteRtf()
659 void StartFont(const OUString& rFamilyName) const;
660
662 void EndFont() const;
663
665 void FontAlternateName(const OUString& rName) const;
666
668 void FontCharset(sal_uInt8 nCharSet) const;
669
671 void FontFamilyType(FontFamily eFamily, const wwFont& rFont) const;
672
674 void FontPitchType(FontPitch ePitch) const;
675
676 void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) override;
677
679 void writeTextFrame(const ww8::Frame& rFrame, bool bTextBox = false);
680
681 OStringBuffer& GetTabStop() { return m_aTabStop; }
682
683 const SwPageDesc* GetPrevPageDesc() const { return m_pPrevPageDesc; }
684};
685
686#endif // INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
687
688/* 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 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 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 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:293
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
Defines the horizontal position of a fly frame.
Definition: fmtornt.hxx:73
SfxPoolItem subclass that wraps an SwLineBreakClear.
Defines the vertical position of a fly frame.
Definition: fmtornt.hxx:37
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:98
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:111
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