1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_ATTRIBUTEOUTPUTBASE_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_WW8_ATTRIBUTEOUTPUTBASE_HXX
23 #include "WW8TableInfo.hxx"
26 #include <rtl/textenc.h>
27 #include <editeng/svxenum.hxx>
28 #include <tools/solar.h>
31 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
32 #include <swtypes.hxx>
40 class SvxCrossedOutItem
;
41 class SvxEscapementItem
;
43 class SvxFontHeightItem
;
45 class SvxLanguageItem
;
47 class SvxShadowedItem
;
48 class SvxUnderlineItem
;
50 class SvxAutoKernItem
;
54 class XFillGradientItem
;
56 class SvxFontHeightItem
;
57 class SvxLanguageItem
;
61 class SvxFontHeightItem
;
62 class SvxLanguageItem
;
65 class SvxCharRotateItem
;
66 class SvxEmphasisMarkItem
;
67 class SvxTwoLinesItem
;
68 class SvxCharScaleWidthItem
;
69 class SvxCharReliefItem
;
70 class SvxCharHiddenItem
;
72 class SwFormatINetFormat
;
73 class SwFormatCharFormat
;
76 class SwFormatFootnote
;
77 class SvxLineSpacingItem
;
79 class SvxFormatSplitItem
;
82 class SvxHyphenZoneItem
;
87 class SvxParaVertAlignItem
;
88 class SvxParaGridItem
;
89 class SwFormatFrameSize
;
90 class SvxPaperBinItem
;
93 class SwFormatPageDesc
;
94 class SvxFormatBreakItem
;
95 class SwFormatSurround
;
96 class SwFormatVertOrient
;
97 class SwFormatHoriOrient
;
102 class SvxFormatKeepItem
;
103 class SwTextGridItem
;
104 class SwFormatLineNumber
;
105 class SvxFrameDirectionItem
;
106 class SfxGrabBagItem
;
118 class SwLineNumberInfo
;
122 namespace editeng
{ class SvxBorderLine
; }
124 namespace rtl
{ class OUString
; }
126 class MSWordExportBase
;
128 namespace ww8
{ class Frame
; }
131 const sal_uInt8 ColumnBreak
= 0xE;
132 const sal_uInt8 PageBreak
= 0xC;
135 /// Type of a style in the style table.
143 class AttributeOutputBase
146 OUString m_sBaseURL
; // To be used in ConvertURL
148 OUString
ConvertURL( const OUString
& rUrl
, bool bAbsoluteOut
);
151 /// Export the state of RTL/CJK.
152 virtual void RTLAndCJKState( bool bIsRTL
, sal_uInt16 nScript
) = 0;
154 /// Start of the paragraph.
155 virtual sal_Int32
StartParagraph( const ww8::WW8TableNodeInfo::Pointer_t
& pTextNodeInfo
, bool bGenerateParaId
) = 0;
157 /// End of the paragraph.
158 virtual void EndParagraph( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTextNodeInfoInner
) = 0;
160 /// Called in order to output section breaks.
161 virtual void SectionBreaks(const SwNode
& rNode
) = 0;
163 /// Called before we start outputting the attributes.
164 virtual void StartParagraphProperties() = 0;
166 /// Called after we end outputting the attributes.
167 virtual void EndParagraphProperties(const SfxItemSet
& rParagraphMarkerProperties
, const SwRedlineData
* pRedlineData
, const SwRedlineData
* pRedlineParagraphMarkerDeleted
, const SwRedlineData
* pRedlineParagraphMarkerInserted
) = 0;
170 virtual void EmptyParagraph() = 0;
172 /// Start of the text run.
173 virtual void StartRun( const SwRedlineData
* pRedlineData
, sal_Int32 nPos
, bool bSingleEmptyRun
= false ) = 0;
175 /// End of the text run.
176 virtual void EndRun( const SwTextNode
* pNode
, sal_Int32 nPos
, sal_Int32 nLen
, bool bLastRun
= false ) = 0;
178 /// Called before we start outputting the attributes.
179 virtual void StartRunProperties() = 0;
181 /// Called after we end outputting the attributes.
182 virtual void EndRunProperties( const SwRedlineData
* pRedlineData
) = 0;
184 /// docx requires footnoteRef/endnoteRef tag at the beginning of each of them
185 virtual bool FootnoteEndnoteRefTag() { return false; };
187 /// for footnote/endnote section properties
188 virtual void SectFootnoteEndnotePr() {};
190 /// for docx w:commentReference
191 virtual void WritePostitFieldReference() {};
193 /// Output text (inside a run).
194 virtual void RunText( const OUString
& rText
, rtl_TextEncoding eCharSet
= RTL_TEXTENCODING_UTF8
, const OUString
& rSymbolFont
= OUString() ) = 0;
196 /// Output text (without markup).
197 virtual void RawText(const OUString
& rText
, rtl_TextEncoding eCharSet
) = 0;
199 /// Output ruby start.
200 virtual void StartRuby( const SwTextNode
& rNode
, sal_Int32 nPos
, const SwFormatRuby
& rRuby
) = 0;
203 virtual void EndRuby( const SwTextNode
& rNode
, sal_Int32 nPos
) = 0;
205 /// Output URL start.
206 virtual bool StartURL(const OUString
& rUrl
, const OUString
& rTarget
, const OUString
& rName
= OUString()) = 0;
209 virtual bool EndURL(bool isAtEndOfParagraph
) = 0;
211 virtual void FieldVanish(const OUString
& rText
, ww::eField eType
, OUString
const* pBookmarkName
) = 0;
213 /// MSO uses bookmarks to reference sequence fields, so we need to generate these additional bookmarks during export
214 void GenerateBookmarksForSequenceField(const SwTextNode
& rNode
, SwWW8AttrIter
& rAttrIter
);
216 void StartTOX( const SwSection
& rSect
);
218 void EndTOX( const SwSection
& rSect
,bool bCareEnd
=true );
220 virtual void OnTOXEnding() {}
222 void TOXMark( const SwTextNode
& rNode
, const SwTOXMark
& rAttr
);
224 /// Output redlining.
225 virtual void Redline( const SwRedlineData
* pRedline
) = 0;
227 virtual void FormatDrop( const SwTextNode
& rNode
, const SwFormatDrop
& rSwFormatDrop
, sal_uInt16 nStyle
, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo
, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner
) = 0;
229 /// Output FKP (Formatted disK Page) - necessary for binary formats only.
230 /// FIXME having it in AttributeOutputBase is probably a hack, it
231 /// should be in WW8AttributeOutput only...
232 virtual void OutputFKP(bool /*bForce*/) {}
235 virtual void ParagraphStyle( sal_uInt16 nStyle
) = 0;
237 virtual void TableInfoCell( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfo
) = 0;
239 virtual void TableInfoRow( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfo
) = 0;
241 virtual void TableDefinition( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfo
) = 0;
243 virtual void TableDefaultBorders( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfo
) = 0;
245 virtual void TableBackgrounds( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfo
) = 0;
247 virtual void TableRowRedline( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfo
) = 0;
249 virtual void TableCellRedline( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfo
) = 0;
251 virtual void TableHeight( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfo
) = 0;
253 virtual void TableCanSplit( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfo
) = 0;
255 virtual void TableBidi( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfo
) = 0;
257 virtual void TableVerticalCell( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfo
) = 0;
259 virtual void TableNodeInfoInner( const ww8::WW8TableNodeInfoInner::Pointer_t
& pNodeInfoInner
) = 0;
261 virtual void TableOrientation( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfoInner
) = 0;
263 virtual void TableSpacing( const ww8::WW8TableNodeInfoInner::Pointer_t
& pTableTextNodeInfoInner
) = 0;
265 virtual void TableRowEnd( sal_uInt32 nDepth
) = 0;
267 /// Start of the styles table.
268 virtual void StartStyles() = 0;
270 /// End of the styles table.
271 virtual void EndStyles( sal_uInt16 nNumberOfStyles
) = 0;
273 /// Write default style.
274 virtual void DefaultStyle() = 0;
276 /// Start of a style in the styles table.
277 virtual void StartStyle( const OUString
& rName
, StyleType eType
,
278 sal_uInt16 nBase
, sal_uInt16 nNext
, sal_uInt16 nLink
, sal_uInt16 nWwId
, sal_uInt16 nSlot
,
279 bool bAutoUpdate
) = 0;
281 /// End of a style in the styles table.
282 virtual void EndStyle() = 0;
284 /// Start of (paragraph or run) properties of a style.
285 virtual void StartStyleProperties( bool bParProp
, sal_uInt16 nStyle
) = 0;
287 /// End of (paragraph or run) properties of a style.
288 virtual void EndStyleProperties( bool bParProp
) = 0;
290 /// Numbering rule and Id.
291 virtual void OutlineNumbering(sal_uInt8 nLvl
) = 0;
294 /// As a paragraph property - the paragraph should be on the next page.
295 virtual void PageBreakBefore( bool bBreak
) = 0;
297 /// Write a section break
298 /// msword::ColumnBreak or msword::PageBreak
299 /// bBreakAfter: the break must be scheduled for insertion in the end of current paragraph
300 virtual void SectionBreak( sal_uInt8 nC
, bool bBreakAfter
, const WW8_SepInfo
* pSectionInfo
= nullptr, bool bExtraPageBreak
= false ) = 0;
302 // preserve page vertical alignment
303 virtual void TextVerticalAdjustment( const css::drawing::TextVerticalAdjust
) {};
305 /// Start of the section properties.
306 virtual void StartSection() = 0;
308 /// End of the section properties.
309 virtual void EndSection() = 0;
311 /// Protection of forms.
312 virtual void SectionFormProtection( bool bProtected
) = 0;
314 /// Numbering of the lines in the document.
315 virtual void SectionLineNumbering( sal_uLong nRestartNo
, const SwLineNumberInfo
& rLnNumInfo
) = 0;
317 /// Has different headers/footers for the title page.
318 virtual void SectionTitlePage() = 0;
320 /// Set the state of the Fly at current position
321 virtual void SetStateOfFlyFrame( FlyProcessingState
/*nStateOfFlyFrame*/ ){};
322 /// If the node has an anchor linked.
323 virtual void SetAnchorIsLinkedToNode( bool /*bAnchorLinkedToNode*/){};
325 /// Is processing of fly postponed ?
326 virtual bool IsFlyProcessingPostponed(){ return false; };
328 /// Reset the flag for FlyProcessing
329 virtual void ResetFlyProcessingFlag(){};
331 /// Description of the page borders.
332 virtual void SectionPageBorders( const SwFrameFormat
* pFormat
, const SwFrameFormat
* pFirstPageFormat
) = 0;
334 /// Columns populated from right/numbers on the right side?
335 virtual void SectionBiDi( bool bBiDi
) = 0;
337 /// The style of the page numbers.
339 virtual void SectionPageNumbering( sal_uInt16 nNumType
, const ::std::optional
<sal_uInt16
>& oPageRestartNumber
) = 0;
341 /// The type of breaking.
342 virtual void SectionType( sal_uInt8 nBreakCode
) = 0;
344 /// Definition of a numbering instance.
345 virtual void NumberingDefinition( sal_uInt16 nId
, const SwNumRule
&rRule
) = 0;
347 /// Numbering definition that overrides abstract numbering definition
348 virtual void OverrideNumberingDefinition(SwNumRule
const&, sal_uInt16
/*nNum*/, sal_uInt16
/*nAbstractNum*/,
349 const std::map
< size_t, size_t > & /*rLevelOverrides*/)
350 { assert(false); } // TODO implement for WW8/RTF
352 /// Start of the abstract numbering definition instance.
353 virtual void StartAbstractNumbering( sal_uInt16
/*nId*/ ) {}
355 /// End of the abstract numbering definition instance.
356 virtual void EndAbstractNumbering() {}
358 /// All the numbering level information.
359 virtual void NumberingLevel( sal_uInt8 nLevel
,
361 sal_uInt16 nNumberingType
,
363 const sal_uInt8
*pNumLvlPos
,
366 const SfxItemSet
*pOutSet
,
368 sal_Int16 nFirstLineIndex
,
369 sal_Int16 nListTabPos
,
370 const OUString
&rNumberingString
,
371 const SvxBrushItem
* pBrush
, // #i120928 export graphic of bullet
376 static void GetNumberPara( OUString
& rStr
, const SwField
& rField
);
378 /// Output frames - the implementation.
379 virtual void OutputFlyFrame_Impl( const ww8::Frame
& rFormat
, const Point
& rNdTopLeft
) = 0;
381 /// Sfx item Sfx item RES_CHRATR_CASEMAP
382 virtual void CharCaseMap( const SvxCaseMapItem
& ) = 0;
384 /// Sfx item Sfx item RES_CHRATR_COLOR
385 virtual void CharColor( const SvxColorItem
& ) = 0;
387 /// Sfx item Sfx item RES_CHRATR_CONTOUR
388 virtual void CharContour( const SvxContourItem
& ) = 0;
390 /// Sfx item RES_CHRATR_CROSSEDOUT
391 virtual void CharCrossedOut( const SvxCrossedOutItem
& ) = 0;
393 /// Sfx item RES_CHRATR_ESCAPEMENT
394 virtual void CharEscapement( const SvxEscapementItem
& ) = 0;
396 /// Sfx item RES_CHRATR_FONT
397 virtual void CharFont( const SvxFontItem
& ) = 0;
399 /// Sfx item RES_CHRATR_FONTSIZE
400 virtual void CharFontSize( const SvxFontHeightItem
& ) = 0;
402 /// Sfx item RES_CHRATR_KERNING
403 virtual void CharKerning( const SvxKerningItem
& ) = 0;
405 /// Sfx item RES_CHRATR_LANGUAGE
406 virtual void CharLanguage( const SvxLanguageItem
& ) = 0;
408 /// Sfx item RES_CHRATR_POSTURE
409 virtual void CharPosture( const SvxPostureItem
& ) = 0;
411 /// Sfx item RES_CHRATR_SHADOWED
412 virtual void CharShadow( const SvxShadowedItem
& ) = 0;
414 /// Sfx item RES_CHRATR_UNDERLINE
415 virtual void CharUnderline( const SvxUnderlineItem
& ) = 0;
417 /// Sfx item RES_CHRATR_WEIGHT
418 virtual void CharWeight( const SvxWeightItem
& ) = 0;
420 /// Sfx item RES_CHRATR_AUTOKERN
421 virtual void CharAutoKern( const SvxAutoKernItem
& ) = 0;
423 /// Sfx item RES_CHRATR_BLINK
424 virtual void CharAnimatedText( const SvxBlinkItem
& ) = 0;
426 /// Sfx item RES_CHRATR_BACKGROUND
427 void CharBackgroundBase( const SvxBrushItem
& );
428 virtual void CharBackground( const SvxBrushItem
& ) = 0;
430 /// Sfx item RES_CHRATR_CJK_FONT
431 virtual void CharFontCJK( const SvxFontItem
& ) = 0;
433 /// Sfx item RES_CHRATR_CJK_FONTSIZE
434 virtual void CharFontSizeCJK( const SvxFontHeightItem
& ) = 0;
436 /// Sfx item RES_CHRATR_CJK_LANGUAGE
437 virtual void CharLanguageCJK( const SvxLanguageItem
& ) = 0;
439 /// Sfx item RES_CHRATR_CJK_POSTURE
440 virtual void CharPostureCJK( const SvxPostureItem
& ) = 0;
442 /// Sfx item RES_CHRATR_CJK_WEIGHT
443 virtual void CharWeightCJK( const SvxWeightItem
& ) = 0;
445 /// Sfx item RES_CHRATR_CTL_FONT
446 virtual void CharFontCTL( const SvxFontItem
& ) = 0;
448 /// Sfx item RES_CHRATR_CTL_FONTSIZE
449 virtual void CharFontSizeCTL( const SvxFontHeightItem
& ) = 0;
451 /// Sfx item RES_CHRATR_CTL_LANGUAGE
452 virtual void CharLanguageCTL( const SvxLanguageItem
& ) = 0;
454 /// Sfx item RES_CHRATR_CTL_POSTURE
455 virtual void CharPostureCTL( const SvxPostureItem
& ) = 0;
457 /// Sfx item RES_CHRATR_CTL_WEIGHT
458 virtual void CharWeightCTL( const SvxWeightItem
& ) = 0;
460 /// Sfx item RES_CHRATR_BidiRTL
461 virtual void CharBidiRTL( const SfxPoolItem
& ) = 0;
463 /// Sfx item RES_CHRATR_IdctHint
464 virtual void CharIdctHint( const SfxPoolItem
& ) = 0;
466 /// Sfx item RES_CHRATR_ROTATE
467 virtual void CharRotate( const SvxCharRotateItem
& ) = 0;
469 /// Sfx item RES_CHRATR_EMPHASIS_MARK
470 virtual void CharEmphasisMark( const SvxEmphasisMarkItem
& ) = 0;
472 /// Sfx item RES_CHRATR_TWO_LINES
473 virtual void CharTwoLines( const SvxTwoLinesItem
& ) = 0;
475 /// Sfx item RES_CHRATR_SCALEW
476 virtual void CharScaleWidth( const SvxCharScaleWidthItem
& ) = 0;
478 /// Sfx item RES_CHRATR_RELIEF
479 virtual void CharRelief( const SvxCharReliefItem
& ) = 0;
481 /// Sfx item RES_CHRATR_HIDDEN
482 virtual void CharHidden( const SvxCharHiddenItem
& ) = 0;
484 /// Sfx item RES_CHRATR_BOX
485 void FormatCharBorder( const SvxBoxItem
& rBox
);
486 virtual void CharBorder( const ::editeng::SvxBorderLine
* pAllBorder
, const sal_uInt16 nDist
, const bool bShadow
) = 0;
488 /// Sfx item RES_CHRATR_HIGHLIGHT
489 virtual void CharHighlight( const SvxBrushItem
& ) = 0;
491 /// Sfx item RES_TXTATR_INETFMT
492 virtual void TextINetFormat( const SwFormatINetFormat
& ) = 0;
494 /// Sfx item RES_TXTATR_CHARFMT
495 virtual void TextCharFormat( const SwFormatCharFormat
& ) = 0;
497 /// Sfx item RES_TXTATR_FIELD, RES_TXTATR_ANNOTATION and RES_TXTATR_INPUTFIELD
498 void TextField( const SwFormatField
& );
500 /// Sfx item RES_TXTATR_FLYCNT
501 void TextFlyContent( const SwFormatFlyCnt
& );
503 /// Sfx item RES_TXTATR_FTN
505 /// This one is common for both WW8AttributeOutput as well as
506 /// DocxAttributeOutput.
507 void TextFootnote( const SwFormatFootnote
& );
509 /// Sfx item RES_TXTATR_FTN
510 virtual void TextFootnote_Impl( const SwFormatFootnote
& ) = 0;
512 /// RES_TXTATR_LINEBREAK, i.e. clearing breaks.
513 virtual void TextLineBreak(const SwFormatLineBreak
&) = 0;
515 /// Sfx item RES_PARATR_LINESPACING
516 void ParaLineSpacing( const SvxLineSpacingItem
& );
518 /// Count the values in ParaLineSpacing, and pass theme here.
519 virtual void ParaLineSpacing_Impl( short nSpace
, short nMulti
) = 0;
521 /// Sfx item RES_PARATR_ADJUST
522 virtual void ParaAdjust( const SvxAdjustItem
& ) = 0;
524 /// Sfx item RES_PARATR_SPLIT
525 virtual void ParaSplit( const SvxFormatSplitItem
& ) = 0;
527 /// Sfx item RES_PARATR_WIDOWS
528 virtual void ParaWidows( const SvxWidowsItem
& ) = 0;
530 /// Sfx item RES_PARATR_TABSTOP
531 virtual void ParaTabStop( const SvxTabStopItem
& ) = 0;
533 /// Sfx item RES_PARATR_HYPHENZONE
534 virtual void ParaHyphenZone( const SvxHyphenZoneItem
& ) = 0;
536 /// Sfx item RES_PARATR_NUMRULE
537 void ParaNumRule( const SwNumRuleItem
& );
539 /// Numbering - the implementation.
540 virtual void ParaNumRule_Impl( const SwTextNode
*pTextNd
, sal_Int32 nLvl
, sal_Int32 nNumId
) = 0;
542 /// Sfx item RES_PARATR_SCRIPTSPACE
543 virtual void ParaScriptSpace( const SfxBoolItem
& ) = 0;
545 /// Sfx item RES_PARATR_HANGINGPUNCTUATION
546 virtual void ParaHangingPunctuation( const SfxBoolItem
& ) = 0;
548 /// Sfx item RES_PARATR_FORBIDDEN_RULES
549 virtual void ParaForbiddenRules( const SfxBoolItem
& ) = 0;
551 /// Sfx item RES_PARATR_VERTALIGN
552 virtual void ParaVerticalAlign( const SvxParaVertAlignItem
& ) = 0;
554 /// Sfx item RES_PARATR_SNAPTOGRID
555 virtual void ParaSnapToGrid( const SvxParaGridItem
& ) = 0;
557 /// Sfx item RES_FRM_SIZE
558 virtual void FormatFrameSize( const SwFormatFrameSize
& ) = 0;
560 /// Sfx item RES_PAPER_BIN
561 virtual void FormatPaperBin( const SvxPaperBinItem
& ) = 0;
563 /// Sfx item RES_MARGIN_FIRSTLINE
564 virtual void FormatFirstLineIndent(const SvxFirstLineIndentItem
& rFirstLine
) = 0;
565 /// Sfx item RES_MARGIN_TEXTLEFT
566 virtual void FormatTextLeftMargin(const SvxTextLeftMarginItem
& rTextLeftMargin
) = 0;
567 /// Sfx item RES_MARGIN_RIGHT
568 virtual void FormatRightMargin(const SvxRightMarginItem
& rRightMargin
) = 0;
570 /// Sfx item RES_LR_SPACE
571 virtual void FormatLRSpace( const SvxLRSpaceItem
& ) = 0;
573 /// Sfx item RES_UL_SPACE
574 virtual void FormatULSpace( const SvxULSpaceItem
& ) = 0;
576 /// Sfx item RES_PAGEDESC
577 void FormatPageDescription( const SwFormatPageDesc
& );
579 /// Sfx item RES_BREAK
580 void FormatBreak( const SvxFormatBreakItem
& );
582 /// Sfx item RES_SURROUND
583 virtual void FormatSurround( const SwFormatSurround
& ) = 0;
585 /// Sfx item RES_VERT_ORIENT
586 virtual void FormatVertOrientation( const SwFormatVertOrient
& ) = 0;
588 /// Sfx item RES_HORI_ORIENT
589 virtual void FormatHorizOrientation( const SwFormatHoriOrient
& ) = 0;
591 /// Sfx item RES_ANCHOR
592 virtual void FormatAnchor( const SwFormatAnchor
& ) = 0;
594 /// Sfx item RES_BACKGROUND
595 virtual void FormatBackground( const SvxBrushItem
& ) = 0;
597 /// Sfx item RES_FILL_STYLE
598 virtual void FormatFillStyle( const XFillStyleItem
& ) = 0;
600 /// Sfx item RES_FILL_GRADIENT
601 virtual void FormatFillGradient( const XFillGradientItem
& ) = 0;
604 virtual void FormatBox( const SvxBoxItem
& ) = 0;
607 void FormatColumns( const SwFormatCol
& );
609 virtual void FormatColumns_Impl( sal_uInt16 nCols
, const SwFormatCol
& rCol
, bool bEven
, SwTwips nPageSize
) = 0;
611 /// Sfx item RES_KEEP
612 virtual void FormatKeep( const SvxFormatKeepItem
& ) = 0;
614 /// Compute the grid character pitch
615 sal_uInt32
GridCharacterPitch( const SwTextGridItem
& rGrid
) const;
617 /// Sfx item RES_TEXTGRID
618 virtual void FormatTextGrid( const SwTextGridItem
& ) = 0;
620 /// Sfx item RES_LINENUMBER
621 void FormatLineNumberingBase(const SwFormatLineNumber
&);
622 virtual void FormatLineNumbering( const SwFormatLineNumber
& ) = 0;
624 /// Sfx item RES_FRAMEDIR
625 virtual void FormatFrameDirection( const SvxFrameDirectionItem
& ) = 0;
627 /// Sfx item RES_PARATR_GRABBAG
628 virtual void ParaGrabBag( const SfxGrabBagItem
& ) = 0;
630 /// Sfx item RES_CHRATR_GRABBAG
631 virtual void CharGrabBag( const SfxGrabBagItem
& ) = 0;
633 /// Sfx item RES_PARATR_OUTLINELEVEL
634 void ParaOutlineLevelBase( const SfxUInt16Item
& rItem
);
635 virtual void ParaOutlineLevel( const SfxUInt16Item
& ) = 0;
637 /// Write the expanded field
638 virtual void WriteExpand( const SwField
* pField
) = 0;
640 virtual void RefField( const SwField
& rField
, const OUString
& rRef
) = 0;
641 virtual void HiddenField( const SwField
& rField
) = 0;
642 virtual void SetField( const SwField
& rField
, ww::eField eType
, const OUString
& rCmd
) = 0;
643 virtual void PostitField( const SwField
* pField
) = 0;
644 virtual bool DropdownField( const SwField
* pField
) = 0;
645 virtual bool PlaceholderField( const SwField
* pField
) = 0;
647 virtual bool AnalyzeURL( const OUString
& rUrl
, const OUString
& rTarget
, OUString
* pLinkURL
, OUString
* pMark
);
649 /// Insert a bookmark inside the currently processed paragraph.
650 virtual void WriteBookmarkInActParagraph( const OUString
& rName
, sal_Int32 nFirstRunPos
, sal_Int32 nLastRunPos
) = 0;
652 ww8::GridColsPtr
GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t
const & pTableTextNodeInfoInner
);
653 ww8::WidthsPtr
GetColumnWidths( ww8::WW8TableNodeInfoInner::Pointer_t
const & pTableTextNodeInfoInner
);
656 virtual void SectionRtlGutter(const SfxBoolItem
& rRtlGutter
) = 0;
659 AttributeOutputBase(OUString sBaseURL
)
660 : m_sBaseURL(std::move(sBaseURL
))
663 virtual ~AttributeOutputBase() {}
665 /// Return the right export class.
666 virtual MSWordExportBase
& GetExport() = 0;
669 const MSWordExportBase
& GetExport() const { return const_cast< AttributeOutputBase
* >( this )->GetExport(); }
671 /// Call the right virtual function according to the type of the item.
672 void OutputItem( const SfxPoolItem
& rHt
);
674 /// Use OutputItem() on an item set - for styles.
675 void OutputStyleItemSet( const SfxItemSet
& rSet
, bool bTestForDefault
);
678 void OutputFlyFrame( const ww8::Frame
& rFormat
);
680 void GetTablePageSize
681 ( ww8::WW8TableNodeInfoInner
const * pTableTextNodeInfoInner
,
682 tools::Long
& rPageSize
, bool& rRelBoxSize
);
684 virtual bool MaybeOutputBrushItem(SfxItemSet
const&) { return false; }
686 /// Exports the definition (image, size) of a single numbering picture bullet.
687 virtual void BulletDefinition(int /*nId*/, const Graphic
& /*rGraphic*/, Size
/*aSize*/) {}
689 // Returns whether or not the 'SwTextNode' has a paragraph marker inserted \ deleted (using 'track changes')
690 const SwRedlineData
* GetParagraphMarkerRedline( const SwTextNode
& rNode
, RedlineType aRedlineType
);
697 sal_uInt32 m_nRubyHeight
;
698 sal_uInt32 m_nBaseHeight
;
699 OUString m_sFontFamily
;
702 WW8Ruby(const SwTextNode
& rNode
, const SwFormatRuby
& rRuby
, const MSWordExportBase
& rExport
);
703 sal_Int32
GetJC() const { return m_nJC
; }
704 char GetDirective() const { return m_cDirective
; }
705 sal_uInt32
GetRubyHeight() const { return m_nRubyHeight
; }
706 sal_uInt32
GetBaseHeight() const { return m_nBaseHeight
; }
707 OUString
const & GetFontFamily() const { return m_sFontFamily
; }
709 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_ATTRIBUTEOUTPUTBASE_HXX
711 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */