include/xmloff/xmltoken.hxx                                     |    5 +
 include/xmloff/xmluconv.hxx                                     |   38 
++++++++++
 reportdesign/source/filter/xml/xmlGroup.cxx                     |    4 -
 reportdesign/source/filter/xml/xmlImage.cxx                     |    2 
 reportdesign/source/filter/xml/xmlReport.cxx                    |    2 
 reportdesign/source/filter/xml/xmlSection.cxx                   |    6 -
 reportdesign/source/filter/xml/xmlTable.cxx                     |    6 -
 xmloff/source/chart/SchXMLAxisContext.cxx                       |    4 -
 xmloff/source/core/xmltoken.cxx                                 |   11 ++
 xmloff/source/core/xmluconv.cxx                                 |   19 +++++
 xmloff/source/draw/animationimport.cxx                          |   30 +++----
 xmloff/source/draw/animimp.cxx                                  |    6 -
 xmloff/source/draw/eventimp.cxx                                 |    8 +-
 xmloff/source/draw/ximpcustomshape.cxx                          |    4 -
 xmloff/source/draw/ximpshap.cxx                                 |    8 +-
 xmloff/source/style/DashStyle.cxx                               |    2 
 xmloff/source/style/GradientStyle.cxx                           |    2 
 xmloff/source/style/HatchStyle.cxx                              |    2 
 xmloff/source/style/TransGradientStyle.cxx                      |    2 
 xmloff/source/style/XMLBackgroundImageContext.cxx               |   11 +-
 xmloff/source/style/XMLFootnoteSeparatorImport.cxx              |    4 -
 xmloff/source/style/xmlnumfi.cxx                                |    4 -
 xmloff/source/text/XMLAnchorTypePropHdl.hxx                     |    2 
 xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx |    4 -
 xmloff/source/text/XMLIndexBibliographyEntryContext.cxx         |    2 
 xmloff/source/text/XMLIndexChapterInfoEntryContext.cxx          |    2 
 xmloff/source/text/XMLIndexTableSourceContext.cxx               |    2 
 xmloff/source/text/XMLIndexTemplateContext.cxx                  |    2 
 xmloff/source/text/XMLTextColumnsContext.cxx                    |    4 -
 xmloff/source/text/XMLTextFrameContext.cxx                      |    4 -
 xmloff/source/text/XMLTextShapeImportHelper.cxx                 |    2 
 xmloff/source/text/txtfldi.cxx                                  |    2 
 xmloff/source/text/txtprhdl.cxx                                 |    2 
 33 files changed, 140 insertions(+), 68 deletions(-)

New commits:
commit d9b8670548561f7f53a546b8fe53212c6b1ce26e
Author:     Noel <noel.gran...@collabora.co.uk>
AuthorDate: Thu Dec 17 16:23:57 2020 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Dec 18 07:56:54 2020 +0100

    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.gran...@collabora.co.uk>

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index e0f3ef898c65..0a8a12381240 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3410,6 +3410,11 @@ namespace xmloff::token {
         const OUString& rString,
         enum XMLTokenEnum eToken );
 
+    /// compare eToken to the string
+    XMLOFF_DLLPUBLIC bool IsXMLToken(
+        std::string_view rString,
+        enum XMLTokenEnum eToken );
+
     XMLOFF_DLLPUBLIC bool IsXMLToken(
         const sax_fastparser::FastAttributeList::FastAttributeIter& aIter,
         enum XMLTokenEnum eToken );
diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx
index 3a9950edbd64..daca3b617f7f 100644
--- a/include/xmloff/xmluconv.hxx
+++ b/include/xmloff/xmluconv.hxx
@@ -147,6 +147,21 @@ public:
         return bRet;
     }
 
+    /** convert string to enum using given enum map, if the enum is
+        not found in the map, this method will return false */
+    template<typename EnumT>
+    static bool convertEnum( EnumT& rEnum,
+                             std::string_view rValue,
+                             const SvXMLEnumMapEntry<EnumT> *pMap )
+    {
+        sal_uInt16 nTmp;
+        bool bRet = convertEnumImpl(nTmp, rValue,
+                        reinterpret_cast<const 
SvXMLEnumMapEntry<sal_uInt16>*>(pMap));
+        if (bRet)
+            rEnum = static_cast<EnumT>(nTmp);
+        return bRet;
+    }
+
     /** convert string to enum using given token map, if the enum is
         not found in the map, this method will return false */
     template<typename EnumT>
@@ -162,6 +177,21 @@ public:
         return bRet;
     }
 
