21#include <com/sun/star/beans/XPropertySet.hpp>
22#include <com/sun/star/frame/XModel.hpp>
23#include <com/sun/star/text/XLineNumberingProperties.hpp>
24#include <com/sun/star/style/LineNumberPosition.hpp>
37using ::com::sun::star::beans::XPropertySet;
38using ::com::sun::star::text::XLineNumberingProperties;
48 {
XML_LEFT, style::LineNumberPosition::LEFT },
49 {
XML_RIGHT, style::LineNumberPosition::RIGHT },
50 {
XML_INSIDE, style::LineNumberPosition::INSIDE },
51 {
XML_OUTSIDE, style::LineNumberPosition::OUTSIDE },
64 Reference<XPropertySet> xLineNumbering =
65 xSupplier->getLineNumberingProperties();
67 if (!xLineNumbering.is())
71 Any aAny = xLineNumbering->getPropertyValue(
"CharStyleName");
81 aAny = xLineNumbering->getPropertyValue(
"IsOn");
82 if (! *o3tl::doAccess<bool>(aAny))
89 aAny = xLineNumbering->getPropertyValue(
"CountEmptyLines");
90 if (! *o3tl::doAccess<bool>(aAny))
97 aAny = xLineNumbering->getPropertyValue(
"CountLinesInFrames");
98 if (*o3tl::doAccess<bool>(aAny))
105 aAny = xLineNumbering->getPropertyValue(
"RestartAtEachPage");
106 if (*o3tl::doAccess<bool>(aAny))
113 aAny = xLineNumbering->getPropertyValue(
"Distance");
122 sBuf.makeStringAndClear());
126 OUStringBuffer sNumPosBuf;
127 aAny = xLineNumbering->getPropertyValue(
"NumberingType");
128 sal_Int16 nFormat = 0;
132 sNumPosBuf.makeStringAndClear());
134 if( !sNumPosBuf.isEmpty() )
138 sNumPosBuf.makeStringAndClear() );
142 aAny = xLineNumbering->getPropertyValue(
"NumberPosition");
143 sal_uInt16 nPosition = 0;
149 sNumPosBuf.makeStringAndClear());
153 aAny = xLineNumbering->getPropertyValue(
"Interval");
154 sal_Int16 nLineInterval = 0;
155 aAny >>= nLineInterval;
157 OUString::number(nLineInterval));
164 aAny = xLineNumbering->getPropertyValue(
"SeparatorText");
167 if (sSeparator.isEmpty())
171 aAny = xLineNumbering->getPropertyValue(
"SeparatorInterval");
172 sal_Int16 nLineDistance = 0;
173 aAny >>= nLineDistance;
175 OUString::number(nLineDistance));
SvXMLEnumMapEntry< sal_uInt16 > const aLineNumberPositionMap[]
void AddAttribute(sal_uInt16 nPrefix, const OUString &rName, const OUString &rValue)
void Characters(const OUString &rChars)
const css::uno::Reference< css::frame::XModel > & GetModel() const
OUString EncodeStyleName(const OUString &rName, bool *pEncoded=nullptr) const
const SvXMLUnitConverter & GetMM100UnitConverter() const
static bool convertEnum(EnumT &rEnum, std::u16string_view rValue, const SvXMLEnumMapEntry< EnumT > *pMap)
convert string to enum using given enum map, if the enum is not found in the map, this method will re...
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
void convertMeasureToXML(OUStringBuffer &rBuffer, sal_Int32 nMeasure) const
convert measure to string: from meCoreMeasureUnit to meXMLMeasureUnit
static void convertNumLetterSync(OUStringBuffer &rBuffer, sal_Int16 nType)
XMLLineNumberingExport(SvXMLExport &rExp)
Handling of tokens in XML:
@ XML_LINENUMBERING_CONFIGURATION
@ XML_COUNT_IN_TEXT_BOXES
@ XML_LINENUMBERING_SEPARATOR
constexpr sal_uInt16 XML_NAMESPACE_TEXT
constexpr sal_uInt16 XML_NAMESPACE_STYLE