34#include <rtl/ustrbuf.hxx>
35#include <com/sun/star/lang/XServiceInfo.hpp>
36#include <com/sun/star/beans/XPropertySet.hpp>
37#include <com/sun/star/beans/XPropertyState.hpp>
38#include <com/sun/star/text/XTextDocument.hpp>
39#include <com/sun/star/text/XText.hpp>
40#include <com/sun/star/text/XFootnote.hpp>
41#include <com/sun/star/text/XFootnotesSupplier.hpp>
42#include <com/sun/star/text/XEndnotesSupplier.hpp>
43#include <com/sun/star/text/FootnoteNumbering.hpp>
44#include <com/sun/star/container/XNameReplace.hpp>
65 const Reference<XPropertySet> & rPropSet,
66 const OUString& rText,
67 bool bAutoStyles,
bool bIsProgress )
71 Reference<XFootnote> xFootnote;
73 Reference<XText> xText(xFootnote, UNO_QUERY);
76 Reference<XServiceInfo> xServiceInfo( xFootnote, UNO_QUERY );
86 bAutoStyles, bIsEndnote, bIsProgress );
93 bool bIsUICharStyle =
false;
94 bool bHasAutoStyle =
false;
97 bIsUICharStyle, bHasAutoStyle );
100 Reference < XPropertySetInfo > xPropSetInfo;
103 Reference<XPropertyState> xPropState( rPropSet, UNO_QUERY );
104 xPropSetInfo = rPropSet->getPropertySetInfo();
115 OUString sHyperLinkEvents(
"HyperLinkEvents");
116 if (xPropSetInfo->hasPropertyByName(sHyperLinkEvents))
118 Any a = rPropSet->getPropertyValue(sHyperLinkEvents);
119 Reference<XNameReplace> xName;
129 rPropSet ), bHasAutoStyle,
131 if( !sStyle.isEmpty() )
138 bAutoStyles, bIsEndnote, bIsProgress );
143 bAutoStyles, bIsEndnote, bIsProgress );
151 const Reference<XFootnote> & rFootnote,
152 const Reference<XText> & rText,
153 const OUString& rTextString,
160 exportText(rText, bAutoStyles, bIsProgress,
true );
165 Reference<XPropertySet> xPropSet(rFootnote, UNO_QUERY);
167 sal_Int32 nNumber = 0;
170 "ftn" + OUString::number(nNumber));
179 OUString sLabel = rFootnote->getLabel();
180 if (!sLabel.isEmpty())
195 exportText(rText, bAutoStyles, bIsProgress,
true );
204 Reference<XFootnotesSupplier> aFootnotesSupplier(
GetExport().GetModel(),
206 Reference<XPropertySet> aFootnoteConfiguration(
207 aFootnotesSupplier->getFootnoteSettings());
211 Reference<XEndnotesSupplier> aEndnotesSupplier(
GetExport().GetModel(),
213 Reference<XPropertySet> aEndnoteConfiguration(
214 aEndnotesSupplier->getEndnoteSettings());
221 const Reference<XPropertySet> & rPropSet,
222 const OUString& sProperty,
229 Any aAny = rPropSet->getPropertyValue(sProperty);
241 const Reference<XPropertySet> & rFootnoteConfig,
283 OUStringBuffer sBuffer;
285 sal_Int16 nNumbering = 0;
289 sBuffer.makeStringAndClear() );
291 if (!sBuffer.isEmpty() )
294 sBuffer.makeStringAndClear());
298 aAny = rFootnoteConfig->getPropertyValue(
gsStartAt);
299 sal_Int16 nOffset = 0;
302 OUString::number(nOffset));
308 aAny = rFootnoteConfig->getPropertyValue(
311 ( (*o3tl::doAccess<bool>(aAny)) ?
320 case FootnoteNumbering::PER_PAGE:
323 case FootnoteNumbering::PER_CHAPTER:
326 case FootnoteNumbering::PER_DOCUMENT:
348 aAny = rFootnoteConfig->getPropertyValue(
gsEndNotice);
bool hasProperty(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo)
XMLEventExport & GetEventExport()
get Event export, with handlers for script types "None" and "StarBasic" already registered; other han...
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
void Characters(const OUString &rChars)
OUString EncodeStyleName(const OUString &rName, bool *pEncoded=nullptr) const
const SvXMLUnitConverter & GetMM100UnitConverter() const
bool convertNumFormat(sal_Int16 &rType, const OUString &rNumFormat, std::u16string_view rNumLetterSync, bool bNumberNone=false) const
convert num-format and num-letter-sync values to NumberingType
static void convertNumLetterSync(OUStringBuffer &rBuffer, sal_Int16 nType)
void Export(css::uno::Reference< css::document::XEventsSupplier > const &xAccess, bool bUseWhitespace=true)
export the events (calls EventExport::Export(Reference<XNameAccess>) )
SvXMLExport & GetExport()
static constexpr OUStringLiteral gsParaStyleName
SinglePropertySetInfoCache aCharStyleNamesPropInfoCache
static constexpr OUStringLiteral gsCharStyleNames
static constexpr OUStringLiteral gsPrefix
void exportTextFootnoteConfiguration()
export footnote and endnote configuration elements
static constexpr OUStringLiteral gsReferenceId
static constexpr OUStringLiteral gsSuffix
static constexpr OUStringLiteral gsStartAt
static constexpr OUStringLiteral gsBeginNotice
static constexpr OUStringLiteral gsNumberingType
OUString FindTextStyleAndHyperlink(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, bool &rbHyperlink, bool &rbHasCharStyle, bool &rbHasAutoStyle, const XMLPropertyState **pAddState=nullptr) const
static constexpr OUStringLiteral gsPageStyleName
static constexpr OUStringLiteral gsFootnote
static constexpr OUStringLiteral gsPositionEndOfDoc
static constexpr OUStringLiteral gsFootnoteCounting
static constexpr OUStringLiteral gsCharStyleName
void exportTextFootnoteConfigurationHelper(const css::uno::Reference< css::beans::XPropertySet > &rFootnoteSupplier, bool bIsEndnote)
void exportTextFootnote(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const OUString &sString, bool bAutoStyles, bool bProgress)
export a footnote and styles
static constexpr OUStringLiteral gsEndNotice
static constexpr OUStringLiteral gsTextEndnoteService
static constexpr OUStringLiteral gsAnchorCharStyleName
void Add(XmlStyleFamily nFamily, MultiPropertySetHelper &rPropSetHelper, const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
add autostyle for specified family
void exportTextFootnoteHelper(const css::uno::Reference< css::text::XFootnote > &rPropSet, const css::uno::Reference< css::text::XText > &rText, const OUString &sString, bool bAutoStyles, bool bIsEndnote, bool bProgress)
helper for exportTextFootnote
void exportText(const css::uno::Reference< css::text::XText > &rText, bool bAutoStyles, bool bProgress, bool bExportParagraph, TextPNS eExtensionNS=TextPNS::ODF)
bool addHyperlinkAttributes(const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertyState > &rPropState, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo)
#define SAL_WARN_IF(condition, area, stream)
Handling of tokens in XML:
XMLTokenEnum
The enumeration of all XML tokens.
@ XML_CITATION_BODY_STYLE_NAME
@ XML_NOTES_CONFIGURATION
@ XML_FOOTNOTE_CONTINUATION_NOTICE_FORWARD
@ XML_FOOTNOTE_CONTINUATION_NOTICE_BACKWARD
@ XML_CITATION_STYLE_NAME
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
static void lcl_exportString(SvXMLExport &rExport, const Reference< XPropertySet > &rPropSet, const OUString &sProperty, sal_uInt16 nPrefix, enum XMLTokenEnum eElement, bool bEncodeName)
constexpr sal_uInt16 XML_NAMESPACE_TEXT
constexpr sal_uInt16 XML_NAMESPACE_STYLE