+    /** convert string to enum using given token map, if the enum is
+        not found in the map, this method will return false */
+    template<typename EnumT>
+    static bool convertEnum( EnumT& rEnum,
+                             std::string_view rValue,
+                             const SvXMLEnumStringMapEntry<EnumT> *pMap )
+    {
+        sal_uInt16 nTmp;
+        bool bRet = convertEnumImpl(nTmp, rValue,
+                        reinterpret_cast<const 
SvXMLEnumStringMapEntry<sal_uInt16>*>(pMap));
+        if (bRet)
+            rEnum = static_cast<EnumT>(nTmp);
+        return bRet;
+    }
+
     /** 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
@@ -268,6 +298,14 @@ private:
                              std::u16string_view rValue,
                              const SvXMLEnumStringMapEntry<sal_uInt16> *pMap );
 
+    static bool convertEnumImpl( sal_uInt16& rEnum,
+                             std::string_view rValue,
+                             const SvXMLEnumMapEntry<sal_uInt16> *pMap );
+
+    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,
diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx 
b/reportdesign/source/filter/xml/xmlGroup.cxx
index 938ec7f3238e..e4b6c4d23bd1 100644
--- a/reportdesign/source/filter/xml/xmlGroup.cxx
+++ b/reportdesign/source/filter/xml/xmlGroup.cxx
@@ -39,7 +39,7 @@ namespace rptxml
     using namespace ::com::sun::star::report;
     using namespace ::com::sun::star::xml::sax;
 
-    static sal_Int16 lcl_getKeepTogetherOption(std::u16string_view _sValue)
+    static sal_Int16 lcl_getKeepTogetherOption(std::string_view _sValue)
     {
         sal_Int16 nRet = report::KeepTogether::NO;
         const SvXMLEnumMapEntry<sal_Int16>* aXML_EnumMap = 
OXMLHelper::GetKeepTogetherOptions();
@@ -154,7 +154,7 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport
                     }
                     break;
                 case XML_ELEMENT(REPORT, XML_KEEP_TOGETHER):
-                    
m_xGroup->setKeepTogether(lcl_getKeepTogetherOption(aIter.toString()));
+                    
m_xGroup->setKeepTogether(lcl_getKeepTogetherOption(aIter.toView()));
                     break;
                 default:
                     XMLOFF_WARN_UNKNOWN("reportdesign", aIter);
diff --git a/reportdesign/source/filter/xml/xmlImage.cxx 
b/reportdesign/source/filter/xml/xmlImage.cxx
index d8736f5ca032..c9e1aeea5e8f 100644
--- a/reportdesign/source/filter/xml/xmlImage.cxx
+++ b/reportdesign/source/filter/xml/xmlImage.cxx
@@ -72,7 +72,7 @@ OXMLImage::OXMLImage( ORptFilter& rImport,
                     else
                     {
                         const SvXMLEnumMapEntry<sal_Int16>* aXML_EnumMap = 
OXMLHelper::GetImageScaleOptions();
-                        bool bConvertOk = SvXMLUnitConverter::convertEnum( 
nRet, aIter.toString(), aXML_EnumMap );
+                        bool bConvertOk = SvXMLUnitConverter::convertEnum( 
nRet, aIter.toView(), aXML_EnumMap );
                         SAL_WARN_IF(!bConvertOk, "reportdesign", "convertEnum 
failed");
                     }
                     _xComponent->setScaleMode( nRet );
diff --git a/reportdesign/source/filter/xml/xmlReport.cxx 
b/reportdesign/source/filter/xml/xmlReport.cxx
index 01a0a2a76765..86347b1ef2b9 100644
--- a/reportdesign/source/filter/xml/xmlReport.cxx
+++ b/reportdesign/source/filter/xml/xmlReport.cxx
@@ -59,7 +59,7 @@ OXMLReport::OXMLReport( ORptFilter& rImport,
                     {
                         sal_Int32 nRet = sdb::CommandType::COMMAND;
                         const SvXMLEnumMapEntry<sal_Int32>* aXML_EnumMap = 
OXMLHelper::GetCommandTypeOptions();
-                        bool bConvertOk = SvXMLUnitConverter::convertEnum( 
nRet, aIter.toString(), aXML_EnumMap );
+                        bool bConvertOk = SvXMLUnitConverter::convertEnum( 
nRet, aIter.toView(), aXML_EnumMap );
                         SAL_WARN_IF(!bConvertOk, "reportdesign", "convertEnum 
failed");
                         m_xReportDefinition->setCommandType(nRet);
                     }
diff --git a/reportdesign/source/filter/xml/xmlSection.cxx 
b/reportdesign/source/filter/xml/xmlSection.cxx
index 2d5a20ea1927..0b0834eac1e3 100644
--- a/reportdesign/source/filter/xml/xmlSection.cxx
+++ b/reportdesign/source/filter/xml/xmlSection.cxx
@@ -36,7 +36,7 @@ namespace rptxml
     using namespace ::com::sun::star::uno;
     using namespace ::com::sun::star::xml::sax;
 
-    static sal_Int16 lcl_getReportPrintOption(std::u16string_view _sValue)
+    static sal_Int16 lcl_getReportPrintOption(std::string_view _sValue)
     {
         sal_Int16 nRet = report::ReportPrintOption::ALL_PAGES;
         const SvXMLEnumMapEntry<sal_Int16>* aXML_EnumMap = 
OXMLHelper::GetReportPrintOptions();
@@ -63,9 +63,9 @@ OXMLSection::OXMLSection( ORptFilter& rImport,
             {
                 case XML_ELEMENT(REPORT, XML_PAGE_PRINT_OPTION):
                     if ( _bPageHeader )
-                        
m_xSection->getReportDefinition()->setPageHeaderOption(lcl_getReportPrintOption(aIter.toString()));
+                        
m_xSection->getReportDefinition()->setPageHeaderOption(lcl_getReportPrintOption(aIter.toView()));
                     else
-                        
m_xSection->getReportDefinition()->setPageFooterOption(lcl_getReportPrintOption(aIter.toString()));
+                        
m_xSection->getReportDefinition()->setPageFooterOption(lcl_getReportPrintOption(aIter.toView()));
                     break;
                 case XML_ELEMENT(REPORT, XML_REPEAT_SECTION):
                     m_xSection->setRepeatSection(IsXMLToken(aIter, XML_TRUE));
diff --git a/reportdesign/source/filter/xml/xmlTable.cxx 
b/reportdesign/source/filter/xml/xmlTable.cxx
index 7a6055ace448..719b169f310b 100644
--- a/reportdesign/source/filter/xml/xmlTable.cxx
+++ b/reportdesign/source/filter/xml/xmlTable.cxx
@@ -50,7 +50,7 @@ namespace rptxml
     using ::com::sun::star::uno::Reference;
     using namespace ::com::sun::star::xml::sax;
 
-    static sal_Int16 lcl_getForceNewPageOption(std::u16string_view _sValue)
+    static sal_Int16 lcl_getForceNewPageOption(std::string_view _sValue)
     {
         sal_Int16 nRet = report::ForceNewPage::NONE;
         const SvXMLEnumMapEntry<sal_Int16>* aXML_EnumMap = 
OXMLHelper::GetForceNewPageOptions();
@@ -82,10 +82,10 @@ OXMLTable::OXMLTable( ORptFilter& rImport
                     m_xSection->setVisible(IsXMLToken(aIter, XML_TRUE));
                     break;
                 case XML_ELEMENT(REPORT, XML_FORCE_NEW_PAGE):
-                    
m_xSection->setForceNewPage(lcl_getForceNewPageOption(aIter.toString()));
+                    
m_xSection->setForceNewPage(lcl_getForceNewPageOption(aIter.toView()));
                     break;
                 case XML_ELEMENT(REPORT, XML_FORCE_NEW_COLUMN):
-                    
m_xSection->setNewRowOrCol(lcl_getForceNewPageOption(aIter.toString()));
+                    
m_xSection->setNewRowOrCol(lcl_getForceNewPageOption(aIter.toView()));
                     break;
                 case XML_ELEMENT(REPORT, XML_KEEP_TOGETHER):
                     m_xSection->setKeepTogether(IsXMLToken(aIter, XML_TRUE));
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx 
b/xmloff/source/chart/SchXMLAxisContext.cxx
index dd6c1fd62596..13bec6e8e15a 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -240,7 +240,7 @@ void SchXMLAxisContext::startFastElement( sal_Int32 
/*nElement*/,
             case XML_ELEMENT(CHART, XML_DIMENSION):
                 {
                     SchXMLAxisDimension nEnumVal;
-                    if( SvXMLUnitConverter::convertEnum( nEnumVal, 
aIter.toString(), aXMLAxisDimensionMap ))
+                    if( SvXMLUnitConverter::convertEnum( nEnumVal, 
aIter.toView(), aXMLAxisDimensionMap ))
                         m_aCurrentAxis.eDimension = nEnumVal;
                 }
                 break;
