Mark some visible strings in ui files as translatable
[LibreOffice.git] / sw / source / filter / ww8 / rtfattributeoutput.hxx
blobf6fc8c388dffc83d8f1de27947170c15e8b4f6d2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
23 #include <memory>
24 #include <com/sun/star/drawing/FillStyle.hpp>
26 #include "attributeoutputbase.hxx"
27 #include "rtfstringbuffer.hxx"
29 #include <wrtswtbl.hxx>
31 #include <rtl/strbuf.hxx>
32 #include <editeng/boxitem.hxx>
33 #include <unotools/securityoptions.hxx>
35 #include <optional>
37 class SwGrfNode;
38 class SwOLENode;
39 class SwFlyFrameFormat;
40 class RtfExport;
42 /// The class that has handlers for various resource types when exporting as RTF
43 class RtfAttributeOutput : public AttributeOutputBase
45 friend class RtfStringBufferValue;
46 friend class SaveRunState;
48 public:
49 /// Export the state of RTL/CJK.
50 void RTLAndCJKState(bool bIsRTL, sal_uInt16 nScript) override;
52 /// Start of the paragraph.
53 sal_Int32 StartParagraph(const ww8::WW8TableNodeInfo::Pointer_t& pTextNodeInfo,
54 bool bGenerateParaId) override;
56 /// End of the paragraph.
57 void EndParagraph(const ww8::WW8TableNodeInfoInner::Pointer_t& pTextNodeInfoInner) override;
59 /// Empty paragraph.
60 void EmptyParagraph() override;
62 /// Called in order to output section breaks.
63 void SectionBreaks(const SwNode& rNode) override;
65 /// Called before we start outputting the attributes.
66 void StartParagraphProperties() override;
68 /// Called after we end outputting the attributes.
69 void EndParagraphProperties(const SfxItemSet& rParagraphMarkerProperties,
70 const SwRedlineData* pRedlineData,
71 const SwRedlineData* pRedlineParagraphMarkerDeleted,
72 const SwRedlineData* pRedlineParagraphMarkerInserted) override;
74 /// Start of the text run.
75 void StartRun(const SwRedlineData* pRedlineData, sal_Int32 nPos,
76 bool bSingleEmptyRun = false) override;
78 /// End of the text run.
79 void EndRun(const SwTextNode* pNode, sal_Int32 nPos, sal_Int32 nLen,
80 bool bLastRun = false) override;
82 /// Called before we start outputting the attributes.
83 void StartRunProperties() override;
85 /// Called after we end outputting the attributes.
86 void EndRunProperties(const SwRedlineData* pRedlineData) override;
88 /// Output text (inside a run).
89 void RunText(const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8,
90 const OUString& rSymbolFont = OUString()) override;
92 // Access to (anyway) private buffers, used by the sdr exporter
93 OStringBuffer& RunText();
94 OString MoveCharacterProperties(bool aAutoWriteRtlLtr = false);
96 /// Output text (without markup).
97 void RawText(const OUString& rText, rtl_TextEncoding eCharSet) override;
99 /// Output ruby start.
100 void StartRuby(const SwTextNode& rNode, sal_Int32 nPos, const SwFormatRuby& rRuby) override;
102 /// Output ruby end.
103 void EndRuby(const SwTextNode& rNode, sal_Int32 nPos) override;
105 /// Output URL start.
106 bool StartURL(const OUString& rUrl, const OUString& rTarget,
107 const OUString& rName = OUString()) override;
109 /// Output URL end.
110 bool EndURL(bool isAtEndOfParagraph) override;
112 void FieldVanish(const OUString& rText, ww::eField eType,
113 OUString const* pBookmarkName) override;
115 /// Output redlining.
117 /// The common attribute that can be among the run properties.
118 void Redline(const SwRedlineData* pRedline) override;
120 void FormatDrop(const SwTextNode& rNode, const SwFormatDrop& rSwFormatDrop, sal_uInt16 nStyle,
121 ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo,
122 ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override;
124 /// Output style.
125 void ParagraphStyle(sal_uInt16 nStyle) override;
127 void
128 TableInfoCell(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
129 void
130 TableInfoRow(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
131 void
132 TableDefinition(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
133 void TablePositioning(SwFrameFormat* pFlyFormat);
134 void TableDefaultBorders(
135 const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
136 void
137 TableBackgrounds(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
138 void
139 TableRowRedline(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
140 void
141 TableCellRedline(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
142 void TableHeight(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
143 void
144 TableCanSplit(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
145 void TableBidi(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
146 void TableVerticalCell(
147 const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
148 void TableNodeInfoInner(const ww8::WW8TableNodeInfoInner::Pointer_t& pNodeInfoInner) override;
149 void
150 TableOrientation(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
151 void
152 TableSpacing(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner) override;
153 void TableRowEnd(sal_uInt32 nDepth) override;
155 /// Start of the styles table.
156 void StartStyles() override;
158 /// End of the styles table.
159 void EndStyles(sal_uInt16 nNumberOfStyles) override;
161 /// Write default style.
162 void DefaultStyle() override;
164 /// Start of a style in the styles table.
165 void StartStyle(const OUString& rName, StyleType eType, sal_uInt16 nBase, sal_uInt16 nNext,
166 sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nSlot,
167 bool bAutoUpdate) override;
169 /// End of a style in the styles table.
170 void EndStyle() override;
172 /// Start of (paragraph or run) properties of a style.
173 void StartStyleProperties(bool bParProp, sal_uInt16 nStyle) override;
175 /// End of (paragraph or run) properties of a style.
176 void EndStyleProperties(bool bParProp) override;
178 /// Numbering rule and Id.
179 void OutlineNumbering(sal_uInt8 nLvl) override;
181 /// Page break
182 /// As a paragraph property - the paragraph should be on the next page.
183 void PageBreakBefore(bool bBreak) override;
185 /// Write a section break
186 /// msword::ColumnBreak or msword::PageBreak
187 void SectionBreak(sal_uInt8 nC, bool bBreakAfter, const WW8_SepInfo* pSectionInfo = nullptr,
188 bool bExtraPageBreak = false) override;
190 /// Start of the section properties.
191 void StartSection() override;
193 /// End of the section properties.
194 void EndSection() override;
196 /// Protection of forms.
197 void SectionFormProtection(bool bProtected) override;
199 /// Numbering of the lines in the document.
200 void SectionLineNumbering(sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo) override;
202 /// Has different headers/footers for the title page.
203 void SectionTitlePage() override;
205 /// Description of the page borders.
206 void SectionPageBorders(const SwFrameFormat* pFormat,
207 const SwFrameFormat* pFirstPageFormat) override;
209 /// Columns populated from right/numbers on the right side?
210 void SectionBiDi(bool bBiDi) override;
212 /// The style of the page numbers.
214 void SectionPageNumbering(sal_uInt16 nNumType,
215 const ::std::optional<sal_uInt16>& oPageRestartNumber) override;
217 /// The type of breaking.
218 void SectionType(sal_uInt8 nBreakCode) override;
220 void SectFootnoteEndnotePr() override;
222 void WriteFootnoteEndnotePr(bool bFootnote, const SwEndNoteInfo& rInfo);
224 /// Definition of a numbering instance.
225 void NumberingDefinition(sal_uInt16 nId, const SwNumRule& rRule) override;
227 /// Start of the abstract numbering definition instance.
228 void StartAbstractNumbering(sal_uInt16 nId) override;
230 /// End of the abstract numbering definition instance.
231 void EndAbstractNumbering() override;
233 /// All the numbering level information.
234 void NumberingLevel(sal_uInt8 nLevel, sal_uInt16 nStart, sal_uInt16 nNumberingType,
235 SvxAdjust eAdjust, const sal_uInt8* pNumLvlPos, sal_uInt8 nFollow,
236 const wwFont* pFont, const SfxItemSet* pOutSet, sal_Int16 nIndentAt,
237 sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos,
238 const OUString& rNumberingString,
239 const SvxBrushItem* pBrush, //For i120928,to export graphic of bullet
240 bool isLegal) override;
242 void WriteField_Impl(const SwField* pField, ww::eField eType, std::u16string_view rFieldCmd,
243 FieldFlags nMode);
244 void WriteBookmarks_Impl(std::vector<OUString>& rStarts, std::vector<OUString>& rEnds);
245 void WriteAnnotationMarks_Impl(std::vector<OUString>& rStarts, std::vector<OUString>& rEnds);
246 void WriteHeaderFooter_Impl(const SwFrameFormat& rFormat, bool bHeader, const char* pStr,
247 bool bTitlepg);
248 void WriteBookmarkInActParagraph(const OUString& /*rName*/, sal_Int32 /*nFirstRunPos*/,
249 sal_Int32 /*nLastRunPos*/) override{};
251 protected:
252 /// Output frames - the implementation.
253 void OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Point& rNdTopLeft) override;
255 /// Sfx item Sfx item RES_CHRATR_CASEMAP
256 void CharCaseMap(const SvxCaseMapItem& rCaseMap) override;
258 /// Sfx item Sfx item RES_CHRATR_COLOR
259 void CharColor(const SvxColorItem& rColor) override;
261 /// Sfx item Sfx item RES_CHRATR_CONTOUR
262 void CharContour(const SvxContourItem& rContour) override;
264 /// Sfx item RES_CHRATR_CROSSEDOUT
265 void CharCrossedOut(const SvxCrossedOutItem& rCrossedOut) override;
267 /// Sfx item RES_CHRATR_ESCAPEMENT
268 void CharEscapement(const SvxEscapementItem& rEscapement) override;
270 /// Sfx item RES_CHRATR_FONT
271 void CharFont(const SvxFontItem& rFont) override;
273 /// Sfx item RES_CHRATR_FONTSIZE
274 void CharFontSize(const SvxFontHeightItem& rFontSize) override;
276 /// Sfx item RES_CHRATR_KERNING
277 void CharKerning(const SvxKerningItem& rKerning) override;
279 /// Sfx item RES_CHRATR_LANGUAGE
280 void CharLanguage(const SvxLanguageItem& rLanguage) override;
282 /// Sfx item RES_CHRATR_POSTURE
283 void CharPosture(const SvxPostureItem& rPosture) override;
285 /// Sfx item RES_CHRATR_SHADOWED
286 void CharShadow(const SvxShadowedItem& rShadow) override;
288 /// Sfx item RES_CHRATR_UNDERLINE
289 void CharUnderline(const SvxUnderlineItem& rUnderline) override;
291 /// Sfx item RES_CHRATR_WEIGHT
292 void CharWeight(const SvxWeightItem& rWeight) override;
294 /// Sfx item RES_CHRATR_AUTOKERN
295 void CharAutoKern(const SvxAutoKernItem& rAutoKern) override;
297 /// Sfx item RES_CHRATR_BLINK
298 void CharAnimatedText(const SvxBlinkItem& rBlink) override;
300 /// Sfx item RES_CHRATR_BACKGROUND
301 void CharBackground(const SvxBrushItem& rBrush) override;
303 /// Sfx item RES_CHRATR_CJK_FONT
304 void CharFontCJK(const SvxFontItem& rFont) override;
306 /// Sfx item RES_CHRATR_CJK_FONTSIZE
307 void CharFontSizeCJK(const SvxFontHeightItem& rFontSize) override;
309 /// Sfx item RES_CHRATR_CJK_LANGUAGE
310 void CharLanguageCJK(const SvxLanguageItem& rLanguageItem) override;
312 /// Sfx item RES_CHRATR_CJK_POSTURE
313 void CharPostureCJK(const SvxPostureItem& rPosture) override;
315 /// Sfx item RES_CHRATR_CJK_WEIGHT
316 void CharWeightCJK(const SvxWeightItem& rWeight) override;
318 /// Sfx item RES_CHRATR_CTL_FONT
319 void CharFontCTL(const SvxFontItem& rFont) override;
321 /// Sfx item RES_CHRATR_CTL_FONTSIZE
322 void CharFontSizeCTL(const SvxFontHeightItem& rFontSize) override;
324 /// Sfx item RES_CHRATR_CTL_LANGUAGE
325 void CharLanguageCTL(const SvxLanguageItem& rLanguageItem) override;
327 /// Sfx item RES_CHRATR_CTL_POSTURE
328 void CharPostureCTL(const SvxPostureItem& rPosture) override;
330 /// Sfx item RES_CHRATR_CTL_WEIGHT
331 void CharWeightCTL(const SvxWeightItem& rWeight) override;
333 /// Sfx item RES_CHRATR_BidiRTL
334 void CharBidiRTL(const SfxPoolItem& rItem) override;
336 /// Sfx item RES_CHRATR_IdctHint
337 void CharIdctHint(const SfxPoolItem& rItem) override;
339 /// Sfx item RES_CHRATR_ROTATE
340 void CharRotate(const SvxCharRotateItem& rRotate) override;
342 /// Sfx item RES_CHRATR_EMPHASIS_MARK
343 void CharEmphasisMark(const SvxEmphasisMarkItem& rEmphasisMark) override;
345 /// Sfx item RES_CHRATR_TWO_LINES
346 void CharTwoLines(const SvxTwoLinesItem& rTwoLines) override;
348 /// Sfx item RES_CHRATR_SCALEW
349 void CharScaleWidth(const SvxCharScaleWidthItem& rScaleWidth) override;
351 /// Sfx item RES_CHRATR_RELIEF
352 void CharRelief(const SvxCharReliefItem& rRelief) override;
354 /// Sfx item RES_CHRATR_HIDDEN
355 void CharHidden(const SvxCharHiddenItem& rHidden) override;
357 /// Sfx item RES_CHRATR_BOX
358 void CharBorder(const ::editeng::SvxBorderLine* pAllBorder, sal_uInt16 nDist,
359 bool bShadow) override;
361 /// Sfx item RES_CHRATR_HIGHLIGHT
362 void CharHighlight(const SvxBrushItem& rBrush) override;
364 /// Sfx item RES_TXTATR_INETFMT
365 void TextINetFormat(const SwFormatINetFormat& rURL) override;
367 /// Sfx item RES_TXTATR_CHARFMT
368 void TextCharFormat(const SwFormatCharFormat& rCharFormat) override;
370 /// Sfx item RES_TXTATR_FTN
371 void TextFootnote_Impl(const SwFormatFootnote& rFootnote) override;
373 /// Sfx item RES_PARATR_LINESPACING
374 void ParaLineSpacing_Impl(short nSpace, short nMulti) override;
376 /// Sfx item RES_PARATR_ADJUST
377 void ParaAdjust(const SvxAdjustItem& rAdjust) override;
379 /// Sfx item RES_PARATR_SPLIT
380 void ParaSplit(const SvxFormatSplitItem& rSplit) override;
382 /// Sfx item RES_PARATR_WIDOWS
383 void ParaWidows(const SvxWidowsItem& rWidows) override;
385 /// Sfx item RES_PARATR_TABSTOP
386 void ParaTabStop(const SvxTabStopItem& rTabStop) override;
388 /// Sfx item RES_PARATR_HYPHENZONE
389 void ParaHyphenZone(const SvxHyphenZoneItem& rHyphenZone) override;
391 /// Sfx item RES_PARATR_NUMRULE
392 void ParaNumRule_Impl(const SwTextNode* pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) override;
394 /// Sfx item RES_PARATR_SCRIPTSPACE
395 void ParaScriptSpace(const SfxBoolItem& rScriptSpace) override;
397 /// Sfx item RES_PARATR_HANGINGPUNCTUATION
398 void ParaHangingPunctuation(const SfxBoolItem& rItem) override;
400 /// Sfx item RES_PARATR_FORBIDDEN_RULES
401 void ParaForbiddenRules(const SfxBoolItem& rItem) override;
403 /// Sfx item RES_PARATR_VERTALIGN
404 void ParaVerticalAlign(const SvxParaVertAlignItem& rAlign) override;
406 /// Sfx item RES_PARATR_SNAPTOGRID
407 void ParaSnapToGrid(const SvxParaGridItem& rItem) override;
409 /// Sfx item RES_FRM_SIZE
410 void FormatFrameSize(const SwFormatFrameSize& rSize) override;
412 /// Sfx item RES_PAPER_BIN
413 void FormatPaperBin(const SvxPaperBinItem& rItem) override;
415 /// Sfx item RES_MARGIN_FIRSTLINE
416 virtual void FormatFirstLineIndent(const SvxFirstLineIndentItem& rFirstLine) override;
417 /// Sfx item RES_MARGIN_TEXTLEFT
418 virtual void FormatTextLeftMargin(const SvxTextLeftMarginItem& rTextLeftMargin) override;
419 /// Sfx item RES_MARGIN_RIGHT
420 virtual void FormatRightMargin(const SvxRightMarginItem& rRightMargin) override;
422 /// Sfx item RES_LR_SPACE
423 void FormatLRSpace(const SvxLRSpaceItem& rLRSpace) override;
425 /// Sfx item RES_UL_SPACE
426 void FormatULSpace(const SvxULSpaceItem& rULSpace) override;
428 /// Sfx item RES_SURROUND
429 void FormatSurround(const SwFormatSurround& rSurround) override;
431 /// Sfx item RES_VERT_ORIENT
432 void FormatVertOrientation(const SwFormatVertOrient& rFlyVert) override;
434 /// Sfx item RES_HORI_ORIENT
435 void FormatHorizOrientation(const SwFormatHoriOrient& rFlyHori) override;
437 /// Sfx item RES_ANCHOR
438 void FormatAnchor(const SwFormatAnchor& rAnchor) override;
440 /// Sfx item RES_BACKGROUND
441 void FormatBackground(const SvxBrushItem& rBrush) override;
443 /// Sfx item RES_FILL_STYLE
444 void FormatFillStyle(const XFillStyleItem& rFillStyle) override;
446 /// Sfx item RES_FILL_GRADIENT
447 void FormatFillGradient(const XFillGradientItem& rFillGradient) override;
449 /// Sfx item RES_BOX
450 void FormatBox(const SvxBoxItem& rBox) override;
452 /// Sfx item RES_COL
453 void FormatColumns_Impl(sal_uInt16 nCols, const SwFormatCol& rCol, bool bEven,
454 SwTwips nPageSize) override;
456 /// Sfx item RES_KEEP
457 void FormatKeep(const SvxFormatKeepItem& rItem) override;
459 /// Sfx item RES_TEXTGRID
460 void FormatTextGrid(const SwTextGridItem& rItem) override;
462 /// Sfx item RES_LINENUMBER
463 void FormatLineNumbering(const SwFormatLineNumber& rNumbering) override;
465 /// Sfx item RES_FRAMEDIR
466 void FormatFrameDirection(const SvxFrameDirectionItem& rDirection) override;
468 /// Sfx item RES_PARATR_GRABBAG
469 void ParaGrabBag(const SfxGrabBagItem& rItem) override;
471 /// Sfx item RES_CHRATR_GRABBAG
472 void CharGrabBag(const SfxGrabBagItem& rItem) override;
474 /// Sfx item RES_PARATR_OUTLINELEVEL
475 void ParaOutlineLevel(const SfxUInt16Item& rItem) override;
477 /// Write the expanded field
478 void WriteExpand(const SwField* pField) override;
480 void RefField(const SwField& rField, const OUString& rRef) override;
481 void HiddenField(const SwField& rField) override;
482 void SetField(const SwField& rField, ww::eField eType, const OUString& rCmd) override;
483 void PostitField(const SwField* pField) override;
484 bool DropdownField(const SwField* pField) override;
485 bool PlaceholderField(const SwField* pField) override;
487 void SectionRtlGutter(const SfxBoolItem& rRtlGutter) override;
489 void TextLineBreak(const SwFormatLineBreak& rLineBreak) override;
491 private:
492 /// Reference to the export, where to get the data from
493 RtfExport& m_rExport;
495 OStringBuffer m_aTabStop;
497 /// Access to the page style of the previous paragraph.
498 const SwPageDesc* m_pPrevPageDesc;
500 /// Output graphic fly frames.
501 void FlyFrameGraphic(const SwFlyFrameFormat* pFlyFrameFormat, const SwGrfNode* pGrfNode);
502 void FlyFrameOLE(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
503 const Size& rSize);
504 void FlyFrameOLEReplacement(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
505 const Size& rSize);
506 /// Math export.
507 bool FlyFrameOLEMath(const SwFlyFrameFormat* pFlyFrameFormat, SwOLENode& rOLENode,
508 const Size& rSize);
511 * Table methods.
513 void InitTableHelper(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
514 void StartTable();
515 void StartTableRow(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
516 void StartTableCell();
517 void TableCellProperties(const ww8::WW8TableNodeInfoInner::Pointer_t& pTableTextNodeInfoInner);
518 void EndTableCell();
519 void EndTableRow();
520 void EndTable();
522 /// End cell, row, and even the entire table if necessary.
523 void FinishTableRowCell(const ww8::WW8TableNodeInfoInner::Pointer_t& pInner);
525 void WriteTextFootnoteNumStr(const SwFormatFootnote& rFootnote);
528 * Current style name and its ID.
530 OUString m_rStyleName;
531 sal_uInt16 m_nStyleId;
533 * Current list ID.
535 sal_uInt16 m_nListId;
537 * This is needed because the call order is: run text, run properties, paragraph properties.
538 * What we need is the opposite.
540 RtfStringBuffer m_aRun;
541 RtfStringBuffer m_aRunText;
543 * This is written after runs.
545 OStringBuffer m_aAfterRuns;
547 * Same for colors and stylesheets: first we just want to output colors,
548 * need to buffer the stylesheet table to output it after the color one.
550 OStringBuffer m_aStylesheet;
552 * This one just holds the style commands in the current style.
554 OStringBuffer m_aStyles;
556 * This is the same as m_aStyles but the contents of it is Assoc.
558 OStringBuffer m_aStylesAssocHich;
559 OStringBuffer m_aStylesAssocDbch;
560 OStringBuffer m_aStylesAssocRtlch;
561 OStringBuffer m_aStylesAssocLtrch;
563 bool m_bIsRTL;
564 sal_uInt16 m_nScript;
565 bool m_bControlLtrRtl;
567 sal_Int32 m_nNextAnnotationMarkId;
568 sal_Int32 m_nCurrentAnnotationMarkId;
569 /// Maps annotation mark names to ID's.
570 std::map<OString, sal_Int32> m_rOpenedAnnotationMarksIds;
573 * The current table helper.
575 std::unique_ptr<SwWriteTable> m_pTableWrt;
578 * Remember if we are in an open cell, or not.
580 bool m_bTableCellOpen;
583 * Remember the current table depth.
585 sal_uInt32 m_nTableDepth;
588 * Remember if we wrote a \cell or not.
590 bool m_bTableAfterCell;
593 * For late output of row definitions.
595 OStringBuffer m_aRowDefs;
598 * Is a column break needed after the next \par?
600 bool m_nColBreakNeeded;
603 * If section breaks should be buffered to m_aSectionBreaks
605 bool m_bBufferSectionBreaks;
606 OStringBuffer m_aSectionBreaks;
609 * If section headers (and footers) should be buffered to
610 * m_aSectionHeaders.
612 bool m_bBufferSectionHeaders;
613 OStringBuffer m_aSectionHeaders;
616 * Support for starting multiple tables at the same cell.
617 * If the current table is the last started one.
619 bool m_bLastTable;
621 * List of already started but not yet defined tables (need to be defined
622 * after the nested tables).
624 std::vector<OString> m_aTables;
626 * If cell info is already output.
628 bool m_bWroteCellInfo;
630 /// If we ended a table row without starting a new one.
631 bool m_bTableRowEnded;
633 /// Number of cells from the table definition, by depth.
634 std::map<sal_uInt32, sal_uInt32> m_aCells;
636 bool m_bIsBeforeFirstParagraph;
638 /// If we're in a paragraph that has a single empty run only.
639 bool m_bSingleEmptyRun;
641 bool m_bInRun;
643 bool m_bInRuby;
645 /// Maps ID's to postit fields, used in atrfstart/end and atnref.
646 std::map<sal_uInt16, const SwPostItField*> m_aPostitFields;
648 /// When exporting fly frames, this holds the real size of the frame.
649 const Size* m_pFlyFrameSize;
651 std::vector<std::pair<OString, OString>> m_aFlyProperties;
653 std::optional<css::drawing::FillStyle> m_oFillStyle;
655 /// If we're in the process of exporting a hyperlink, then its URL.
656 std::stack<OUString> m_aURLs;
658 /// If original file had \sbauto.
659 bool m_bParaBeforeAutoSpacing;
660 /// If m_bParaBeforeAutoSpacing is set, value of \sb.
661 sal_Int32 m_nParaBeforeSpacing;
662 /// If original file had \saauto.
663 bool m_bParaAfterAutoSpacing;
664 /// If m_bParaBeforeAutoSpacing is set, value of \sa.
665 sal_Int32 m_nParaAfterSpacing;
667 editeng::WordPageMargins m_aPageMargins;
669 public:
670 explicit RtfAttributeOutput(RtfExport& rExport);
672 ~RtfAttributeOutput() override;
674 /// Return the right export class.
675 MSWordExportBase& GetExport() override;
677 // These are used by wwFont::WriteRtf()
678 /// Start the font.
679 void StartFont(std::u16string_view rFamilyName) const;
681 /// End the font.
682 void EndFont() const;
684 /// Alternate name for the font.
685 void FontAlternateName(std::u16string_view rName) const;
687 /// Font charset.
688 void FontCharset(sal_uInt8 nCharSet) const;
690 /// Font family.
691 void FontFamilyType(FontFamily eFamily, const wwFont& rFont) const;
693 /// Font pitch.
694 void FontPitchType(FontPitch ePitch) const;
696 void BulletDefinition(int nId, const Graphic& rGraphic, Size aSize) override;
698 /// Handles just the {\shptxt ...} part of a shape export.
699 void writeTextFrame(const ww8::Frame& rFrame, bool bTextBox = false);
701 OStringBuffer& GetTabStop() { return m_aTabStop; }
703 const SwPageDesc* GetPrevPageDesc() const { return m_pPrevPageDesc; }
706 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
708 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */