LibreOffice Module xmloff (master) 1
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
SvXMLUnitConverter Class Referencefinal

the SvXMLTypeConverter converts values of various types from their internal representation to the textual form used in xml and back. More...

#include <xmluconv.hxx>

Classes

struct  Impl
 

Public Member Functions

 SvXMLUnitConverter (const css::uno::Reference< css::uno::XComponentContext > &xContext, sal_Int16 eCoreMeasureUnit, sal_Int16 eXMLMeasureUnit, SvtSaveOptions::ODFSaneDefaultVersion const nODFVersion)
 constructs a SvXMLUnitConverter. More...
 
 ~SvXMLUnitConverter ()
 
void SetCoreMeasureUnit (sal_Int16 const eCoreMeasureUnit)
 sets the default unit for numerical measures More...
 
void SetXMLMeasureUnit (sal_Int16 const eXMLMeasureUnit)
 sets the default unit for textual measures More...
 
sal_Int16 GetXMLMeasureUnit () const
 gets the default unit for textual measures More...
 
SvtSaveOptions::ODFSaneDefaultVersion getSaneDefaultVersion () const
 ODF version, only when exporting. More...
 
void overrideSaneDefaultVersion (SvtSaveOptions::ODFSaneDefaultVersion const)
 
const css::uno::Reference< css::text::XNumberingTypeInfo > & getNumTypeInfo () const
 gets XNumberingTypeInfo More...
 
bool convertMeasureToCore (sal_Int32 &rValue, std::u16string_view rString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32) const
 convert string to measure with meCoreMeasureUnit, using optional min and max values More...
 
bool convertMeasureToCore (sal_Int32 &rValue, std::string_view rString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32) const
 convert string to measure with meCoreMeasureUnit, using optional min and max values More...
 
void convertMeasureToXML (OUStringBuffer &rBuffer, sal_Int32 nMeasure) const
 convert measure to string: from meCoreMeasureUnit to meXMLMeasureUnit More...
 
OUString convertMeasureToXML (sal_Int32 nMeasure) const
 convert measure to string: from meCoreMeasureUnit to meXMLMeasureUnit More...
 
void convertDouble (OUStringBuffer &rBuffer, double fNumber) const
 convert double number to string (using ::rtl::math) and DO convert to export MapUnit using meCoreMeasureUnit/meXMLMeasureUnit More...
 
bool convertDouble (double &rValue, std::u16string_view rString) const
 convert string to double number (using ::rtl::math) and DO convert. More...
 
bool convertDouble (double &rValue, std::string_view rString) const
 convert string to double number (using ::rtl::math) and DO convert. More...
 
bool setNullDate (const css::uno::Reference< css::frame::XModel > &xModel)
 get the Null Date of the XModel and set it to the UnitConverter More...
 
void convertDateTime (OUStringBuffer &rBuffer, const double &fDateTime, bool const bAddTimeIf0AM=false)
 convert double to ISO Date Time String More...
 
bool convertDateTime (double &fDateTime, std::u16string_view rString) const
 convert ISO Date Time String to double More...
 
bool convertDateTime (double &fDateTime, std::string_view rString) const
 convert ISO Date Time String to double More...
 
bool convertPosition3D (css::drawing::Position3D &rPosition, std::string_view rValue) const
 convert string to Position3D More...
 
void convertPosition3D (OUStringBuffer &rBuffer, const css::drawing::Position3D &rVector)
 convert Position3D to string More...
 
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 More...
 
void convertNumFormat (OUStringBuffer &rBuffer, sal_Int16 nType) const
 convert NumberingType to num-format and num-letter-sync values More...
 
OUString encodeStyleName (const OUString &rName, bool *pEncoded=nullptr) const
 

Static Public Member Functions

static sal_Int16 GetMeasureUnit (FieldUnit const nFieldUnit)
 
template<typename EnumT >
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 return false More...
 