@@ -250,7 +250,7 @@ void SchXMLAxisContext::startFastElement( sal_Int32 
/*nElement*/,
             case XML_ELEMENT(CHART, XML_AXIS_TYPE):
             case XML_ELEMENT(CHART_EXT, XML_AXIS_TYPE):
                 sal_uInt16 nEnumVal;
-                if( SvXMLUnitConverter::convertEnum( nEnumVal, 
aIter.toString(), aXMLAxisTypeMap ))
+                if( SvXMLUnitConverter::convertEnum( nEnumVal, aIter.toView(), 
aXMLAxisTypeMap ))
                 {
                     m_nAxisType = nEnumVal;
                     m_bAxisTypeImported = true;
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index c64f51768cf3..efcd2d421e1a 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3479,6 +3479,17 @@ namespace xmloff::token {
         const XMLTokenEntry* pToken = 
&aTokenList[static_cast<sal_uInt16>(eToken)];
         return aIter.isString( pToken->pChar );
     }
+
+    bool IsXMLToken(
+        std::string_view aStr,
+        enum XMLTokenEnum eToken )
+    {
+        assert(XML_TOKEN_INVALID < eToken);
+        assert(eToken < XML_TOKEN_END);
+
+        const XMLTokenEntry* pToken = 
&aTokenList[static_cast<sal_uInt16>(eToken)];
+        return aStr == pToken->pChar;
+    }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index e31dbfa231ca..b1143fd38cc1 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -248,6 +248,25 @@ bool SvXMLUnitConverter::convertEnumImpl(
     return false;
 }
 
+/** convert string to enum using given token map, if the enum is
+    not found in the map, this method will return false */
+bool SvXMLUnitConverter::convertEnumImpl(
+    sal_uInt16& rEnum,
+    std::string_view rValue,
+    const SvXMLEnumMapEntry<sal_uInt16> *pMap )
+{
+    while( pMap->GetToken() != XML_TOKEN_INVALID )
+    {
+        if( IsXMLToken( rValue, pMap->GetToken() ) )
+        {
+            rEnum = pMap->GetValue();
+            return true;
+        }
+        ++pMap;
+    }
+    return false;
+}
+
 /** convert enum to string using given token 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
diff --git a/xmloff/source/draw/animationimport.cxx 
b/xmloff/source/draw/animationimport.cxx
index 2813160d7691..c648e8133a2f 100644
--- a/xmloff/source/draw/animationimport.cxx
+++ b/xmloff/source/draw/animationimport.cxx
@@ -585,7 +585,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             case XML_ELEMENT(SMIL_COMPAT, XML_FILL):
             case XML_ELEMENT(SMIL_SO52, XML_FILL):
             {
-                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toString(), 
aAnimations_EnumMap_Fill ) )
+                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), 
aAnimations_EnumMap_Fill ) )
                     mxNode->setFill( nEnum );
             }
             break;
@@ -593,7 +593,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             case XML_ELEMENT(SMIL_COMPAT, XML_FILLDEFAULT):
             case XML_ELEMENT(SMIL_SO52, XML_FILLDEFAULT):
             {
-                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toString(), 
aAnimations_EnumMap_FillDefault ) )
+                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), 
aAnimations_EnumMap_FillDefault ) )
                     mxNode->setFillDefault( nEnum );
             }
             break;
@@ -601,7 +601,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             case XML_ELEMENT(SMIL_COMPAT, XML_RESTART):
             case XML_ELEMENT(SMIL_SO52, XML_RESTART):
             {
-                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toString(), 
aAnimations_EnumMap_Restart ) )
+                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), 
aAnimations_EnumMap_Restart ) )
                     mxNode->setRestart( nEnum );
             }
             break;
@@ -609,7 +609,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             case XML_ELEMENT(SMIL_COMPAT, XML_RESTARTDEFAULT):
             case XML_ELEMENT(SMIL_SO52, XML_RESTARTDEFAULT):
             {
-                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toString(), 
aAnimations_EnumMap_RestartDefault ) )
+                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), 
aAnimations_EnumMap_RestartDefault ) )
                     mxNode->setRestartDefault( nEnum );
             }
             break;
@@ -656,7 +656,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             case XML_ELEMENT(SMIL_COMPAT, XML_ENDSYNC):
             case XML_ELEMENT(SMIL_SO52, XML_ENDSYNC):
             {
-                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toString(), 
aAnimations_EnumMap_Endsync ) )
+                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), 
aAnimations_EnumMap_Endsync ) )
                     mxNode->setEndSync( makeAny( nEnum ) );
             }
             break;
@@ -665,7 +665,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             case XML_ELEMENT(PRESENTATION_OOO, XML_NODE_TYPE):
             case XML_ELEMENT(PRESENTATION_OASIS, XML_NODE_TYPE):
             {
-                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toString(), 
aAnimations_EnumMap_EffectNodeType ) )
+                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), 
aAnimations_EnumMap_EffectNodeType ) )
                     aUserData.emplace_back( GetXMLToken( XML_NODE_TYPE ), 
makeAny( nEnum ) );
             }
             break;
@@ -690,7 +690,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             case XML_ELEMENT(PRESENTATION_OOO, XML_PRESET_CLASS):
             case XML_ELEMENT(PRESENTATION_OASIS, XML_PRESET_CLASS):
             {
-                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toString(), 
aAnimations_EnumMap_EffectPresetClass ) )
+                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), 
aAnimations_EnumMap_EffectPresetClass ) )
                     aUserData.emplace_back( GetXMLToken( XML_PRESET_CLASS ), 
makeAny( nEnum ) );
             }
             break;
@@ -760,7 +760,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             case XML_ELEMENT(ANIMATION, XML_SUB_ITEM):
             case XML_ELEMENT(ANIMATION_OOO, XML_SUB_ITEM):
             {
-                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toString(), 
aAnimations_EnumMap_SubItem ) )
+                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), 
aAnimations_EnumMap_SubItem ) )
                 {
                     if( xAnimate.is() )
                     {
@@ -868,7 +868,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             {
                 if( xAnimate.is() )
                 {
-                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toString(), aAnimations_EnumMap_CalcMode ) )
+                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toView(), aAnimations_EnumMap_CalcMode ) )
                         xAnimate->setCalcMode( nEnum );
                 }
             }
@@ -892,7 +892,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             {
                 if( xAnimate.is() )
                 {
-                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toString(), aAnimations_EnumMap_AdditiveMode ) )
+                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toView(), aAnimations_EnumMap_AdditiveMode ) )
                         xAnimate->setAdditive( nEnum );
                 }
             }
@@ -980,7 +980,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
                 Reference< XAnimateTransform > xTransform( mxNode, UNO_QUERY );
                 if( xTransform.is() )
                 {
-                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toString(), aAnimations_EnumMap_TransformType ) )
+                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toView(), aAnimations_EnumMap_TransformType ) )
                     {
                         xTransform->setTransformType( nEnum );
                         switch( nEnum )
@@ -1004,7 +1004,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             {
                 if( xTransitionFilter.is() )
                 {
-                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toString(), aAnimations_EnumMap_TransitionType ) )
+                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toView(), aAnimations_EnumMap_TransitionType ) )
                         xTransitionFilter->setTransition( nEnum );
                 }
             }
@@ -1016,7 +1016,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             {
                 if( xTransitionFilter.is() )
                 {
-                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toString(), aAnimations_EnumMap_TransitionSubType ) )
+                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toView(), aAnimations_EnumMap_TransitionSubType ) )
                         xTransitionFilter->setSubtype( nEnum );
                 }
             }
@@ -1056,7 +1056,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             case XML_ELEMENT(ANIMATION, XML_ITERATE_TYPE):
             case XML_ELEMENT(ANIMATION_OOO, XML_ITERATE_TYPE):
             {
-                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toString(), 
aAnimations_EnumMap_IterateType ) )
+                if( SvXMLUnitConverter::convertEnum( nEnum, aIter.toView(), 
aAnimations_EnumMap_IterateType ) )
                 {
                     if( xIter.is() )
                         xIter->setIterateType( nEnum );
@@ -1104,7 +1104,7 @@ void AnimationNodeContext::init_node(  const 
css::uno::Reference< css::xml::sax:
             {
                 if( xCommand.is() && nNodeType == AnimationNodeType::COMMAND )
                 {
-                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toString(), aAnimations_EnumMap_Command ) )
+                    if( SvXMLUnitConverter::convertEnum( nEnum, 
aIter.toView(), aAnimations_EnumMap_Command ) )
                     {
                         xCommand->setCommand( nEnum );
                     }
diff --git a/xmloff/source/draw/animimp.cxx b/xmloff/source/draw/animimp.cxx
index ca6d6cb28450..3ae369745f43 100644
--- a/xmloff/source/draw/animimp.cxx
+++ b/xmloff/source/draw/animimp.cxx
@@ -459,10 +459,10 @@ XMLAnimationsEffectContext::XMLAnimationsEffectContext( 
SvXMLImport& rImport,
                 break;
 
             case XML_ELEMENT(PRESENTATION, XML_EFFECT):
-                SvXMLUnitConverter::convertEnum( meEffect, aIter.toString(), 
aXML_AnimationEffect_EnumMap );
+                SvXMLUnitConverter::convertEnum( meEffect, aIter.toView(), 
aXML_AnimationEffect_EnumMap );
                 break;
             case XML_ELEMENT(PRESENTATION, XML_DIRECTION):
-                SvXMLUnitConverter::convertEnum( meDirection, 
aIter.toString(), aXML_AnimationDirection_EnumMap );
+                SvXMLUnitConverter::convertEnum( meDirection, aIter.toView(), 
aXML_AnimationDirection_EnumMap );
                 break;
             case XML_ELEMENT(PRESENTATION, XML_START_SCALE):
             {
@@ -472,7 +472,7 @@ XMLAnimationsEffectContext::XMLAnimationsEffectContext( 
SvXMLImport& rImport,
                 break;
             }
             case XML_ELEMENT(PRESENTATION, XML_SPEED):
-                SvXMLUnitConverter::convertEnum( meSpeed, aIter.toString(), 
aXML_AnimationSpeed_EnumMap );
+                SvXMLUnitConverter::convertEnum( meSpeed, aIter.toView(), 
aXML_AnimationSpeed_EnumMap );
                 break;
             case XML_ELEMENT(PRESENTATION, XML_PATH_ID):
                 maPathShapeId = aIter.toString();
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 2f90ed9e5e6c..41f9cf69a2e6 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -147,13 +147,13 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp,
         switch( aIter.getToken() )
         {
         case XML_ELEMENT(PRESENTATION, XML_ACTION):
-            SvXMLUnitConverter::convertEnum( maData.meClickAction, 
aIter.toString(), aXML_EventActions_EnumMap );
+            SvXMLUnitConverter::convertEnum( maData.meClickAction, 
aIter.toView(), aXML_EventActions_EnumMap );
             break;
         case XML_ELEMENT(PRESENTATION, XML_EFFECT):
-            SvXMLUnitConverter::convertEnum( maData.meEffect, 
aIter.toString(), aXML_AnimationEffect_EnumMap );
+            SvXMLUnitConverter::convertEnum( maData.meEffect, aIter.toView(), 
aXML_AnimationEffect_EnumMap );
             break;
         case XML_ELEMENT(PRESENTATION, XML_DIRECTION):
-            SvXMLUnitConverter::convertEnum( maData.meDirection, 
aIter.toString(), aXML_AnimationDirection_EnumMap );
+            SvXMLUnitConverter::convertEnum( maData.meDirection, 
aIter.toView(), aXML_AnimationDirection_EnumMap );
             break;
         case XML_ELEMENT(PRESENTATION, XML_START_SCALE):
             {
@@ -163,7 +163,7 @@ SdXMLEventContext::SdXMLEventContext( SvXMLImport& rImp,
             }
             break;
         case XML_ELEMENT(PRESENTATION, XML_SPEED):
-            SvXMLUnitConverter::convertEnum( maData.meSpeed, aIter.toString(), 
aXML_AnimationSpeed_EnumMap );
+            SvXMLUnitConverter::convertEnum( maData.meSpeed, aIter.toView(), 
aXML_AnimationSpeed_EnumMap );
             break;
         case XML_ELEMENT(PRESENTATION, XML_VERB):
             ::sax::Converter::convertNumber( maData.mnVerb, aIter.toView() );
diff --git a/xmloff/source/draw/ximpcustomshape.cxx 
b/xmloff/source/draw/ximpcustomshape.cxx
index f53c513d7e26..897f8dcc375c 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -121,7 +121,7 @@ static void GetString( std::vector< 
css::beans::PropertyValue >& rDest,
 
 template<typename EnumT>
 static void GetEnum( std::vector< css::beans::PropertyValue >& rDest,
-                         const OUString& rValue, const 
EnhancedCustomShapeTokenEnum eDestProp,
+                         std::string_view rValue, const 
EnhancedCustomShapeTokenEnum eDestProp,
                         const SvXMLEnumMapEntry<EnumT>& rMap )
 {
     EnumT eKind;
@@ -1070,7 +1070,7 @@ void XMLEnhancedCustomShapeContext::startFastElement(
             }
             break;
             case EAS_glue_point_type :
-                GetEnum( maPath, aIter.toString(), EAS_GluePointType, 
*aXML_GluePointEnumMap );
+                GetEnum( maPath, aIter.toView(), EAS_GluePointType, 
*aXML_GluePointEnumMap );
             break;
             case EAS_glue_point_leaving_directions :
                 GetDoubleSequence( maPath, aIter.toString(), 
EAS_GluePointLeavingDirections );
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 895303e0cd52..cb28c4735415 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -286,7 +286,7 @@ void SdXMLShapeContext::addGluePoint( const uno::Reference< 
xml::sax::XFastAttri
             case XML_ELEMENT(DRAW, XML_ALIGN):
             {
                 drawing::Alignment eKind;
-                if( SvXMLUnitConverter::convertEnum( eKind, aIter.toString(), 
aXML_GlueAlignment_EnumMap ) )
+                if( SvXMLUnitConverter::convertEnum( eKind, aIter.toView(), 
aXML_GlueAlignment_EnumMap ) )
                 {
                     aGluePoint.PositionAlignment = eKind;
                     aGluePoint.IsRelative = false;
@@ -295,7 +295,7 @@ void SdXMLShapeContext::addGluePoint( const uno::Reference< 
xml::sax::XFastAttri
             }
             case XML_ELEMENT(DRAW, XML_ESCAPE_DIRECTION):
             {
-                SvXMLUnitConverter::convertEnum( aGluePoint.Escape, 
aIter.toString(), aXML_GlueEscapeDirection_EnumMap );
+                SvXMLUnitConverter::convertEnum( aGluePoint.Escape, 
aIter.toView(), aXML_GlueEscapeDirection_EnumMap );
                 break;
             }
             default:
@@ -1132,7 +1132,7 @@ bool SdXMLEllipseShapeContext::processAttribute( const 
sax_fastparser::FastAttri
             mnRY = mnRX;
             break;
         case XML_ELEMENT(DRAW, XML_KIND):
-            SvXMLUnitConverter::convertEnum( meKind, aIter.toString(), 
aXML_CircleKind_EnumMap );
+            SvXMLUnitConverter::convertEnum( meKind, aIter.toView(), 
aXML_CircleKind_EnumMap );
             break;
         case XML_ELEMENT(DRAW, XML_START_ANGLE):
         {
@@ -1771,7 +1771,7 @@ bool SdXMLConnectorShapeContext::processAttribute( const 
sax_fastparser::FastAtt
         }
         case XML_ELEMENT(DRAW, XML_TYPE):
         {
-            (void)SvXMLUnitConverter::convertEnum( mnType, aIter.toString(), 
aXML_ConnectionKind_EnumMap );
+            (void)SvXMLUnitConverter::convertEnum( mnType, aIter.toView(), 
aXML_ConnectionKind_EnumMap );
             break;
         }
         // #121965# draw:transform may be used in ODF1.2, e.g. exports from MS 
seem to use these
diff --git a/xmloff/source/style/DashStyle.cxx 
b/xmloff/source/style/DashStyle.cxx
index 68aeb7770966..532efb79a9b2 100644
--- a/xmloff/source/style/DashStyle.cxx
+++ b/xmloff/source/style/DashStyle.cxx
@@ -95,7 +95,7 @@ void XMLDashStyleImport::importXML(
         case XML_ELEMENT(DRAW, XML_STYLE):
         case XML_ELEMENT(DRAW_OOO, XML_STYLE):
             {
-                SvXMLUnitConverter::convertEnum( aLineDash.Style, 
aIter.toString(), pXML_DashStyle_Enum );
+                SvXMLUnitConverter::convertEnum( aLineDash.Style, 
aIter.toView(), pXML_DashStyle_Enum );
             }
             break;
         case XML_ELEMENT(DRAW, XML_DOTS1):
diff --git a/xmloff/source/style/GradientStyle.cxx 
b/xmloff/source/style/GradientStyle.cxx
index 47070f0ac67c..69c2cb059eee 100644
--- a/xmloff/source/style/GradientStyle.cxx
+++ b/xmloff/source/style/GradientStyle.cxx
@@ -89,7 +89,7 @@ void XMLGradientStyleImport::importXML(
             aDisplayName = aIter.toString();
             break;
         case XML_ELEMENT(DRAW, XML_STYLE):
-            SvXMLUnitConverter::convertEnum( aGradient.Style, 
aIter.toString(), pXML_GradientStyle_Enum );
+            SvXMLUnitConverter::convertEnum( aGradient.Style, aIter.toView(), 
pXML_GradientStyle_Enum );
             break;
         case XML_ELEMENT(DRAW, XML_CX):
             ::sax::Converter::convertPercent( nTmpValue, aIter.toView() );
diff --git a/xmloff/source/style/HatchStyle.cxx 
b/xmloff/source/style/HatchStyle.cxx
index 59d79a838551..875ff203d0ce 100644
--- a/xmloff/source/style/HatchStyle.cxx
+++ b/xmloff/source/style/HatchStyle.cxx
@@ -87,7 +87,7 @@ void XMLHatchStyleImport::importXML(
                 break;
             case XML_ELEMENT(DRAW, XML_STYLE):
             case XML_ELEMENT(DRAW_OOO, XML_STYLE):
-                SvXMLUnitConverter::convertEnum( aHatch.Style, 
aIter.toString(), pXML_HatchStyle_Enum );
+                SvXMLUnitConverter::convertEnum( aHatch.Style, aIter.toView(), 
pXML_HatchStyle_Enum );
                 break;
             case XML_ELEMENT(DRAW, XML_COLOR):
             case XML_ELEMENT(DRAW_OOO, XML_COLOR):
diff --git a/xmloff/source/style/TransGradientStyle.cxx 
b/xmloff/source/style/TransGradientStyle.cxx
index f7cbb53a753a..a745440a1197 100644
--- a/xmloff/source/style/TransGradientStyle.cxx
+++ b/xmloff/source/style/TransGradientStyle.cxx
@@ -95,7 +95,7 @@ void XMLTransGradientStyleImport::importXML(
             break;
         case XML_ELEMENT(DRAW, XML_STYLE):
             {
-                SvXMLUnitConverter::convertEnum( aGradient.Style, 
aIter.toString(), pXML_GradientStyle_Enum );
+                SvXMLUnitConverter::convertEnum( aGradient.Style, 
aIter.toView(), pXML_GradientStyle_Enum );
             }
             break;
         case XML_ELEMENT(DRAW, XML_CX):
diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx 
b/xmloff/source/style/XMLBackgroundImageContext.cxx
index 6f44e7a79147..a32bdde772f1 100644
--- a/xmloff/source/style/XMLBackgroundImageContext.cxx
+++ b/xmloff/source/style/XMLBackgroundImageContext.cxx
@@ -145,12 +145,10 @@ void XMLBackgroundImageContext::ProcessAttrs(
 
     for (auto &aIter : sax_fastparser::castToFastAttributeList(xAttrList))
     {
-        const OUString sValue = aIter.toString();
-
         switch( aIter.getToken() )
         {
         case XML_ELEMENT(XLINK, XML_HREF):
-            m_sURL = sValue;
+            m_sURL = aIter.toString();
             if( GraphicLocation_NONE == ePos )
                 ePos = GraphicLocation_TILED;
             break;
@@ -161,6 +159,7 @@ void XMLBackgroundImageContext::ProcessAttrs(
         case XML_ELEMENT(STYLE, XML_POSITION):
             {
                 GraphicLocation eNewPos = GraphicLocation_NONE, eTmp;
+                OUString sValue = aIter.toString();
                 SvXMLTokenEnumerator aTokenEnum( sValue );
                 OUString aToken;
                 bool bHori = false, bVert = false;
@@ -255,7 +254,7 @@ void XMLBackgroundImageContext::ProcessAttrs(
                     { XML_STRETCH,              GraphicLocation_AREA    },
                     { XML_TOKEN_INVALID,        GraphicLocation(0)      }
                 };
-                if( SvXMLUnitConverter::convertEnum( nPos, sValue,
+                if( SvXMLUnitConverter::convertEnum( nPos, aIter.toView(),
                                                 psXML_BrushRepeat ) )
                 {
                     if( GraphicLocation_MIDDLE_MIDDLE != nPos ||
@@ -267,13 +266,13 @@ void XMLBackgroundImageContext::ProcessAttrs(
             }
             break;
         case XML_ELEMENT(STYLE, XML_FILTER_NAME):
-            sFilter = sValue;
+            sFilter = aIter.toString();
             break;
         case XML_ELEMENT(DRAW, XML_OPACITY):
             {
                 sal_Int32 nTmp;
                 // convert from percent and clip
-                if (::sax::Converter::convertPercent( nTmp, sValue ))
+                if (::sax::Converter::convertPercent( nTmp, aIter.toView() ))
                 {
                     if( (nTmp >= 0) && (nTmp <= 100) )
                         nTransparency = static_cast<sal_Int8>( 100-nTmp );
diff --git a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx 
b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
index 879f4d3ffa13..399741023dbc 100644
--- a/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
+++ b/xmloff/source/style/XMLFootnoteSeparatorImport.cxx
@@ -126,7 +126,7 @@ void XMLFootnoteSeparatorImport::startFastElement(
                 };
 
                 SvXMLUnitConverter::convertEnum(
-                            eLineAdjust, aIter.toString(), 
aXML_HorizontalAdjust_Enum);
+                            eLineAdjust, aIter.toView(), 
aXML_HorizontalAdjust_Enum);
                 break;
             }
             case XML_ELEMENT(STYLE, XML_REL_WIDTH ):
@@ -154,7 +154,7 @@ void XMLFootnoteSeparatorImport::startFastElement(
                     { XML_TOKEN_INVALID, 0 }
                 };
 
-                SvXMLUnitConverter::convertEnum(nLineStyle, aIter.toString(), 
aXML_LineStyle_Enum);
+                SvXMLUnitConverter::convertEnum(nLineStyle, aIter.toView(), 
aXML_LineStyle_Enum);
                 break;
             }
             default:
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 10c57aaa04f8..e513e1e34be2 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -759,7 +759,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( 
SvXMLImport& rImport,
                 aLanguageTagODF.maCountry = aIter.toString();
                 break;
             case XML_ELEMENT(NUMBER, XML_STYLE):
-                SvXMLUnitConverter::convertEnum( bLong, aIter.toString(), 
aStyleValueMap );
+                SvXMLUnitConverter::convertEnum( bLong, aIter.toView(), 
aStyleValueMap );
                 break;
             case XML_ELEMENT(NUMBER, XML_TEXTUAL):
                 if (::sax::Converter::convertBool( bAttrBool, aIter.toView() ))
@@ -1168,7 +1168,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( 
SvXMLImport& rImport,
                     bAutoOrder = bAttrBool;
                 break;
             case XML_ELEMENT(NUMBER, XML_FORMAT_SOURCE):
-                SvXMLUnitConverter::convertEnum( bFromSystem, 
aIter.toString(), aFormatSourceMap );
+                SvXMLUnitConverter::convertEnum( bFromSystem, aIter.toView(), 
aFormatSourceMap );
                 break;
             case XML_ELEMENT(NUMBER, XML_TRUNCATE_ON_OVERFLOW):
                 if (::sax::Converter::convertBool( bAttrBool, aIter.toView() ))
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;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to