diff options
author | Noel <noel.grandin@collabora.co.uk> | 2020-12-17 16:23:57 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-18 07:56:54 +0100 |
commit | d9b8670548561f7f53a546b8fe53212c6b1ce26e (patch) | |
tree | f81854d5bf867dfc4eb7da2f31632656c745969c /xmloff/source/text | |
parent | 8c9a4ff511a3b1d84a7a6d08a1b153c07f164abb (diff) |
use more string_view in convertEnum
Change-Id: I859de4b908672722e1873c5b41cb456b42258ddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107885
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text')
-rw-r--r-- | xmloff/source/text/XMLAnchorTypePropHdl.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexBibliographyEntryContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTableSourceContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLIndexTemplateContext.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextColumnsContext.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextFrameContext.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/XMLTextShapeImportHelper.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtfldi.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtprhdl.cxx | 2 |
11 files changed, 14 insertions, 14 deletions
diff --git a/xmloff/source/text/XMLAnchorTypePropHdl.hxx b/xmloff/source/text/XMLAnchorTypePropHdl.hxx index 9cd0a06f0d7e..0a4b7fa6593a 100644 --- a/xmloff/source/text/XMLAnchorTypePropHdl.hxx +++ b/xmloff/source/text/XMLAnchorTypePropHdl.hxx @@ -37,7 +37,7 @@ public: OUString& rStrExpValue, const css::uno::Any& rValue, const SvXMLUnitConverter& rUnitConverter ) const override; - static bool convert( std::u16string_view rStrImpValue, + static bool convert( std::string_view rStrImpValue, css::text::TextContentAnchorType& rType ); }; diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx index b38fd4db03d4..758a7be07208 100644 --- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx @@ -127,7 +127,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexBibliographyCo // process children here and use default context! if ( nElement == XML_ELEMENT(TEXT, XML_SORT_KEY) ) { - OUString sKey; + std::string_view sKey; bool bSort(true); for (auto &aIter : sax_fastparser::castToFastAttributeList( xAttrList )) @@ -135,7 +135,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexBibliographyCo switch (aIter.getToken()) { case XML_ELEMENT(TEXT, XML_KEY): - sKey = aIter.toString(); + sKey = aIter.toView(); break; case XML_ELEMENT(TEXT, XML_SORT_ASCENDING): { diff --git a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx index c9bd4eabbce3..7218f563a0c7 100644 --- a/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx +++ b/xmloff/source/text/XMLIndexBibliographyEntryContext.cxx @@ -110,7 +110,7 @@ void XMLIndexBibliographyEntryContext::startFastElement( case XML_ELEMENT(TEXT, XML_BIBLIOGRAPHY_DATA_FIELD): { sal_uInt16 nTmp; - if (SvXMLUnitConverter::convertEnum(nTmp, aIter.toString(), aBibliographyDataFieldMap)) + if (SvXMLUnitConverter::convertEnum(nTmp, aIter.toView(), aBibliographyDataFieldMap)) { nBibliographyInfo = nTmp; bBibliographyInfoOK = true; diff --git a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx index 1f5bbc2ea11f..4936a640b996 100644 --- a/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx +++ b/xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx @@ -93,7 +93,7 @@ void XMLIndexChapterInfoEntryContext::startFastElement( case XML_ELEMENT(TEXT, XML_DISPLAY): //i53420, always true, in TOC as well { sal_uInt16 nTmp; - if (SvXMLUnitConverter::convertEnum(nTmp, aIter.toString(), aChapterDisplayMap)) + if (SvXMLUnitConverter::convertEnum(nTmp, aIter.toView(), aChapterDisplayMap)) { nChapterInfo = nTmp; bChapterInfoOK = true; diff --git a/xmloff/source/text/XMLIndexTableSourceContext.cxx b/xmloff/source/text/XMLIndexTableSourceContext.cxx index aae8e0388f18..480baf0cee16 100644 --- a/xmloff/source/text/XMLIndexTableSourceContext.cxx +++ b/xmloff/source/text/XMLIndexTableSourceContext.cxx @@ -93,7 +93,7 @@ void XMLIndexTableSourceContext::ProcessAttribute(const sax_fastparser::FastAttr case XML_ELEMENT(TEXT, XML_CAPTION_SEQUENCE_FORMAT): { sal_uInt16 nTmp; - if (SvXMLUnitConverter::convertEnum(nTmp, aIter.toString(), + if (SvXMLUnitConverter::convertEnum(nTmp, aIter.toView(), lcl_aReferenceTypeTokenMap)) { nDisplayFormat = nTmp; diff --git a/xmloff/source/text/XMLIndexTemplateContext.cxx b/xmloff/source/text/XMLIndexTemplateContext.cxx index 36710b0eab2b..1b9fff15aaad 100644 --- a/xmloff/source/text/XMLIndexTemplateContext.cxx +++ b/xmloff/source/text/XMLIndexTemplateContext.cxx @@ -113,7 +113,7 @@ void XMLIndexTemplateContext::startFastElement( // we have an attr name! Then see if we have the attr, too. // outline level sal_uInt16 nTmp; - if (SvXMLUnitConverter::convertEnum(nTmp, aIter.toString(), pOutlineLevelNameMap)) + if (SvXMLUnitConverter::convertEnum(nTmp, aIter.toView(), pOutlineLevelNameMap)) { nOutlineLevel = nTmp; bOutlineLevelOK = true; diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index 5cf2d03f60cd..4c301af5e8bd 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.cxx @@ -174,11 +174,11 @@ XMLTextColumnSepContext_Impl::XMLTextColumnSepContext_Impl( ::sax::Converter::convertColor( nColor, aIter.toView() ); break; case XML_ELEMENT(STYLE, XML_VERTICAL_ALIGN): - SvXMLUnitConverter::convertEnum( eVertAlign, aIter.toString(), + SvXMLUnitConverter::convertEnum( eVertAlign, aIter.toView(), pXML_Sep_Align_Enum ); break; case XML_ELEMENT(STYLE, XML_STYLE): - SvXMLUnitConverter::convertEnum( nStyle, aIter.toString(), + SvXMLUnitConverter::convertEnum( nStyle, aIter.toView(), pXML_Sep_Style_Enum ); break; default: diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index 2855e64dd45f..7c028bd1ef63 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -859,7 +859,7 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl( { TextContentAnchorType eNew; - if( XMLAnchorTypePropHdl::convert( aIter.toString(), eNew ) && + if( XMLAnchorTypePropHdl::convert( aIter.toView(), eNew ) && ( TextContentAnchorType_AT_PARAGRAPH == eNew || TextContentAnchorType_AT_CHARACTER == eNew || TextContentAnchorType_AS_CHARACTER == eNew || @@ -1353,7 +1353,7 @@ XMLTextFrameContext::XMLTextFrameContext( case XML_ELEMENT(TEXT, XML_ANCHOR_TYPE): { TextContentAnchorType eNew; - if( XMLAnchorTypePropHdl::convert( aIter.toString(), eNew ) && + if( XMLAnchorTypePropHdl::convert( aIter.toView(), eNew ) && ( TextContentAnchorType_AT_PARAGRAPH == eNew || TextContentAnchorType_AT_CHARACTER == eNew || TextContentAnchorType_AS_CHARACTER == eNew || diff --git a/xmloff/source/text/XMLTextShapeImportHelper.cxx b/xmloff/source/text/XMLTextShapeImportHelper.cxx index 74f8a7a49b26..89b7de528c95 100644 --- a/xmloff/source/text/XMLTextShapeImportHelper.cxx +++ b/xmloff/source/text/XMLTextShapeImportHelper.cxx @@ -94,7 +94,7 @@ void XMLTextShapeImportHelper::addShape( { TextContentAnchorType eNew; // OD 2004-06-01 #i26791# - allow all anchor types - if ( XMLAnchorTypePropHdl::convert( aIter.toString(), eNew ) ) + if ( XMLAnchorTypePropHdl::convert( aIter.toView(), eNew ) ) { eAnchorType = eNew; } diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx index f0cc32b3a33c..da6a7b7710c0 100644 --- a/xmloff/source/text/txtfldi.cxx +++ b/xmloff/source/text/txtfldi.cxx @@ -2963,7 +2963,7 @@ void XMLBibliographyFieldImportContext::startFastElement( { sal_uInt16 nTmp; if (SvXMLUnitConverter::convertEnum( - nTmp, aIter.toString(), + nTmp, aIter.toView(), aBibliographyDataTypeMap)) { aAny <<= static_cast<sal_Int16>(nTmp); diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx index e68a8316a503..0cca1a9489ee 100644 --- a/xmloff/source/text/txtprhdl.cxx +++ b/xmloff/source/text/txtprhdl.cxx @@ -631,7 +631,7 @@ XMLAnchorTypePropHdl::~XMLAnchorTypePropHdl() { } -bool XMLAnchorTypePropHdl::convert( std::u16string_view rStrImpValue, +bool XMLAnchorTypePropHdl::convert( std::string_view rStrImpValue, TextContentAnchorType& rType ) { TextContentAnchorType nAnchor; |