1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _DOCXATTRIBUTEOUTPUT_HXX_
25 #define _DOCXATTRIBUTEOUTPUT_HXX_
26 
27 #include "attributeoutputbase.hxx"
28 #include "fields.hxx"
29 
30 #include <sax/fshelper.hxx>
31 #include <sax/fastattribs.hxx>
32 #include <vcl/vclenum.hxx>
33 
34 #include <fldbas.hxx>
35 
36 #include <vector>
37 
38 class DocxExport;
39 
40 class SwGrfNode;
41 
42 namespace docx { class FootnotesList; }
43 namespace oox { namespace drawingml { class DrawingML; } }
44 
45 struct FieldInfos
46 {
47     const SwField*    pField;
48     ww::eField  eType;
49     bool        bOpen;
50     bool        bClose;
51     String     sCmd;
52 };
53 
54 enum DocxColBreakStatus
55 {
56     COLBRK_NONE,
57     COLBRK_POSTPONE,
58     COLBRK_WRITE
59 };
60 
61 class DocxAttributeOutput : public AttributeOutputBase
62 {
63 public:
64     /// Export the state of RTL/CJK.
65     virtual void RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript );
66 
67     /// Start of the paragraph.
68     virtual void StartParagraph( ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo );
69 
70     /// End of the paragraph.
71     virtual void EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
72 
73     /// Empty paragraph.
74     virtual void EmptyParagraph();
75 
76     /// Called before we start outputting the attributes.
77     virtual void StartParagraphProperties( const SwTxtNode& rNode );
78 
79     /// Called after we end outputting the attributes.
80     virtual void EndParagraphProperties();
81 
82     /// Start of the text run.
83     virtual void StartRun( const SwRedlineData* pRedlineData );
84 
85     /// End of the text run.
86     virtual void EndRun();
87 
88     /// Called before we start outputting the attributes.
89     virtual void StartRunProperties();
90 
91     /// Called after we end outputting the attributes.
92     virtual void EndRunProperties( const SwRedlineData* pRedlineData );
93 
94     virtual void WritePostitFieldStart();
95 
96     virtual void WritePostitFieldEnd();
97 
98     /// Output text (inside a run).
99     virtual void RunText( const String& rText, rtl_TextEncoding eCharSet = RTL_TEXTENCODING_UTF8 );
100 
101     /// Output text (without markup).
102     virtual void RawText( const String& rText, bool bForceUnicode, rtl_TextEncoding eCharSet );
103 
104     /// Output ruby start.
105     virtual void StartRuby( const SwTxtNode& rNode, const SwFmtRuby& rRuby );
106 
107     /// Output ruby end.
108     virtual void EndRuby();
109 
110     /// Output URL start.
111     virtual bool StartURL( const String& rUrl, const String& rTarget );
112 
113     /// Output URL end.
114     virtual bool EndURL();
115 
116     virtual void FieldVanish( const String& rTxt, ww::eField eType );
117 
118     /// Output redlining.
119     ///
120     /// The common attribute that can be among the run properties.
121     virtual void Redline( const SwRedlineData* pRedline );
122 
123     /// Output redlining.
124     ///
125     /// Start of the tag that encloses the run, fills the info according to
126     /// the value of m_pRedlineData.
127     void StartRedline( const SwRedlineData* pRedlineData );
128 
129     /// Output redlining.
130     ///
131     /// End of the tag that encloses the run.
132     void EndRedline();
133 
134     virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
135 
136     /// Output style.
137     virtual void ParagraphStyle( sal_uInt16 nStyle );
138 
139     virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
140 
141     virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
142 
143     virtual void TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
144 
145     virtual void TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
146 
147     virtual void TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
148 
149     virtual void TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
150 
151     virtual void TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
152 
153     virtual void TableBidi( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
154 
155     virtual void TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
156 
157     virtual void TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeInfo );
158 
159     virtual void TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer_t pNodeInfoInner );
160 
161     virtual void TableOrientation( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
162 
163     virtual void TableRowEnd( sal_uInt32 nDepth = 1 );
164 
165     /// Start of the styles table.
166     virtual void StartStyles();
167 
168     /// End of the styles table.
169     virtual void EndStyles( sal_uInt16 nNumberOfStyles );
170 
171     /// Write default style.
172     virtual void DefaultStyle( sal_uInt16 nStyle );
173 
174     /// Start of a style in the styles table.
175     virtual void StartStyle( const String& rName, bool bPapFmt,
176             sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId );
177 
178     /// End of a style in the styles table.
179     virtual void EndStyle();
180 
181     /// Start of (paragraph or run) properties of a style.
182     virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle );
183 
184     /// End of (paragraph or run) properties of a style.
185     virtual void EndStyleProperties( bool bParProp );
186 
187     /// Numbering rule and Id.
188     virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
189 
190     /// Page break
191     /// As a paragraph property - the paragraph should be on the next page.
192     virtual void PageBreakBefore( bool bBreak );
193 
194     /// Write a section break
195     /// msword::ColumnBreak or msword::PageBreak
196     virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL );
197 
198     /// Start of the section properties.
199     virtual void StartSection();
200 
201     /// End of the section properties.
202     virtual void EndSection();
203 
204     /// Protection of forms.
205     virtual void SectionFormProtection( bool bProtected );
206 
207     /// Numbering of the lines in the document.
208     virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo );
209 
210     /// Has different headers/footers for the title page.
211     virtual void SectionTitlePage();
212 
213     /// Description of the page borders.
214     virtual void SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmFmt* pFirstPageFmt );
215 
216     /// Columns populated from right/numbers on the right side?
217     virtual void SectionBiDi( bool bBiDi );
218 
219     /// The style of the page numbers.
220     ///
221     /// nPageRestartNumberr being 0 means no restart.
222     virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber );
223 
224     /// The type of breaking.
225     virtual void SectionType( sal_uInt8 nBreakCode );
226 
227     /// Start the font.
228     void StartFont( const String& rFamilyName ) const;
229 
230     /// End the font.
231     void EndFont() const;
232 
233     /// Alternate name for the font.
234     void FontAlternateName( const String& rName ) const;
235 
236     /// Font charset.
237     void FontCharset( sal_uInt8 nCharSet ) const;
238 
239     /// Font family.
240     void FontFamilyType( FontFamily eFamily ) const;
241 
242     /// Font pitch.
243     void FontPitchType( FontPitch ePitch ) const;
244 
245     /// Definition of a numbering instance.
246     virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
247 
248     /// Start of the abstract numbering definition instance.
249     virtual void StartAbstractNumbering( sal_uInt16 nId );
250 
251     /// End of the abstract numbering definition instance.
252     virtual void EndAbstractNumbering();
253 
254     /// All the numbering level information.
255     virtual void NumberingLevel( sal_uInt8 nLevel,
256         sal_uInt16 nStart,
257         sal_uInt16 nNumberingType,
258         SvxAdjust eAdjust,
259         const sal_uInt8 *pNumLvlPos,
260         sal_uInt8 nFollow,
261         const wwFont *pFont,
262         const SfxItemSet *pOutSet,
263         sal_Int16 nIndentAt,
264         sal_Int16 nFirstLineIndex,
265         sal_Int16 nListTabPos,
266         const String &rNumberingString );
267 
268     void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode );
269 
270     void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds );
271 
272 private:
273     /// Initialize the structures where we are going to collect some of the paragraph properties.
274     ///
275     /// Some of the properties have to be collected from more sources, and are
276     /// actually not written between StartParagraphProperties and
277     /// EndParagraphProperties.  They are output in this method, which is
278     /// supposed to be called just before outputting </rPr> whenever it is done.
279     void InitCollectedParagraphProperties();
280 
281     /// Output what we collected during the run properties output.
282     ///
283     /// @see WriteCollectedParagrapProperties().
284     void WriteCollectedParagraphProperties();
285 
286     /// Initialize the structures where we are going to collect some of the run properties.
287     ///
288     /// This is an equivalent of InitCollectedParagraphProperties(), resp.
289     /// WriteCollectectedParagraphProperties().
290     ///
291     /// @see InitCollectedParagraphProperties().
292     void InitCollectedRunProperties();
293 
294     /// Output what we collected during the run properties output.
295     ///
296     /// @see InitCollectedRunProperies(), WriteCollectedParagraphProperties()
297     void WriteCollectedRunProperties();
298 
299     /// Output graphic fly frames.
300     void FlyFrameGraphic( const SwGrfNode& rGrfNode, const Size& rSize );
301 
302     void InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
303 
304     void StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
305 
306     void StartTableRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
307 
308     void StartTableCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
309 
310     void TableCellProperties( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
311 
312     void EndTableCell( );
313 
314     void EndTableRow( );
315 
316     void EndTable();
317 
318     /// End cell, row, and even the entire table if necessary.
319     void FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer_t pInner, bool bForceEmptyParagraph = false );
320 
321 protected:
322 
323     /// Output frames - the implementation.
324     virtual void OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point& rNdTopLeft );
325 
326     /// Sfx item Sfx item RES_CHRATR_CASEMAP
327     virtual void CharCaseMap( const SvxCaseMapItem& rCaseMap );
328 
329     /// Sfx item Sfx item RES_CHRATR_COLOR
330     virtual void CharColor( const SvxColorItem& rColor);
331 
332     /// Sfx item Sfx item RES_CHRATR_CONTOUR
333     virtual void CharContour( const SvxContourItem& rContour );
334 
335     /// Sfx item RES_CHRATR_CROSSEDOUT
336     virtual void CharCrossedOut( const SvxCrossedOutItem& rCrossedOut );
337 
338     /// Sfx item RES_CHRATR_ESCAPEMENT
339     virtual void CharEscapement( const SvxEscapementItem& rEscapement );
340 
341     /// Sfx item RES_CHRATR_FONT
342     virtual void CharFont( const SvxFontItem& rFont );
343 
344     /// Sfx item RES_CHRATR_FONTSIZE
345     virtual void CharFontSize( const SvxFontHeightItem& rFontSize );
346 
347     /// Sfx item RES_CHRATR_KERNING
348     virtual void CharKerning( const SvxKerningItem& rKerning );
349 
350     /// Sfx item RES_CHRATR_LANGUAGE
351     virtual void CharLanguage( const SvxLanguageItem& rLanguage );
352 
353     /// Sfx item RES_CHRATR_POSTURE
354     virtual void CharPosture( const SvxPostureItem& rPosture );
355 
356     /// Sfx item RES_CHRATR_SHADOWED
357     virtual void CharShadow( const SvxShadowedItem& rShadow );
358 
359     /// Sfx item RES_CHRATR_UNDERLINE
360     virtual void CharUnderline( const SvxUnderlineItem& rUnderline );
361 
362     /// Sfx item RES_CHRATR_WEIGHT
363     virtual void CharWeight( const SvxWeightItem& rWeight );
364 
365     /// Sfx item RES_CHRATR_AUTOKERN
366     virtual void CharAutoKern( const SvxAutoKernItem& );
367 
368     /// Sfx item RES_CHRATR_BLINK
369     virtual void CharAnimatedText( const SvxBlinkItem& rBlink );
370 
371     /// Sfx item RES_CHRATR_BACKGROUND
372     virtual void CharBackground( const SvxBrushItem& rBrush );
373 
374     /// Sfx item RES_CHRATR_CJK_FONT
375     virtual void CharFontCJK( const SvxFontItem& rFont );
376 
377     /// Sfx item RES_CHRATR_CJK_FONTSIZE
CharFontSizeCJK(const SvxFontHeightItem & rFontSize)378     virtual void CharFontSizeCJK( const SvxFontHeightItem& rFontSize ) { CharFontSize( rFontSize ); }
379 
380     /// Sfx item RES_CHRATR_CJK_LANGUAGE
CharLanguageCJK(const SvxLanguageItem & rLanguageItem)381     virtual void CharLanguageCJK( const SvxLanguageItem& rLanguageItem ) { CharLanguage( rLanguageItem ); }
382 
383     /// Sfx item RES_CHRATR_CJK_POSTURE
384     virtual void CharPostureCJK( const SvxPostureItem& rPosture );
385 
386     /// Sfx item RES_CHRATR_CJK_WEIGHT
387     virtual void CharWeightCJK( const SvxWeightItem& rWeight );
388 
389     /// Sfx item RES_CHRATR_CTL_FONT
390     virtual void CharFontCTL( const SvxFontItem& rFont );
391 
392     /// Sfx item RES_CHRATR_CTL_FONTSIZE
CharFontSizeCTL(const SvxFontHeightItem & rFontSize)393     virtual void CharFontSizeCTL( const SvxFontHeightItem& rFontSize ) { CharFontSize( rFontSize ); }
394 
395     /// Sfx item RES_CHRATR_CTL_LANGUAGE
CharLanguageCTL(const SvxLanguageItem & rLanguageItem)396     virtual void CharLanguageCTL( const SvxLanguageItem& rLanguageItem ) { CharLanguage( rLanguageItem); }
397 
398     /// Sfx item RES_CHRATR_CTL_POSTURE
399     virtual void CharPostureCTL( const SvxPostureItem& rWeight );
400 
401     /// Sfx item RES_CHRATR_CTL_WEIGHT
402     virtual void CharWeightCTL( const SvxWeightItem& rWeight );
403 
404     /// Sfx item RES_CHRATR_ROTATE
405     virtual void CharRotate( const SvxCharRotateItem& rRotate );
406 
407     /// Sfx item RES_CHRATR_EMPHASIS_MARK
408     virtual void CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisMark );
409 
410     /// Sfx item RES_CHRATR_TWO_LINES
411     virtual void CharTwoLines( const SvxTwoLinesItem& rTwoLines );
412 
413     /// Sfx item RES_CHRATR_SCALEW
414     virtual void CharScaleWidth( const SvxCharScaleWidthItem& rScaleWidth );
415 
416     /// Sfx item RES_CHRATR_RELIEF
417     virtual void CharRelief( const SvxCharReliefItem& rRelief);
418 
419     /// Sfx item RES_CHRATR_HIDDEN
420     virtual void CharHidden( const SvxCharHiddenItem& rHidden );
421 
422     /// Sfx item RES_TXTATR_INETFMT
423     virtual void TextINetFormat( const SwFmtINetFmt& );
424 
425     /// Sfx item RES_TXTATR_CHARFMT
426     virtual void TextCharFormat( const SwFmtCharFmt& );
427 
428     /// Sfx item RES_TXTATR_FTN
429     virtual void TextFootnote_Impl( const SwFmtFtn& );
430 
431     /// Output the footnote/endnote reference (if there's one to output).
432     void FootnoteEndnoteReference();
433 
434     /// Sfx item RES_PARATR_LINESPACING
435     virtual void ParaLineSpacing_Impl( short nSpace, short nMulti );
436 
437     /// Sfx item RES_PARATR_ADJUST
438     virtual void ParaAdjust( const SvxAdjustItem& rAdjust );
439 
440     /// Sfx item RES_PARATR_SPLIT
441     virtual void ParaSplit( const SvxFmtSplitItem& rSplit );
442 
443     /// Sfx item RES_PARATR_WIDOWS
444     virtual void ParaWidows( const SvxWidowsItem& rWidows );
445 
446     /// Sfx item RES_PARATR_TABSTOP
447     virtual void ParaTabStop( const SvxTabStopItem& rTabStop );
448 
449     /// Sfx item RES_PARATR_HYPHENZONE
450     virtual void ParaHyphenZone( const SvxHyphenZoneItem& );
451 
452     /// Sfx item RES_PARATR_NUMRULE
453     virtual void ParaNumRule_Impl( const SwTxtNode *pTxtNd, sal_Int32 nLvl, sal_Int32 nNumId );
454 
455     /// Sfx item RES_PARATR_SCRIPTSPACE
456     virtual void ParaScriptSpace( const SfxBoolItem& );
457 
458     /// Sfx item RES_PARATR_VERTALIGN
459     virtual void ParaVerticalAlign( const SvxParaVertAlignItem& rAlign );
460 
461     /// Sfx item RES_PARATR_SNAPTOGRID
462     virtual void ParaSnapToGrid( const SvxParaGridItem& );
463 
464     /// Sfx item RES_FRM_SIZE
465     virtual void FormatFrameSize( const SwFmtFrmSize& );
466 
467     /// Sfx item RES_PAPER_BIN
468     virtual void FormatPaperBin( const SvxPaperBinItem& );
469 
470     /// Sfx item RES_LR_SPACE
471     virtual void FormatLRSpace( const SvxLRSpaceItem& rLRSpace );
472 
473     /// Sfx item RES_UL_SPACE
474     virtual void FormatULSpace( const SvxULSpaceItem& rULSpace );
475 
476     /// Sfx item RES_SURROUND
477     virtual void FormatSurround( const SwFmtSurround& );
478 
479     /// Sfx item RES_VERT_ORIENT
480     virtual void FormatVertOrientation( const SwFmtVertOrient& );
481 
482     /// Sfx item RES_HORI_ORIENT
483     virtual void FormatHorizOrientation( const SwFmtHoriOrient& );
484 
485     /// Sfx item RES_ANCHOR
486     virtual void FormatAnchor( const SwFmtAnchor& );
487 
488     /// Sfx item RES_BACKGROUND
489     virtual void FormatBackground( const SvxBrushItem& );
490 
491     /// Sfx item RES_BOX
492     virtual void FormatBox( const SvxBoxItem& );
493 
494     /// Sfx item RES_COL
495     virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
496 
497     /// Sfx item RES_KEEP
498     virtual void FormatKeep( const SvxFmtKeepItem& );
499 
500     /// Sfx item RES_TEXTGRID
501     virtual void FormatTextGrid( const SwTextGridItem& );
502 
503     /// Sfx item RES_LINENUMBER
504     virtual void FormatLineNumbering( const SwFmtLineNumber& );
505 
506     /// Sfx item RES_FRAMEDIR
507     virtual void FormatFrameDirection( const SvxFrameDirectionItem& );
508 
509     /// Write the expanded field
510     virtual void WriteExpand( const SwField* pFld );
511 
512     virtual void RefField( const SwField& rFld, const String& rRef );
513     virtual void HiddenField( const SwField& rFld );
514     virtual void SetField( const SwField& rFld, ww::eField eType, const String& rCmd );
515     virtual void PostitField( const SwField* pFld );
516     virtual bool DropdownField( const SwField* pFld );
517 
518     virtual bool AnalyzeURL( const String& rURL, const String& rTarget, String* pLinkURL, String* pMark );
519 
520     /// Reference to the export, where to get the data from
521     DocxExport &m_rExport;
522 
523     /// Fast serializer to output the data
524     ::sax_fastparser::FSHelperPtr m_pSerializer;
525 
526     /// DrawingML access
527     oox::drawingml::DrawingML &m_rDrawingML;
528 
529 private:
530 
531     void DoWriteBookmarks( );
532     void WriteCommentRanges();
533 
534     void StartField_Impl( FieldInfos& rInfos, sal_Bool bWriteRun = sal_False );
535     void DoWriteCmd( String& rCmd );
536     void CmdField_Impl( FieldInfos& rInfos );
537     void EndField_Impl( FieldInfos& rInfos );
538 
539     ::sax_fastparser::FastAttributeList *m_pFontsAttrList, *m_pEastAsianLayoutAttrList;
540     ::sax_fastparser::FastAttributeList *m_pCharLangAttrList;
541     ::sax_fastparser::FastAttributeList *m_pSpacingAttrList;
542     ::sax_fastparser::FastAttributeList *m_pHyperlinkAttrList;
543 
544     ::docx::FootnotesList *m_pFootnotesList;
545     ::docx::FootnotesList *m_pEndnotesList;
546 
547     const WW8_SepInfo *m_pSectionInfo;
548 
549     /// Redline data to remember in the text run.
550     const SwRedlineData *m_pRedlineData;
551 
552     /// Id of the redline
553     sal_Int32 m_nRedlineId;
554 
555     /// Flag indicating that the section properties are being written
556     sal_Bool m_bOpenedSectPr;
557 
558     /// Field data to remember in the text run
559     std::vector< FieldInfos > m_Fields;
560     String m_sFieldBkm;
561     sal_Int32 m_nNextMarkId;
562 
563     /// Bookmarks to output
564     std::vector<rtl::OString> m_rMarksStart;
565     std::vector<rtl::OString> m_rMarksEnd;
566 
567     /// Is there a postit start to output?
568     bool m_bPostitStart;
569     /// Is there a postit end to output?
570     bool m_bPostitEnd;
571 
572     /// Maps of the bookmarks ids
573     std::map<rtl::OString, sal_uInt16> m_rOpenedMarksIds;
574 
575     /// The current table helper
576     SwWriteTable *m_pTableWrt;
577 
578     /// Remember if we are in an open cell, or not.
579     bool m_bTableCellOpen;
580 
581     /// Remember the current table depth.
582     sal_uInt32 m_nTableDepth;
583 
584     bool m_bParagraphOpened;
585 
586     // Remember that a column break has to be opened at the
587     // beginning of the next paragraph
588     DocxColBreakStatus m_nColBreakStatus;
589 
590 public:
591     DocxAttributeOutput( DocxExport &rExport, ::sax_fastparser::FSHelperPtr pSerializer, oox::drawingml::DrawingML* pDrawingML );
592 
593     virtual ~DocxAttributeOutput();
594 
595     /// Return the right export class.
596     virtual MSWordExportBase& GetExport();
597 
598     /// For eg. the output of the styles, we need to switch the serializer to enother one.
SetSerializer(::sax_fastparser::FSHelperPtr pSerializer)599     void SetSerializer( ::sax_fastparser::FSHelperPtr pSerializer ) { m_pSerializer = pSerializer; }
600 
601     /// Occasionnaly need to use this serializer from the outside
GetSerializer()602     ::sax_fastparser::FSHelperPtr GetSerializer( ) { return m_pSerializer; }
603 
604     /// Do we have any footnotes?
605     bool HasFootnotes();
606 
607     /// Do we have any endnotes?
608     bool HasEndnotes();
609 
610     /// Output the content of the footnotes.xml resp. endnotes.xml
611     void FootnotesEndnotes( bool bFootnotes );
612 };
613 
614 #endif // _DOCXATTRIBUTEOUTPUT_HXX_
615 
616 /* vi:set tabstop=4 shiftwidth=4 expandtab: */
617