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( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo
, bool bGenerateParaId
) = 0;
157 /// End of the paragraph.
158 virtual void EndParagraph( 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
) = 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( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo
) = 0;
239 virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo
) = 0;
241 virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo
) = 0;
243 virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo
) = 0;
245 virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo
) = 0;
247 virtual void TableRowRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo
) = 0;
249 virtual void TableCellRedline( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo
) = 0;
251 virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo
) = 0;
253 virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo
) = 0;
255 virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo
) = 0;
257 virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo
) = 0;
259 virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner
) = 0;
261 virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner
) = 0;
263 virtual void TableSpacing( 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
) = 0; // #i120928 export graphic of bullet
375 static void GetNumberPara( OUString
& rStr
, const SwField
& rField
);
377 /// Output frames - the implementation.
378 virtual void OutputFlyFrame_Impl( const ww8::Frame
& rFormat
, const Point
& rNdTopLeft
) = 0;
380 /// Sfx item Sfx item RES_CHRATR_CASEMAP
381 virtual void CharCaseMap( const SvxCaseMapItem
& ) = 0;
383 /// Sfx item Sfx item RES_CHRATR_COLOR
384 virtual void CharColor( const SvxColorItem
& ) = 0;
386 /// Sfx item Sfx item RES_CHRATR_CONTOUR
387 virtual void CharContour( const SvxContourItem
& ) = 0;
389 /// Sfx item RES_CHRATR_CROSSEDOUT
390 virtual void CharCrossedOut( const SvxCrossedOutItem
& ) = 0;
392 /// Sfx item RES_CHRATR_ESCAPEMENT
393 virtual void CharEscapement( const SvxEscapementItem
& ) = 0;
395 /// Sfx item RES_CHRATR_FONT
396 virtual void CharFont( const SvxFontItem
& ) = 0;
398 /// Sfx item RES_CHRATR_FONTSIZE
399 virtual void CharFontSize( const SvxFontHeightItem
& ) = 0;
401 /// Sfx item RES_CHRATR_KERNING
402 virtual void CharKerning( const SvxKerningItem
& ) = 0;
404 /// Sfx item RES_CHRATR_LANGUAGE
405 virtual void CharLanguage( const SvxLanguageItem
& ) = 0;
407 /// Sfx item RES_CHRATR_POSTURE
408 virtual void CharPosture( const SvxPostureItem
& ) = 0;
410 /// Sfx item RES_CHRATR_SHADOWED
411 virtual void CharShadow( const SvxShadowedItem
& ) = 0;
413 /// Sfx item RES_CHRATR_UNDERLINE
414 virtual void CharUnderline( const SvxUnderlineItem
& ) = 0;
416 /// Sfx item RES_CHRATR_WEIGHT
417 virtual void CharWeight( const SvxWeightItem
& ) = 0;
419 /// Sfx item RES_CHRATR_AUTOKERN
420 virtual void CharAutoKern( const SvxAutoKernItem
& ) = 0;
422 /// Sfx item RES_CHRATR_BLINK
423 virtual void CharAnimatedText( const SvxBlinkItem
& ) = 0;
425 /// Sfx item RES_CHRATR_BACKGROUND
426 void CharBackgroundBase( const SvxBrushItem
& );
427 virtual void CharBackground( const SvxBrushItem
& ) = 0;
429 /// Sfx item RES_CHRATR_CJK_FONT
430 virtual void CharFontCJK( const SvxFontItem
& ) = 0;
432 /// Sfx item RES_CHRATR_CJK_FONTSIZE
433 virtual void CharFontSizeCJK( const SvxFontHeightItem
& ) = 0;
435 /// Sfx item RES_CHRATR_CJK_LANGUAGE
436 virtual void CharLanguageCJK( const SvxLanguageItem
& ) = 0;
438 /// Sfx item RES_CHRATR_CJK_POSTURE
439 virtual void CharPostureCJK( const SvxPostureItem
& ) = 0;
441 /// Sfx item RES_CHRATR_CJK_WEIGHT
442 virtual void CharWeightCJK( const SvxWeightItem
& ) = 0;
444 /// Sfx item RES_CHRATR_CTL_FONT
445 virtual void CharFontCTL( const SvxFontItem
& ) = 0;
447 /// Sfx item RES_CHRATR_CTL_FONTSIZE
448 virtual void CharFontSizeCTL( const SvxFontHeightItem
& ) = 0;
450 /// Sfx item RES_CHRATR_CTL_LANGUAGE
451 virtual void CharLanguageCTL( const SvxLanguageItem
& ) = 0;
453 /// Sfx item RES_CHRATR_CTL_POSTURE
454 virtual void CharPostureCTL( const SvxPostureItem
& ) = 0;
456 /// Sfx item RES_CHRATR_CTL_WEIGHT
457 virtual void CharWeightCTL( const SvxWeightItem
& ) = 0;
459 /// Sfx item RES_CHRATR_BidiRTL
460 virtual void CharBidiRTL( const SfxPoolItem
& ) = 0;
462 /// Sfx item RES_CHRATR_IdctHint
463 virtual void CharIdctHint( const SfxPoolItem
& ) = 0;
465 /// Sfx item RES_CHRATR_ROTATE
466 virtual void CharRotate( const SvxCharRotateItem
& ) = 0;
468 /// Sfx item RES_CHRATR_EMPHASIS_MARK
469 virtual void CharEmphasisMark( const SvxEmphasisMarkItem
& ) = 0;
471 /// Sfx item RES_CHRATR_TWO_LINES
472 virtual void CharTwoLines( const SvxTwoLinesItem
& ) = 0;
474 /// Sfx item RES_CHRATR_SCALEW
475 virtual void CharScaleWidth( const SvxCharScaleWidthItem
& ) = 0;
477 /// Sfx item RES_CHRATR_RELIEF
478 virtual void CharRelief( const SvxCharReliefItem
& ) = 0;
480 /// Sfx item RES_CHRATR_HIDDEN
481 virtual void CharHidden( const SvxCharHiddenItem
& ) = 0;
483 /// Sfx item RES_CHRATR_BOX
484 void FormatCharBorder( const SvxBoxItem
& rBox
);
485 virtual void CharBorder( const ::editeng::SvxBorderLine
* pAllBorder
, const sal_uInt16 nDist
, const bool bShadow
) = 0;
487 /// Sfx item RES_CHRATR_HIGHLIGHT
488 virtual void CharHighlight( const SvxBrushItem
& ) = 0;
490 /// Sfx item RES_TXTATR_INETFMT
491 virtual void TextINetFormat( const SwFormatINetFormat
& ) = 0;
493 /// Sfx item RES_TXTATR_CHARFMT
494 virtual void TextCharFormat( const SwFormatCharFormat
& ) = 0;
496 /// Sfx item RES_TXTATR_FIELD, RES_TXTATR_ANNOTATION and RES_TXTATR_INPUTFIELD
497 void TextField( const SwFormatField
& );
499 /// Sfx item RES_TXTATR_FLYCNT
500 void TextFlyContent( const SwFormatFlyCnt
& );
502 /// Sfx item RES_TXTATR_FTN
504 /// This one is common for both WW8AttributeOutput as well as
505 /// DocxAttributeOutput.
506 void TextFootnote( const SwFormatFootnote
& );
508 /// Sfx item RES_TXTATR_FTN
509 virtual void TextFootnote_Impl( const SwFormatFootnote
& ) = 0;
511 /// RES_TXTATR_LINEBREAK, i.e. clearing breaks.
512 virtual void TextLineBreak(const SwFormatLineBreak
&) = 0;
514 /// Sfx item RES_PARATR_LINESPACING
515 void ParaLineSpacing( const SvxLineSpacingItem
& );
517 /// Count the values in ParaLineSpacing, and pass theme here.
518 virtual void ParaLineSpacing_Impl( short nSpace
, short nMulti
) = 0;
520 /// Sfx item RES_PARATR_ADJUST
521 virtual void ParaAdjust( const SvxAdjustItem
& ) = 0;
523 /// Sfx item RES_PARATR_SPLIT
524 virtual void ParaSplit( const SvxFormatSplitItem
& ) = 0;
526 /// Sfx item RES_PARATR_WIDOWS
527 virtual void ParaWidows( const SvxWidowsItem
& ) = 0;
529 /// Sfx item RES_PARATR_TABSTOP
530 virtual void ParaTabStop( const SvxTabStopItem
& ) = 0;
532 /// Sfx item RES_PARATR_HYPHENZONE
533 virtual void ParaHyphenZone( const SvxHyphenZoneItem
& ) = 0;
535 /// Sfx item RES_PARATR_NUMRULE
536 void ParaNumRule( const SwNumRuleItem
& );
538 /// Numbering - the implementation.
539 virtual void ParaNumRule_Impl( const SwTextNode
*pTextNd
, sal_Int32 nLvl
, sal_Int32 nNumId
) = 0;
541 /// Sfx item RES_PARATR_SCRIPTSPACE
542 virtual void ParaScriptSpace( const SfxBoolItem
& ) = 0;
544 /// Sfx item RES_PARATR_HANGINGPUNCTUATION
545 virtual void ParaHangingPunctuation( const SfxBoolItem
& ) = 0;
547 /// Sfx item RES_PARATR_FORBIDDEN_RULES
548 virtual void ParaForbiddenRules( const SfxBoolItem
& ) = 0;
550 /// Sfx item RES_PARATR_VERTALIGN
551 virtual void ParaVerticalAlign( const SvxParaVertAlignItem
& ) = 0;
553 /// Sfx item RES_PARATR_SNAPTOGRID
554 virtual void ParaSnapToGrid( const SvxParaGridItem
& ) = 0;
556 /// Sfx item RES_FRM_SIZE
557 virtual void FormatFrameSize( const SwFormatFrameSize
& ) = 0;
559 /// Sfx item RES_PAPER_BIN
560 virtual void FormatPaperBin( const SvxPaperBinItem
& ) = 0;
562 /// Sfx item RES_MARGIN_FIRSTLINE
563 virtual void FormatFirstLineIndent(const SvxFirstLineIndentItem
& rFirstLine
) = 0;
564 /// Sfx item RES_MARGIN_TEXTLEFT
565 virtual void FormatTextLeftMargin(const SvxTextLeftMarginItem
& rTextLeftMargin
) = 0;
566 /// Sfx item RES_MARGIN_RIGHT
567 virtual void FormatRightMargin(const SvxRightMarginItem
& rRightMargin
) = 0;
569 /// Sfx item RES_LR_SPACE
570 virtual void FormatLRSpace( const SvxLRSpaceItem
& ) = 0;
572 /// Sfx item RES_UL_SPACE
573 virtual void FormatULSpace( const SvxULSpaceItem
& ) = 0;
575 /// Sfx item RES_PAGEDESC
576 void FormatPageDescription( const SwFormatPageDesc
& );
578 /// Sfx item RES_BREAK
579 void FormatBreak( const SvxFormatBreakItem
& );
581 /// Sfx item RES_SURROUND
582 virtual void FormatSurround( const SwFormatSurround
& ) = 0;
584 /// Sfx item RES_VERT_ORIENT
585 virtual void FormatVertOrientation( const SwFormatVertOrient
& ) = 0;
587 /// Sfx item RES_HORI_ORIENT
588 virtual void FormatHorizOrientation( const SwFormatHoriOrient
& ) = 0;
590 /// Sfx item RES_ANCHOR
591 virtual void FormatAnchor( const SwFormatAnchor
& ) = 0;
593 /// Sfx item RES_BACKGROUND
594 virtual void FormatBackground( const SvxBrushItem
& ) = 0;
596 /// Sfx item RES_FILL_STYLE
597 virtual void FormatFillStyle( const XFillStyleItem
& ) = 0;
599 /// Sfx item RES_FILL_GRADIENT
600 virtual void FormatFillGradient( const XFillGradientItem
& ) = 0;
603 virtual void FormatBox( const SvxBoxItem
& ) = 0;
606 void FormatColumns( const SwFormatCol
& );
608 virtual void FormatColumns_Impl( sal_uInt16 nCols
, const SwFormatCol
& rCol
, bool bEven
, SwTwips nPageSize
) = 0;
610 /// Sfx item RES_KEEP
611 virtual void FormatKeep( const SvxFormatKeepItem
& ) = 0;
613 /// Compute the grid character pitch
614 sal_uInt32
GridCharacterPitch( const SwTextGridItem
& rGrid
) const;
616 /// Sfx item RES_TEXTGRID
617 virtual void FormatTextGrid( const SwTextGridItem
& ) = 0;
619 /// Sfx item RES_LINENUMBER
620 virtual void FormatLineNumbering( const SwFormatLineNumber
& ) = 0;
622 /// Sfx item RES_FRAMEDIR
623 virtual void FormatFrameDirection( const SvxFrameDirectionItem
& ) = 0;
625 /// Sfx item RES_PARATR_GRABBAG
626 virtual void ParaGrabBag( const SfxGrabBagItem
& ) = 0;
628 /// Sfx item RES_CHRATR_GRABBAG
629 virtual void CharGrabBag( const SfxGrabBagItem
& ) = 0;
631 /// Sfx item RES_PARATR_OUTLINELEVEL
632 void ParaOutlineLevelBase( const SfxUInt16Item
& rItem
);
633 virtual void ParaOutlineLevel( const SfxUInt16Item
& ) = 0;
635 /// Write the expanded field
636 virtual void WriteExpand( const SwField
* pField
) = 0;
638 virtual void RefField( const SwField
& rField
, const OUString
& rRef
) = 0;
639 virtual void HiddenField( const SwField
& rField
) = 0;
640 virtual void SetField( const SwField
& rField
, ww::eField eType
, const OUString
& rCmd
) = 0;
641 virtual void PostitField( const SwField
* pField
) = 0;
642 virtual bool DropdownField( const SwField
* pField
) = 0;
643 virtual bool PlaceholderField( const SwField
* pField
) = 0;
645 virtual bool AnalyzeURL( const OUString
& rUrl
, const OUString
& rTarget
, OUString
* pLinkURL
, OUString
* pMark
);
647 /// Insert a bookmark inside the currently processed paragraph.
648 virtual void WriteBookmarkInActParagraph( const OUString
& rName
, sal_Int32 nFirstRunPos
, sal_Int32 nLastRunPos
) = 0;
650 ww8::GridColsPtr
GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t
const & pTableTextNodeInfoInner
);
651 ww8::WidthsPtr
GetColumnWidths( ww8::WW8TableNodeInfoInner::Pointer_t
const & pTableTextNodeInfoInner
);
654 virtual void SectionRtlGutter(const SfxBoolItem
& rRtlGutter
) = 0;
657 AttributeOutputBase(OUString sBaseURL
)
658 : m_sBaseURL(std::move(sBaseURL
))
661 virtual ~AttributeOutputBase() {}
663 /// Return the right export class.
664 virtual MSWordExportBase
& GetExport() = 0;
667 const MSWordExportBase
& GetExport() const { return const_cast< AttributeOutputBase
* >( this )->GetExport(); }
669 /// Call the right virtual function according to the type of the item.
670 void OutputItem( const SfxPoolItem
& rHt
);
672 /// Use OutputItem() on an item set - for styles.
673 void OutputStyleItemSet( const SfxItemSet
& rSet
, bool bTestForDefault
);
676 void OutputFlyFrame( const ww8::Frame
& rFormat
);
678 void GetTablePageSize
679 ( ww8::WW8TableNodeInfoInner
const * pTableTextNodeInfoInner
,
680 tools::Long
& rPageSize
, bool& rRelBoxSize
);
682 virtual bool MaybeOutputBrushItem(SfxItemSet
const&) { return false; }
684 /// Exports the definition (image, size) of a single numbering picture bullet.
685 virtual void BulletDefinition(int /*nId*/, const Graphic
& /*rGraphic*/, Size
/*aSize*/) {}
687 // Returns whether or not the 'SwTextNode' has a paragraph marker inserted \ deleted (using 'track changes')
688 const SwRedlineData
* GetParagraphMarkerRedline( const SwTextNode
& rNode
, RedlineType aRedlineType
);
695 sal_uInt32 m_nRubyHeight
;
696 sal_uInt32 m_nBaseHeight
;
697 OUString m_sFontFamily
;
700 WW8Ruby(const SwTextNode
& rNode
, const SwFormatRuby
& rRuby
, const MSWordExportBase
& rExport
);
701 sal_Int32
GetJC() const { return m_nJC
; }
702 char GetDirective() const { return m_cDirective
; }
703 sal_uInt32
GetRubyHeight() const { return m_nRubyHeight
; }
704 sal_uInt32
GetBaseHeight() const { return m_nBaseHeight
; }
705 OUString
const & GetFontFamily() const { return m_sFontFamily
; }
707 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_ATTRIBUTEOUTPUTBASE_HXX
709 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */