1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 INCLUDED_XMLOFF_TXTPARAE_HXX
21 #define INCLUDED_XMLOFF_TXTPARAE_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/xmlexppr.hxx>
30 #include <xmloff/styleexp.hxx>
31 #include <xmloff/xmltoken.hxx>
32 #include <xmloff/SinglePropertySetInfoCache.hxx>
36 class XMLTextListsHelper
;
38 class SvXMLAutoStylePoolP
;
39 class XMLTextFieldExport
;
40 class XMLTextNumRuleInfo
;
41 class XMLTextListAutoStylePool
;
42 class XMLSectionExport
;
43 class XMLIndexMarkExport
;
44 class XMLRedlineExport
;
45 struct XMLPropertyState
;
46 class MultiPropertySetHelper
;
47 enum class XMLShapeExportFlags
;
49 namespace com
{ namespace sun
{ namespace star
51 namespace beans
{ class XPropertySet
; class XPropertyState
;
52 class XPropertySetInfo
; }
53 namespace container
{ class XEnumerationAccess
; class XEnumeration
; class XIndexAccess
; }
54 namespace text
{ class XTextContent
; class XTextRange
; class XText
;
55 class XFootnote
; class XTextFrame
; class XTextSection
;
57 class XDocumentIndex
; class XTextShapesSupplier
; }
62 class OFormLayerXMLExport
;
73 class XMLOFF_DLLPUBLIC XMLTextParagraphExport
: public XMLStyleExport
76 std::unique_ptr
<Impl
> m_xImpl
;
78 // SvXMLExport& rExport;
79 SvXMLAutoStylePoolP
& rAutoStylePool
;
80 rtl::Reference
< SvXMLExportPropertyMapper
> xParaPropMapper
;
81 rtl::Reference
< SvXMLExportPropertyMapper
> xTextPropMapper
;
82 rtl::Reference
< SvXMLExportPropertyMapper
> xFramePropMapper
;
83 rtl::Reference
< SvXMLExportPropertyMapper
> xAutoFramePropMapper
;
84 rtl::Reference
< SvXMLExportPropertyMapper
> xSectionPropMapper
;
85 rtl::Reference
< SvXMLExportPropertyMapper
> xRubyPropMapper
;
87 const ::std::unique_ptr
< ::xmloff::BoundFrameSets
> pBoundFrameSets
;
88 XMLTextFieldExport
*pFieldExport
;
89 std::vector
<OUString
> *pListElements
;
90 XMLTextListAutoStylePool
*pListAutoPool
;
91 XMLSectionExport
*pSectionExport
;
92 XMLIndexMarkExport
*pIndexMarkExport
;
94 /// may be NULL (if no redlines should be exported; e.g. in block mode)
95 XMLRedlineExport
*pRedlineExport
;
96 std::vector
<OUString
> *pHeadingStyles
;
102 // keep track of open rubies
103 OUString sOpenRubyText
;
104 OUString sOpenRubyCharStyle
;
107 XMLTextListsHelper
* mpTextListsHelper
;
108 ::std::vector
< XMLTextListsHelper
* > maTextListsHelperStack
;
110 enum FrameType
{ FT_TEXT
, FT_GRAPHIC
, FT_EMBEDDED
, FT_SHAPE
};
113 enum FieldmarkType
{ NONE
, TEXT
, CHECK
}; // Used for simulating fieldmarks in OpenDocument 1.n Strict (for n <= 2). CHECK currently ignored.
116 void exportTextRangeSpan(
117 const ::com::sun::star::uno::Reference
< com::sun::star::text::XTextRange
> & rTextRange
,
118 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> & xPropSet
,
119 ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> & xPropSetInfo
,
120 const bool bIsUICharStyle
,
121 const bool bHasAutoStyle
,
122 const OUString
& sStyle
,
123 bool& rPrevCharIsSpace
,
124 FieldmarkType
& openFieldMark
);
128 const OUString sActualSize
;
129 // Implement Title/Description Elements UI (#i73249#)
130 const OUString sTitle
;
131 const OUString sDescription
;
132 const OUString sAnchorCharStyleName
;
133 const OUString sAnchorPageNo
;
134 const OUString sAnchorType
;
135 const OUString sBeginNotice
;
136 const OUString sBookmark
;
137 const OUString sCategory
;
138 const OUString sChainNextName
;
139 const OUString sCharStyleName
;
140 const OUString sCharStyleNames
;
141 const OUString sContourPolyPolygon
;
142 const OUString sDocumentIndex
;
143 const OUString sDocumentIndexMark
;
144 const OUString sEndNotice
;
145 const OUString sFootnote
;
146 const OUString sFootnoteCounting
;
147 const OUString sFrame
;
148 const OUString sFrameHeightAbsolute
;
149 const OUString sFrameHeightPercent
;
150 const OUString sFrameStyleName
;
151 const OUString sFrameWidthAbsolute
;
152 const OUString sFrameWidthPercent
;
153 const OUString sGraphicFilter
;
154 const OUString sGraphicRotation
;
155 const OUString sGraphicURL
;
156 const OUString sReplacementGraphicURL
;
157 const OUString sHeight
;
158 const OUString sHoriOrient
;
159 const OUString sHoriOrientPosition
;
160 const OUString sHyperLinkName
;
161 const OUString sHyperLinkTarget
;
162 const OUString sHyperLinkURL
;
163 const OUString sIsAutomaticContour
;
164 const OUString sIsCollapsed
;
165 const OUString sIsPixelContour
;
166 const OUString sIsStart
;
167 const OUString sIsSyncHeightToWidth
;
168 const OUString sIsSyncWidthToHeight
;
169 const OUString sNumberingRules
;
170 const OUString sNumberingType
;
171 const OUString sPageDescName
;
172 const OUString sPageStyleName
;
173 const OUString sParaChapterNumberingLevel
;
174 const OUString sParaConditionalStyleName
;
175 const OUString sParagraphService
;
176 const OUString sParaStyleName
;
177 const OUString sPositionEndOfDoc
;
178 const OUString sPrefix
;
179 const OUString sRedline
;
180 const OUString sReferenceId
;
181 const OUString sReferenceMark
;
182 const OUString sRelativeHeight
;
183 const OUString sRelativeWidth
;
184 const OUString sRuby
;
185 const OUString sRubyAdjust
;
186 const OUString sRubyCharStyleName
;
187 const OUString sRubyText
;
188 const OUString sServerMap
;
189 const OUString sShapeService
;
190 const OUString sSizeType
;
191 const OUString sSoftPageBreak
;
192 const OUString sStartAt
;
193 const OUString sSuffix
;
194 const OUString sTableService
;
195 const OUString sText
;
196 const OUString sTextContentService
;
197 const OUString sTextEmbeddedService
;
198 const OUString sTextEndnoteService
;
199 const OUString sTextField
;
200 const OUString sTextFieldService
;
201 const OUString sTextFrameService
;
202 const OUString sTextGraphicService
;
203 const OUString sTextPortionType
;
204 const OUString sTextSection
;
205 const OUString sUnvisitedCharStyleName
;
206 const OUString sVertOrient
;
207 const OUString sVertOrientPosition
;
208 const OUString sVisitedCharStyleName
;
209 const OUString sWidth
;
210 const OUString sWidthType
;
211 const OUString sTextFieldStart
;
212 const OUString sTextFieldEnd
;
213 const OUString sTextFieldStartEnd
;
215 SinglePropertySetInfoCache aCharStyleNamesPropInfoCache
;
217 SvXMLAutoStylePoolP
& GetAutoStylePool() { return rAutoStylePool
; }
218 const SvXMLAutoStylePoolP
& GetAutoStylePool() const { return rAutoStylePool
; }
221 rtl::Reference
< SvXMLExportPropertyMapper
> GetParaPropMapper() const
223 return xParaPropMapper
;
226 rtl::Reference
< SvXMLExportPropertyMapper
> GetTextPropMapper() const
228 return xTextPropMapper
;
231 rtl::Reference
< SvXMLExportPropertyMapper
> GetFramePropMapper() const
233 return xFramePropMapper
;
235 rtl::Reference
< SvXMLExportPropertyMapper
> GetAutoFramePropMapper() const
237 return xAutoFramePropMapper
;
239 rtl::Reference
< SvXMLExportPropertyMapper
> GetSectionPropMapper() const
241 return xSectionPropMapper
;
243 rtl::Reference
< SvXMLExportPropertyMapper
> GetRubyPropMapper() const
245 return xRubyPropMapper
;
248 OUString
FindTextStyleAndHyperlink(
249 const ::com::sun::star::uno::Reference
<
250 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
252 bool& rbHasCharStyle
,
253 bool& rbHasAutoStyle
,
254 const XMLPropertyState
** pAddState
= NULL
) const;
255 bool addHyperlinkAttributes(
256 const ::com::sun::star::uno::Reference
<
257 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
258 const ::com::sun::star::uno::Reference
<
259 ::com::sun::star::beans::XPropertyState
> & rPropState
,
260 const ::com::sun::star::uno::Reference
<
261 ::com::sun::star::beans::XPropertySetInfo
> & rPropSetInfo
);
263 void exportTextRangeEnumeration(
264 const ::com::sun::star::uno::Reference
<
265 ::com::sun::star::container::XEnumeration
> & rRangeEnum
,
266 bool bAutoStyles
, bool bProgress
,
267 bool bPrvChrIsSpc
= true );
271 XMLShapeExportFlags
addTextFrameAttributes(
272 const ::com::sun::star::uno::Reference
<
273 ::com::sun::star::beans::XPropertySet
>& rPropSet
,
275 OUString
*pMinHeightValue
= 0,
276 OUString
*pMinWidthValue
= 0 );
278 virtual void exportStyleAttributes(
279 const ::com::sun::star::uno::Reference
<
280 ::com::sun::star::style::XStyle
> & rStyle
) SAL_OVERRIDE
;
282 void exportPageFrames( bool bAutoStyles
, bool bProgress
);
283 void exportFrameFrames( bool bAutoStyles
, bool bProgress
,
284 const ::com::sun::star::uno::Reference
<
285 ::com::sun::star::text::XTextFrame
> *pParentTxtFrame
= 0 );
287 void exportNumStyles( bool bUsed
);
290 const ::com::sun::star::uno::Reference
<
291 ::com::sun::star::text::XText
> & rText
,
292 bool bAutoStyles
, bool bProgress
, bool bExportParagraph
, TextPNS eExtensionNS
= TextPNS::ODF
);
295 const ::com::sun::star::uno::Reference
<
296 ::com::sun::star::text::XText
> & rText
,
297 const ::com::sun::star::uno::Reference
<
298 ::com::sun::star::text::XTextSection
> & rBaseSection
,
299 bool bAutoStyles
, bool bProgress
, bool bExportParagraph
, TextPNS eExtensionNS
= TextPNS::ODF
);
301 bool exportTextContentEnumeration(
302 const ::com::sun::star::uno::Reference
<
303 ::com::sun::star::container::XEnumeration
> & rContentEnum
,
305 const ::com::sun::star::uno::Reference
<
306 ::com::sun::star::text::XTextSection
> & rBaseSection
,
308 bool bExportParagraph
= true,
309 const ::com::sun::star::uno::Reference
<
310 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0,
311 bool bExportLevels
= true,
312 TextPNS eExtensionNS
= TextPNS::ODF
);
313 void exportParagraph(
314 const ::com::sun::star::uno::Reference
<
315 ::com::sun::star::text::XTextContent
> & rTextContent
,
316 bool bAutoStyles
, bool bProgress
,
317 bool bExportParagraph
,
318 MultiPropertySetHelper
& rPropSetHelper
,
319 TextPNS eExtensionNS
= TextPNS::ODF
);
321 virtual void exportTable(
322 const ::com::sun::star::uno::Reference
<
323 ::com::sun::star::text::XTextContent
> & rTextContent
,
324 bool bAutoStyles
, bool bProgress
);
326 void exportTextField(
327 const ::com::sun::star::uno::Reference
<
328 ::com::sun::star::text::XTextRange
> & rTextRange
,
329 bool bAutoStyles
, bool bProgress
);
331 void exportTextField(
332 const ::com::sun::star::uno::Reference
<
333 ::com::sun::star::text::XTextField
> & xTextField
,
334 const bool bAutoStyles
, const bool bProgress
,
335 const bool bRecursive
);
337 void exportAnyTextFrame(
338 const ::com::sun::star::uno::Reference
<
339 ::com::sun::star::text::XTextContent
> & rTextContent
,
341 bool bAutoStyles
, bool bProgress
, bool bExportContent
,
342 const ::com::sun::star::uno::Reference
<
343 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0 );
344 void _exportTextFrame(
345 const ::com::sun::star::uno::Reference
<
346 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
347 const ::com::sun::star::uno::Reference
<
348 ::com::sun::star::beans::XPropertySetInfo
> & rPropSetInfo
,
350 inline void exportTextFrame(
351 const ::com::sun::star::uno::Reference
<
352 ::com::sun::star::text::XTextContent
> & rTextContent
,
353 bool bAutoStyles
, bool bProgress
, bool bExportContent
,
354 const ::com::sun::star::uno::Reference
<
355 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0 );
356 inline void exportShape(
357 const ::com::sun::star::uno::Reference
<
358 ::com::sun::star::text::XTextContent
> & rTextContent
,
360 const ::com::sun::star::uno::Reference
<
361 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0 );
364 const ::com::sun::star::uno::Reference
<
365 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
366 const ::com::sun::star::uno::Reference
<
367 ::com::sun::star::beans::XPropertySetInfo
> & rPropSetInfo
);
368 void _exportTextGraphic(
369 const ::com::sun::star::uno::Reference
<
370 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
371 const ::com::sun::star::uno::Reference
<
372 ::com::sun::star::beans::XPropertySetInfo
> & rPropSetInfo
);
373 inline void exportTextGraphic(
374 const ::com::sun::star::uno::Reference
<
375 ::com::sun::star::text::XTextContent
> & rTextContent
,
377 const ::com::sun::star::uno::Reference
<
378 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0 );
380 virtual void _collectTextEmbeddedAutoStyles(
381 const ::com::sun::star::uno::Reference
<
382 ::com::sun::star::beans::XPropertySet
> & rPropSet
);
383 virtual void _exportTextEmbedded(
384 const ::com::sun::star::uno::Reference
<
385 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
386 const ::com::sun::star::uno::Reference
<
387 ::com::sun::star::beans::XPropertySetInfo
> & rPropSetInfo
);
388 inline void exportTextEmbedded(
389 const ::com::sun::star::uno::Reference
<
390 ::com::sun::star::text::XTextContent
> & rTextContent
,
392 const ::com::sun::star::uno::Reference
<
393 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0 );
395 /// export a footnote and styles
396 void exportTextFootnote(
397 const ::com::sun::star::uno::Reference
<
398 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
399 const OUString
& sString
,
400 bool bAutoStyles
, bool bProgress
);
402 /// helper for exportTextFootnote
403 void exportTextFootnoteHelper(
404 const ::com::sun::star::uno::Reference
<
405 ::com::sun::star::text::XFootnote
> & rPropSet
,
406 const ::com::sun::star::uno::Reference
<
407 ::com::sun::star::text::XText
> & rText
,
408 const OUString
& sString
,
410 bool bIsEndnote
, bool bProgress
);
412 /// export footnote and endnote configuration elements
413 void exportTextFootnoteConfiguration();
415 void exportTextFootnoteConfigurationHelper(
416 const ::com::sun::star::uno::Reference
<
417 ::com::sun::star::beans::XPropertySet
> & rFootnoteSupplier
,
421 const ::com::sun::star::uno::Reference
<
422 ::com::sun::star::beans::XPropertySet
> & xPropSet
,
423 const OUString
& rProperty
,
424 const enum ::xmloff::token::XMLTokenEnum pElements
[],
427 void exportIndexMark(
428 const ::com::sun::star::uno::Reference
<
429 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
432 void exportSoftPageBreak(
433 const ::com::sun::star::uno::Reference
<
434 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
437 void exportTextRange(
438 const ::com::sun::star::uno::Reference
<
439 ::com::sun::star::text::XTextRange
> & rTextRange
,
441 bool& rPrevCharWasSpace
,
442 FieldmarkType
& openFieldmarkType
);
444 void exportListChange( const XMLTextNumRuleInfo
& rPrvInfo
,
445 const XMLTextNumRuleInfo
& rNextInfo
);
447 /// check if current section or current list has changed;
448 /// calls exortListChange as appropriate
449 void exportListAndSectionChange(
450 ::com::sun::star::uno::Reference
<
451 ::com::sun::star::text::XTextSection
> & rOldSection
,
452 const ::com::sun::star::uno::Reference
<
453 ::com::sun::star::text::XTextSection
> & rNewSection
,
454 const XMLTextNumRuleInfo
& rOldList
,
455 const XMLTextNumRuleInfo
& rNewList
,
458 /// overload for exportListAndSectionChange;
459 /// takes new content rather than new section.
460 void exportListAndSectionChange(
461 ::com::sun::star::uno::Reference
<
462 ::com::sun::star::text::XTextSection
> & rOldSection
,
463 const ::com::sun::star::uno::Reference
<
464 ::com::sun::star::text::XTextContent
> & rNewContent
,
465 const XMLTextNumRuleInfo
& rOldList
,
466 const XMLTextNumRuleInfo
& rNewList
,
468 void exportListAndSectionChange(
469 ::com::sun::star::uno::Reference
<
470 ::com::sun::star::text::XTextSection
> & rOldSection
,
471 MultiPropertySetHelper
& rPropSetHelper
,
472 sal_Int16 nTextSectionId
,
473 const ::com::sun::star::uno::Reference
<
474 ::com::sun::star::text::XTextContent
> & rNewContent
,
475 const XMLTextNumRuleInfo
& rOldList
,
476 const XMLTextNumRuleInfo
& rNewList
,
479 /// export a redline text portion
481 const ::com::sun::star::uno::Reference
<
482 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
487 const ::com::sun::star::uno::Reference
<
488 ::com::sun::star::beans::XPropertySet
> & rPortionPropSet
,
491 /// export a text:meta
493 const ::com::sun::star::uno::Reference
<
494 ::com::sun::star::beans::XPropertySet
> & i_xPortion
,
495 bool i_bAutoStyles
, bool i_isProgress
);
499 XMLTextParagraphExport(
501 SvXMLAutoStylePoolP
& rASP
503 virtual ~XMLTextParagraphExport();
505 /// add autostyle for specified family
508 MultiPropertySetHelper
& rPropSetHelper
,
509 const ::com::sun::star::uno::Reference
<
510 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
511 const XMLPropertyState
** pAddState
= NULL
);
514 const ::com::sun::star::uno::Reference
<
515 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
516 const XMLPropertyState
** pAddState
= NULL
, bool bDontSeek
= false );
518 /// find style name for specified family and parent
521 const ::com::sun::star::uno::Reference
<
522 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
523 const OUString
& rParent
,
524 const XMLPropertyState
** pAddState
= NULL
) const;
526 static SvXMLExportPropertyMapper
*CreateShapeExtPropMapper(
527 SvXMLExport
& rExport
);
528 static SvXMLExportPropertyMapper
*CreateCharExtPropMapper(
529 SvXMLExport
& rExport
);
530 static SvXMLExportPropertyMapper
*CreateParaExtPropMapper(
531 SvXMLExport
& rExport
);
532 static SvXMLExportPropertyMapper
*CreateParaDefaultExtPropMapper(
533 SvXMLExport
& rExport
);
535 // This methods exports all (or all used) styles
536 void exportTextStyles( bool bUsed
540 /// This method exports (text field) declarations etc.
541 void exportTextDeclarations();
543 /// export the (text field) declarations for a particular XText
544 void exportTextDeclarations(
545 const ::com::sun::star::uno::Reference
<
546 ::com::sun::star::text::XText
> & rText
);
548 /// true: export only those declarations that are used;
549 /// false: export all declarations
550 void exportUsedDeclarations( bool bOnlyUsed
);
552 /// Export the list of change information (enclosed by <tracked-changes>)
553 /// (or the necessary automatic styles)
554 void exportTrackedChanges(bool bAutoStyle
);
556 /// Export the list of change information (enclosed by <tracked-changes>)
557 /// (or the necessary automatic styles)
558 void exportTrackedChanges(const ::com::sun::star::uno::Reference
<
559 ::com::sun::star::text::XText
> & rText
,
562 /// Record tracked changes for this particular XText
563 /// (empty reference stop recording)
564 /// This should be used if tracked changes for e.g. footers are to
565 /// be exported separately via the exportTrackedChanges(bool,
566 /// Reference<XText>) method.
567 void recordTrackedChangesForXText(
568 const ::com::sun::star::uno::Reference
<
569 ::com::sun::star::text::XText
> & rText
);
572 /// Stop recording tracked changes.
573 /// This is the same as calling recordTrackedChanges(...) with an
575 void recordTrackedChangesNoXText();
578 // This method exports the given OUString
580 const OUString
& rText
,
581 bool& rPrevCharWasSpace
,
582 TextPNS eExtensionNS
= TextPNS::ODF
);
584 // This method collects all automatic styles for the given XText
585 void collectTextAutoStyles(
586 const ::com::sun::star::uno::Reference
<
587 ::com::sun::star::text::XText
> & rText
,
588 bool bIsProgress
= false,
589 bool bExportParagraph
= true )
591 exportText( rText
, true, bIsProgress
, bExportParagraph
);
594 void collectTextAutoStyles(
595 const ::com::sun::star::uno::Reference
<
596 ::com::sun::star::text::XText
> & rText
,
597 const ::com::sun::star::uno::Reference
<
598 ::com::sun::star::text::XTextSection
> & rBaseSection
,
599 bool bIsProgress
= false,
600 bool bExportParagraph
= true )
602 exportText( rText
, rBaseSection
, true, bIsProgress
, bExportParagraph
);
605 // It the model implements the xAutoStylesSupplier interface, the automatic
606 // styles can exported without iterating over the text portions
607 bool collectTextAutoStylesOptimized(
608 bool bIsProgress
= false );
610 // This method exports all automatic styles that have been collected.
611 void exportTextAutoStyles();
613 void exportEvents( const ::com::sun::star::uno::Reference
< com::sun::star::beans::XPropertySet
> & rPropSet
);
615 // Implement Title/Description Elements UI (#i73249#)
616 void exportTitleAndDescription( const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> & rPropSet
,
617 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> & rPropSetInfo
);
619 // This method exports the given XText
621 const ::com::sun::star::uno::Reference
<
622 ::com::sun::star::text::XText
> & rText
,
623 bool bIsProgress
= false,
624 bool bExportParagraph
= true, TextPNS eExtensionNS
= TextPNS::ODF
)
626 exportText( rText
, false, bIsProgress
, bExportParagraph
, eExtensionNS
);
630 const ::com::sun::star::uno::Reference
<
631 ::com::sun::star::text::XText
> & rText
,
632 const ::com::sun::star::uno::Reference
<
633 ::com::sun::star::text::XTextSection
> & rBaseSection
,
634 bool bIsProgress
= false,
635 bool bExportParagraph
= true,
636 TextPNS eExtensionNS
= TextPNS::ODF
)
638 exportText( rText
, rBaseSection
, false, bIsProgress
, bExportParagraph
, eExtensionNS
);
641 void exportFramesBoundToPage( bool bIsProgress
= false )
643 exportPageFrames( false, bIsProgress
);
645 void exportFramesBoundToFrame(
646 const ::com::sun::star::uno::Reference
<
647 ::com::sun::star::text::XTextFrame
>& rParentTxtFrame
,
648 bool bIsProgress
= false )
650 exportFrameFrames( false, bIsProgress
, &rParentTxtFrame
);
652 inline const XMLTextListAutoStylePool
& GetListAutoStylePool() const;
654 void SetBlockMode( bool bSet
) { bBlock
= bSet
; }
655 bool IsBlockMode() const { return bBlock
; }
658 rtl::Reference
< SvXMLExportPropertyMapper
> GetParagraphPropertyMapper() const
660 return xParaPropMapper
;
664 /** exclude form controls which are in mute sections.
666 * This method is necessary to prevent the form layer export from exporting
667 * control models whose controls are not represented in the document. To
668 * achieve this, this method iterates over all shapes, checks to see if
669 * they are control shapes, and if so, whether they should be exported or
670 * not. If not, the form layer export will be notified accordingly.
672 * The reason this method is located here is tha it needs to access the
673 * XMLSectionExport, which is only available here.
675 void PreventExportOfControlsInMuteSections(
676 const ::com::sun::star::uno::Reference
<
677 ::com::sun::star::container::XIndexAccess
> & rShapes
,
678 rtl::Reference
<xmloff::OFormLayerXMLExport
> xFormExport
);
680 SinglePropertySetInfoCache
& GetCharStyleNamesPropInfoCache() { return aCharStyleNamesPropInfoCache
; }
682 void PushNewTextListsHelper();
684 void PopTextListsHelper();
687 XMLTextParagraphExport(XMLTextParagraphExport
&) SAL_DELETED_FUNCTION
;
690 inline const XMLTextListAutoStylePool
&
691 XMLTextParagraphExport::GetListAutoStylePool() const
693 return *pListAutoPool
;
696 inline void XMLTextParagraphExport::exportTextFrame(
697 const ::com::sun::star::uno::Reference
<
698 ::com::sun::star::text::XTextContent
> & rTextContent
,
699 bool bAutoStyles
, bool bIsProgress
, bool bExportContent
,
700 const ::com::sun::star::uno::Reference
<
701 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
)
703 exportAnyTextFrame( rTextContent
, FT_TEXT
, bAutoStyles
, bIsProgress
,
704 bExportContent
, pRangePropSet
);
707 inline void XMLTextParagraphExport::exportTextGraphic(
708 const ::com::sun::star::uno::Reference
<
709 ::com::sun::star::text::XTextContent
> & rTextContent
,
711 const ::com::sun::star::uno::Reference
<
712 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
)
714 exportAnyTextFrame( rTextContent
, FT_GRAPHIC
, bAutoStyles
, false,
715 true, pRangePropSet
);
718 inline void XMLTextParagraphExport::exportTextEmbedded(
719 const ::com::sun::star::uno::Reference
<
720 ::com::sun::star::text::XTextContent
> & rTextContent
,
722 const ::com::sun::star::uno::Reference
<
723 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
)
725 exportAnyTextFrame( rTextContent
, FT_EMBEDDED
, bAutoStyles
, false,
726 true, pRangePropSet
);
729 inline void XMLTextParagraphExport::exportShape(
730 const ::com::sun::star::uno::Reference
<
731 ::com::sun::star::text::XTextContent
> & rTextContent
,
733 const ::com::sun::star::uno::Reference
<
734 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
)
736 exportAnyTextFrame( rTextContent
, FT_SHAPE
, bAutoStyles
, false,
737 true, pRangePropSet
);
742 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */