diff options
author | Noel <noelgrandin@gmail.com> | 2020-11-24 14:33:13 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-25 07:13:26 +0100 |
commit | c8a2550b6a014c05cd4d0ad6a72122f79ce301af (patch) | |
tree | 516947d3d50162ca2f52a759f846679f0bb8b526 /xmloff/source | |
parent | aac9c35c7405859a38f634ee95b8aba5f62db84d (diff) |
use string_view for the parsing in sax utils
Change-Id: Ifd7430501318684f9999c90dd36c1ca965373947
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106499
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/chart/SchXMLPlotAreaContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLPlotAreaContext.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/xmluconv.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/draw/ximpcustomshape.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/XMLChangedRegionImportContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLChangedRegionImportContext.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/xforms/XFormsSubmissionContext.cxx | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx index d64cb89ec573..0391b4f4a8d3 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx @@ -817,7 +817,7 @@ bool SchXMLPositionAttributesHelper::isAutomatic() const return m_bAutoSize || m_bAutoPosition; } -void SchXMLPositionAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue ) +void SchXMLPositionAttributesHelper::readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, std::u16string_view rValue ) { if( XML_NAMESPACE_SVG != nPrefix ) return; diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.hxx b/xmloff/source/chart/SchXMLPlotAreaContext.hxx index 1e392e8a3b3c..750eacb25ce7 100644 --- a/xmloff/source/chart/SchXMLPlotAreaContext.hxx +++ b/xmloff/source/chart/SchXMLPlotAreaContext.hxx @@ -60,7 +60,7 @@ public: explicit SchXMLPositionAttributesHelper( SvXMLImport& rImporter ); ~SchXMLPositionAttributesHelper(); - void readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, const OUString& rValue ); + void readPositioningAttribute( sal_uInt16 nPrefix, const OUString& rLocalName, std::u16string_view rValue ); void readAutomaticPositioningProperties( XMLPropStyleContext const * pPropStyleContext, const SvXMLStylesContext* pStylesCtxt ); bool hasPosSize() const; diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx index b18972ba29f2..98aa54df7b51 100644 --- a/xmloff/source/core/xmluconv.cxx +++ b/xmloff/source/core/xmluconv.cxx @@ -169,7 +169,7 @@ sal_Int16 SvXMLUnitConverter::GetMeasureUnit(FieldUnit const nFieldUnit) /** convert string to measure using optional min and max values*/ bool SvXMLUnitConverter::convertMeasureToCore( sal_Int32& nValue, - const OUString& rString, + std::u16string_view rString, sal_Int32 nMin, sal_Int32 nMax ) const { return ::sax::Converter::convertMeasure( nValue, rString, @@ -292,7 +292,7 @@ void SvXMLUnitConverter::convertDouble(OUStringBuffer& rBuffer, /** convert string to double number (using ::rtl::math) */ bool SvXMLUnitConverter::convertDouble(double& rValue, - const OUString& rString) const + std::u16string_view rString) const { sal_Int16 const eSrcUnit = ::sax::Converter::GetUnitFromString( rString, m_pImpl->m_eCoreMeasureUnit); @@ -322,7 +322,7 @@ void SvXMLUnitConverter::convertDateTime(OUStringBuffer& rBuffer, /** convert ISO Date Time String to double */ bool SvXMLUnitConverter::convertDateTime(double& fDateTime, - const OUString& rString) + std::u16string_view rString) { return convertDateTime(fDateTime, rString, m_pImpl->m_aNullDate); } @@ -416,7 +416,7 @@ void SvXMLUnitConverter::convertDateTime( OUStringBuffer& rBuffer, /** convert ISO Date Time String to double */ bool SvXMLUnitConverter::convertDateTime( double& fDateTime, - const OUString& rString, const css::util::Date& aTempNullDate) + std::u16string_view rString, const css::util::Date& aTempNullDate) { css::util::DateTime aDateTime; bool bSuccess = ::sax::Converter::parseDateTime(aDateTime, rString); diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index 3bd71eae268d..b1cf0740ab6c 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -73,7 +73,7 @@ const SvXMLEnumMapEntry<sal_uInt16> aXML_GluePointEnumMap[] = { XML_TOKEN_INVALID, 0 } }; static void GetBool( std::vector< css::beans::PropertyValue >& rDest, - const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp ) + std::u16string_view rValue, const EnhancedCustomShapeTokenEnum eDestProp ) { bool bAttrBool; if (::sax::Converter::convertBool( bAttrBool, rValue )) @@ -99,7 +99,7 @@ static void GetInt32( std::vector< css::beans::PropertyValue >& rDest, } static void GetDouble( std::vector< css::beans::PropertyValue >& rDest, - const OUString& rValue, const EnhancedCustomShapeTokenEnum eDestProp ) + std::u16string_view rValue, const EnhancedCustomShapeTokenEnum eDestProp ) { double fAttrDouble; if (::sax::Converter::convertDouble( fAttrDouble, rValue )) diff --git a/xmloff/source/text/XMLChangedRegionImportContext.cxx b/xmloff/source/text/XMLChangedRegionImportContext.cxx index 8f815c3a7f75..5b2313e67ded 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.cxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.cxx @@ -144,7 +144,7 @@ void XMLChangedRegionImportContext::SetChangeInfo( const OUString& rType, const OUString& rAuthor, const OUString& rComment, - const OUString& rDate) + std::u16string_view rDate) { util::DateTime aDateTime; if (::sax::Converter::parseDateTime(aDateTime, rDate)) diff --git a/xmloff/source/text/XMLChangedRegionImportContext.hxx b/xmloff/source/text/XMLChangedRegionImportContext.hxx index 2ef452b2b201..45297c573caf 100644 --- a/xmloff/source/text/XMLChangedRegionImportContext.hxx +++ b/xmloff/source/text/XMLChangedRegionImportContext.hxx @@ -72,7 +72,7 @@ public: void SetChangeInfo(const OUString& rType, const OUString& rAuthor, const OUString& rComment, - const OUString& rDate); + std::u16string_view rDate); /// create redline XText/XTextCursor on demand and register with /// XMLTextImportHelper diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx index 3fc13f9e35b7..ec9463437894 100644 --- a/xmloff/source/xforms/XFormsSubmissionContext.cxx +++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx @@ -56,7 +56,7 @@ XFormsSubmissionContext::XFormsSubmissionContext( namespace { -Any toBool( const OUString& rValue ) +Any toBool( std::u16string_view rValue ) { Any aValue; bool bValue(false); |