20#ifndef INCLUDED_XMLOFF_TXTPARAE_HXX
21#define INCLUDED_XMLOFF_TXTPARAE_HXX
26#include <rtl/ustring.hxx>
27#include <com/sun/star/uno/Reference.h>
52 namespace beans {
class XPropertySet;
class XPropertyState;
53 class XPropertySetInfo; }
54 namespace container {
class XEnumeration;
class XIndexAccess;
class XNameReplace; }
55 namespace drawing {
class XShape; }
56 namespace text {
class XTextContent;
class XTextRange;
class XText;
57 class XFootnote;
class XTextFrame;
class XTextSection;
63 class OFormLayerXMLExport;
129 void exportTextRangeSpan(
130 const css::uno::Reference< css::text::XTextRange > & rTextRange,
131 css::uno::Reference< css::beans::XPropertySet >
const & xPropSet,
132 css::uno::Reference < css::beans::XPropertySetInfo > & xPropSetInfo,
133 const bool bIsUICharStyle,
134 const bool bHasAutoStyle,
135 const OUString& sStyle,
136 bool& rPrevCharIsSpace,
137 FieldmarkType& openFieldMark);
142 static constexpr OUStringLiteral gsAnchorCharStyleName =
u"AnchorCharStyleName";
143 static constexpr OUStringLiteral gsBeginNotice =
u"BeginNotice";
144 static constexpr OUStringLiteral gsCategory =
u"Category";
146 static constexpr OUStringLiteral gsCharStyleNames =
u"CharStyleNames";
147 static constexpr OUStringLiteral gsEndNotice =
u"EndNotice";
148 static constexpr OUStringLiteral gsFootnote =
u"Footnote";
149 static constexpr OUStringLiteral gsFootnoteCounting =
u"FootnoteCounting";
151 static constexpr OUStringLiteral gsPageDescName =
u"PageDescName";
152 static constexpr OUStringLiteral gsPageStyleName =
u"PageStyleName";
153 static constexpr OUStringLiteral gsParaStyleName =
u"ParaStyleName";
154 static constexpr OUStringLiteral gsPositionEndOfDoc =
u"PositionEndOfDoc";
155 static constexpr OUStringLiteral gsPrefix =
u"Prefix";
156 static constexpr OUStringLiteral gsReferenceId =
u"ReferenceId";
157 static constexpr OUStringLiteral gsStartAt =
u"StartAt";
158 static constexpr OUStringLiteral gsSuffix =
u"Suffix";
159 static constexpr OUStringLiteral gsTextEndnoteService =
u"com.sun.star.text.Endnote";
160 static constexpr OUStringLiteral gsTextSection =
u"TextSection";
163 static constexpr OUStringLiteral gsFrameStyleName =
u"FrameStyleName";
172 return m_xParaPropMapper;
177 return m_xTextPropMapper;
182 return m_xAutoFramePropMapper;
186 return m_xSectionPropMapper;
190 return m_xRubyPropMapper;
193 OUString FindTextStyle(
194 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
195 bool& rbHasCharStyle,
196 bool& rbHasAutoStyle,
199 void exportTextRangeEnumeration(
200 const css::uno::Reference< css::container::XEnumeration > & rRangeEnum,
201 bool bAutoStyles,
bool bProgress,
bool & rPrevCharIsSpace);
206 const css::uno::Reference< css::beans::XPropertySet >& rPropSet,
209 OUString *pMinHeightValue =
nullptr,
210 OUString *pMinWidthValue =
nullptr );
213 const css::uno::Reference< css::style::XStyle > & rStyle )
override;
215 void exportPageFrames(
bool bProgress );
216 void exportFrameFrames(
bool bAutoStyles,
bool bProgress,
217 const css::uno::Reference< css::text::XTextFrame >& rParentTxtFrame );
219 void exportNumStyles(
bool bUsed );
222 const css::uno::Reference <
223 css::text::XText > & rText,
224 bool bAutoStyles,
bool bProgress,
bool bExportParagraph,
TextPNS eExtensionNS =
TextPNS::ODF );
227 const css::uno::Reference< css::text::XText > & rText,
228 const css::uno::Reference< css::text::XTextSection > & rBaseSection,
229 bool bAutoStyles,
bool bProgress,
bool bExportParagraph );
231 void exportTextContentEnumeration(
232 const css::uno::Reference< css::container::XEnumeration > & rContentEnum,
234 const css::uno::Reference< css::text::XTextSection > & rBaseSection,
236 bool bExportParagraph =
true,
237 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet =
nullptr,
239 void exportParagraph(
240 const css::uno::Reference< css::text::XTextContent > & rTextContent,
241 bool bAutoStyles,
bool bProgress,
242 bool bExportParagraph,
246 virtual void exportTable(
247 const css::uno::Reference< css::text::XTextContent > & rTextContent,
248 bool bAutoStyles,
bool bProgress );
251 const css::uno::Reference< css::text::XTextRange > & rTextRange,
252 bool bAutoStyles,
bool bProgress,
bool * pPrevCharIsSpace);
255 const css::uno::Reference< css::text::XTextField> & xTextField,
256 const bool bAutoStyles,
const bool bProgress,
257 const bool bRecursive,
bool * pPrevCharIsSpace);
259 void exportAnyTextFrame(
260 const css::uno::Reference< css::text::XTextContent > & rTextContent,
262 bool bAutoStyles,
bool bProgress,
bool bExportContent,
263 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet );
264 void _exportTextFrame(
265 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
266 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo,
268 inline void exportTextFrame(
269 const css::uno::Reference< css::text::XTextContent > & rTextContent,
270 bool bAutoStyles,
bool bProgress,
bool bExportContent,
271 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet =
nullptr );
272 inline void exportShape(
273 const css::uno::Reference< css::text::XTextContent > & rTextContent,
275 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet =
nullptr );
278 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
279 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo );
280 void _exportTextGraphic(
281 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
282 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo );
283 inline void exportTextGraphic(
284 const css::uno::Reference< css::text::XTextContent > & rTextContent,
286 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet =
nullptr );
288 virtual void _collectTextEmbeddedAutoStyles(
289 const css::uno::Reference< css::beans::XPropertySet > & rPropSet );
290 virtual void _exportTextEmbedded(
291 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
292 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo );
293 inline void exportTextEmbedded(
294 const css::uno::Reference< css::text::XTextContent > & rTextContent,
296 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet =
nullptr );
299 void exportTextFootnote(
300 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
301 const OUString& sString,
302 bool bAutoStyles,
bool bProgress );
305 void exportTextFootnoteHelper(
306 const css::uno::Reference< css::text::XFootnote > & rPropSet,
307 const css::uno::Reference< css::text::XText> & rText,
308 const OUString& sString,
310 bool bIsEndnote,
bool bProgress );
313 void exportTextFootnoteConfiguration();
315 void exportTextFootnoteConfigurationHelper(
316 const css::uno::Reference< css::beans::XPropertySet> & rFootnoteSupplier,
320 const css::uno::Reference< css::beans::XPropertySet> & xPropSet,
321 const OUString& rProperty,
325 void exportSoftPageBreak();
327 void exportTextLineBreak(
const css::uno::Reference<css::beans::XPropertySet>& xPropSet);
329 void exportTextRange(
330 const css::uno::Reference< css::text::XTextRange > & rTextRange,
332 bool& rPrevCharWasSpace,
341 css::uno::Reference< css::text::XTextSection > & rOldSection,
342 const css::uno::Reference< css::text::XTextSection > & rNewSection,
350 css::uno::Reference< css::text::XTextSection > & rOldSection,
351 const css::uno::Reference< css::text::XTextContent > & rNewContent,
356 css::uno::Reference< css::text::XTextSection > & rOldSection,
358 sal_Int16 nTextSectionId,
359 const css::uno::Reference< css::text::XTextContent > & rNewContent,
366 const css::uno::Reference< css::beans::XPropertySet> & rPortionPropSet,
371 const css::uno::Reference< css::beans::XPropertySet> & i_xPortion,
372 bool i_bAutoStyles,
bool i_isProgress,
bool & rPrevCharIsSpace);
375 void ExportContentControl(
const css::uno::Reference<css::beans::XPropertySet>& xPortion,
376 bool bAutoStyles,
bool isProgress,
bool& rPrevCharIsSpace);
380 virtual void exportTableAutoStyles();
394 const css::uno::Reference< css::beans::XPropertySet > & rPropSet );
397 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
403 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
404 const OUString& rParent,
417 void exportTextStyles(
bool bUsed,
bool bProg );
420 void exportTextDeclarations();
424 const css::uno::Reference< css::text::XText > & rText );
427 void exportUsedDeclarations();
431 void exportTrackedChanges(
bool bAutoStyle);
443 void recordTrackedChangesForXText(
444 const css::uno::Reference< css::text::XText > & rText );
450 void recordTrackedChangesNoXText();
454 void exportCharacterData(
455 const OUString& rText,
456 bool& rPrevCharWasSpace);
460 const css::uno::Reference< css::text::XText > & rText,
461 bool bIsProgress =
false,
462 bool bExportParagraph =
true )
464 exportText( rText,
true, bIsProgress, bExportParagraph );
468 const css::uno::Reference< css::text::XText > & rText,
469 const css::uno::Reference< css::text::XTextSection > & rBaseSection,
472 exportText( rText, rBaseSection,
true, bIsProgress,
true );
477 void collectTextAutoStylesOptimized(
bool bIsProgress );
480 void exportTextAutoStyles();
482 void exportEvents(
const css::uno::Reference< css::beans::XPropertySet > & rPropSet );
485 void exportTitleAndDescription(
const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
486 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo );
490 const css::uno::Reference< css::text::XText > & rText,
491 bool bIsProgress =
false,
494 exportText( rText,
false, bIsProgress, bExportParagraph, eExtensionNS );
498 const css::uno::Reference< css::text::XText > & rText,
499 const css::uno::Reference< css::text::XTextSection > & rBaseSection,
502 exportText( rText, rBaseSection,
false, bIsProgress,
true );
507 exportPageFrames( bIsProgress );
517 return m_xParaPropMapper;
532 void PreventExportOfControlsInMuteSections(
533 const css::uno::Reference< css::container::XIndexAccess> & rShapes,
538 void PushNewTextListsHelper();
540 void PopTextListsHelper();
543 bool ShouldSkipListId(
const css::uno::Reference<css::text::XTextContent>& xTextContent);
544 bool ExportListId()
const;
557 const css::uno::Reference< css::text::XTextContent > & rTextContent,
558 bool bAutoStyles,
bool bIsProgress,
bool bExportContent,
559 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet)
562 bExportContent, pRangePropSet );
566 const css::uno::Reference< css::text::XTextContent > & rTextContent,
568 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet )
571 true, pRangePropSet );
575 const css::uno::Reference< css::text::XTextContent > & rTextContent,
577 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet )
580 true, pRangePropSet );
584 const css::uno::Reference< css::text::XTextContent > & rTextContent,
586 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet )
589 true, pRangePropSet );
constexpr OUStringLiteral gsNumberingType(u"NumberingType")
constexpr OUStringLiteral gsCharStyleName(u"CharStyleName")
The MultiPropertySetHelper performs the following functions:
This class handles the export of index marks for table of content, alphabetical and user index.
This class handles the export of redline portions.
This class handles the export of sections and indices (which are, internally, just sections).
virtual void exportStyleAttributes(const css::uno::Reference< css::style::XStyle > &rStyle)
information about list and list style for a certain paragraph
void exportText(const css::uno::Reference< css::text::XText > &rText, const css::uno::Reference< css::text::XTextSection > &rBaseSection, bool bIsProgress)
void exportTrackedChanges(const css::uno::Reference< css::text::XText > &rText, bool bAutoStyle)
Export the list of change information (enclosed by <tracked-changes>) (or the necessary automatic sty...
void exportFramesBoundToPage(bool bIsProgress)
SinglePropertySetInfoCache & GetCharStyleNamesPropInfoCache()
std::unique_ptr< XMLRedlineExport > m_pRedlineExport
may be NULL (if no redlines should be exported; e.g. in block mode)
std::vector< OUString > maListElements
SvXMLAutoStylePoolP & GetAutoStylePool()
void exportTextFrame(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bAutoStyles, bool bProgress, bool bExportContent, const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet=nullptr)
void exportShape(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bAutoStyles, const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet=nullptr)
void exportTextField(const css::uno::Reference< css::text::XTextRange > &rTextRange, bool bAutoStyles, bool bProgress, bool *pPrevCharIsSpace)
std::unique_ptr< XMLSectionExport > m_pSectionExport
std::unique_ptr< XMLIndexMarkExport > m_pIndexMarkExport
rtl::Reference< SvXMLExportPropertyMapper > m_xRubyPropMapper
const rtl::Reference< SvXMLExportPropertyMapper > & GetTextPropMapper() const
void exportTextField(const css::uno::Reference< css::text::XTextField > &xTextField, const bool bAutoStyles, const bool bProgress, const bool bRecursive, bool *pPrevCharIsSpace)
const ::std::unique_ptr< ::xmloff::BoundFrameSets > m_pBoundFrameSets
rtl::Reference< SvXMLExportPropertyMapper > m_xFramePropMapper
void exportText(const css::uno::Reference< css::text::XText > &rText, const css::uno::Reference< css::text::XTextSection > &rBaseSection, bool bAutoStyles, bool bProgress, bool bExportParagraph)
rtl::Reference< SvXMLExportPropertyMapper > m_xParaPropMapper
const SvXMLAutoStylePoolP & GetAutoStylePool() const
XMLTextListsHelper * mpTextListsHelper
::std::vector< std::unique_ptr< XMLTextListsHelper > > maTextListsHelperStack
void collectTextAutoStyles(const css::uno::Reference< css::text::XText > &rText, const css::uno::Reference< css::text::XTextSection > &rBaseSection, bool bIsProgress)
const rtl::Reference< SvXMLExportPropertyMapper > & GetRubyPropMapper() const
void exportTextGraphic(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bAutoStyles, const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet=nullptr)
void SetBlockMode(bool bSet)
void exportTextDeclarations(const css::uno::Reference< css::text::XText > &rText)
export the (text field) declarations for a particular XText
std::unique_ptr< DocumentListNodes > mpDocumentListNodes
OUString m_sOpenRubyCharStyle
void exportListAndSectionChange(css::uno::Reference< css::text::XTextSection > &rOldSection, const css::uno::Reference< css::text::XTextSection > &rNewSection, const XMLTextNumRuleInfo &rOldList, const XMLTextNumRuleInfo &rNewList, bool bAutoStyles)
check if current section or current list has changed; calls exportListChange as appropriate
void Add(XmlStyleFamily nFamily, const css::uno::Reference< css::beans::XPropertySet > &rPropSet, o3tl::span< const XMLPropertyState > aAddStates={}, bool bDontSeek=false)
void exportTextEmbedded(const css::uno::Reference< css::text::XTextContent > &rTextContent, bool bAutoStyles, const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet=nullptr)
const rtl::Reference< SvXMLExportPropertyMapper > & GetParaPropMapper() const
std::unique_ptr< XMLTextFieldExport > m_pFieldExport
rtl::Reference< SvXMLExportPropertyMapper > m_xSectionPropMapper
const rtl::Reference< SvXMLExportPropertyMapper > & GetSectionPropMapper() const
XMLTextListAutoStylePool maListAutoPool
const XMLTextListAutoStylePool & GetListAutoStylePool() const
void exportListAndSectionChange(css::uno::Reference< css::text::XTextSection > &rOldSection, MultiPropertySetHelper &rPropSetHelper, sal_Int16 nTextSectionId, const css::uno::Reference< css::text::XTextContent > &rNewContent, const XMLTextNumRuleInfo &rOldList, const XMLTextNumRuleInfo &rNewList, bool bAutoStyles)
bool isAutoStylesCollected() const
o3tl::sorted_vector< css::uno::Reference< css::text::XTextFrame > > maFrameRecurseGuard
rtl::Reference< SvXMLExportPropertyMapper > m_xAutoFramePropMapper
void collectTextAutoStyles(const css::uno::Reference< css::text::XText > &rText, bool bIsProgress=false, bool bExportParagraph=true)
const rtl::Reference< SvXMLExportPropertyMapper > & GetParagraphPropertyMapper() const
o3tl::sorted_vector< css::uno::Reference< css::drawing::XShape > > maShapeRecurseGuard
const rtl::Reference< SvXMLExportPropertyMapper > & GetAutoFramePropMapper() const
std::unique_ptr< Impl > m_xImpl
SinglePropertySetInfoCache m_aCharStyleNamesPropInfoCache
void exportText(const css::uno::Reference< css::text::XText > &rText, bool bIsProgress=false, bool bExportParagraph=true, TextPNS eExtensionNS=TextPNS::ODF)
void Add(XmlStyleFamily nFamily, MultiPropertySetHelper &rPropSetHelper, const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
add autostyle for specified family
XMLTextParagraphExport(XMLTextParagraphExport const &)=delete
SvXMLAutoStylePoolP & m_rAutoStylePool
void exportListAndSectionChange(css::uno::Reference< css::text::XTextSection > &rOldSection, const css::uno::Reference< css::text::XTextContent > &rNewContent, const XMLTextNumRuleInfo &rOldList, const XMLTextNumRuleInfo &rNewList, bool bAutoStyles)
overload for exportListAndSectionChange; takes new content rather than new section.
void exportAnyTextFrame(const css::uno::Reference< css::text::XTextContent > &rTextContent, FrameType eTxpe, bool bAutoStyles, bool bProgress, bool bExportContent, const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet)
rtl::Reference< SvXMLExportPropertyMapper > m_xTextPropMapper
void exportText(const css::uno::Reference< css::text::XText > &rText, bool bAutoStyles, bool bProgress, bool bExportParagraph, TextPNS eExtensionNS=TextPNS::ODF)
class SAL_NO_VTABLE XPropertySet
XMLTokenEnum
The enumeration of all XML tokens.
Smart struct to transport an Any with an index to the appropriate property-name.