Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef _ATTRIBUTEOUTPUTBASE_HXX_
21 : #define _ATTRIBUTEOUTPUTBASE_HXX_
22 :
23 : #include "fields.hxx"
24 : #include "WW8TableInfo.hxx"
25 :
26 : #include <rtl/textenc.h>
27 : #include <editeng/svxenum.hxx>
28 : #include <tools/solar.h>
29 :
30 : #include <swtypes.hxx>
31 : #include <wrtswtbl.hxx>
32 : #include <fldbas.hxx>
33 :
34 : #include <vector>
35 :
36 : class Point;
37 : class SvxCaseMapItem;
38 : class SvxColorItem;
39 : class SvxContourItem;
40 : class SvxCrossedOutItem;
41 : class SvxEscapementItem;
42 : class SvxFontItem;
43 : class SvxFontHeightItem;
44 : class SvxKerningItem;
45 : class SvxLanguageItem;
46 : class SvxPostureItem;
47 : class SvxShadowedItem;
48 : class SvxUnderlineItem;
49 : class SvxWeightItem;
50 : class SvxAutoKernItem;
51 : class SvxBlinkItem;
52 : class SvxBrushItem;
53 : class XFillStyleItem;
54 : class XFillGradientItem;
55 : class SvxFontItem;
56 : class SvxFontHeightItem;
57 : class SvxLanguageItem;
58 : class SvxPostureItem;
59 : class SvxWeightItem;
60 : class SvxFontItem;
61 : class SvxFontHeightItem;
62 : class SvxLanguageItem;
63 : class SvxPostureItem;
64 : class SvxWeightItem;
65 : class SvxCharRotateItem;
66 : class SvxEmphasisMarkItem;
67 : class SvxTwoLinesItem;
68 : class SvxCharScaleWidthItem;
69 : class SvxCharReliefItem;
70 : class SvxCharHiddenItem;
71 : class SwFmtINetFmt;
72 : class SwFmtCharFmt;
73 : class SwFmtFld;
74 : class SwFmtFlyCnt;
75 : class SwFmtFtn;
76 : class SvxLineSpacingItem;
77 : class SvxAdjustItem;
78 : class SvxFmtSplitItem;
79 : class SvxWidowsItem;
80 : class SvxTabStopItem;
81 : class SvxHyphenZoneItem;
82 : class SwNumRuleItem;
83 : class SfxBoolItem;
84 : class SfxPoolItem;
85 : class SfxItemSet;
86 : class SvxParaVertAlignItem;
87 : class SvxParaGridItem;
88 : class SwFmtFrmSize;
89 : class SvxPaperBinItem;
90 : class SvxLRSpaceItem;
91 : class SvxULSpaceItem;
92 : class SwFmtPageDesc;
93 : class SvxFmtBreakItem;
94 : class SwFmtSurround;
95 : class SwFmtVertOrient;
96 : class SwFmtHoriOrient;
97 : class SwFmtAnchor;
98 : class SvxBrushItem;
99 : class SvxBoxItem;
100 : class SwFmtCol;
101 : class SvxFmtKeepItem;
102 : class SwTextGridItem;
103 : class SwFmtLineNumber;
104 : class SvxFrameDirectionItem;
105 : class SwFmtRuby;
106 : class SwTxtNode;
107 : class SwTOXMark;
108 : class SwRedlineData;
109 : class SwSection;
110 : class SwFmtDrop;
111 : class SwFrmFmt;
112 : class SwNumFmt;
113 : class SwFmt;
114 : struct WW8_SepInfo;
115 : class SwLineNumberInfo;
116 : class SwNumRule;
117 : class wwFont;
118 :
119 : class String;
120 :
121 : class MSWordExportBase;
122 :
123 : namespace sw { class Frame; }
124 :
125 : namespace msword {
126 : const sal_uInt8 ColumnBreak = 0xE;
127 : const sal_uInt8 PageBreak = 0xC;
128 : }
129 :
130 : class AttributeOutputBase
131 : {
132 : public:
133 : /// Export the state of RTL/CJK.
134 : virtual void RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript ) = 0;
135 :
136 : /// Start of the paragraph.
137 : virtual void StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo ) = 0;
138 :
139 : /// End of the paragraph.
140 : virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0;
141 :
142 : /// Called before we start outputting the attributes.
143 : virtual void StartParagraphProperties( const SwTxtNode& rNode ) = 0;
144 :
145 : /// Called after we end outputting the attributes.
146 : virtual void EndParagraphProperties() = 0;
147 :
148 : /// Empty paragraph.
149 : virtual void EmptyParagraph() = 0;
150 :
151 : /// Start of the text run.
152 : virtual void StartRun( const SwRedlineData* pRedlineData, bool bSingleEmptyRun = false ) = 0;
153 :
154 : /// End of the text run.
155 : virtual void EndRun() = 0;
156 :
157 : /// Called before we start outputting the attributes.
158 : virtual void StartRunProperties() = 0;
159 :
160 : /// Called after we end outputting the attributes.
161 : virtual void EndRunProperties( const SwRedlineData* pRedlineData ) = 0;
162 :
163 : /// docx requires footnoteRef/endnoteRef tag at the beginning of each of them
164 3 : virtual void FootnoteEndnoteRefTag() {};
165 :
166 : /// for docx footnotePr/endnotePr inside sectPr
167 12 : virtual void SectFootnoteEndnotePr() {};
168 :
169 : /// for docx w:commentReference
170 438 : virtual void WritePostitFieldReference() {};
171 :
172 : /// for docx w:commentRangeStart
173 0 : virtual void WritePostitFieldStart() {};
174 :
175 : /// for docx w:commentRangeEnd
176 0 : virtual void WritePostitFieldEnd() {};
177 :
178 : /// Output text (inside a run).
179 : virtual void RunText( const String& rText, rtl_TextEncoding eCharSet ) = 0;
180 :
181 : /// Output text (without markup).
182 : virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet ) = 0;
183 :
184 : /// Output ruby start.
185 : virtual void StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, const SwFmtRuby& rRuby ) = 0;
186 :
187 : /// Output ruby end.
188 : virtual void EndRuby() = 0;
189 :
190 : /// Output URL start.
191 : virtual bool StartURL( const String& rUrl, const String& rTarget ) = 0;
192 :
193 : /// Output URL end.
194 : virtual bool EndURL() = 0;
195 :
196 : virtual void FieldVanish( const String& rTxt, ww::eField eType ) = 0;
197 :
198 : void StartTOX( const SwSection& rSect );
199 :
200 : void EndTOX( const SwSection& rSect );
201 :
202 : virtual void TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAttr );
203 :
204 : /// Output redlining.
205 : virtual void Redline( const SwRedlineData* pRedline ) = 0;
206 :
207 : virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0;
208 :
209 : /// Output FKP (Formatted disK Page) - necessary for binary formats only.
210 : /// FIXME having it in AttributeOutputBase is probably a hack, it
211 : /// should be in WW8AttributeOutput only...
212 325 : virtual void OutputFKP() {}
213 :
214 : /// Output style.
215 : virtual void ParagraphStyle( sal_uInt16 nStyle ) = 0;
216 :
217 : virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
218 :
219 : virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
220 :
221 : virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
222 :
223 : virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
224 :
225 : virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
226 :
227 : virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
228 :
229 : virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
230 :
231 : virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
232 :
233 : virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
234 :
235 : virtual void TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo ) = 0;
236 :
237 : virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner ) = 0;
238 :
239 : virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) = 0;
240 :
241 : virtual void TableSpacing( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner ) = 0;
242 :
243 : virtual void TableRowEnd( sal_uInt32 nDepth ) = 0;
244 :
245 : /// Start of the styles table.
246 : virtual void StartStyles() = 0;
247 :
248 : /// End of the styles table.
249 : virtual void EndStyles( sal_uInt16 nNumberOfStyles ) = 0;
250 :
251 : /// Write default style.
252 : virtual void DefaultStyle( sal_uInt16 nStyle ) = 0;
253 :
254 : /// Start of a style in the styles table.
255 : virtual void StartStyle( const String& rName, bool bPapFmt,
256 : sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
257 : bool bAutoUpdate ) = 0;
258 :
259 : /// End of a style in the styles table.
260 : virtual void EndStyle() = 0;
261 :
262 : /// Start of (paragraph or run) properties of a style.
263 : virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle ) = 0;
264 :
265 : /// End of (paragraph or run) properties of a style.
266 : virtual void EndStyleProperties( bool bParProp ) = 0;
267 :
268 : /// Numbering rule and Id.
269 : virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& rNFmt, const SwFmt& rFmt ) = 0;
270 :
271 : /// Page break
272 : /// As a paragraph property - the paragraph should be on the next page.
273 : virtual void PageBreakBefore( bool bBreak ) = 0;
274 :
275 : /// Write a section break
276 : /// msword::ColumnBreak or msword::PageBreak
277 : virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL ) = 0;
278 :
279 : /// Start of the section properties.
280 : virtual void StartSection() = 0;
281 :
282 : /// End of the section properties.
283 : virtual void EndSection() = 0;
284 :
285 : /// Protection of forms.
286 : virtual void SectionFormProtection( bool bProtected ) = 0;
287 :
288 : /// Numbering of the lines in the document.
289 : virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo ) = 0;
290 :
291 : /// Has different headers/footers for the title page.
292 : virtual void SectionTitlePage() = 0;
293 :
294 : /// Description of the page borders.
295 : virtual void SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFmt* pFirstPageFmt ) = 0;
296 :
297 : /// Columns populated from right/numbers on the right side?
298 : virtual void SectionBiDi( bool bBiDi ) = 0;
299 :
300 : /// The style of the page numbers.
301 : ///
302 : /// nPageRestartNumberr being 0 means no restart.
303 : virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber ) = 0;
304 :
305 : /// The type of breaking.
306 : virtual void SectionType( sal_uInt8 nBreakCode ) = 0;
307 :
308 : /// Special header/footer flags, needed for old versions only.
309 49 : virtual void SectionWW6HeaderFooterFlags( sal_uInt8 /*nHeadFootFlags*/ ) {}
310 :
311 : /// Definition of a numbering instance.
312 : virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) = 0;
313 :
314 : /// Start of the abstract numbering definition instance.
315 4 : virtual void StartAbstractNumbering( sal_uInt16 /*nId*/ ) {}
316 :
317 : /// End of the abstract numbering definition instance.
318 4 : virtual void EndAbstractNumbering() {}
319 :
320 : /// All the numbering level information.
321 : virtual void NumberingLevel( sal_uInt8 nLevel,
322 : sal_uInt16 nStart,
323 : sal_uInt16 nNumberingType,
324 : SvxAdjust eAdjust,
325 : const sal_uInt8 *pNumLvlPos,
326 : sal_uInt8 nFollow,
327 : const wwFont *pFont,
328 : const SfxItemSet *pOutSet,
329 : sal_Int16 nIndentAt,
330 : sal_Int16 nFirstLineIndex,
331 : sal_Int16 nListTabPos,
332 : const String &rNumberingString,
333 : const SvxBrushItem* pBrush = 0) = 0; // #i120928 export graphic of bullet
334 :
335 : protected:
336 :
337 : void GetNumberPara( String& rStr, const SwField& rFld );
338 :
339 : /// Output frames - the implementation.
340 : virtual void OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point& rNdTopLeft ) = 0;
341 :
342 : /// Sfx item Sfx item RES_CHRATR_CASEMAP
343 : virtual void CharCaseMap( const SvxCaseMapItem& ) = 0;
344 :
345 : /// Sfx item Sfx item RES_CHRATR_COLOR
346 : virtual void CharColor( const SvxColorItem& ) = 0;
347 :
348 : /// Sfx item Sfx item RES_CHRATR_CONTOUR
349 : virtual void CharContour( const SvxContourItem& ) = 0;
350 :
351 : /// Sfx item RES_CHRATR_CROSSEDOUT
352 : virtual void CharCrossedOut( const SvxCrossedOutItem& ) = 0;
353 :
354 : /// Sfx item RES_CHRATR_ESCAPEMENT
355 : virtual void CharEscapement( const SvxEscapementItem& ) = 0;
356 :
357 : /// Sfx item RES_CHRATR_FONT
358 : virtual void CharFont( const SvxFontItem& ) = 0;
359 :
360 : /// Sfx item RES_CHRATR_FONTSIZE
361 : virtual void CharFontSize( const SvxFontHeightItem& ) = 0;
362 :
363 : /// Sfx item RES_CHRATR_KERNING
364 : virtual void CharKerning( const SvxKerningItem& ) = 0;
365 :
366 : /// Sfx item RES_CHRATR_LANGUAGE
367 : virtual void CharLanguage( const SvxLanguageItem& ) = 0;
368 :
369 : /// Sfx item RES_CHRATR_POSTURE
370 : virtual void CharPosture( const SvxPostureItem& ) = 0;
371 :
372 : /// Sfx item RES_CHRATR_SHADOWED
373 : virtual void CharShadow( const SvxShadowedItem& ) = 0;
374 :
375 : /// Sfx item RES_CHRATR_UNDERLINE
376 : virtual void CharUnderline( const SvxUnderlineItem& ) = 0;
377 :
378 : /// Sfx item RES_CHRATR_WEIGHT
379 : virtual void CharWeight( const SvxWeightItem& ) = 0;
380 :
381 : /// Sfx item RES_CHRATR_AUTOKERN
382 : virtual void CharAutoKern( const SvxAutoKernItem& ) = 0;
383 :
384 : /// Sfx item RES_CHRATR_BLINK
385 : virtual void CharAnimatedText( const SvxBlinkItem& ) = 0;
386 :
387 : /// Sfx item RES_CHRATR_BACKGROUND
388 : virtual void CharBackground( const SvxBrushItem& ) = 0;
389 :
390 : /// Sfx item RES_CHRATR_CJK_FONT
391 : virtual void CharFontCJK( const SvxFontItem& ) = 0;
392 :
393 : /// Sfx item RES_CHRATR_CJK_FONTSIZE
394 : virtual void CharFontSizeCJK( const SvxFontHeightItem& ) = 0;
395 :
396 : /// Sfx item RES_CHRATR_CJK_LANGUAGE
397 : virtual void CharLanguageCJK( const SvxLanguageItem& ) = 0;
398 :
399 : /// Sfx item RES_CHRATR_CJK_POSTURE
400 : virtual void CharPostureCJK( const SvxPostureItem& ) = 0;
401 :
402 : /// Sfx item RES_CHRATR_CJK_WEIGHT
403 : virtual void CharWeightCJK( const SvxWeightItem& ) = 0;
404 :
405 : /// Sfx item RES_CHRATR_CTL_FONT
406 : virtual void CharFontCTL( const SvxFontItem& ) = 0;
407 :
408 : /// Sfx item RES_CHRATR_CTL_FONTSIZE
409 : virtual void CharFontSizeCTL( const SvxFontHeightItem& ) = 0;
410 :
411 : /// Sfx item RES_CHRATR_CTL_LANGUAGE
412 : virtual void CharLanguageCTL( const SvxLanguageItem& ) = 0;
413 :
414 : /// Sfx item RES_CHRATR_CTL_POSTURE
415 : virtual void CharPostureCTL( const SvxPostureItem& ) = 0;
416 :
417 : /// Sfx item RES_CHRATR_CTL_WEIGHT
418 : virtual void CharWeightCTL( const SvxWeightItem& ) = 0;
419 :
420 : /// Sfx item RES_CHRATR_ROTATE
421 : virtual void CharRotate( const SvxCharRotateItem& ) = 0;
422 :
423 : /// Sfx item RES_CHRATR_EMPHASIS_MARK
424 : virtual void CharEmphasisMark( const SvxEmphasisMarkItem& ) = 0;
425 :
426 : /// Sfx item RES_CHRATR_TWO_LINES
427 : virtual void CharTwoLines( const SvxTwoLinesItem& ) = 0;
428 :
429 : /// Sfx item RES_CHRATR_SCALEW
430 : virtual void CharScaleWidth( const SvxCharScaleWidthItem& ) = 0;
431 :
432 : /// Sfx item RES_CHRATR_RELIEF
433 : virtual void CharRelief( const SvxCharReliefItem& ) = 0;
434 :
435 : /// Sfx item RES_CHRATR_HIDDEN
436 : virtual void CharHidden( const SvxCharHiddenItem& ) = 0;
437 :
438 : /// Sfx item RES_TXTATR_INETFMT
439 : virtual void TextINetFormat( const SwFmtINetFmt& ) = 0;
440 :
441 : /// Sfx item RES_TXTATR_CHARFMT
442 : virtual void TextCharFormat( const SwFmtCharFmt& ) = 0;
443 :
444 : /// Sfx item RES_TXTATR_FIELD
445 : void TextField( const SwFmtFld& );
446 :
447 : /// Sfx item RES_TXTATR_FLYCNT
448 : virtual void TextFlyContent( const SwFmtFlyCnt& );
449 :
450 : /// Sfx item RES_TXTATR_FTN
451 : ///
452 : /// This one is common for both WW8AttributeOutput as well as
453 : /// DocxAttributeOutput.
454 : void TextFootnote( const SwFmtFtn& );
455 :
456 : /// Sfx item RES_TXTATR_FTN
457 : virtual void TextFootnote_Impl( const SwFmtFtn& ) = 0;
458 :
459 : /// Sfx item RES_PARATR_LINESPACING
460 : void ParaLineSpacing( const SvxLineSpacingItem& );
461 :
462 : /// Count the values in ParaLineSpacing, and pass theme here.
463 : virtual void ParaLineSpacing_Impl( short nSpace, short nMulti ) = 0;
464 :
465 : /// Sfx item RES_PARATR_ADJUST
466 : virtual void ParaAdjust( const SvxAdjustItem& ) = 0;
467 :
468 : /// Sfx item RES_PARATR_SPLIT
469 : virtual void ParaSplit( const SvxFmtSplitItem& ) = 0;
470 :
471 : /// Sfx item RES_PARATR_WIDOWS
472 : virtual void ParaWidows( const SvxWidowsItem& ) = 0;
473 :
474 : /// Sfx item RES_PARATR_TABSTOP
475 : virtual void ParaTabStop( const SvxTabStopItem& ) = 0;
476 :
477 : /// Sfx item RES_PARATR_HYPHENZONE
478 : virtual void ParaHyphenZone( const SvxHyphenZoneItem& ) = 0;
479 :
480 : /// Sfx item RES_PARATR_NUMRULE
481 : void ParaNumRule( const SwNumRuleItem& );
482 :
483 : /// Numbering - the implementation.
484 : virtual void ParaNumRule_Impl( const SwTxtNode *pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId ) = 0;
485 :
486 : /// Sfx item RES_PARATR_SCRIPTSPACE
487 : virtual void ParaScriptSpace( const SfxBoolItem& ) = 0;
488 :
489 : /// Sfx item RES_PARATR_HANGINGPUNCTUATION
490 25 : void ParaHangingPunctuation( const SfxBoolItem& rHt ) { ParaScriptSpace( rHt ); };
491 :
492 : /// Sfx item RES_PARATR_FORBIDDEN_RULES
493 18 : void ParaForbiddenRules( const SfxBoolItem& rHt ) { ParaScriptSpace( rHt ); };
494 :
495 : /// Sfx item RES_PARATR_VERTALIGN
496 : virtual void ParaVerticalAlign( const SvxParaVertAlignItem& ) = 0;
497 :
498 : /// Sfx item RES_PARATR_SNAPTOGRID
499 : virtual void ParaSnapToGrid( const SvxParaGridItem& ) = 0;
500 :
501 : /// Sfx item RES_FRM_SIZE
502 : virtual void FormatFrameSize( const SwFmtFrmSize& ) = 0;
503 :
504 : /// Sfx item RES_PAPER_BIN
505 : virtual void FormatPaperBin( const SvxPaperBinItem& ) = 0;
506 :
507 : /// Sfx item RES_LR_SPACE
508 : virtual void FormatLRSpace( const SvxLRSpaceItem& ) = 0;
509 :
510 : /// Sfx item RES_UL_SPACE
511 : virtual void FormatULSpace( const SvxULSpaceItem& ) = 0;
512 :
513 : /// Sfx item RES_PAGEDESC
514 : void FormatPageDescription( const SwFmtPageDesc& );
515 :
516 : /// Sfx item RES_BREAK
517 : void FormatBreak( const SvxFmtBreakItem& );
518 :
519 : /// Sfx item RES_SURROUND
520 : virtual void FormatSurround( const SwFmtSurround& ) = 0;
521 :
522 : /// Sfx item RES_VERT_ORIENT
523 : virtual void FormatVertOrientation( const SwFmtVertOrient& ) = 0;
524 :
525 : /// Sfx item RES_HORI_ORIENT
526 : virtual void FormatHorizOrientation( const SwFmtHoriOrient& ) = 0;
527 :
528 : /// Sfx item RES_ANCHOR
529 : virtual void FormatAnchor( const SwFmtAnchor& ) = 0;
530 :
531 : /// Sfx item RES_BACKGROUND
532 : virtual void FormatBackground( const SvxBrushItem& ) = 0;
533 :
534 : /// Sfx item RES_FILL_STYLE
535 : virtual void FormatFillStyle( const XFillStyleItem& ) = 0;
536 :
537 : /// Sfx item RES_FILL_GRADIENT
538 : virtual void FormatFillGradient( const XFillGradientItem& ) = 0;
539 :
540 : /// Sfx item RES_BOX
541 : virtual void FormatBox( const SvxBoxItem& ) = 0;
542 :
543 : /// Sfx item RES_COL
544 : void FormatColumns( const SwFmtCol& );
545 :
546 : virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) = 0;
547 :
548 : /// Sfx item RES_KEEP
549 : virtual void FormatKeep( const SvxFmtKeepItem& ) = 0;
550 :
551 : /// Compute the grid character pitch
552 : sal_uInt32 GridCharacterPitch( const SwTextGridItem& rGrid ) const;
553 :
554 : /// Sfx item RES_TEXTGRID
555 : virtual void FormatTextGrid( const SwTextGridItem& ) = 0;
556 :
557 : /// Sfx item RES_LINENUMBER
558 : virtual void FormatLineNumbering( const SwFmtLineNumber& ) = 0;
559 :
560 : /// Sfx item RES_FRAMEDIR
561 : virtual void FormatFrameDirection( const SvxFrameDirectionItem& ) = 0;
562 :
563 : /// Write the expanded field
564 : virtual void WriteExpand( const SwField* pFld ) = 0;
565 :
566 : virtual void RefField( const SwField& rFld, const String& rRef ) = 0;
567 : virtual void HiddenField( const SwField& rFld ) = 0;
568 : virtual void SetField( const SwField& rFld, ww::eField eType, const String& rCmd ) = 0;
569 : virtual void PostitField( const SwField* pFld ) = 0;
570 : virtual bool DropdownField( const SwField* pFld ) = 0;
571 : virtual bool PlaceholderField( const SwField* pFld ) = 0;
572 :
573 : virtual bool AnalyzeURL( const String& rUrl, const String& rTarget, String* pLinkURL, String* pMark );
574 :
575 : ww8::GridColsPtr GetGridCols( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
576 :
577 : public:
578 97 : AttributeOutputBase() {}
579 97 : virtual ~AttributeOutputBase() {}
580 :
581 : /// Return the right export class.
582 : virtual MSWordExportBase& GetExport() = 0;
583 :
584 : /// @overload
585 50 : const MSWordExportBase& GetExport() const { return const_cast< AttributeOutputBase* >( this )->GetExport(); }
586 :
587 : /// Call the right virtual function according to the type of the item.
588 : void OutputItem( const SfxPoolItem& rHt );
589 :
590 : /// Use OutputItem() on an item set - for styles.
591 : void OutputStyleItemSet( const SfxItemSet& rSet, sal_Bool bDeep, sal_Bool bTestForDefault );
592 :
593 : /// Output frames.
594 : void OutputFlyFrame( const sw::Frame& rFmt );
595 :
596 : void GetTablePageSize
597 : ( ww8::WW8TableNodeInfoInner * pTableTextNodeInfoInner,
598 : sal_uInt32& rPageSize, bool& rRelBoxSize );
599 :
600 : /// Exports the definition (image, size) of a single numbering picture bullet.
601 0 : virtual void BulletDefinition(int /*nId*/, const Graphic& /*rGraphic*/, Size /*aSize*/) {}
602 :
603 : };
604 :
605 : #endif // _ATTRIBUTEOUTPUTBASE_HXX_
606 :
607 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|