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