bump product version to 4.1.6.2
[LibreOffice.git] / include / xmloff / txtparae.hxx
blobe37a6de3924829ec5f9124269cc207d7429ecfa4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _XMLOFF_TEXTPARAE_HXX_
21 #define _XMLOFF_TEXTPARAE_HXX_
23 #include "sal/config.h"
24 #include "xmloff/dllapi.h"
25 #include <rtl/ustring.hxx>
26 #include <com/sun/star/uno/Reference.h>
27 #include <com/sun/star/uno/Sequence.h>
28 #include <com/sun/star/beans/PropertyValue.hpp>
29 #include <xmloff/uniref.hxx>
30 #include <xmloff/xmlexppr.hxx>
31 #include <xmloff/styleexp.hxx>
32 #include <xmloff/xmltoken.hxx>
33 #include <xmloff/SinglePropertySetInfoCache.hxx>
34 #include <xmloff/XMLStringVector.hxx>
35 #include <vector>
36 #include <boost/scoped_ptr.hpp>
38 class XMLTextListsHelper;
39 class SvXMLExport;
40 class SvXMLAutoStylePoolP;
41 class XMLTextFieldExport;
42 class XMLTextNumRuleInfo;
43 class XMLTextListAutoStylePool;
44 class XMLSectionExport;
45 class XMLIndexMarkExport;
46 class XMLRedlineExport;
47 struct XMLPropertyState;
48 class MultiPropertySetHelper;
50 namespace com { namespace sun { namespace star
52 namespace beans { class XPropertySet; class XPropertyState;
53 class XPropertySetInfo; }
54 namespace container { class XEnumerationAccess; class XEnumeration; class XIndexAccess; }
55 namespace text { class XTextContent; class XTextRange; class XText;
56 class XFootnote; class XTextFrame; class XTextSection;
57 class XTextField;
58 class XDocumentIndex; class XTextShapesSupplier; }
59 } } }
61 namespace xmloff
63 class OFormLayerXMLExport;
64 class BoundFrameSets;
67 class XMLOFF_DLLPUBLIC XMLTextParagraphExport : public XMLStyleExport
69 struct Impl;
70 ::boost::scoped_ptr<Impl> m_pImpl;
72 // SvXMLExport& rExport;
73 SvXMLAutoStylePoolP& rAutoStylePool;
74 UniReference < SvXMLExportPropertyMapper > xParaPropMapper;
75 UniReference < SvXMLExportPropertyMapper > xTextPropMapper;
76 UniReference < SvXMLExportPropertyMapper > xFramePropMapper;
77 UniReference < SvXMLExportPropertyMapper > xAutoFramePropMapper;
78 UniReference < SvXMLExportPropertyMapper > xSectionPropMapper;
79 UniReference < SvXMLExportPropertyMapper > xRubyPropMapper;
81 const ::std::auto_ptr< ::xmloff::BoundFrameSets > pBoundFrameSets;
82 XMLTextFieldExport *pFieldExport;
83 std::vector<OUString> *pListElements;
84 XMLTextListAutoStylePool *pListAutoPool;
85 XMLSectionExport *pSectionExport;
86 XMLIndexMarkExport *pIndexMarkExport;
88 /// may be NULL (if no redlines should be exported; e.g. in block mode)
89 XMLRedlineExport *pRedlineExport;
90 XMLStringVector *pHeadingStyles;
92 sal_Bool bProgress;
94 sal_Bool bBlock;
96 // keep track of open rubies
97 OUString sOpenRubyText;
98 OUString sOpenRubyCharStyle;
99 sal_Bool bOpenRuby;
101 XMLTextListsHelper* mpTextListsHelper;
102 ::std::vector< XMLTextListsHelper* > maTextListsHelperStack;
104 enum FrameType { FT_TEXT, FT_GRAPHIC, FT_EMBEDDED, FT_SHAPE };
105 public:
107 enum FieldmarkType { NONE, TEXT, CHECK }; // Used for simulating fieldmarks in OpenDocument 1.n Strict (for n <= 2). CHECK currently ignored.
109 protected:
111 const OUString sActualSize;
112 // Implement Title/Description Elements UI (#i73249#)
113 const OUString sTitle;
114 const OUString sDescription;
115 const OUString sAnchorCharStyleName;
116 const OUString sAnchorPageNo;
117 const OUString sAnchorType;
118 const OUString sBeginNotice;
119 const OUString sBookmark;
120 const OUString sCategory;
121 const OUString sChainNextName;
122 const OUString sCharStyleName;
123 const OUString sCharStyleNames;
124 const OUString sContourPolyPolygon;
125 const OUString sDocumentIndex;
126 const OUString sDocumentIndexMark;
127 const OUString sEndNotice;
128 const OUString sFootnote;
129 const OUString sFootnoteCounting;
130 const OUString sFrame;
131 const OUString sFrameHeightAbsolute;
132 const OUString sFrameHeightPercent;
133 const OUString sFrameStyleName;
134 const OUString sFrameWidthAbsolute;
135 const OUString sFrameWidthPercent;
136 const OUString sGraphicFilter;
137 const OUString sGraphicRotation;
138 const OUString sGraphicURL;
139 const OUString sReplacementGraphicURL;
140 const OUString sHeight;
141 const OUString sHoriOrient;
142 const OUString sHoriOrientPosition;
143 const OUString sHyperLinkName;
144 const OUString sHyperLinkTarget;
145 const OUString sHyperLinkURL;
146 const OUString sIsAutomaticContour;
147 const OUString sIsCollapsed;
148 const OUString sIsPixelContour;
149 const OUString sIsStart;
150 const OUString sIsSyncHeightToWidth;
151 const OUString sIsSyncWidthToHeight;
152 const OUString sNumberingRules;
153 const OUString sNumberingType;
154 const OUString sPageDescName;
155 const OUString sPageStyleName;
156 const OUString sParaChapterNumberingLevel;
157 const OUString sParaConditionalStyleName;
158 const OUString sParagraphService;
159 const OUString sParaStyleName;
160 const OUString sPositionEndOfDoc;
161 const OUString sPrefix;
162 const OUString sRedline;
163 const OUString sReferenceId;
164 const OUString sReferenceMark;
165 const OUString sRelativeHeight;
166 const OUString sRelativeWidth;
167 const OUString sRuby;
168 const OUString sRubyAdjust;
169 const OUString sRubyCharStyleName;
170 const OUString sRubyText;
171 const OUString sServerMap;
172 const OUString sShapeService;
173 const OUString sSizeType;
174 const OUString sSoftPageBreak;
175 const OUString sStartAt;
176 const OUString sSuffix;
177 const OUString sTableService;
178 const OUString sText;
179 const OUString sTextContentService;
180 const OUString sTextEmbeddedService;
181 const OUString sTextEndnoteService;
182 const OUString sTextField;
183 const OUString sTextFieldService;
184 const OUString sTextFrameService;
185 const OUString sTextGraphicService;
186 const OUString sTextPortionType;
187 const OUString sTextSection;
188 const OUString sUnvisitedCharStyleName;
189 const OUString sVertOrient;
190 const OUString sVertOrientPosition;
191 const OUString sVisitedCharStyleName;
192 const OUString sWidth;
193 const OUString sWidthType;
194 const OUString sTextFieldStart;
195 const OUString sTextFieldEnd;
196 const OUString sTextFieldStartEnd;
198 SinglePropertySetInfoCache aCharStyleNamesPropInfoCache;
200 // SvXMLExport& GetExport() { return rExport; }
201 // const SvXMLExport& GetExport() const { return rExport; }
203 UniReference < SvXMLExportPropertyMapper > GetParaPropMapper() const
205 return xParaPropMapper;
208 UniReference < SvXMLExportPropertyMapper > GetTextPropMapper() const
210 return xTextPropMapper;
213 UniReference < SvXMLExportPropertyMapper > GetFramePropMapper() const
215 return xFramePropMapper;
217 UniReference < SvXMLExportPropertyMapper > GetAutoFramePropMapper() const
219 return xAutoFramePropMapper;
221 UniReference < SvXMLExportPropertyMapper > GetSectionPropMapper() const
223 return xSectionPropMapper;
225 UniReference < SvXMLExportPropertyMapper > GetRubyPropMapper() const
227 return xRubyPropMapper;
231 SvXMLAutoStylePoolP& GetAutoStylePool() { return rAutoStylePool; }
232 const SvXMLAutoStylePoolP& GetAutoStylePool() const { return rAutoStylePool; }
234 public:
235 OUString FindTextStyleAndHyperlink(
236 const ::com::sun::star::uno::Reference <
237 ::com::sun::star::beans::XPropertySet > & rPropSet,
238 sal_Bool& rbHyperlink,
239 sal_Bool& rbHasCharStyle,
240 sal_Bool& rbHasAutoStyle,
241 const XMLPropertyState** pAddState = NULL) const;
242 sal_Bool addHyperlinkAttributes(
243 const ::com::sun::star::uno::Reference <
244 ::com::sun::star::beans::XPropertySet > & rPropSet,
245 const ::com::sun::star::uno::Reference <
246 ::com::sun::star::beans::XPropertyState > & rPropState,
247 const ::com::sun::star::uno::Reference <
248 ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
250 void exportTextRangeEnumeration(
251 const ::com::sun::star::uno::Reference <
252 ::com::sun::star::container::XEnumeration > & rRangeEnum,
253 sal_Bool bAutoStyles, sal_Bool bProgress,
254 sal_Bool bPrvChrIsSpc = sal_True );
256 protected:
258 sal_Int32 addTextFrameAttributes(
259 const ::com::sun::star::uno::Reference <
260 ::com::sun::star::beans::XPropertySet >& rPropSet,
261 sal_Bool bShape,
262 OUString *pMinHeightValue = 0,
263 OUString *pMinWidthValue = 0 );
265 virtual void exportStyleAttributes(
266 const ::com::sun::star::uno::Reference<
267 ::com::sun::star::style::XStyle > & rStyle );
269 void exportPageFrames( sal_Bool bAutoStyles, sal_Bool bProgress );
270 void exportFrameFrames( sal_Bool bAutoStyles, sal_Bool bProgress,
271 const ::com::sun::star::uno::Reference <
272 ::com::sun::star::text::XTextFrame > *pParentTxtFrame = 0 );
274 void exportNumStyles( sal_Bool bUsed );
276 void exportText(
277 const ::com::sun::star::uno::Reference <
278 ::com::sun::star::text::XText > & rText,
279 sal_Bool bAutoStyles, sal_Bool bProgress, sal_Bool bExportParagraph );
281 void exportText(
282 const ::com::sun::star::uno::Reference <
283 ::com::sun::star::text::XText > & rText,
284 const ::com::sun::star::uno::Reference <
285 ::com::sun::star::text::XTextSection > & rBaseSection,
286 sal_Bool bAutoStyles, sal_Bool bProgress, sal_Bool bExportParagraph );
288 sal_Bool exportTextContentEnumeration(
289 const ::com::sun::star::uno::Reference <
290 ::com::sun::star::container::XEnumeration > & rContentEnum,
291 sal_Bool bAutoStyles,
292 const ::com::sun::star::uno::Reference <
293 ::com::sun::star::text::XTextSection > & rBaseSection,
294 sal_Bool bProgress,
295 sal_Bool bExportParagraph = sal_True,
296 const ::com::sun::star::uno::Reference <
297 ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0,
298 sal_Bool bExportLevels = sal_True );
299 void exportParagraph(
300 const ::com::sun::star::uno::Reference <
301 ::com::sun::star::text::XTextContent > & rTextContent,
302 sal_Bool bAutoStyles, sal_Bool bProgress,
303 sal_Bool bExportParagraph,
304 MultiPropertySetHelper& rPropSetHelper);
305 virtual void exportTable(
306 const ::com::sun::star::uno::Reference <
307 ::com::sun::star::text::XTextContent > & rTextContent,
308 sal_Bool bAutoStyles, sal_Bool bProgress );
310 void exportTextField(
311 const ::com::sun::star::uno::Reference <
312 ::com::sun::star::text::XTextRange > & rTextRange,
313 sal_Bool bAutoStyles, sal_Bool bProgress );
315 void exportTextField(
316 const ::com::sun::star::uno::Reference <
317 ::com::sun::star::text::XTextField> & xTextField,
318 const sal_Bool bAutoStyles, const sal_Bool bProgress,
319 const sal_Bool bRecursive );
321 void exportAnyTextFrame(
322 const ::com::sun::star::uno::Reference <
323 ::com::sun::star::text::XTextContent > & rTextContent,
324 FrameType eTxpe,
325 sal_Bool bAutoStyles, sal_Bool bProgress, sal_Bool bExportContent,
326 const ::com::sun::star::uno::Reference <
327 ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
328 void _exportTextFrame(
329 const ::com::sun::star::uno::Reference <
330 ::com::sun::star::beans::XPropertySet > & rPropSet,
331 const ::com::sun::star::uno::Reference <
332 ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo,
333 sal_Bool bProgress );
334 inline void exportTextFrame(
335 const ::com::sun::star::uno::Reference <
336 ::com::sun::star::text::XTextContent > & rTextContent,
337 sal_Bool bAutoStyles, sal_Bool bProgress, sal_Bool bExportContent,
338 const ::com::sun::star::uno::Reference <
339 ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
340 inline void exportShape(
341 const ::com::sun::star::uno::Reference <
342 ::com::sun::star::text::XTextContent > & rTextContent,
343 sal_Bool bAutoStyles,
344 const ::com::sun::star::uno::Reference <
345 ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
347 void exportContour(
348 const ::com::sun::star::uno::Reference <
349 ::com::sun::star::beans::XPropertySet > & rPropSet,
350 const ::com::sun::star::uno::Reference <
351 ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
352 void _exportTextGraphic(
353 const ::com::sun::star::uno::Reference <
354 ::com::sun::star::beans::XPropertySet > & rPropSet,
355 const ::com::sun::star::uno::Reference <
356 ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
357 inline void exportTextGraphic(
358 const ::com::sun::star::uno::Reference <
359 ::com::sun::star::text::XTextContent > & rTextContent,
360 sal_Bool bAutoStyles,
361 const ::com::sun::star::uno::Reference <
362 ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
364 virtual void _collectTextEmbeddedAutoStyles(
365 const ::com::sun::star::uno::Reference <
366 ::com::sun::star::beans::XPropertySet > & rPropSet );
367 virtual void _exportTextEmbedded(
368 const ::com::sun::star::uno::Reference <
369 ::com::sun::star::beans::XPropertySet > & rPropSet,
370 const ::com::sun::star::uno::Reference <
371 ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
372 inline void exportTextEmbedded(
373 const ::com::sun::star::uno::Reference <
374 ::com::sun::star::text::XTextContent > & rTextContent,
375 sal_Bool bAutoStyles,
376 const ::com::sun::star::uno::Reference <
377 ::com::sun::star::beans::XPropertySet > *pRangePropSet = 0 );
378 virtual void setTextEmbeddedGraphicURL(
379 const ::com::sun::star::uno::Reference <
380 ::com::sun::star::beans::XPropertySet >& rPropSet,
381 OUString& rStreamName ) const;
383 /// export a footnote and styles
384 void exportTextFootnote(
385 const ::com::sun::star::uno::Reference<
386 ::com::sun::star::beans::XPropertySet > & rPropSet,
387 const OUString& sString,
388 sal_Bool bAutoStyles, sal_Bool bProgress );
390 /// helper for exportTextFootnote
391 void exportTextFootnoteHelper(
392 const ::com::sun::star::uno::Reference<
393 ::com::sun::star::text::XFootnote > & rPropSet,
394 const ::com::sun::star::uno::Reference<
395 ::com::sun::star::text::XText> & rText,
396 const OUString& sString,
397 sal_Bool bAutoStyles,
398 sal_Bool bIsEndnote, sal_Bool bProgress );
400 /// export footnote and endnote configuration elements
401 void exportTextFootnoteConfiguration();
403 void exportTextFootnoteConfigurationHelper(
404 const ::com::sun::star::uno::Reference<
405 ::com::sun::star::beans::XPropertySet> & rFootnoteSupplier,
406 sal_Bool bIsEndnote);
408 void exportTextMark(
409 const ::com::sun::star::uno::Reference<
410 ::com::sun::star::beans::XPropertySet> & xPropSet,
411 const OUString& rProperty,
412 const enum ::xmloff::token::XMLTokenEnum pElements[],
413 sal_Bool bAutoStyles);
415 void exportIndexMark(
416 const ::com::sun::star::uno::Reference<
417 ::com::sun::star::beans::XPropertySet> & rPropSet,
418 sal_Bool bAutoStyles);
420 void exportSoftPageBreak(
421 const ::com::sun::star::uno::Reference<
422 ::com::sun::star::beans::XPropertySet> & rPropSet,
423 sal_Bool bAutoStyles);
425 void exportTextRange(
426 const ::com::sun::star::uno::Reference <
427 ::com::sun::star::text::XTextRange > & rTextRange,
428 sal_Bool bAutoStyles,
429 bool& rPrevCharWasSpace,
430 FieldmarkType& openFieldmarkType );
432 void exportListChange( const XMLTextNumRuleInfo& rPrvInfo,
433 const XMLTextNumRuleInfo& rNextInfo );
435 /// check if current section or current list has changed;
436 /// calls exortListChange as appropriate
437 void exportListAndSectionChange(
438 ::com::sun::star::uno::Reference <
439 ::com::sun::star::text::XTextSection > & rOldSection,
440 const ::com::sun::star::uno::Reference <
441 ::com::sun::star::text::XTextSection > & rNewSection,
442 const XMLTextNumRuleInfo& rOldList,
443 const XMLTextNumRuleInfo& rNewList,
444 sal_Bool bAutoStyles );
446 /// overload for exportListAndSectionChange;
447 /// takes new content rather than new section.
448 void exportListAndSectionChange(
449 ::com::sun::star::uno::Reference <
450 ::com::sun::star::text::XTextSection > & rOldSection,
451 const ::com::sun::star::uno::Reference <
452 ::com::sun::star::text::XTextContent > & rNewContent,
453 const XMLTextNumRuleInfo& rOldList,
454 const XMLTextNumRuleInfo& rNewList,
455 sal_Bool bAutoStyles );
456 void exportListAndSectionChange(
457 ::com::sun::star::uno::Reference <
458 ::com::sun::star::text::XTextSection > & rOldSection,
459 MultiPropertySetHelper& rPropSetHelper,
460 sal_Int16 nTextSectionId,
461 const ::com::sun::star::uno::Reference <
462 ::com::sun::star::text::XTextContent > & rNewContent,
463 const XMLTextNumRuleInfo& rOldList,
464 const XMLTextNumRuleInfo& rNewList,
465 sal_Bool bAutoStyles );
467 /// export a redline text portion
468 void exportChange(
469 const ::com::sun::star::uno::Reference <
470 ::com::sun::star::beans::XPropertySet > & rPropSet,
471 sal_Bool bAutoStyle);
473 /// export a ruby
474 void exportRuby(
475 const ::com::sun::star::uno::Reference<
476 ::com::sun::star::beans::XPropertySet> & rPortionPropSet,
477 sal_Bool bAutoStyles );
479 /// export a text:meta
480 void exportMeta(
481 const ::com::sun::star::uno::Reference<
482 ::com::sun::star::beans::XPropertySet> & i_xPortion,
483 sal_Bool i_bAutoStyles, sal_Bool i_isProgress );
485 public:
487 XMLTextParagraphExport(
488 SvXMLExport& rExp,
489 SvXMLAutoStylePoolP & rASP
491 virtual ~XMLTextParagraphExport();
493 /// add autostyle for specified family
494 void Add(
495 sal_uInt16 nFamily,
496 MultiPropertySetHelper& rPropSetHelper,
497 const ::com::sun::star::uno::Reference <
498 ::com::sun::star::beans::XPropertySet > & rPropSet,
499 const XMLPropertyState** pAddState = NULL );
500 void Add(
501 sal_uInt16 nFamily,
502 const ::com::sun::star::uno::Reference <
503 ::com::sun::star::beans::XPropertySet > & rPropSet,
504 const XMLPropertyState** pAddState = NULL, bool bDontSeek = false );
506 /// find style name for specified family and parent
507 OUString Find(
508 sal_uInt16 nFamily,
509 const ::com::sun::star::uno::Reference <
510 ::com::sun::star::beans::XPropertySet > & rPropSet,
511 const OUString& rParent,
512 const XMLPropertyState** pAddState = NULL ) const;
514 static SvXMLExportPropertyMapper *CreateShapeExtPropMapper(
515 SvXMLExport& rExport );
516 static SvXMLExportPropertyMapper *CreateCharExtPropMapper(
517 SvXMLExport& rExport);
518 static SvXMLExportPropertyMapper *CreateParaExtPropMapper(
519 SvXMLExport& rExport);
520 static SvXMLExportPropertyMapper *CreateParaDefaultExtPropMapper(
521 SvXMLExport& rExport);
523 // This methods exports all (or all used) styles
524 void exportTextStyles( sal_Bool bUsed
525 , sal_Bool bProg = sal_False
528 /// This method exports (text field) declarations etc.
529 void exportTextDeclarations();
531 /// export the (text field) declarations for a particular XText
532 void exportTextDeclarations(
533 const ::com::sun::star::uno::Reference <
534 ::com::sun::star::text::XText > & rText );
536 /// true: export only those declarations that are used;
537 /// false: export all declarations
538 void exportUsedDeclarations( sal_Bool bOnlyUsed );
540 /// Export the list of change information (enclosed by <tracked-changes>)
541 /// (or the necessary automatic styles)
542 void exportTrackedChanges(sal_Bool bAutoStyle);
544 /// Export the list of change information (enclosed by <tracked-changes>)
545 /// (or the necessary automatic styles)
546 void exportTrackedChanges(const ::com::sun::star::uno::Reference <
547 ::com::sun::star::text::XText > & rText,
548 sal_Bool bAutoStyle );
550 /// Record tracked changes for this particular XText
551 /// (empty reference stop recording)
552 /// This should be used if tracked changes for e.g. footers are to
553 /// be exported separately via the exportTrackedChanges(sal_Bool,
554 /// Reference<XText>) method.
555 void recordTrackedChangesForXText(
556 const ::com::sun::star::uno::Reference <
557 ::com::sun::star::text::XText > & rText );
560 /// Stop recording tracked changes.
561 /// This is the same as calling recordTrackedChanges(...) with an
562 /// empty reference.
563 void recordTrackedChangesNoXText();
566 // This method exports the given OUString
567 void exportText(
568 const OUString& rText,
569 bool& rPrevCharWasSpace );
571 // This method collects all automatic styles for the given XText
572 void collectTextAutoStyles(
573 const ::com::sun::star::uno::Reference <
574 ::com::sun::star::text::XText > & rText,
575 sal_Bool bIsProgress = sal_False,
576 sal_Bool bExportParagraph = sal_True )
578 exportText( rText, sal_True, bIsProgress, bExportParagraph );
581 void collectTextAutoStyles(
582 const ::com::sun::star::uno::Reference <
583 ::com::sun::star::text::XText > & rText,
584 const ::com::sun::star::uno::Reference <
585 ::com::sun::star::text::XTextSection > & rBaseSection,
586 sal_Bool bIsProgress = sal_False,
587 sal_Bool bExportParagraph = sal_True )
589 exportText( rText, rBaseSection, sal_True, bIsProgress, bExportParagraph );
592 // It the model implements the xAutoStylesSupplier interface, the automatic
593 // styles can exported without iterating over the text portions
594 bool collectTextAutoStylesOptimized(
595 sal_Bool bIsProgress = sal_False );
597 // This method exports all automatic styles that have been collected.
598 virtual void exportTextAutoStyles();
600 void exportEvents( const ::com::sun::star::uno::Reference < com::sun::star::beans::XPropertySet > & rPropSet );
602 // Implement Title/Description Elements UI (#i73249#)
603 void exportTitleAndDescription( const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySet > & rPropSet,
604 const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > & rPropSetInfo );
606 // This method exports the given XText
607 void exportText(
608 const ::com::sun::star::uno::Reference <
609 ::com::sun::star::text::XText > & rText,
610 sal_Bool bIsProgress = sal_False,
611 sal_Bool bExportParagraph = sal_True)
613 exportText( rText, sal_False, bIsProgress, bExportParagraph );
616 void exportText(
617 const ::com::sun::star::uno::Reference <
618 ::com::sun::star::text::XText > & rText,
619 const ::com::sun::star::uno::Reference <
620 ::com::sun::star::text::XTextSection > & rBaseSection,
621 sal_Bool bIsProgress = sal_False,
622 sal_Bool bExportParagraph = sal_True)
624 exportText( rText, rBaseSection, sal_False, bIsProgress, bExportParagraph );
627 void exportFramesBoundToPage( sal_Bool bIsProgress = sal_False )
629 exportPageFrames( sal_False, bIsProgress );
631 void exportFramesBoundToFrame(
632 const ::com::sun::star::uno::Reference <
633 ::com::sun::star::text::XTextFrame >& rParentTxtFrame,
634 sal_Bool bIsProgress = sal_False )
636 exportFrameFrames( sal_False, bIsProgress, &rParentTxtFrame );
638 inline const XMLTextListAutoStylePool& GetListAutoStylePool() const;
640 void SetBlockMode( sal_Bool bSet ) { bBlock = bSet; }
641 sal_Bool IsBlockMode() const { return bBlock; }
644 UniReference < SvXMLExportPropertyMapper > GetParagraphPropertyMapper() const
646 return xParaPropMapper;
650 /** exclude form controls which are in mute sections.
652 * This method is necessary to prevent the form layer export from exporting
653 * control models whose controls are not represented in the document. To
654 * achieve this, this method iterates over all shapes, checks to see if
655 * they are control shapes, and if so, whether they should be exported or
656 * not. If not, the form layer export will be notified accordingly.
658 * The reason this method is located here is tha it needs to access the
659 * XMLSectionExport, which is only available here.
661 void PreventExportOfControlsInMuteSections(
662 const ::com::sun::star::uno::Reference<
663 ::com::sun::star::container::XIndexAccess> & rShapes,
664 UniReference<xmloff::OFormLayerXMLExport> xFormExport );
666 SinglePropertySetInfoCache& GetCharStyleNamesPropInfoCache() { return aCharStyleNamesPropInfoCache; }
668 void PushNewTextListsHelper();
670 void PopTextListsHelper();
672 private:
673 XMLTextParagraphExport(XMLTextParagraphExport &); // private copy-ctor because of explicit copy-ctor of auto_ptr
676 inline const XMLTextListAutoStylePool&
677 XMLTextParagraphExport::GetListAutoStylePool() const
679 return *pListAutoPool;
682 inline void XMLTextParagraphExport::exportTextFrame(
683 const ::com::sun::star::uno::Reference <
684 ::com::sun::star::text::XTextContent > & rTextContent,
685 sal_Bool bAutoStyles, sal_Bool bIsProgress, sal_Bool bExportContent,
686 const ::com::sun::star::uno::Reference <
687 ::com::sun::star::beans::XPropertySet > *pRangePropSet)
689 exportAnyTextFrame( rTextContent, FT_TEXT, bAutoStyles, bIsProgress,
690 bExportContent, pRangePropSet );
693 inline void XMLTextParagraphExport::exportTextGraphic(
694 const ::com::sun::star::uno::Reference <
695 ::com::sun::star::text::XTextContent > & rTextContent,
696 sal_Bool bAutoStyles,
697 const ::com::sun::star::uno::Reference <
698 ::com::sun::star::beans::XPropertySet > *pRangePropSet )
700 exportAnyTextFrame( rTextContent, FT_GRAPHIC, bAutoStyles, sal_False,
701 sal_True, pRangePropSet );
704 inline void XMLTextParagraphExport::exportTextEmbedded(
705 const ::com::sun::star::uno::Reference <
706 ::com::sun::star::text::XTextContent > & rTextContent,
707 sal_Bool bAutoStyles,
708 const ::com::sun::star::uno::Reference <
709 ::com::sun::star::beans::XPropertySet > *pRangePropSet )
711 exportAnyTextFrame( rTextContent, FT_EMBEDDED, bAutoStyles, sal_False,
712 sal_True, pRangePropSet );
715 inline void XMLTextParagraphExport::exportShape(
716 const ::com::sun::star::uno::Reference <
717 ::com::sun::star::text::XTextContent > & rTextContent,
718 sal_Bool bAutoStyles,
719 const ::com::sun::star::uno::Reference <
720 ::com::sun::star::beans::XPropertySet > *pRangePropSet )
722 exportAnyTextFrame( rTextContent, FT_SHAPE, bAutoStyles, sal_False,
723 sal_True, pRangePropSet );
726 #endif
728 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */