20#ifndef INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
21#define INCLUDED_SW_SOURCE_FILTER_WW8_RTFATTRIBUTEOUTPUT_HXX
24#include <com/sun/star/drawing/FillStyle.hpp>
31#include <rtl/strbuf.hxx>
53 bool bGenerateParaId)
override;
71 const SwRedlineData* pRedlineParagraphMarkerInserted)
override;
75 bool bSingleEmptyRun =
false)
override;
79 bool bLastRun =
false)
override;
88 void RunText(
const OUString& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8,
89 const OUString& rSymbolFont = OUString())
override;
96 void RawText(
const OUString& rText, rtl_TextEncoding eCharSet)
override;
105 bool StartURL(
const OUString& rUrl,
const OUString& rTarget)
override;
108 bool EndURL(
bool isAtEndOfParagraph)
override;
111 OUString
const* pBookmarkName)
override;
147 void EndStyles(sal_uInt16 nNumberOfStyles)
override;
153 void StartStyle(
const OUString& rName,
StyleType eType, sal_uInt16 nBase, sal_uInt16 nNext,
154 sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nSlot,
155 bool bAutoUpdate)
override;
176 bool bExtraPageBreak =
false)
override;
203 const ::std::optional<sal_uInt16>& oPageRestartNumber)
override;
225 sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos,
226 const OUString& rNumberingString,
228 bool isLegal)
override;
237 sal_Int32 )
override{};
346 void CharBorder(const ::editeng::SvxBorderLine* pAllBorder, sal_uInt16 nDist,
347 bool bShadow)
override;
667 void StartFont(std::u16string_view rFamilyName)
const;
Base class for WW8Export and DocxExport.
The class that has handlers for various resource types when exporting as RTF.
void OutlineNumbering(sal_uInt8 nLvl) override
Numbering rule and Id.
void RefField(const SwField &rField, const OUString &rRef) override
void TableCellRedline(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void CharKerning(const SvxKerningItem &rKerning) override
Sfx item RES_CHRATR_KERNING.
void CharFontSizeCTL(const SvxFontHeightItem &rFontSize) override
Sfx item RES_CHRATR_CTL_FONTSIZE.
void FormatFillGradient(const XFillGradientItem &rFillGradient) override
Sfx item RES_FILL_GRADIENT.
RtfExport & m_rExport
Reference to the export, where to get the data from.
void TableDefinition(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void CharEscapement(const SvxEscapementItem &rEscapement) override
Sfx item RES_CHRATR_ESCAPEMENT.
virtual void FormatTextLeftMargin(const SvxTextLeftMarginItem &rTextLeftMargin) override
Sfx item RES_MARGIN_TEXTLEFT.
void SectFootnoteEndnotePr() override
for footnote/endnote section properties
OStringBuffer m_aStylesAssocRtlch
void HiddenField(const SwField &rField) override
void FormatFillStyle(const XFillStyleItem &rFillStyle) override
Sfx item RES_FILL_STYLE.
void FormatBox(const SvxBoxItem &rBox) override
Sfx item RES_BOX.
void ParaLineSpacing_Impl(short nSpace, short nMulti) override
Sfx item RES_PARATR_LINESPACING.
editeng::WordPageMargins m_aPageMargins
void CharLanguage(const SvxLanguageItem &rLanguage) override
Sfx item RES_CHRATR_LANGUAGE.
void PageBreakBefore(bool bBreak) override
Page break As a paragraph property - the paragraph should be on the next page.
void FormatULSpace(const SvxULSpaceItem &rULSpace) override
Sfx item RES_UL_SPACE.
void CharBackground(const SvxBrushItem &rBrush) override
Sfx item RES_CHRATR_BACKGROUND.
void StartRuby(const SwTextNode &rNode, sal_Int32 nPos, const SwFormatRuby &rRuby) override
Output ruby start.
void CharBorder(const ::editeng::SvxBorderLine *pAllBorder, sal_uInt16 nDist, bool bShadow) override
Sfx item RES_CHRATR_BOX.
void ParaNumRule_Impl(const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) override
Sfx item RES_PARATR_NUMRULE.
void TextCharFormat(const SwFormatCharFormat &rCharFormat) override
Sfx item RES_TXTATR_CHARFMT.
void CharHidden(const SvxCharHiddenItem &rHidden) override
Sfx item RES_CHRATR_HIDDEN.
void CharWeightCJK(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_CJK_WEIGHT.
void FlyFrameOLEReplacement(const SwFlyFrameFormat *pFlyFrameFormat, SwOLENode &rOLENode, const Size &rSize)
void CharWeightCTL(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_CTL_WEIGHT.
void NumberingLevel(sal_uInt8 nLevel, sal_uInt16 nStart, sal_uInt16 nNumberingType, SvxAdjust eAdjust, const sal_uInt8 *pNumLvlPos, sal_uInt8 nFollow, const wwFont *pFont, const SfxItemSet *pOutSet, sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex, sal_Int16 nListTabPos, const OUString &rNumberingString, const SvxBrushItem *pBrush, bool isLegal) override
All the numbering level information.
void FormatHorizOrientation(const SwFormatHoriOrient &rFlyHori) override
Sfx item RES_HORI_ORIENT.
bool PlaceholderField(const SwField *pField) override
void SectionTitlePage() override
Has different headers/footers for the title page.
void EndStyleProperties(bool bParProp) override
End of (paragraph or run) properties of a style.
void WriteFootnoteEndnotePr(bool bFootnote, const SwEndNoteInfo &rInfo)
sal_Int32 m_nParaAfterSpacing
If m_bParaBeforeAutoSpacing is set, value of.
sal_Int32 m_nParaBeforeSpacing
If m_bParaBeforeAutoSpacing is set, value of \sb.
void EndRuby(const SwTextNode &rNode, sal_Int32 nPos) override
Output ruby end.
bool m_bParaBeforeAutoSpacing
If original file had \sbauto.
void FontPitchType(FontPitch ePitch) const
Font pitch.
virtual void FormatFirstLineIndent(const SvxFirstLineIndentItem &rFirstLine) override
Sfx item RES_MARGIN_FIRSTLINE.
void EndRun(const SwTextNode *pNode, sal_Int32 nPos, sal_Int32 nLen, bool bLastRun=false) override
End of the text run.
MSWordExportBase & GetExport() override
Return the right export class.
void FormatAnchor(const SwFormatAnchor &rAnchor) override
Sfx item RES_ANCHOR.
void SectionPageNumbering(sal_uInt16 nNumType, const ::std::optional< sal_uInt16 > &oPageRestartNumber) override
The style of the page numbers.
void SetField(const SwField &rField, ww::eField eType, const OUString &rCmd) override
bool m_bBufferSectionHeaders
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)
bool m_bIsBeforeFirstParagraph
OStringBuffer m_aStylesAssocLtrch
void PostitField(const SwField *pField) override
void FontAlternateName(std::u16string_view rName) const
Alternate name for the font.
void ParagraphStyle(sal_uInt16 nStyle) override
Output style.
std::map< sal_uInt16, const SwPostItField * > m_aPostitFields
Maps ID's to postit fields, used in atrfstart/end and atnref.
void FormatFrameDirection(const SvxFrameDirectionItem &rDirection) override
Sfx item RES_FRAMEDIR.
void EndParagraph(ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override
End of the paragraph.
void WriteBookmarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
void DefaultStyle() override
Write default style.
void CharBidiRTL(const SfxPoolItem &rItem) override
Sfx item RES_CHRATR_BidiRTL.
void CharPosture(const SvxPostureItem &rPosture) override
Sfx item RES_CHRATR_POSTURE.
std::vector< OString > m_aTables
void CharContour(const SvxContourItem &rContour) override
Sfx item Sfx item RES_CHRATR_CONTOUR.
bool EndURL(bool isAtEndOfParagraph) override
Output URL end.
bool m_bTableRowEnded
If we ended a table row without starting a new one.
std::map< OString, sal_Int32 > m_rOpenedAnnotationMarksIds
Maps annotation mark names to ID's.
std::vector< std::pair< OString, OString > > m_aFlyProperties
std::optional< css::drawing::FillStyle > m_oFillStyle
void StartStyleProperties(bool bParProp, sal_uInt16 nStyle) override
Start of (paragraph or run) properties of a style.
void WriteField_Impl(const SwField *pField, ww::eField eType, std::u16string_view rFieldCmd, FieldFlags nMode)
void CharFontCTL(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_CTL_FONT.
sal_Int32 m_nNextAnnotationMarkId
void CharGrabBag(const SfxGrabBagItem &rItem) override
Sfx item RES_CHRATR_GRABBAG.
bool FlyFrameOLEMath(const SwFlyFrameFormat *pFlyFrameFormat, SwOLENode &rOLENode, const Size &rSize)
Math export.
OStringBuffer m_aSectionBreaks
OString MoveCharacterProperties(bool aAutoWriteRtlLtr=false)
void TableInfoRow(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void ParaAdjust(const SvxAdjustItem &rAdjust) override
Sfx item RES_PARATR_ADJUST.
RtfAttributeOutput(RtfExport &rExport)
void SectionBreaks(const SwNode &rNode) override
Called in order to output section breaks.
virtual void FormatRightMargin(const SvxRightMarginItem &rRightMargin) override
Sfx item RES_MARGIN_RIGHT.
void TextINetFormat(const SwFormatINetFormat &rURL) override
Sfx item RES_TXTATR_INETFMT.
void OutputFlyFrame_Impl(const ww8::Frame &rFrame, const Point &rNdTopLeft) override
Output frames - the implementation.
void ParaScriptSpace(const SfxBoolItem &rScriptSpace) override
Sfx item RES_PARATR_SCRIPTSPACE.
void CharTwoLines(const SvxTwoLinesItem &rTwoLines) override
Sfx item RES_CHRATR_TWO_LINES.
void CharCrossedOut(const SvxCrossedOutItem &rCrossedOut) override
Sfx item RES_CHRATR_CROSSEDOUT.
void FormatBackground(const SvxBrushItem &rBrush) override
Sfx item RES_BACKGROUND.
bool m_bBufferSectionBreaks
void TableCanSplit(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void CharFont(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_FONT.
void TableOrientation(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void CharColor(const SvxColorItem &rColor) override
Sfx item Sfx item RES_CHRATR_COLOR.
void WriteBookmarkInActParagraph(const OUString &, sal_Int32, sal_Int32) override
Insert a bookmark inside the currently processed paragraph.
void StartSection() override
Start of the section properties.
void EndParagraphProperties(const SfxItemSet &rParagraphMarkerProperties, const SwRedlineData *pRedlineData, const SwRedlineData *pRedlineParagraphMarkerDeleted, const SwRedlineData *pRedlineParagraphMarkerInserted) override
Called after we end outputting the attributes.
sal_Int32 m_nCurrentAnnotationMarkId
bool m_bSingleEmptyRun
If we're in a paragraph that has a single empty run only.
void FormatSurround(const SwFormatSurround &rSurround) override
Sfx item RES_SURROUND.
void FontFamilyType(FontFamily eFamily, const wwFont &rFont) const
Font family.
void FormatFrameSize(const SwFormatFrameSize &rSize) override
Sfx item RES_FRM_SIZE.
OStringBuffer m_aStylesAssocHich
void WriteAnnotationMarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
void TextLineBreak(const SwFormatLineBreak &rLineBreak) override
RES_TXTATR_LINEBREAK, i.e. clearing breaks.
void FieldVanish(const OUString &rText, ww::eField eType, OUString const *pBookmarkName) override
OStringBuffer m_aSectionHeaders
void SectionRtlGutter(const SfxBoolItem &rRtlGutter) override
RES_RTL_GUTTER.
std::unique_ptr< SwWriteTable > m_pTableWrt
void ParaHangingPunctuation(const SfxBoolItem &rItem) override
Sfx item RES_PARATR_HANGINGPUNCTUATION.
std::map< sal_uInt32, sal_uInt32 > m_aCells
Number of cells from the table definition, by depth.
void TextFootnote_Impl(const SwFormatFootnote &rFootnote) override
Sfx item RES_TXTATR_FTN.
void SectionFormProtection(bool bProtected) override
Protection of forms.
void ParaSplit(const SvxFormatSplitItem &rSplit) override
Sfx item RES_PARATR_SPLIT.
void CharRotate(const SvxCharRotateItem &rRotate) override
Sfx item RES_CHRATR_ROTATE.
void RawText(const OUString &rText, rtl_TextEncoding eCharSet) override
Output text (without markup).
OStringBuffer m_aStylesheet
void SectionType(sal_uInt8 nBreakCode) override
The type of breaking.
void FormatDrop(const SwTextNode &rNode, const SwFormatDrop &rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override
void CharFontSizeCJK(const SvxFontHeightItem &rFontSize) override
Sfx item RES_CHRATR_CJK_FONTSIZE.
void NumberingDefinition(sal_uInt16 nId, const SwNumRule &rRule) override
Definition of a numbering instance.
OStringBuffer & GetTabStop()
void CharCaseMap(const SvxCaseMapItem &rCaseMap) override
Sfx item Sfx item RES_CHRATR_CASEMAP.
void StartFont(std::u16string_view rFamilyName) const
Start the font.
void WriteExpand(const SwField *pField) override
Write the expanded field.
void ParaGrabBag(const SfxGrabBagItem &rItem) override
Sfx item RES_PARATR_GRABBAG.
void CharIdctHint(const SfxPoolItem &rItem) override
Sfx item RES_CHRATR_IdctHint.
void StartParagraphProperties() override
Called before we start outputting the attributes.
void TableBidi(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void EndSection() override
End of the section properties.
void FormatLineNumbering(const SwFormatLineNumber &rNumbering) override
Sfx item RES_LINENUMBER.
void ParaWidows(const SvxWidowsItem &rWidows) override
Sfx item RES_PARATR_WIDOWS.
void BulletDefinition(int nId, const Graphic &rGraphic, Size aSize) override
Exports the definition (image, size) of a single numbering picture bullet.
void CharPostureCJK(const SvxPostureItem &rPosture) override
Sfx item RES_CHRATR_CJK_POSTURE.
void EndStyles(sal_uInt16 nNumberOfStyles) override
End of the styles table.
const SwPageDesc * GetPrevPageDesc() const
void InitTableHelper(const ww8::WW8TableNodeInfoInner::Pointer_t &pTableTextNodeInfoInner)
void Redline(const SwRedlineData *pRedline) override
Output redlining.
const Size * m_pFlyFrameSize
When exporting fly frames, this holds the real size of the frame.
void EmptyParagraph() override
Empty paragraph.
void StartTableRow(const ww8::WW8TableNodeInfoInner::Pointer_t &pTableTextNodeInfoInner)
void EndRunProperties(const SwRedlineData *pRedlineData) override
Called after we end outputting the attributes.
void CharHighlight(const SvxBrushItem &rBrush) override
Sfx item RES_CHRATR_HIGHLIGHT.
void ParaOutlineLevel(const SfxUInt16Item &rItem) override
Sfx item RES_PARATR_OUTLINELEVEL.
const SwPageDesc * m_pPrevPageDesc
Access to the page style of the previous paragraph.
void TableInfoCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
sal_Int32 StartParagraph(ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, bool bGenerateParaId) override
Start of the paragraph.
void CharRelief(const SvxCharReliefItem &rRelief) override
Sfx item RES_CHRATR_RELIEF.
void EndFont() const
End the font.
void FontCharset(sal_uInt8 nCharSet) const
Font charset.
std::stack< OUString > m_aURLs
If we're in the process of exporting a hyperlink, then its URL.
void FormatKeep(const SvxFormatKeepItem &rItem) override
Sfx item RES_KEEP.
void CharEmphasisMark(const SvxEmphasisMarkItem &rEmphasisMark) override
Sfx item RES_CHRATR_EMPHASIS_MARK.
void ParaTabStop(const SvxTabStopItem &rTabStop) override
Sfx item RES_PARATR_TABSTOP.
void TableVerticalCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void CharLanguageCTL(const SvxLanguageItem &rLanguageItem) override
Sfx item RES_CHRATR_CTL_LANGUAGE.
OStringBuffer m_aStylesAssocDbch
void ParaHyphenZone(const SvxHyphenZoneItem &rHyphenZone) override
Sfx item RES_PARATR_HYPHENZONE.
void CharAutoKern(const SvxAutoKernItem &rAutoKern) override
Sfx item RES_CHRATR_AUTOKERN.
void ParaSnapToGrid(const SvxParaGridItem &rItem) override
Sfx item RES_PARATR_SNAPTOGRID.
void ParaForbiddenRules(const SfxBoolItem &rItem) override
Sfx item RES_PARATR_FORBIDDEN_RULES.
void TableBackgrounds(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void TableDefaultBorders(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void TableNodeInfoInner(ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner) override
void SectionBiDi(bool bBiDi) override
Columns populated from right/numbers on the right side?
void FlyFrameOLE(const SwFlyFrameFormat *pFlyFrameFormat, SwOLENode &rOLENode, const Size &rSize)
void StartStyles() override
Start of the styles table.
void SectionLineNumbering(sal_uLong nRestartNo, const SwLineNumberInfo &rLnNumInfo) override
Numbering of the lines in the document.
void StartStyle(const OUString &rName, StyleType eType, sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nLink, sal_uInt16 nWwId, sal_uInt16 nSlot, bool bAutoUpdate) override
Start of a style in the styles table.
void TablePositioning(SwFrameFormat *pFlyFormat)
OStringBuffer m_aAfterRuns
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.
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.
< purpose of derivation from SwClient: character style for displaying the numbers.
Base class of the Writer document model elements.
SwTextNode is a paragraph in the document model.
Make exporting a Writer Frame easy.
std::shared_ptr< WW8TableNodeInfoInner > Pointer_t
std::shared_ptr< WW8TableNodeInfo > Pointer_t
Collects and outputs fonts.