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