template<typename EnumT >
static bool convertEnum (EnumT &rEnum, std::string_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 return false More...
 
template<typename EnumT >
static bool convertEnum (EnumT &rEnum, std::u16string_view rValue, const SvXMLEnumStringMapEntry< EnumT > *pMap)
 convert string to enum using given token map, if the enum is not found in the map, this method will return false More...
 
template<typename EnumT >
static bool convertEnum (EnumT &rEnum, std::string_view rValue, const SvXMLEnumStringMapEntry< EnumT > *pMap)
 convert string to enum using given token map, if the enum is not found in the map, this method will return false More...
 
template<typename EnumT >
static bool convertEnum (OUStringBuffer &rBuffer, EnumT nValue, const SvXMLEnumMapEntry< EnumT > *pMap, enum ::xmloff::token::XMLTokenEnum eDefault=::xmloff::token::XML_TOKEN_INVALID)
 convert enum to string using given enum map with an optional default token. More...
 
static void convertDateTime (OUStringBuffer &rBuffer, const double &fDateTime, const css::util::Date &aNullDate, bool bAddTimeIf0AM=false)
 these 2 functions use tools Date, so they're not yet moved to sax More...
 
static bool convertDateTime (double &fDateTime, std::u16string_view rString, const css::util::Date &aNullDate)
 convert ISO Date Time String to double More...
 
static bool convertDateTime (double &fDateTime, std::string_view rString, const css::util::Date &aNullDate)
 convert ISO Date Time String to double More...
 
static bool convertB3DVector (::basegfx::B3DVector &rVector, std::string_view rValue)
 convert string to basegfx::B3DVector More...
 
static void convertB3DVector (OUStringBuffer &rBuffer, const ::basegfx::B3DVector &rVector)
 convert B3DVector to string More...
 
static void convertNumLetterSync (OUStringBuffer &rBuffer, sal_Int16 nType)
 
static void convertPropertySet (css::uno::Sequence< css::beans::PropertyValue > &rProps, const css::uno::Reference< css::beans::XPropertySet > &aProperties, const std::initializer_list< std::u16string_view > *pOmitFalseValues=nullptr)
 
static void convertPropertySet (css::uno::Reference< css::beans::XPropertySet > const &rProperties, const css::uno::Sequence< css::beans::PropertyValue > &aProps)
 
static bool convertHex (sal_uInt32 &nVal, std::u16string_view rValue)
 convert string (hex) to number (sal_uInt32) More...
 
static void convertHex (OUStringBuffer &rBuffer, sal_uInt32 nVal)
 convert number (sal_uInt32) to string (hex) More...
 

Private Member Functions

 SvXMLUnitConverter (const SvXMLUnitConverter &)=delete
 
SvXMLUnitConverteroperator= (const SvXMLUnitConverter &)=delete
 

Static Private Member Functions

static bool convertEnumImpl (sal_uInt16 &rEnum, std::u16string_view rValue, const SvXMLEnumMapEntry< sal_uInt16 > *pMap)
 convert string to enum using given token map, if the enum is not found in the map, this method will return false More...
 
static bool convertEnumImpl (sal_uInt16 &rEnum, std::u16string_view rValue, const SvXMLEnumStringMapEntry< sal_uInt16 > *pMap)
 convert string to enum using given enum map, if the enum is not found in the map, this method will return false More...
 
static bool convertEnumImpl (sal_uInt16 &rEnum, std::string_view rValue, const SvXMLEnumMapEntry< sal_uInt16 > *pMap)
 convert string to enum using given token map, if the enum is not found in the map, this method will return false More...
 
static bool convertEnumImpl (sal_uInt16 &rEnum, std::string_view rValue, const SvXMLEnumStringMapEntry< sal_uInt16 > *pMap)
 
static bool convertEnumImpl (OUStringBuffer &rBuffer, sal_uInt16 nValue, const SvXMLEnumMapEntry< sal_uInt16 > *pMap, enum ::xmloff::token::XMLTokenEnum eDefault)
 

Private Attributes

struct SAL_DLLPRIVATE Impl
 
::std::unique_ptr< Implm_pImpl
 

Detailed Description

the SvXMLTypeConverter converts values of various types from their internal representation to the textual form used in xml and back.

Most of the methods are static but the SvXMLTypeConverter can also store default units for both numerical and textual measures.

Attention: \n:
a lot of the methods here have been moved to <sax/tools/converter.hxx>!

Definition at line 82 of file xmluconv.hxx.

Constructor & Destructor Documentation

◆ SvXMLUnitConverter() [1/2]

SvXMLUnitConverter::SvXMLUnitConverter ( const SvXMLUnitConverter )
privatedelete

◆ SvXMLUnitConverter() [2/2]

SvXMLUnitConverter::SvXMLUnitConverter ( const css::uno::Reference< css::uno::XComponentContext > &  xContext,
sal_Int16  eCoreMeasureUnit,
sal_Int16  eXMLMeasureUnit,
SvtSaveOptions::ODFSaneDefaultVersion const  nODFVersion 
)

constructs a SvXMLUnitConverter.

The core measure unit is the default unit for numerical measures, the XML measure unit is the default unit for textual measures

◆ ~SvXMLUnitConverter()

SvXMLUnitConverter::~SvXMLUnitConverter ( )

Definition at line 150 of file xmluconv.cxx.

Member Function Documentation

◆ convertB3DVector() [1/2]

bool SvXMLUnitConverter::convertB3DVector ( ::basegfx::B3DVector rVector,
std::string_view  rValue 
)
static

◆ convertB3DVector() [2/2]

void SvXMLUnitConverter::convertB3DVector ( OUStringBuffer &  rBuffer,
const ::basegfx::B3DVector rVector 
)
static

convert B3DVector to string

convert basegfx::B3DVector to string

Definition at line 616 of file xmluconv.cxx.

References sax::Converter::convertDouble().

◆ convertDateTime() [1/6]

bool SvXMLUnitConverter::convertDateTime ( double &  fDateTime,
std::string_view  rString 
) const

convert ISO Date Time String to double

Definition at line 391 of file xmluconv.cxx.

References convertDateTime(), and m_pImpl.

◆ convertDateTime() [2/6]

bool SvXMLUnitConverter::convertDateTime ( double &  fDateTime,
std::string_view  rString,
const css::util::Date &  aNullDate 
)
static

convert ISO Date Time String to double

Definition at line 517 of file xmluconv.cxx.

References lcl_convertDateTime().

◆ convertDateTime() [3/6]

bool SvXMLUnitConverter::convertDateTime ( double &  fDateTime,
std::u16string_view  rString 
) const

convert ISO Date Time String to double

Definition at line 384 of file xmluconv.cxx.

References convertDateTime(), and m_pImpl.

◆ convertDateTime() [4/6]

bool SvXMLUnitConverter::convertDateTime ( double &  fDateTime,
std::u16string_view  rString,
const css::util::Date &  aNullDate 
)
static

convert ISO Date Time String to double

Definition at line 511 of file xmluconv.cxx.

References lcl_convertDateTime().

◆ convertDateTime() [5/6]

void SvXMLUnitConverter::convertDateTime ( OUStringBuffer &  rBuffer,
const double &  fDateTime,
bool const  bAddTimeIf0AM = false 
)

convert double to ISO Date Time String

Definition at line 377 of file xmluconv.cxx.

References convertDateTime(), and m_pImpl.

Referenced by convertDateTime(), and XMLNumberFormatAttributesExportHelper::WriteAttributes().

◆ convertDateTime() [6/6]

void SvXMLUnitConverter::convertDateTime ( OUStringBuffer &  rBuffer,
const double &  fDateTime,
const css::util::Date &  aNullDate,
bool  bAddTimeIf0AM = false 
)
static

these 2 functions use tools Date, so they're not yet moved to sax

convert double to ISO Date Time String

Definition at line 398 of file xmluconv.cxx.

References Date::AddDays(), tools::Time::GetClock(), Date::GetDay(), Date::GetMonth(), Date::GetYear(), nCount, and XML_MAXDIGITSCOUNT_TIME.

◆ convertDouble() [1/3]

bool SvXMLUnitConverter::convertDouble ( double &  rValue,
std::string_view  rString 
) const

convert string to double number (using ::rtl::math) and DO convert.

convert string to double number (using ::rtl::math)

Definition at line 354 of file xmluconv.cxx.

References sax::Converter::GetUnitFromString(), and m_pImpl.

◆ convertDouble() [2/3]

bool SvXMLUnitConverter::convertDouble ( double &  rValue,
std::u16string_view  rString 
) const

convert string to double number (using ::rtl::math) and DO convert.

convert string to double number (using ::rtl::math)

Definition at line 343 of file xmluconv.cxx.

References sax::Converter::GetUnitFromString(), and m_pImpl.

◆ convertDouble() [3/3]

void SvXMLUnitConverter::convertDouble ( OUStringBuffer &  rBuffer,
double  fNumber 
) const

convert double number to string (using ::rtl::math) and DO convert to export MapUnit using meCoreMeasureUnit/meXMLMeasureUnit

convert double number to string (using ::rtl::math)

Definition at line 335 of file xmluconv.cxx.

References sax::Converter::convertDouble(), and m_pImpl.

Referenced by Imp_GetDoubleChar(), Imp_PutDoubleChar(), and ImpExportEnhancedGeometry().

◆ convertEnum() [1/5]

template<typename EnumT >
static bool SvXMLUnitConverter::convertEnum ( EnumT &  rEnum,
std::string_view  rValue,
const SvXMLEnumMapEntry< EnumT > *  pMap 
)
inlinestatic

convert string to enum using given enum map, if the enum is not found in the map, this method will return false

Definition at line 160 of file xmluconv.hxx.

◆ convertEnum() [2/5]

template<typename EnumT >
static bool SvXMLUnitConverter::convertEnum ( EnumT &  rEnum,
std::string_view  rValue,
const SvXMLEnumStringMapEntry< EnumT > *  pMap 
)
inlinestatic

convert string to enum using given token map, if the enum is not found in the map, this method will return false

Definition at line 190 of file xmluconv.hxx.

◆ convertEnum() [3/5]

template<typename EnumT >
static bool SvXMLUnitConverter::convertEnum ( EnumT &  rEnum,
std::u16string_view  rValue,
const SvXMLEnumMapEntry< EnumT > *  pMap 
)
inlinestatic

convert string to enum using given enum map, if the enum is not found in the map, this method will return false

Definition at line 145 of file xmluconv.hxx.

Referenced by SdXMLShapeContext::addGluePoint(), XMLAnchorTypePropHdl::convert(), xmloff::PropertyConversion::convertString(), xmloff::AnimationsImportHelperImpl::convertTiming(), xmloff::AnimationsExporterImpl::convertTiming(), XMLTextStyleContext::CreateAndInsert(), XMLIndexBibliographyConfigurationContext::createFastChildContext(), XMLIndexTemplateContext::createFastChildContext(), XMLTextMarkImportContext::endFastElement(), XMLLineNumberingExport::Export(), xmloff::AnimationsExporterImpl::exportAnimate(), XMLAnimationsExporter::exportAnimations(), XMLSectionExport::ExportBibliographyConfiguration(), xmloff::OControlExport::exportCellBindingAttributes(), xmloff::AnimationsExporterImpl::exportCommand(), xmloff::AnimationsExporterImpl::exportContainer(), xmloff::OPropertyExport::exportEnumPropertyAttributeImpl(), XMLSectionExport::ExportIndexTemplateElement(), xmloff::AnimationsExporterImpl::exportNode(), SvxXMLTabStopExport::exportTabStop(), xmloff::AnimationsExporterImpl::exportTransitionNode(), XMLFootnoteSeparatorExport::exportXML(), XMLDashStyleExport::exportXML(), XMLGradientStyleExport::exportXML(), XMLHatchStyleExport::exportXML(), XMLTransGradientStyleExport::exportXML(), xmloff::OControlBorderHandler::exportXML(), xmloff::OControlTextEmphasisHandler::exportXML(), XMLEnumPropertyHdl::exportXML(), XMLConstantsPropertyHandler::exportXML(), XMLParaAdjustPropHdl::exportXML(), XMLLastLineAdjustPropHdl::exportXML(), XMLFmtBreakBeforePropHdl::exportXML(), XMLFmtBreakAfterPropHdl::exportXML(), XMLCrossedOutTypePropHdl::exportXML(), XMLCrossedOutStylePropHdl::exportXML(), XMLCrossedOutWidthPropHdl::exportXML(), XMLCaseMapPropHdl::exportXML(), XMLFontFamilyPropHdl::exportXML(), XMLFontPitchPropHdl::exportXML(), XMLPosturePropHdl::exportXML(), XMLUnderlineTypePropHdl::exportXML(), XMLUnderlineStylePropHdl::exportXML(), XMLUnderlineWidthPropHdl::exportXML(), XMLAnchorTypePropHdl::exportXML(), SchXMLTools::GetChartTypeEnum(), GetEnum(), XMLShapeExport::ImpExportConnectorShape(), XMLShapeExport::ImpExportEllipseShape(), XMLShapeExport::ImpExportEvents(), XMLShapeExport::ImpExportGluePoints(), XMLDashStyleImport::importXML(), XMLGradientStyleImport::importXML(), XMLHatchStyleImport::importXML(), XMLTransGradientStyleImport::importXML(), xmloff::OControlBorderHandler::importXML(), xmloff::OControlTextEmphasisHandler::importXML(), XMLEnumPropertyHdl::importXML(), XMLConstantsPropertyHandler::importXML(), XMLParaAdjustPropHdl::importXML(), XMLLastLineAdjustPropHdl::importXML(), XMLBackGraphicPositionPropHdl::importXML(), XMLBorderHdl::importXML(), XMLFmtBreakBeforePropHdl::importXML(), XMLFmtBreakAfterPropHdl::importXML(), XMLCrossedOutTypePropHdl::importXML(), XMLCrossedOutStylePropHdl::importXML(), XMLCrossedOutWidthPropHdl::importXML(), XMLCaseMapPropHdl::importXML(), XMLFontFamilyPropHdl::importXML(), XMLFontPitchPropHdl::importXML(), XMLPosturePropHdl::importXML(), XMLUnderlineTypePropHdl::importXML(), XMLUnderlineStylePropHdl::importXML(), XMLUnderlineWidthPropHdl::importXML(), XMLAnchorTypePropHdl::importXML(), xmloff::AnimationNodeContext::init_node(), XMLTextFieldExport::MapFieldName(), XMLSectionExport::MapSectionType(), SdXMLEllipseShapeContext::processAttribute(), SdXMLConnectorShapeContext::processAttribute(), XMLIndexTableSourceContext::ProcessAttribute(), XMLValueImportHelper::ProcessAttribute(), XMLPageContinuationImportContext::ProcessAttribute(), XMLPageNumberImportContext::ProcessAttribute(), XMLFileNameImportContext::ProcessAttribute(), XMLTemplateNameImportContext::ProcessAttribute(), XMLChapterImportContext::ProcessAttribute(), XMLReferenceFieldImportContext::ProcessAttribute(), XMLBackgroundImageContext::ProcessAttrs(), XMLTextFieldExport::ProcessBibliographyData(), XMLFootnoteConfigurationImportContext::SetAttribute(), XMLLineNumberingImportContext::SetAttribute(), XMLFootnoteSeparatorImport::startFastElement(), XMLBibliographyFieldImportContext::startFastElement(), SchXMLAxisContext::startFastElement(), XMLIndexBibliographyEntryContext::startFastElement(), XMLIndexChapterInfoEntryContext::startFastElement(), XMLIndexTemplateContext::startFastElement(), SvXMLLineBreakContext::startFastElement(), XMLComplexColorContext::XMLComplexColorContext(), XMLIndexTOCContext::XMLIndexTOCContext(), and XMLTextColumnSepContext_Impl::XMLTextColumnSepContext_Impl().

◆ convertEnum() [4/5]

template<typename EnumT >
static bool SvXMLUnitConverter::convertEnum ( EnumT &  rEnum,
std::u16string_view  rValue,
const SvXMLEnumStringMapEntry< EnumT > *  pMap 
)
inlinestatic

convert string to enum using given token map, if the enum is not found in the map, this method will return false

Definition at line 175 of file xmluconv.hxx.

◆ convertEnum() [5/5]

template<typename EnumT >
static bool SvXMLUnitConverter::convertEnum ( OUStringBuffer &  rBuffer,
EnumT  nValue,
const SvXMLEnumMapEntry< EnumT > *  pMap,
enum ::xmloff::token::XMLTokenEnum  eDefault = ::xmloff::token::XML_TOKEN_INVALID 
)
inlinestatic

convert enum to string using given enum map with an optional default token.

If the enum is not found in the map, this method will either use the given default or return false if not default is set

Definition at line 207 of file xmluconv.hxx.

References nValue.

◆ convertEnumImpl() [1/5]

static bool SvXMLUnitConverter::convertEnumImpl ( OUStringBuffer &  rBuffer,
sal_uInt16  nValue,
const SvXMLEnumMapEntry< sal_uInt16 > *  pMap,
enum ::xmloff::token::XMLTokenEnum  eDefault 
)
staticprivate

◆ convertEnumImpl() [2/5]

bool SvXMLUnitConverter::convertEnumImpl ( sal_uInt16 &  rEnum,
std::string_view  rValue,
const SvXMLEnumMapEntry< sal_uInt16 > *  pMap 
)
staticprivate

convert string to enum using given token map, if the enum is not found in the map, this method will return false

Definition at line 270 of file xmluconv.cxx.

References xmloff::token::IsXMLToken(), and xmloff::token::XML_TOKEN_INVALID.

◆ convertEnumImpl() [3/5]

static bool SvXMLUnitConverter::convertEnumImpl ( sal_uInt16 &  rEnum,
std::string_view  rValue,
const SvXMLEnumStringMapEntry< sal_uInt16 > *  pMap 
)
staticprivate

◆ convertEnumImpl() [4/5]

bool SvXMLUnitConverter::convertEnumImpl ( sal_uInt16 &  rEnum,
std::u16string_view  rValue,
const SvXMLEnumMapEntry< sal_uInt16 > *  pMap 
)
staticprivate

convert string to enum using given token map, if the enum is not found in the map, this method will return false

Definition at line 251 of file xmluconv.cxx.

References xmloff::token::IsXMLToken(), and xmloff::token::XML_TOKEN_INVALID.

◆ convertEnumImpl() [5/5]

bool SvXMLUnitConverter::convertEnumImpl ( sal_uInt16 &  rEnum,
std::u16string_view  rValue,
const SvXMLEnumStringMapEntry< sal_uInt16 > *  pMap 
)
staticprivate

convert string to enum using given enum map, if the enum is not found in the map, this method will return false

Definition at line 229 of file xmluconv.cxx.

References SvXMLEnumStringMapEntry< EnumT >::GetName(), SvXMLEnumStringMapEntry< EnumT >::GetNameLength(), and SvXMLEnumStringMapEntry< EnumT >::GetValue().

◆ convertHex() [1/2]

void SvXMLUnitConverter::convertHex ( OUStringBuffer &  rBuffer,
sal_uInt32  nVal 
)
static

convert number (sal_uInt32) to string (hex)

Definition at line 953 of file xmluconv.cxx.

References aHexTab, and i.

◆ convertHex() [2/2]

bool SvXMLUnitConverter::convertHex ( sal_uInt32 &  nVal,
std::u16string_view  rValue 
)
static

convert string (hex) to number (sal_uInt32)

Definition at line 937 of file xmluconv.cxx.

References i, and lcl_gethex().

Referenced by XMLHexPropHdl::exportXML(), and XMLHexPropHdl::importXML().

◆ convertMeasureToCore() [1/2]

bool SvXMLUnitConverter::convertMeasureToCore ( sal_Int32 &  rValue,
std::string_view  rString,
sal_Int32  nMin = SAL_MIN_INT32,
sal_Int32  nMax = SAL_MAX_INT32 
) const

convert string to measure with meCoreMeasureUnit, using optional min and max values

convert string to measure using optional min and max values

Definition at line 198 of file xmluconv.cxx.

References m_pImpl, and nValue.

◆ convertMeasureToCore() [2/2]

bool SvXMLUnitConverter::convertMeasureToCore ( sal_Int32 &  rValue,
std::u16string_view  rString,
sal_Int32  nMin = SAL_MIN_INT32,
sal_Int32  nMax = SAL_MAX_INT32 
) const

◆ convertMeasureToXML() [1/2]

void SvXMLUnitConverter::convertMeasureToXML ( OUStringBuffer &  rBuffer,
sal_Int32  nMeasure 
) const

convert measure to string: from meCoreMeasureUnit to meXMLMeasureUnit

convert measure to string

Definition at line 208 of file xmluconv.cxx.

References sax::Converter::convertMeasure(), and m_pImpl.

Referenced by XMLTextParagraphExport::addTextFrameAttributes(), XMLLineNumberingExport::Export(), XMLShapeExport::export3DSceneAttributes(), SdXMLExport::exportAnnotations(), XMLImageMapExport::ExportCircle(), XMLTextParagraphExport::exportContour(), XMLSectionExport::ExportIndexTemplateElement(), SvxXMLNumRuleExport::exportLevelStyle(), XMLImageMapExport::ExportPolygon(), XMLImageMapExport::ExportRectangle(), SvxXMLTabStopExport::exportTabStop(), XMLFootnoteSeparatorExport::exportXML(), XMLTextColumnsExport::exportXML(), XMLTextDropCapExport::exportXML(), XMLDashStyleExport::exportXML(), XMLHatchStyleExport::exportXML(), XMLTextAnimationStepPropertyHdl::exportXML(), XMLClipPropertyHandler::exportXML(), XMLFillBitmapSizePropertyHandler::exportXML(), XMLPercentOrMeasurePropertyHandler::exportXML(), XMLRectangleMembersHdl::exportXML(), XMLBorderWidthHdl::exportXML(), XMLKerningPropHdl::exportXML(), XMLLineHeightHdl::exportXML(), XMLLineHeightAtLeastHdl::exportXML(), XMLLineSpacingHdl::exportXML(), XMLShadowPropHdl::exportXML(), XMLMeasurePropHdl::exportXML(), XMLChartExportPropertyMapper::handleSpecialItem(), XMLShapeExport::ImpExportCaptionShape(), XMLShapeExport::ImpExportConnectorShape(), XMLShapeExport::ImpExportGluePoints(), XMLShapeExport::ImpExportLineShape(), XMLShapeExport::ImpExportMeasureShape(), XMLShapeExport::ImpExportNewTrans_FeaturesAndWrite(), XMLShapeExport::ImpExportRectangleShape(), XMLShapeExport::ImpExportTextBoxShape(), SdXMLExport::ImpWriteAutoLayoutPlaceholder(), and SdXMLExport::ImpWritePageMasterInfos().

◆ convertMeasureToXML() [2/2]

OUString SvXMLUnitConverter::convertMeasureToXML ( sal_Int32  nMeasure) const

convert measure to string: from meCoreMeasureUnit to meXMLMeasureUnit

convert measure to string

Definition at line 217 of file xmluconv.cxx.

References sax::Converter::convertMeasure(), and m_pImpl.

◆ convertNumFormat() [1/2]

void SvXMLUnitConverter::convertNumFormat ( OUStringBuffer &  rBuffer,
sal_Int16  nType 
) const

◆ convertNumFormat() [2/2]

bool SvXMLUnitConverter::convertNumFormat ( sal_Int16 &  rType,
const OUString &  rNumFormat,
std::u16string_view  rNumLetterSync,
bool  bNumberNone = false 
) const

◆ convertNumLetterSync()

void SvXMLUnitConverter::convertNumLetterSync ( OUStringBuffer &  rBuffer,
sal_Int16  nType 
)
static

◆ convertPosition3D() [1/2]

bool SvXMLUnitConverter::convertPosition3D ( css::drawing::Position3D &  rPosition,
std::string_view  rValue 
) const

convert string to Position3D

Referenced by GetPosition3D(), and ImpExportEnhancedGeometry().

◆ convertPosition3D() [2/2]

void SvXMLUnitConverter::convertPosition3D ( OUStringBuffer &  rBuffer,
const css::drawing::Position3D &  rVector 
)

convert Position3D to string

◆ convertPropertySet() [1/2]

static void SvXMLUnitConverter::convertPropertySet ( css::uno::Reference< css::beans::XPropertySet > const &  rProperties,
const css::uno::Sequence< css::beans::PropertyValue > &  aProps 
)
static

◆ convertPropertySet() [2/2]

static void SvXMLUnitConverter::convertPropertySet ( css::uno::Sequence< css::beans::PropertyValue > &  rProps,
const css::uno::Reference< css::beans::XPropertySet > &  aProperties,
const std::initializer_list< std::u16string_view > *  pOmitFalseValues = nullptr 
)
static

◆ encodeStyleName()

OUString SvXMLUnitConverter::encodeStyleName ( const OUString &  rName,
bool *  pEncoded = nullptr 
) const

Definition at line 832 of file xmluconv.cxx.

References aBuffer, aHexTab, i, m_pImpl, and nType.

Referenced by SvXMLExport::EncodeStyleName(), and XMLStyleNamePropHdl::exportXML().

◆ GetMeasureUnit()

sal_Int16 SvXMLUnitConverter::GetMeasureUnit ( FieldUnit const  nFieldUnit)
static

Definition at line 154 of file xmluconv.cxx.

◆ getNumTypeInfo()

const uno::Reference< text::XNumberingTypeInfo > & SvXMLUnitConverter::getNumTypeInfo ( ) const

gets XNumberingTypeInfo

Definition at line 101 of file xmluconv.cxx.

References m_pImpl.

Referenced by convertNumFormat().

◆ getSaneDefaultVersion()

SvtSaveOptions::ODFSaneDefaultVersion SvXMLUnitConverter::getSaneDefaultVersion ( ) const

◆ GetXMLMeasureUnit()

sal_Int16 SvXMLUnitConverter::GetXMLMeasureUnit ( ) const

gets the default unit for textual measures

Definition at line 120 of file xmluconv.cxx.

References m_pImpl.

◆ operator=()

SvXMLUnitConverter & SvXMLUnitConverter::operator= ( const SvXMLUnitConverter )
privatedelete

◆ overrideSaneDefaultVersion()

void SvXMLUnitConverter::overrideSaneDefaultVersion ( SvtSaveOptions::ODFSaneDefaultVersion const  nODFVersion)

Definition at line 130 of file xmluconv.cxx.

References m_pImpl.

Referenced by SvXMLExport::DetermineModelType_().

◆ SetCoreMeasureUnit()

void SvXMLUnitConverter::SetCoreMeasureUnit ( sal_Int16 const  eCoreMeasureUnit)

sets the default unit for numerical measures

Definition at line 110 of file xmluconv.cxx.

References m_pImpl.

◆ setNullDate()

bool SvXMLUnitConverter::setNullDate ( const css::uno::Reference< css::frame::XModel > &  xModel)

get the Null Date of the XModel and set it to the UnitConverter

Definition at line 365 of file xmluconv.cxx.

References m_pImpl, XML_NULLDATE, and xModel.

Referenced by SvXMLExport::SetNullDateOnUnitConverter().

◆ SetXMLMeasureUnit()

void SvXMLUnitConverter::SetXMLMeasureUnit ( sal_Int16 const  eXMLMeasureUnit)

sets the default unit for textual measures

Definition at line 115 of file xmluconv.cxx.

References m_pImpl.

Member Data Documentation

◆ Impl

struct SAL_DLLPRIVATE SvXMLUnitConverter::Impl
private

Definition at line 88 of file xmluconv.hxx.

◆ m_pImpl

::std::unique_ptr<Impl> SvXMLUnitConverter::m_pImpl
private

The documentation for this class was generated from the following files: