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 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::u16string_view rValue)
 convert string to basegfx::B3DVector 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)
 
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:
: 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::SvXMLUnitConverter ( const SvXMLUnitConverter )
privatedelete
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 ( )

Definition at line 148 of file xmluconv.cxx.

Member Function Documentation

bool SvXMLUnitConverter::convertB3DVector ( ::basegfx::B3DVector rVector,
std::u16string_view  rValue 
)
static
bool SvXMLUnitConverter::convertB3DVector ( ::basegfx::B3DVector rVector,
std::string_view  rValue 
)
static
void SvXMLUnitConverter::convertB3DVector ( OUStringBuffer &  rBuffer,
const ::basegfx::B3DVector rVector 
)
static

convert B3DVector to string

convert basegfx::B3DVector to string

Definition at line 662 of file xmluconv.cxx.

References sax::Converter::convertDouble().

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

convert double to ISO Date Time String

Definition at line 364 of file xmluconv.cxx.

References m_pImpl.

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

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

convert ISO Date Time String to double

Definition at line 371 of file xmluconv.cxx.

References convertDateTime(), and m_pImpl.

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

convert ISO Date Time String to double

Definition at line 378 of file xmluconv.cxx.

References convertDateTime(), and m_pImpl.

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 385 of file xmluconv.cxx.

References tools::Time::GetClock(), nCount, and XML_MAXDIGITSCOUNT_TIME.

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 498 of file xmluconv.cxx.

References lcl_convertDateTime().

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 504 of file xmluconv.cxx.

References lcl_convertDateTime().

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 333 of file xmluconv.cxx.

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

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

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 341 of file xmluconv.cxx.

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

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(), XMLFmtBreakBeforePropHdl::exportXML(), XMLUnderlineTypePropHdl::exportXML(), XMLParaAdjustPropHdl::exportXML(), XMLCrossedOutTypePropHdl::exportXML(), XMLPosturePropHdl::exportXML(), XMLCaseMapPropHdl::exportXML(), XMLAnchorTypePropHdl::exportXML(), XMLUnderlineStylePropHdl::exportXML(), XMLCrossedOutStylePropHdl::exportXML(), XMLEnumPropertyHdl::exportXML(), XMLFontFamilyPropHdl::exportXML(), XMLFmtBreakAfterPropHdl::exportXML(), XMLFootnoteSeparatorExport::exportXML(), XMLLastLineAdjustPropHdl::exportXML(), XMLUnderlineWidthPropHdl::exportXML(), XMLCrossedOutWidthPropHdl::exportXML(), XMLConstantsPropertyHandler::exportXML(), XMLTransGradientStyleExport::exportXML(), XMLDashStyleExport::exportXML(), XMLHatchStyleExport::exportXML(), XMLGradientStyleExport::exportXML(), XMLFontPitchPropHdl::exportXML(), xmloff::OControlBorderHandler::exportXML(), xmloff::OControlTextEmphasisHandler::exportXML(), SchXMLTools::GetChartTypeEnum(), GetEnum(), XMLShapeExport::ImpExportConnectorShape(), XMLShapeExport::ImpExportEllipseShape(), XMLShapeExport::ImpExportEvents(), XMLShapeExport::ImpExportGluePoints(), XMLAnchorTypePropHdl::importXML(), XMLFmtBreakBeforePropHdl::importXML(), XMLParaAdjustPropHdl::importXML(), XMLUnderlineTypePropHdl::importXML(), XMLCrossedOutTypePropHdl::importXML(), XMLPosturePropHdl::importXML(), XMLCaseMapPropHdl::importXML(), XMLBackGraphicPositionPropHdl::importXML(), XMLUnderlineStylePropHdl::importXML(), XMLCrossedOutStylePropHdl::importXML(), XMLBorderHdl::importXML(), XMLTransGradientStyleImport::importXML(), XMLEnumPropertyHdl::importXML(), XMLDashStyleImport::importXML(), XMLFontFamilyPropHdl::importXML(), XMLFmtBreakAfterPropHdl::importXML(), XMLLastLineAdjustPropHdl::importXML(), XMLHatchStyleImport::importXML(), XMLGradientStyleImport::importXML(), XMLUnderlineWidthPropHdl::importXML(), XMLCrossedOutWidthPropHdl::importXML(), XMLConstantsPropertyHandler::importXML(), XMLFontPitchPropHdl::importXML(), xmloff::OControlBorderHandler::importXML(), xmloff::OControlTextEmphasisHandler::importXML(), xmloff::AnimationNodeContext::init_node(), XMLTextFieldExport::MapFieldName(), XMLSectionExport::MapSectionType(), XMLIndexTableSourceContext::ProcessAttribute(), XMLValueImportHelper::ProcessAttribute(), SdXMLEllipseShapeContext::processAttribute(), XMLPageContinuationImportContext::ProcessAttribute(), XMLPageNumberImportContext::ProcessAttribute(), SdXMLConnectorShapeContext::processAttribute(), XMLFileNameImportContext::ProcessAttribute(), XMLTemplateNameImportContext::ProcessAttribute(), XMLChapterImportContext::ProcessAttribute(), XMLReferenceFieldImportContext::ProcessAttribute(), XMLBackgroundImageContext::ProcessAttrs(), XMLTextFieldExport::ProcessBibliographyData(), XMLFootnoteConfigurationImportContext::SetAttribute(), XMLLineNumberingImportContext::SetAttribute(), SchXMLAxisContext::startFastElement(), XMLFootnoteSeparatorImport::startFastElement(), XMLIndexBibliographyEntryContext::startFastElement(), XMLIndexChapterInfoEntryContext::startFastElement(), XMLIndexTemplateContext::startFastElement(), XMLBibliographyFieldImportContext::startFastElement(), XMLIndexTOCContext::XMLIndexTOCContext(), and XMLTextColumnSepContext_Impl::XMLTextColumnSepContext_Impl().

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.

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.

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.

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.

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 249 of file xmluconv.cxx.

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

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 227 of file xmluconv.cxx.

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

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 268 of file xmluconv.cxx.

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

static bool SvXMLUnitConverter::convertEnumImpl ( sal_uInt16 &  rEnum,
std::string_view  rValue,
const SvXMLEnumStringMapEntry< sal_uInt16 > *  pMap 
)
staticprivate
static bool SvXMLUnitConverter::convertEnumImpl ( OUStringBuffer &  rBuffer,
sal_uInt16  nValue,
const SvXMLEnumMapEntry< sal_uInt16 > *  pMap,
enum::xmloff::token::XMLTokenEnum  eDefault 
)
staticprivate
bool SvXMLUnitConverter::convertHex ( sal_uInt32 &  nVal,
std::u16string_view  rValue 
)
static

convert string (hex) to number (sal_uInt32)

Definition at line 971 of file xmluconv.cxx.

References i, and lcl_gethex().

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

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

convert number (sal_uInt32) to string (hex)

Definition at line 987 of file xmluconv.cxx.

References i.

bool SvXMLUnitConverter::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

convert string to measure using optional min and max values

Definition at line 186 of file xmluconv.cxx.

References m_pImpl.

Referenced by SdXMLShapeContext::addGluePoint(), XMLTextShapeImportHelper::addShape(), XMLChartImportPropertyMapper::handleSpecialItem(), XMLBorderWidthHdl::importXML(), XMLShadowPropHdl::importXML(), XMLKerningPropHdl::importXML(), XMLLineHeightHdl::importXML(), XMLPercentOrMeasurePropertyHandler::importXML(), XMLClipPropertyHandler::importXML(), XMLFillBitmapSizePropertyHandler::importXML(), XMLBorderHdl::importXML(), XMLLineHeightAtLeastHdl::importXML(), XMLRectangleMembersHdl::importXML(), XMLDashStyleImport::importXML(), XMLHatchStyleImport::importXML(), XMLLineSpacingHdl::importXML(), XMLTextAnimationStepPropertyHdl::importXML(), XMLMeasurePropHdl::importXML(), SdXMLShapeContext::processAttribute(), SdXMLRectShapeContext::processAttribute(), SdXMLLineShapeContext::processAttribute(), SdXMLEllipseShapeContext::processAttribute(), SdXMLTextBoxShapeContext::processAttribute(), SdXMLConnectorShapeContext::processAttribute(), SdXMLMeasureShapeContext::processAttribute(), SdXMLCaptionShapeContext::processAttribute(), SdXML3DSceneAttributesHelper::processSceneAttribute(), SchXMLPositionAttributesHelper::readPositioningAttribute(), SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext(), SdXMLPresentationPlaceholderContext::SdXMLPresentationPlaceholderContext(), SchXMLLegendContext::startFastElement(), SchXMLEquationContext::startFastElement(), SchXMLChartContext::startFastElement(), SchXMLTitleContext::startFastElement(), and SchXMLDataLabelContext::startFastElement().

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 196 of file xmluconv.cxx.

References m_pImpl.

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

convert measure to string: from meCoreMeasureUnit to meXMLMeasureUnit

convert measure to string

Definition at line 206 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(), XMLKerningPropHdl::exportXML(), XMLLineHeightHdl::exportXML(), XMLBorderWidthHdl::exportXML(), XMLShadowPropHdl::exportXML(), XMLTextDropCapExport::exportXML(), XMLClipPropertyHandler::exportXML(), XMLPercentOrMeasurePropertyHandler::exportXML(), XMLTextColumnsExport::exportXML(), XMLLineHeightAtLeastHdl::exportXML(), XMLFootnoteSeparatorExport::exportXML(), XMLFillBitmapSizePropertyHandler::exportXML(), XMLRectangleMembersHdl::exportXML(), XMLTextAnimationStepPropertyHdl::exportXML(), XMLLineSpacingHdl::exportXML(), XMLHatchStyleExport::exportXML(), XMLDashStyleExport::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().

OUString SvXMLUnitConverter::convertMeasureToXML ( sal_Int32  nMeasure) const

convert measure to string: from meCoreMeasureUnit to meXMLMeasureUnit

convert measure to string

Definition at line 215 of file xmluconv.cxx.

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

bool SvXMLUnitConverter::convertNumFormat ( sal_Int16 &  rType,
const OUString &  rNumFormat,
std::u16string_view  rNumLetterSync,
bool  bNumberNone = false 
) const
void SvXMLUnitConverter::convertNumFormat ( OUStringBuffer &  rBuffer,
sal_Int16  nType 
) const
void SvXMLUnitConverter::convertNumLetterSync ( OUStringBuffer &  rBuffer,
sal_Int16  nType 
)
static
bool SvXMLUnitConverter::convertPosition3D ( css::drawing::Position3D &  rPosition,
std::string_view  rValue 
) const

convert string to Position3D

Referenced by GetPosition3D(), and ImpExportEnhancedGeometry().

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

convert Position3D to string

static void SvXMLUnitConverter::convertPropertySet ( css::uno::Sequence< css::beans::PropertyValue > &  rProps,
const css::uno::Reference< css::beans::XPropertySet > &  aProperties 
)
static
static void SvXMLUnitConverter::convertPropertySet ( css::uno::Reference< css::beans::XPropertySet > const &  rProperties,
const css::uno::Sequence< css::beans::PropertyValue > &  aProps 
)
static
OUString SvXMLUnitConverter::encodeStyleName ( const OUString &  rName,
bool *  pEncoded = nullptr 
) const
sal_Int16 SvXMLUnitConverter::GetMeasureUnit ( FieldUnit const  nFieldUnit)
static

Definition at line 152 of file xmluconv.cxx.

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

gets XNumberingTypeInfo

Definition at line 99 of file xmluconv.cxx.

References m_pImpl.

Referenced by convertNumFormat().

SvtSaveOptions::ODFSaneDefaultVersion SvXMLUnitConverter::getSaneDefaultVersion ( ) const

ODF version, only when exporting.

Definition at line 123 of file xmluconv.cxx.

References m_pImpl.

Referenced by XMLErrorBarStylePropertyHdl::exportXML(), XMLCharScriptHdl::exportXML(), and XMLCharRfcLanguageTagHdl::exportXML().

sal_Int16 SvXMLUnitConverter::GetXMLMeasureUnit ( ) const

gets the default unit for textual measures

Definition at line 118 of file xmluconv.cxx.

References m_pImpl.

SvXMLUnitConverter& SvXMLUnitConverter::operator= ( const SvXMLUnitConverter )
privatedelete
void SvXMLUnitConverter::overrideSaneDefaultVersion ( SvtSaveOptions::ODFSaneDefaultVersion const  nODFVersion)

Definition at line 128 of file xmluconv.cxx.

References m_pImpl.

Referenced by SvXMLExport::DetermineModelType_().

void SvXMLUnitConverter::SetCoreMeasureUnit ( sal_Int16 const  eCoreMeasureUnit)

sets the default unit for numerical measures

Definition at line 108 of file xmluconv.cxx.

References m_pImpl.

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 352 of file xmluconv.cxx.

References m_pImpl, and XML_NULLDATE.

Referenced by SvXMLExport::SetNullDateOnUnitConverter().

void SvXMLUnitConverter::SetXMLMeasureUnit ( sal_Int16 const  eXMLMeasureUnit)

sets the default unit for textual measures

Definition at line 113 of file xmluconv.cxx.

References m_pImpl.

Member Data Documentation

struct SAL_DLLPRIVATE SvXMLUnitConverter::Impl
private

Definition at line 88 of file xmluconv.hxx.

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

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