26#include <rtl/ustrbuf.hxx>
27#include <com/sun/star/uno/Any.hxx>
28#include <com/sun/star/style/PageStyleLayout.hpp>
29#include <com/sun/star/style/NumberingType.hpp>
40#define DEFAULT_PAPERTRAY (sal_Int32(-1))
50 style::PageStyleLayout eLayout1, eLayout2;
51 return (rAny1 >>= eLayout1) && (rAny2 >>= eLayout2) && (eLayout1 == eLayout2);
55 const OUString& rStrImpValue,
62 rValue <<= PageStyleLayout_ALL;
64 rValue <<= PageStyleLayout_LEFT;
66 rValue <<= PageStyleLayout_RIGHT;
68 rValue <<= PageStyleLayout_MIRRORED;
76 OUString& rStrExpValue,
81 PageStyleLayout eLayout;
83 if( rValue >>= eLayout )
88 case PageStyleLayout_ALL:
91 case PageStyleLayout_LEFT:
94 case PageStyleLayout_RIGHT:
97 case PageStyleLayout_MIRRORED:
115 const OUString& rStrImpValue,
119 sal_Int16 nSync = sal_Int16();
120 sal_Int16
nNumType = NumberingType::NUMBER_NONE;
123 if( !(rValue >>= nSync) )
124 nSync = NumberingType::NUMBER_NONE;
129 if( nSync == NumberingType::CHARS_LOWER_LETTER_N )
133 case NumberingType::CHARS_LOWER_LETTER:
134 nNumType = NumberingType::CHARS_LOWER_LETTER_N;
136 case NumberingType::CHARS_UPPER_LETTER:
137 nNumType = NumberingType::CHARS_UPPER_LETTER_N;
147 OUString& rStrExpValue,
158 rStrExpValue =
aBuffer.makeStringAndClear();
171 const OUString& rStrImpValue,
176 sal_Int16 nSync = NumberingType::NUMBER_NONE;
181 nNumType = NumberingType::NUMBER_NONE;
183 if( nSync == NumberingType::CHARS_LOWER_LETTER_N )
187 case NumberingType::CHARS_LOWER_LETTER:
188 nNumType = NumberingType::CHARS_LOWER_LETTER_N;
190 case NumberingType::CHARS_UPPER_LETTER:
191 nNumType = NumberingType::CHARS_UPPER_LETTER_N;
201 OUString& rStrExpValue,
212 rStrExpValue =
aBuffer.makeStringAndClear();
213 bRet = !rStrExpValue.isEmpty();
225 const OUString& rStrImpValue,
238 sal_Int32 nPaperTray;
241 rValue <<= nPaperTray;
250 OUString& rStrExpValue,
255 sal_Int32 nPaperTray = 0;
257 if( rValue >>= nPaperTray )
263 rStrExpValue = OUString::number( nPaperTray );
282 const OUString& rStrImpValue,
286 sal_Int32 nTokenIndex = 0;
293 while ( (nTokenIndex >= 0) && !bFound );
300 OUString& rStrExpValue,
306 if( !rStrExpValue.isEmpty() )
321 const OUString& rStrImpValue,
327 if (!rStrImpValue.isEmpty())
339 OUString& rStrExpValue,
345 if ( ::cppu::any2bool( rValue ) )
348 if (!rStrExpValue.isEmpty())
362 const OUString& rStrImpValue,
368 if (!rStrImpValue.isEmpty())
380 OUString& rStrExpValue,
386 if ( ::cppu::any2bool( rValue ) )
389 if (!rStrExpValue.isEmpty())
#define DEFAULT_PAPERTRAY
the SvXMLTypeConverter converts values of various types from their internal representation to the tex...
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)
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
virtual ~XMLPMPropHdl_CenterHorizontal() override
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual ~XMLPMPropHdl_CenterVertical() override
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual ~XMLPMPropHdl_NumLetterSync() override
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual bool equals(const css::uno::Any &rAny1, const css::uno::Any &rAny2) const override
Compares two Any's in case of the given XML-data-type.
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
virtual ~XMLPMPropHdl_PageStyleLayout() override
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
virtual ~XMLPMPropHdl_PaperTrayNumber() override
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
virtual ~XMLPMPropHdl_Print() override
virtual bool importXML(const OUString &rStrImpValue, css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Imports the given value according to the XML-data-type corresponding to the derived class.
XMLPMPropHdl_Print(enum ::xmloff::token::XMLTokenEnum eValue)
virtual bool exportXML(OUString &rStrExpValue, const css::uno::Any &rValue, const SvXMLUnitConverter &rUnitConverter) const override
Exports the given value according to the XML-data-type corresponding to the derived class.
static bool convertNumber(sal_Int32 &rValue, std::u16string_view aString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32)
bool getBOOL(const Any &_rAny)
std::basic_string_view< charT, traits > getToken(std::basic_string_view< charT, traits > sv, charT delimiter, std::size_t &position)
Handling of tokens in XML:
XMLTokenEnum
The enumeration of all XML tokens.
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
const OUString & GetXMLToken(enum XMLTokenEnum eToken)
return the OUString representation for eToken
std::unique_ptr< char[]> aBuffer