1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: txtparae.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _XMLOFF_TEXTPARAE_HXX_
31 #define _XMLOFF_TEXTPARAE_HXX_
33 #ifndef _RTL_USTRING_HXX_
34 #include <rtl/ustring.hxx>
36 #ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
37 #include <com/sun/star/uno/Reference.h>
39 #ifndef _COM_SUN_STAR_UNO_SEQUENCE_H_
40 #include <com/sun/star/uno/Sequence.h>
42 #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_
43 #include <com/sun/star/beans/PropertyValue.hpp>
45 #ifndef _UNIVERSALL_REFERENCE_HXX
46 #include <bf_xmloff/uniref.hxx>
48 #ifndef _XMLOFF_XMLEXPPR_HXX
49 #include <bf_xmloff/xmlexppr.hxx>
51 #ifndef _XMLOFF_STYLEEXP_HXX
52 #include <bf_xmloff/styleexp.hxx>
54 #ifndef _XMLOFF_XMLTOKEN_HXX
55 #include <bf_xmloff/xmltoken.hxx>
57 #ifndef _XMLOFF_SINGEPROPERTYSETINFOCACHE_HXX
58 #include <bf_xmloff/SinglePropertySetInfoCache.hxx>
61 namespace com
{ namespace sun
{ namespace star
63 namespace beans
{ class XPropertySet
; class XPropertyState
;
64 class XPropertySetInfo
; }
65 namespace container
{ class XEnumeration
; class XIndexAccess
; }
66 namespace text
{ class XTextContent
; class XTextRange
; class XText
;
67 class XFootnote
; class XTextFrame
; class XTextSection
;
68 class XDocumentIndex
; class XTextShapesSupplier
; }
73 class SvXMLAutoStylePoolP
;
74 class XMLTextFieldExport
;
76 class OUStringsSort_Impl
;
77 class XMLTextNumRuleInfo
;
78 class XMLTextListAutoStylePool
;
79 class XMLSectionExport
;
80 class XMLIndexMarkExport
;
81 class XMLRedlineExport
;
82 struct XMLPropertyState
;
83 class MultiPropertySetHelper
;
86 namespace xmloff
{ class OFormLayerXMLExport
; }
88 class XMLTextParagraphExport
: public XMLStyleExport
90 // SvXMLExport& rExport;
91 SvXMLAutoStylePoolP
& rAutoStylePool
;
92 UniReference
< SvXMLExportPropertyMapper
> xParaPropMapper
;
93 UniReference
< SvXMLExportPropertyMapper
> xTextPropMapper
;
94 UniReference
< SvXMLExportPropertyMapper
> xFramePropMapper
;
95 UniReference
< SvXMLExportPropertyMapper
> xAutoFramePropMapper
;
96 UniReference
< SvXMLExportPropertyMapper
> xSectionPropMapper
;
97 UniReference
< SvXMLExportPropertyMapper
> xRubyPropMapper
;
98 ::com::sun::star::uno::Reference
<
99 ::com::sun::star::container::XIndexAccess
> xTextFrames
;
100 ::com::sun::star::uno::Reference
<
101 ::com::sun::star::container::XIndexAccess
> xGraphics
;
102 ::com::sun::star::uno::Reference
<
103 ::com::sun::star::container::XIndexAccess
> xEmbeddeds
;
104 ::com::sun::star::uno::Reference
<
105 ::com::sun::star::container::XIndexAccess
> xShapes
;
107 SvLongs
*pPageTextFrameIdxs
;
108 SvLongs
*pPageGraphicIdxs
;
109 SvLongs
*pPageEmbeddedIdxs
;
110 SvLongs
*pPageShapeIdxs
;
111 SvLongs
*pFrameTextFrameIdxs
;
112 SvLongs
*pFrameGraphicIdxs
;
113 SvLongs
*pFrameEmbeddedIdxs
;
114 SvLongs
*pFrameShapeIdxs
;
115 XMLTextFieldExport
*pFieldExport
;
116 OUStrings_Impl
*pListElements
;
117 OUStringsSort_Impl
*pExportedLists
;
118 XMLTextListAutoStylePool
*pListAutoPool
;
119 XMLSectionExport
*pSectionExport
;
120 XMLIndexMarkExport
*pIndexMarkExport
;
122 /// may be NULL (if no redlines should be exported; e.g. in block mode)
123 XMLRedlineExport
*pRedlineExport
;
129 // keep track of open rubies
130 ::rtl::OUString sOpenRubyText
;
131 ::rtl::OUString sOpenRubyCharStyle
;
134 enum FrameType
{ FT_TEXT
, FT_GRAPHIC
, FT_EMBEDDED
, FT_SHAPE
};
138 const ::rtl::OUString sParagraphService
;
139 const ::rtl::OUString sTableService
;
140 const ::rtl::OUString sTextFieldService
;
141 const ::rtl::OUString sTextFrameService
;
142 const ::rtl::OUString sTextEmbeddedService
;
143 const ::rtl::OUString sTextGraphicService
;
144 const ::rtl::OUString sTextEndnoteService
;
145 const ::rtl::OUString sTextContentService
;
146 const ::rtl::OUString sShapeService
;
147 const ::rtl::OUString sParaStyleName
;
148 const ::rtl::OUString sParaConditionalStyleName
;
149 const ::rtl::OUString sParaChapterNumberingLevel
;
150 const ::rtl::OUString sCharStyleName
;
151 const ::rtl::OUString sCharStyleNames
;
152 const ::rtl::OUString sFrameStyleName
;
153 const ::rtl::OUString sText
;
154 const ::rtl::OUString sTextField
;
155 const ::rtl::OUString sFrame
;
156 const ::rtl::OUString sCategory
;
157 const ::rtl::OUString sNumberingRules
;
158 const ::rtl::OUString sTextPortionType
;
159 const ::rtl::OUString sFootnote
;
160 const ::rtl::OUString sBookmark
;
161 const ::rtl::OUString sReferenceMark
;
162 const ::rtl::OUString sIsCollapsed
;
163 const ::rtl::OUString sIsStart
;
164 const ::rtl::OUString sReferenceId
;
165 const ::rtl::OUString sNumberingType
;
166 const ::rtl::OUString sPageStyleName
;
167 const ::rtl::OUString sPageDescName
;
168 const ::rtl::OUString sPrefix
;
169 const ::rtl::OUString sStartAt
;
170 const ::rtl::OUString sSuffix
;
171 const ::rtl::OUString sPositionEndOfDoc
;
172 const ::rtl::OUString sFootnoteCounting
;
173 const ::rtl::OUString sEndNotice
;
174 const ::rtl::OUString sBeginNotice
;
175 const ::rtl::OUString sFrameWidthAbsolute
;
176 const ::rtl::OUString sFrameWidthPercent
;
177 const ::rtl::OUString sFrameHeightAbsolute
;
178 const ::rtl::OUString sFrameHeightPercent
;
179 const ::rtl::OUString sWidth
;
180 const ::rtl::OUString sRelativeWidth
;
181 const ::rtl::OUString sHeight
;
182 const ::rtl::OUString sRelativeHeight
;
183 const ::rtl::OUString sSizeType
;
184 const ::rtl::OUString sIsSyncWidthToHeight
;
185 const ::rtl::OUString sIsSyncHeightToWidth
;
186 const ::rtl::OUString sHoriOrient
;
187 const ::rtl::OUString sHoriOrientPosition
;
188 const ::rtl::OUString sVertOrient
;
189 const ::rtl::OUString sVertOrientPosition
;
190 const ::rtl::OUString sChainNextName
;
191 const ::rtl::OUString sAnchorType
;
192 const ::rtl::OUString sAnchorPageNo
;
193 const ::rtl::OUString sGraphicURL
;
194 const ::rtl::OUString sGraphicFilter
;
195 const ::rtl::OUString sGraphicRotation
;
196 const ::rtl::OUString sAlternativeText
;
197 const ::rtl::OUString sHyperLinkURL
;
198 const ::rtl::OUString sHyperLinkName
;
199 const ::rtl::OUString sHyperLinkTarget
;
200 const ::rtl::OUString sUnvisitedCharStyleName
;
201 const ::rtl::OUString sVisitedCharStyleName
;
202 const ::rtl::OUString sDocumentIndex
;
203 const ::rtl::OUString sTextSection
;
204 const ::rtl::OUString sDocumentIndexMark
;
205 const ::rtl::OUString sActualSize
;
206 const ::rtl::OUString sContourPolyPolygon
;
207 const ::rtl::OUString sIsPixelContour
;
208 const ::rtl::OUString sIsAutomaticContour
;
209 const ::rtl::OUString sAnchorCharStyleName
;
210 const ::rtl::OUString sServerMap
;
211 const ::rtl::OUString sRedline
;
212 const ::rtl::OUString sRuby
;
213 const ::rtl::OUString sRubyText
;
214 const ::rtl::OUString sRubyAdjust
;
215 const ::rtl::OUString sRubyCharStyleName
;
217 SinglePropertySetInfoCache aCharStyleNamesPropInfoCache
;
219 // SvXMLExport& GetExport() { return rExport; }
220 // const SvXMLExport& GetExport() const { return rExport; }
222 UniReference
< SvXMLExportPropertyMapper
> GetParaPropMapper() const
224 return xParaPropMapper
;
227 UniReference
< SvXMLExportPropertyMapper
> GetTextPropMapper() const
229 return xTextPropMapper
;
232 UniReference
< SvXMLExportPropertyMapper
> GetFramePropMapper() const
234 return xFramePropMapper
;
236 UniReference
< SvXMLExportPropertyMapper
> GetAutoFramePropMapper() const
238 return xAutoFramePropMapper
;
240 UniReference
< SvXMLExportPropertyMapper
> GetSectionPropMapper() const
242 return xSectionPropMapper
;
244 UniReference
< SvXMLExportPropertyMapper
> GetRubyPropMapper() const
246 return xRubyPropMapper
;
249 SvXMLAutoStylePoolP
& GetAutoStylePool() { return rAutoStylePool
; }
250 const SvXMLAutoStylePoolP
& GetAutoStylePool() const { return rAutoStylePool
; }
253 ::rtl::OUString
FindTextStyle(
254 const ::com::sun::star::uno::Reference
<
255 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
256 sal_Bool
& rbHasCharStyle
) const;
257 ::rtl::OUString
FindTextStyleAndHyperlink(
258 const ::com::sun::star::uno::Reference
<
259 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
260 sal_Bool
& rHyperlink
,
261 sal_Bool
& rbHasCharStyle
,
262 const XMLPropertyState
** pAddState
= NULL
) const;
263 sal_Bool
addHyperlinkAttributes(
264 const ::com::sun::star::uno::Reference
<
265 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
266 const ::com::sun::star::uno::Reference
<
267 ::com::sun::star::beans::XPropertyState
> & rPropState
,
268 const ::com::sun::star::uno::Reference
<
269 ::com::sun::star::beans::XPropertySetInfo
> & rPropSetInfo
);
273 sal_Int32
addTextFrameAttributes(
274 const ::com::sun::star::uno::Reference
<
275 ::com::sun::star::beans::XPropertySet
>& rPropSet
,
278 virtual void exportStyleAttributes(
279 const ::com::sun::star::uno::Reference
<
280 ::com::sun::star::style::XStyle
> & rStyle
);
282 void collectFrames( sal_Bool bBoundToFrameOnly
);
283 void exportPageFrames( sal_Bool bAutoStyles
, sal_Bool bProgress
);
284 void exportFrameFrames( sal_Bool bAutoStyles
, sal_Bool bProgress
,
285 const ::com::sun::star::uno::Reference
<
286 ::com::sun::star::text::XTextFrame
> *pParentTxtFrame
= 0 );
288 void exportNumStyles( sal_Bool bUsed
);
291 const ::com::sun::star::uno::Reference
<
292 ::com::sun::star::text::XText
> & rText
,
293 sal_Bool bAutoStyles
, sal_Bool bProgress
, sal_Bool bExportParagraph
);
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 sal_Bool bAutoStyles
, sal_Bool bProgress
, sal_Bool bExportParagraph
);
300 sal_Bool
exportTextContentEnumeration(
301 const ::com::sun::star::uno::Reference
<
302 ::com::sun::star::container::XEnumeration
> & rContentEnum
,
303 sal_Bool bAutoStyles
,
304 const ::com::sun::star::uno::Reference
<
305 ::com::sun::star::text::XTextSection
> & rBaseSection
,
307 sal_Bool bExportParagraph
= sal_True
,
308 const ::com::sun::star::uno::Reference
<
309 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0,
310 sal_Bool bExportLevels
= sal_True
);
311 void exportParagraph(
312 const ::com::sun::star::uno::Reference
<
313 ::com::sun::star::text::XTextContent
> & rTextContent
,
314 sal_Bool bAutoStyles
, sal_Bool bProgress
,
315 sal_Bool bExportParagraph
,
316 MultiPropertySetHelper
& rPropSetHelper
);
317 virtual void exportTable(
318 const ::com::sun::star::uno::Reference
<
319 ::com::sun::star::text::XTextContent
> & rTextContent
,
320 sal_Bool bAutoStyles
, sal_Bool bProgress
);
321 void exportTextRangeEnumeration(
322 const ::com::sun::star::uno::Reference
<
323 ::com::sun::star::container::XEnumeration
> & rRangeEnum
,
324 sal_Bool bAutoStyles
, sal_Bool bProgress
,
325 sal_Bool bPrvChrIsSpc
= sal_True
);
327 void exportTextField(
328 const ::com::sun::star::uno::Reference
<
329 ::com::sun::star::text::XTextRange
> & rTextRange
,
330 sal_Bool bAutoStyles
);
332 void exportAnyTextFrame(
333 const ::com::sun::star::uno::Reference
<
334 ::com::sun::star::text::XTextContent
> & rTextContent
,
336 sal_Bool bAutoStyles
, sal_Bool bProgress
,
337 const ::com::sun::star::uno::Reference
<
338 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0 );
339 void _exportTextFrame(
340 const ::com::sun::star::uno::Reference
<
341 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
342 const ::com::sun::star::uno::Reference
<
343 ::com::sun::star::beans::XPropertySetInfo
> & rPropSetInfo
,
344 sal_Bool bProgress
);
345 inline void exportTextFrame(
346 const ::com::sun::star::uno::Reference
<
347 ::com::sun::star::text::XTextContent
> & rTextContent
,
348 sal_Bool bAutoStyles
, sal_Bool bProgress
,
349 const ::com::sun::star::uno::Reference
<
350 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0 );
351 inline void exportShape(
352 const ::com::sun::star::uno::Reference
<
353 ::com::sun::star::text::XTextContent
> & rTextContent
,
354 sal_Bool bAutoStyles
,
355 const ::com::sun::star::uno::Reference
<
356 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0 );
359 const ::com::sun::star::uno::Reference
<
360 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
361 const ::com::sun::star::uno::Reference
<
362 ::com::sun::star::beans::XPropertySetInfo
> & rPropSetInfo
);
363 void _exportTextGraphic(
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 inline void exportTextGraphic(
369 const ::com::sun::star::uno::Reference
<
370 ::com::sun::star::text::XTextContent
> & rTextContent
,
371 sal_Bool bAutoStyles
,
372 const ::com::sun::star::uno::Reference
<
373 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0 );
375 virtual void _collectTextEmbeddedAutoStyles(
376 const ::com::sun::star::uno::Reference
<
377 ::com::sun::star::beans::XPropertySet
> & rPropSet
);
378 virtual void _exportTextEmbedded(
379 const ::com::sun::star::uno::Reference
<
380 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
381 const ::com::sun::star::uno::Reference
<
382 ::com::sun::star::beans::XPropertySetInfo
> & rPropSetInfo
);
383 inline void exportTextEmbedded(
384 const ::com::sun::star::uno::Reference
<
385 ::com::sun::star::text::XTextContent
> & rTextContent
,
386 sal_Bool bAutoStyles
,
387 const ::com::sun::star::uno::Reference
<
388 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
= 0 );
389 virtual void setTextEmbeddedGraphicURL(
390 const ::com::sun::star::uno::Reference
<
391 ::com::sun::star::beans::XPropertySet
>& rPropSet
,
392 ::rtl::OUString
& rStreamName
) const;
394 /// export a footnote and styles
395 void exportTextFootnote(
396 const ::com::sun::star::uno::Reference
<
397 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
398 const ::rtl::OUString
& sString
,
399 sal_Bool bAutoStyles
, sal_Bool bProgress
);
401 /// helper for exportTextFootnote
402 void exportTextFootnoteHelper(
403 const ::com::sun::star::uno::Reference
<
404 ::com::sun::star::text::XFootnote
> & rPropSet
,
405 const ::com::sun::star::uno::Reference
<
406 ::com::sun::star::text::XText
> & rText
,
407 const ::rtl::OUString
& sString
,
408 sal_Bool bAutoStyles
,
409 sal_Bool bIsEndnote
, sal_Bool bProgress
);
411 /// export footnote and endnote configuration elements
412 void exportTextFootnoteConfiguration();
414 void exportTextFootnoteConfigurationHelper(
415 const ::com::sun::star::uno::Reference
<
416 ::com::sun::star::beans::XPropertySet
> & rFootnoteSupplier
,
417 sal_Bool bIsEndnote
);
420 const ::com::sun::star::uno::Reference
<
421 ::com::sun::star::beans::XPropertySet
> & xPropSet
,
422 const ::rtl::OUString sProperty
,
423 const enum ::binfilter::xmloff::token::XMLTokenEnum pElements
[],
424 sal_Bool bAutoStyles
);
426 void exportIndexMark(
427 const ::com::sun::star::uno::Reference
<
428 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
429 sal_Bool bAutoStyles
);
431 void exportTextRange(
432 const ::com::sun::star::uno::Reference
<
433 ::com::sun::star::text::XTextRange
> & rTextRange
,
434 sal_Bool bAutoStyles
,
435 sal_Bool
& rPrevCharWasSpace
);
437 void exportListChange( const XMLTextNumRuleInfo
& rPrvInfo
,
438 const XMLTextNumRuleInfo
& rNextInfo
);
440 /// check if current section or current list has changed;
441 /// calls exortListChange as appropriate
442 void exportListAndSectionChange(
443 ::com::sun::star::uno::Reference
<
444 ::com::sun::star::text::XTextSection
> & rOldSection
,
445 const ::com::sun::star::uno::Reference
<
446 ::com::sun::star::text::XTextSection
> & rNewSection
,
447 const XMLTextNumRuleInfo
& rOldList
,
448 const XMLTextNumRuleInfo
& rNewList
,
449 sal_Bool bAutoStyles
);
451 /// overload for exportListAndSectionChange;
452 /// takes new content rather than new section.
453 void exportListAndSectionChange(
454 ::com::sun::star::uno::Reference
<
455 ::com::sun::star::text::XTextSection
> & rOldSection
,
456 const ::com::sun::star::uno::Reference
<
457 ::com::sun::star::text::XTextContent
> & rNewContent
,
458 const XMLTextNumRuleInfo
& rOldList
,
459 const XMLTextNumRuleInfo
& rNewList
,
460 sal_Bool bAutoStyles
);
461 void exportListAndSectionChange(
462 ::com::sun::star::uno::Reference
<
463 ::com::sun::star::text::XTextSection
> & rOldSection
,
464 MultiPropertySetHelper
& rPropSetHelper
,
465 sal_Int16 nTextSectionId
,
466 const ::com::sun::star::uno::Reference
<
467 ::com::sun::star::text::XTextContent
> & rNewContent
,
468 const XMLTextNumRuleInfo
& rOldList
,
469 const XMLTextNumRuleInfo
& rNewList
,
470 sal_Bool bAutoStyles
);
472 /// export a redline text portion
474 const ::com::sun::star::uno::Reference
<
475 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
476 sal_Bool bAutoStyle
);
480 const ::com::sun::star::uno::Reference
<
481 ::com::sun::star::beans::XPropertySet
> & rPortionPropSet
,
482 sal_Bool bAutoStyles
);
486 XMLTextParagraphExport(
488 SvXMLAutoStylePoolP
& rASP
490 virtual ~XMLTextParagraphExport();
492 /// add autostyle for specified family
495 MultiPropertySetHelper
& rPropSetHelper
,
496 const ::com::sun::star::uno::Reference
<
497 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
498 const XMLPropertyState
** pAddState
= NULL
);
501 const ::com::sun::star::uno::Reference
<
502 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
503 const XMLPropertyState
** pAddState
= NULL
);
505 /// find style name for specified family and parent
506 ::rtl::OUString
Find(
508 const ::com::sun::star::uno::Reference
<
509 ::com::sun::star::beans::XPropertySet
> & rPropSet
,
510 const ::rtl::OUString
& rParent
,
511 const XMLPropertyState
** pAddState
= NULL
) const;
513 static SvXMLExportPropertyMapper
*CreateShapeExtPropMapper(
514 SvXMLExport
& rExport
);
515 static SvXMLExportPropertyMapper
*CreateCharExtPropMapper(
516 SvXMLExport
& rExport
);
517 static SvXMLExportPropertyMapper
*CreateParaExtPropMapper(
518 SvXMLExport
& rExport
);
520 // This methods exports all (or all used) styles
521 void exportTextStyles( sal_Bool bUsed
522 , sal_Bool bProg
= sal_False
525 /// This method exports (text field) declarations etc.
526 void exportTextDeclarations();
528 /// export the (text field) declarations for a particular XText
529 void exportTextDeclarations(
530 const ::com::sun::star::uno::Reference
<
531 ::com::sun::star::text::XText
> & rText
);
533 /// true: export only those declarations that are used;
534 /// false: export all declarations
535 void exportUsedDeclarations( sal_Bool bOnlyUsed
);
537 /// Export the list of change information (enclosed by <tracked-changes>)
538 /// (or the necessary automatic styles)
539 void exportTrackedChanges(sal_Bool bAutoStyle
);
541 /// Export the list of change information (enclosed by <tracked-changes>)
542 /// (or the necessary automatic styles)
543 void exportTrackedChanges(const ::com::sun::star::uno::Reference
<
544 ::com::sun::star::text::XText
> & rText
,
545 sal_Bool bAutoStyle
);
547 /// Record tracked changes for this particular XText
548 /// (empty reference stop recording)
549 /// This should be used if tracked changes for e.g. footers are to
550 /// be exported seperately via the exportTrackedChanges(sal_Bool,
551 /// Reference<XText>) method.
552 void recordTrackedChangesForXText(
553 const ::com::sun::star::uno::Reference
<
554 ::com::sun::star::text::XText
> & rText
);
556 /// Stop recording tracked changes.
557 /// This is the same as calling recordTrackedChanges(...) with an
559 void recordTrackedChangesNoXText();
561 // This method exports the given OUString
563 const ::rtl::OUString
& rText
,
564 sal_Bool
& rPrevCharWasSpace
);
566 // This method collects all automatic styles for the given XText
567 void collectTextAutoStyles(
568 const ::com::sun::star::uno::Reference
<
569 ::com::sun::star::text::XText
> & rText
,
570 sal_Bool bProgress
= sal_False
,
571 sal_Bool bExportParagraph
= sal_True
)
573 exportText( rText
, sal_True
, bProgress
, bExportParagraph
);
576 void collectTextAutoStyles(
577 const ::com::sun::star::uno::Reference
<
578 ::com::sun::star::text::XText
> & rText
,
579 const ::com::sun::star::uno::Reference
<
580 ::com::sun::star::text::XTextSection
> & rBaseSection
,
581 sal_Bool bProgress
= sal_False
,
582 sal_Bool bExportParagraph
= sal_True
)
584 exportText( rText
, rBaseSection
, sal_True
, bProgress
, bExportParagraph
);
587 // This method prepares the collection of auto styles for frames
588 // that are bound to a frame.
589 void collectFramesBoundToFrameAutoStyles( sal_Bool bProgress
= sal_False
)
591 collectFrames( sal_True
);
593 // This method prepares the collection of auto styles for frames
594 // that are bound to a frame and it collects auto styles
595 // for frames bound to a page.
596 void collectFramesBoundToPageOrFrameAutoStyles( sal_Bool bProgress
= sal_False
)
598 collectFrames( sal_False
);
599 exportPageFrames( sal_True
, bProgress
);
601 void collectFramesBoundToFrameAutoStyles(
602 const ::com::sun::star::uno::Reference
<
603 ::com::sun::star::text::XTextFrame
>& rParentTxtFrame
,
604 sal_Bool bProgress
= sal_False
)
606 exportFrameFrames( sal_True
, bProgress
, &rParentTxtFrame
);
609 // This method exports all automatic styles that have been collected.
610 virtual void exportTextAutoStyles();
612 void exportEvents( const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> & rPropSet
);
613 void exportAlternativeText( const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySet
> & rPropSet
,
614 const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> & rPropSetInfo
);
616 // This method exports the given XText
618 const ::com::sun::star::uno::Reference
<
619 ::com::sun::star::text::XText
> & rText
,
620 sal_Bool bProgress
= sal_False
,
621 sal_Bool bExportParagraph
= sal_True
)
623 exportText( rText
, sal_False
, bProgress
, bExportParagraph
);
627 const ::com::sun::star::uno::Reference
<
628 ::com::sun::star::text::XText
> & rText
,
629 const ::com::sun::star::uno::Reference
<
630 ::com::sun::star::text::XTextSection
> & rBaseSection
,
631 sal_Bool bProgress
= sal_False
,
632 sal_Bool bExportParagraph
= sal_True
)
634 exportText( rText
, rBaseSection
, sal_False
, bProgress
, bExportParagraph
);
637 void exportFramesBoundToPage( sal_Bool bProgress
= sal_False
)
639 exportPageFrames( sal_False
, bProgress
);
641 void exportFramesBoundToFrame(
642 const ::com::sun::star::uno::Reference
<
643 ::com::sun::star::text::XTextFrame
>& rParentTxtFrame
,
644 sal_Bool bProgress
= sal_False
)
646 exportFrameFrames( sal_False
, bProgress
, &rParentTxtFrame
);
648 inline const XMLTextListAutoStylePool
& GetListAutoStylePool() const;
650 void SetBlockMode( sal_Bool bSet
) { bBlock
= bSet
; }
651 sal_Bool
IsBlockMode() const { return bBlock
; }
653 UniReference
< SvXMLExportPropertyMapper
> GetParagraphPropertyMapper() const
655 return xParaPropMapper
;
658 /** exclude form controls which are in mute sections.
660 * This method is necessary to prevent the form layer export from exporting
661 * control models whose controls are not represented in the document. To
662 * achieve this, this method iterates over all shapes, checks to see if
663 * they are control shapes, and if so, whether they should be exported or
664 * not. If not, the form layer export will be notified accordingly.
666 * The reason this method is located here is tha it needs to access the
667 * XMLSectionExport, which is only available here.
669 void PreventExportOfControlsInMuteSections(
670 const ::com::sun::star::uno::Reference
<
671 ::com::sun::star::container::XIndexAccess
> & rShapes
,
672 UniReference
<xmloff::OFormLayerXMLExport
> xFormExport
);
674 SinglePropertySetInfoCache
& GetCharStyleNamesPropInfoCache() { return aCharStyleNamesPropInfoCache
; }
677 inline const XMLTextListAutoStylePool
&
678 XMLTextParagraphExport::GetListAutoStylePool() const
680 return *pListAutoPool
;
683 inline void XMLTextParagraphExport::exportTextFrame(
684 const ::com::sun::star::uno::Reference
<
685 ::com::sun::star::text::XTextContent
> & rTextContent
,
686 sal_Bool bAutoStyles
, sal_Bool bProgress
,
687 const ::com::sun::star::uno::Reference
<
688 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
)
690 exportAnyTextFrame( rTextContent
, FT_TEXT
, bAutoStyles
, bProgress
,
694 inline void XMLTextParagraphExport::exportTextGraphic(
695 const ::com::sun::star::uno::Reference
<
696 ::com::sun::star::text::XTextContent
> & rTextContent
,
697 sal_Bool bAutoStyles
,
698 const ::com::sun::star::uno::Reference
<
699 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
)
701 exportAnyTextFrame( rTextContent
, FT_GRAPHIC
, bAutoStyles
, sal_False
,
705 inline void XMLTextParagraphExport::exportTextEmbedded(
706 const ::com::sun::star::uno::Reference
<
707 ::com::sun::star::text::XTextContent
> & rTextContent
,
708 sal_Bool bAutoStyles
,
709 const ::com::sun::star::uno::Reference
<
710 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
)
712 exportAnyTextFrame( rTextContent
, FT_EMBEDDED
, bAutoStyles
, sal_False
,
716 inline void XMLTextParagraphExport::exportShape(
717 const ::com::sun::star::uno::Reference
<
718 ::com::sun::star::text::XTextContent
> & rTextContent
,
719 sal_Bool bAutoStyles
,
720 const ::com::sun::star::uno::Reference
<
721 ::com::sun::star::beans::XPropertySet
> *pRangePropSet
)
723 exportAnyTextFrame( rTextContent
, FT_SHAPE
, bAutoStyles
, sal_False
,
727 }//end of namespace binfilter