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>
51 namespace beans {
class XPropertySet;
class XPropertyState;
52 class XPropertySetInfo; }
53 namespace container {
class XEnumeration;
class XIndexAccess; }
54 namespace text {
class XTextContent;
class XTextRange;
class XText;
55 class XFootnote;
class XTextFrame;
class XTextSection;
61 class OFormLayerXMLExport;
121 void exportTextRangeSpan(
122 const css::uno::Reference< css::text::XTextRange > & rTextRange,
123 css::uno::Reference< css::beans::XPropertySet >
const & xPropSet,
124 css::uno::Reference < css::beans::XPropertySetInfo > & xPropSetInfo,
125 const bool bIsUICharStyle,
126 const bool bHasAutoStyle,
127 const OUString& sStyle,
128 bool& rPrevCharIsSpace,
129 FieldmarkType& openFieldMark);
134 static constexpr OUStringLiteral gsAnchorCharStyleName =
u"AnchorCharStyleName";
135 static constexpr OUStringLiteral gsBeginNotice =
u"BeginNotice";
136 static constexpr OUStringLiteral gsCategory =
u"Category";
138 static constexpr OUStringLiteral gsCharStyleNames =
u"CharStyleNames";
139 static constexpr OUStringLiteral gsEndNotice =
u"EndNotice";
140 static constexpr OUStringLiteral gsFootnote =
u"Footnote";
141 static constexpr OUStringLiteral gsFootnoteCounting =
u"FootnoteCounting";
143 static constexpr OUStringLiteral gsPageDescName =
u"PageDescName";
144 static constexpr OUStringLiteral gsPageStyleName =
u"PageStyleName";
145 static constexpr OUStringLiteral gsParaStyleName =
u"ParaStyleName";
146 static constexpr OUStringLiteral gsPositionEndOfDoc =
u"PositionEndOfDoc";
147 static constexpr OUStringLiteral gsPrefix =
u"Prefix";
148 static constexpr OUStringLiteral gsReferenceId =
u"ReferenceId";
149 static constexpr OUStringLiteral gsStartAt =
u"StartAt";
150 static constexpr OUStringLiteral gsSuffix =
u"Suffix";
151 static constexpr OUStringLiteral gsTextEndnoteService =
u"com.sun.star.text.Endnote";
152 static constexpr OUStringLiteral gsTextSection =
u"TextSection";
155 static constexpr OUStringLiteral gsFrameStyleName =
u"FrameStyleName";
164 return xParaPropMapper;
169 return xTextPropMapper;
174 return xAutoFramePropMapper;
178 return xSectionPropMapper;
182 return xRubyPropMapper;
185 OUString FindTextStyleAndHyperlink(
186 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
188 bool& rbHasCharStyle,
189 bool& rbHasAutoStyle,
191 bool addHyperlinkAttributes(
192 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
193 const css::uno::Reference< css::beans::XPropertyState > & rPropState,
194 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo );
196 void exportTextRangeEnumeration(
197 const css::uno::Reference< css::container::XEnumeration > & rRangeEnum,
198 bool bAutoStyles,
bool bProgress,
bool & rPrevCharIsSpace);
203 const css::uno::Reference< css::beans::XPropertySet >& rPropSet,
206 OUString *pMinHeightValue =
nullptr,
207 OUString *pMinWidthValue =
nullptr );
210 const css::uno::Reference< css::style::XStyle > & rStyle )
override;
212 void exportPageFrames(
bool bProgress );
213 void exportFrameFrames(
bool bAutoStyles,
bool bProgress,
214 const css::uno::Reference< css::text::XTextFrame > *pParentTxtFrame );
216 void exportNumStyles(
bool bUsed );
219 const css::uno::Reference <
220 css::text::XText > & rText,
221 bool bAutoStyles,
bool bProgress,
bool bExportParagraph,
TextPNS eExtensionNS =
TextPNS::ODF );
224 const css::uno::Reference< css::text::XText > & rText,
225 const css::uno::Reference< css::text::XTextSection > & rBaseSection,
226 bool bAutoStyles,
bool bProgress,
bool bExportParagraph );
228 void exportTextContentEnumeration(
229 const css::uno::Reference< css::container::XEnumeration > & rContentEnum,
231 const css::uno::Reference< css::text::XTextSection > & rBaseSection,
233 bool bExportParagraph =
true,
234 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet =
nullptr,
236 void exportParagraph(
237 const css::uno::Reference< css::text::XTextContent > & rTextContent,
238 bool bAutoStyles,
bool bProgress,
239 bool bExportParagraph,
243 virtual void exportTable(
244 const css::uno::Reference< css::text::XTextContent > & rTextContent,
245 bool bAutoStyles,
bool bProgress );
248 const css::uno::Reference< css::text::XTextRange > & rTextRange,
249 bool bAutoStyles,
bool bProgress,
bool * pPrevCharIsSpace);
252 const css::uno::Reference< css::text::XTextField> & xTextField,
253 const bool bAutoStyles,
const bool bProgress,
254 const bool bRecursive,
bool * pPrevCharIsSpace);
256 void exportAnyTextFrame(
257 const css::uno::Reference< css::text::XTextContent > & rTextContent,
259 bool bAutoStyles,
bool bProgress,
bool bExportContent,
260 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet );
261 void _exportTextFrame(
262 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
263 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo,
265 inline void exportTextFrame(
266 const css::uno::Reference< css::text::XTextContent > & rTextContent,
267 bool bAutoStyles,
bool bProgress,
bool bExportContent,
268 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet =
nullptr );
269 inline void exportShape(
270 const css::uno::Reference< css::text::XTextContent > & rTextContent,
272 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet =
nullptr );
275 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
276 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo );
277 void _exportTextGraphic(
278 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
279 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo );
280 inline void exportTextGraphic(
281 const css::uno::Reference< css::text::XTextContent > & rTextContent,
283 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet =
nullptr );
285 virtual void _collectTextEmbeddedAutoStyles(
286 const css::uno::Reference< css::beans::XPropertySet > & rPropSet );
287 virtual void _exportTextEmbedded(
288 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
289 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo );
290 inline void exportTextEmbedded(
291 const css::uno::Reference< css::text::XTextContent > & rTextContent,
293 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet =
nullptr );
296 void exportTextFootnote(
297 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
298 const OUString& sString,
299 bool bAutoStyles,
bool bProgress );
302 void exportTextFootnoteHelper(
303 const css::uno::Reference< css::text::XFootnote > & rPropSet,
304 const css::uno::Reference< css::text::XText> & rText,
305 const OUString& sString,
307 bool bIsEndnote,
bool bProgress );
310 void exportTextFootnoteConfiguration();
312 void exportTextFootnoteConfigurationHelper(
313 const css::uno::Reference< css::beans::XPropertySet> & rFootnoteSupplier,
317 const css::uno::Reference< css::beans::XPropertySet> & xPropSet,
318 const OUString& rProperty,
322 void exportSoftPageBreak();
324 void exportTextLineBreak(
const css::uno::Reference<css::beans::XPropertySet>& xPropSet);
326 void exportTextRange(
327 const css::uno::Reference< css::text::XTextRange > & rTextRange,
329 bool& rPrevCharWasSpace,
338 css::uno::Reference< css::text::XTextSection > & rOldSection,
339 const css::uno::Reference< css::text::XTextSection > & rNewSection,
347 css::uno::Reference< css::text::XTextSection > & rOldSection,
348 const css::uno::Reference< css::text::XTextContent > & rNewContent,
353 css::uno::Reference< css::text::XTextSection > & rOldSection,
355 sal_Int16 nTextSectionId,
356 const css::uno::Reference< css::text::XTextContent > & rNewContent,
363 const css::uno::Reference< css::beans::XPropertySet> & rPortionPropSet,
368 const css::uno::Reference< css::beans::XPropertySet> & i_xPortion,
369 bool i_bAutoStyles,
bool i_isProgress,
bool & rPrevCharIsSpace);
372 void ExportContentControl(
const css::uno::Reference<css::beans::XPropertySet>& xPortion,
373 bool bAutoStyles,
bool isProgress,
bool& rPrevCharIsSpace);
377 virtual void exportTableAutoStyles();
391 const css::uno::Reference< css::beans::XPropertySet > & rPropSet );
394 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
400 const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
401 const OUString& rParent,
414 void exportTextStyles(
bool bUsed,
bool bProg );
417 void exportTextDeclarations();
421 const css::uno::Reference< css::text::XText > & rText );
424 void exportUsedDeclarations();
428 void exportTrackedChanges(
bool bAutoStyle);
440 void recordTrackedChangesForXText(
441 const css::uno::Reference< css::text::XText > & rText );
447 void recordTrackedChangesNoXText();
451 void exportCharacterData(
452 const OUString& rText,
453 bool& rPrevCharWasSpace);
457 const css::uno::Reference< css::text::XText > & rText,
458 bool bIsProgress =
false,
459 bool bExportParagraph =
true )
461 exportText( rText,
true, bIsProgress, bExportParagraph );
465 const css::uno::Reference< css::text::XText > & rText,
466 const css::uno::Reference< css::text::XTextSection > & rBaseSection,
469 exportText( rText, rBaseSection,
true, bIsProgress,
true );
474 void collectTextAutoStylesOptimized(
bool bIsProgress );
477 void exportTextAutoStyles();
479 void exportEvents(
const css::uno::Reference< css::beans::XPropertySet > & rPropSet );
482 void exportTitleAndDescription(
const css::uno::Reference< css::beans::XPropertySet > & rPropSet,
483 const css::uno::Reference< css::beans::XPropertySetInfo > & rPropSetInfo );
487 const css::uno::Reference< css::text::XText > & rText,
488 bool bIsProgress =
false,
491 exportText( rText,
false, bIsProgress, bExportParagraph, eExtensionNS );
495 const css::uno::Reference< css::text::XText > & rText,
496 const css::uno::Reference< css::text::XTextSection > & rBaseSection,
499 exportText( rText, rBaseSection,
false, bIsProgress,
true );
504 exportPageFrames( bIsProgress );
514 return xParaPropMapper;
529 void PreventExportOfControlsInMuteSections(
530 const css::uno::Reference< css::container::XIndexAccess> & rShapes,
535 void PushNewTextListsHelper();
537 void PopTextListsHelper();
550 const css::uno::Reference< css::text::XTextContent > & rTextContent,
551 bool bAutoStyles,
bool bIsProgress,
bool bExportContent,
552 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet)
555 bExportContent, pRangePropSet );
559 const css::uno::Reference< css::text::XTextContent > & rTextContent,
561 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet )
564 true, pRangePropSet );
568 const css::uno::Reference< css::text::XTextContent > & rTextContent,
570 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet )
573 true, pRangePropSet );
577 const css::uno::Reference< css::text::XTextContent > & rTextContent,
579 const css::uno::Reference< css::beans::XPropertySet > *pRangePropSet )
582 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 > 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)
rtl::Reference< SvXMLExportPropertyMapper > xSectionPropMapper
const rtl::Reference< SvXMLExportPropertyMapper > & GetTextPropMapper() const
SinglePropertySetInfoCache aCharStyleNamesPropInfoCache
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 > pBoundFrameSets
rtl::Reference< SvXMLExportPropertyMapper > xRubyPropMapper
std::unique_ptr< XMLIndexMarkExport > pIndexMarkExport
void exportText(const css::uno::Reference< css::text::XText > &rText, const css::uno::Reference< css::text::XTextSection > &rBaseSection, bool bAutoStyles, bool bProgress, bool bExportParagraph)
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)
std::unique_ptr< XMLTextFieldExport > pFieldExport
void exportTextDeclarations(const css::uno::Reference< css::text::XText > &rText)
export the (text field) declarations for a particular XText
rtl::Reference< SvXMLExportPropertyMapper > xParaPropMapper
SvXMLAutoStylePoolP & rAutoStylePool
rtl::Reference< SvXMLExportPropertyMapper > xTextPropMapper
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
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)
rtl::Reference< SvXMLExportPropertyMapper > xAutoFramePropMapper
bool isAutoStylesCollected() const
void collectTextAutoStyles(const css::uno::Reference< css::text::XText > &rText, bool bIsProgress=false, bool bExportParagraph=true)
const rtl::Reference< SvXMLExportPropertyMapper > & GetParagraphPropertyMapper() const
OUString sOpenRubyCharStyle
const rtl::Reference< SvXMLExportPropertyMapper > & GetAutoFramePropMapper() const
std::unique_ptr< Impl > m_xImpl
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
std::unique_ptr< XMLSectionExport > pSectionExport
rtl::Reference< SvXMLExportPropertyMapper > xFramePropMapper
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)
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.