[Libreoffice-commits] core.git: include/xmloff sc/source xmloff/inc xmloff/source

Noel (via logerrit) logerrit at kemper.freedesktop.org
Fri Dec 18 08:30:28 UTC 2020


 include/xmloff/families.hxx                      |   10 ++++----
 include/xmloff/xmlstyle.hxx                      |    2 -
 include/xmloff/xmltoken.hxx                      |    2 -
 include/xmloff/xmluconv.hxx                      |    2 -
 sc/source/filter/xml/XMLConverter.cxx            |   12 ++++-----
 sc/source/filter/xml/XMLConverter.hxx            |   12 ++++-----
 sc/source/filter/xml/xmlfilti.cxx                |   28 +++++++++++------------
 sc/source/filter/xml/xmlfilti.hxx                |    4 +--
 sc/source/filter/xml/xmlsorti.cxx                |    2 -
 sc/source/filter/xml/xmlsorti.hxx                |    2 -
 xmloff/inc/XMLNumberStylesImport.hxx             |    2 -
 xmloff/source/chart/SchXMLTools.cxx              |    2 -
 xmloff/source/chart/SchXMLTools.hxx              |    2 -
 xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx |    2 -
 xmloff/source/core/xmltoken.cxx                  |    9 ++++---
 xmloff/source/core/xmluconv.cxx                  |    2 -
 xmloff/source/draw/XMLNumberStyles.cxx           |    2 -
 xmloff/source/style/PageMasterPropHdl.cxx        |    2 -
 xmloff/source/style/xmlstyle.cxx                 |    2 -
 xmloff/source/transform/FrameOASISTContext.cxx   |    2 -
 xmloff/source/transform/FrameOASISTContext.hxx   |    2 -
 xmloff/source/transform/StyleOASISTContext.cxx   |    4 +--
 22 files changed, 56 insertions(+), 53 deletions(-)

New commits:
commit 8e6ec5ebcc523a189238a90fd9237872d67085f9
Author:     Noel <noel.grandin at collabora.co.uk>
AuthorDate: Fri Dec 18 08:57:20 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Dec 18 09:29:49 2020 +0100

    use more string_view in IsXMLToken
    
    Change-Id: Ib84e2e7db4b4e6e2486dd024d60057d9d42ff4b0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107932
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/xmloff/families.hxx b/include/xmloff/families.hxx
index 253472220168..58143393bc9d 100644
--- a/include/xmloff/families.hxx
+++ b/include/xmloff/families.hxx
@@ -33,14 +33,14 @@
 #define XML_STYLE_FAMILY_TABLE_ROW_STYLES_PREFIX    "ro"
 #define XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME "table-cell"
 #define XML_STYLE_FAMILY_TABLE_CELL_STYLES_PREFIX   "ce"
-#define XML_STYLE_FAMILY_SD_GRAPHICS_NAME       "graphic"
+#define XML_STYLE_FAMILY_SD_GRAPHICS_NAME       u"graphic"
 #define XML_STYLE_FAMILY_SD_GRAPHICS_PREFIX     "gr"
-#define XML_STYLE_FAMILY_SD_PRESENTATION_NAME   "presentation"
+#define XML_STYLE_FAMILY_SD_PRESENTATION_NAME   u"presentation"
 #define XML_STYLE_FAMILY_SD_PRESENTATION_PREFIX "pr"
-#define XML_STYLE_FAMILY_SD_POOL_NAME           "default"
-#define XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME    "drawing-page"
+#define XML_STYLE_FAMILY_SD_POOL_NAME           u"default"
+#define XML_STYLE_FAMILY_SD_DRAWINGPAGE_NAME    u"drawing-page"
 #define XML_STYLE_FAMILY_SD_DRAWINGPAGE_PREFIX  "dp"
-#define XML_STYLE_FAMILY_SCH_CHART_NAME         "chart"
+#define XML_STYLE_FAMILY_SCH_CHART_NAME         u"chart"
 #define XML_STYLE_FAMILY_SCH_CHART_PREFIX       "ch"
 #define XML_STYLE_FAMILY_CONTROL_PREFIX         "ctrl"
 
diff --git a/include/xmloff/xmlstyle.hxx b/include/xmloff/xmlstyle.hxx
index d0b820258ba4..184fd19eb379 100644
--- a/include/xmloff/xmlstyle.hxx
+++ b/include/xmloff/xmlstyle.hxx
@@ -178,7 +178,7 @@ public:
                                       XmlStyleFamily nFamily,
                                       const OUString& rName,
                                       bool bCreateIndex = false ) const;
-    static XmlStyleFamily GetFamily( const OUString& rFamily );
+    static XmlStyleFamily GetFamily( std::u16string_view rFamily );
     virtual rtl::Reference < SvXMLImportPropertyMapper > GetImportPropertyMapper(
                         XmlStyleFamily nFamily ) const;
 
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 0a8a12381240..19978788ec5f 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -3407,7 +3407,7 @@ namespace xmloff::token {
 
     /// compare eToken to the string
     XMLOFF_DLLPUBLIC bool IsXMLToken(
-        const OUString& rString,
+        std::u16string_view rString,
         enum XMLTokenEnum eToken );
 
     /// compare eToken to the string
diff --git a/include/xmloff/xmluconv.hxx b/include/xmloff/xmluconv.hxx
index daca3b617f7f..6c391d74fe7f 100644
--- a/include/xmloff/xmluconv.hxx
+++ b/include/xmloff/xmluconv.hxx
@@ -265,7 +265,7 @@ public:
     /** convert num-format and num-letter-sync values to NumberingType */
     bool convertNumFormat( sal_Int16& rType,
                            const OUString& rNumFormat,
-                           const OUString& rNumLetterSync,
+                           std::u16string_view rNumLetterSync,
                            bool bNumberNone = false ) const;
 
     /** convert NumberingType to num-format and num-letter-sync values */
diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx
index 004479c7a2c6..02d4eca32f24 100644
--- a/sc/source/filter/xml/XMLConverter.cxx
+++ b/sc/source/filter/xml/XMLConverter.cxx
@@ -41,7 +41,7 @@ ScDocument* ScXMLConverter::GetScDocument( const uno::Reference< frame::XModel >
     return nullptr;
 }
 
-sheet::GeneralFunction ScXMLConverter::GetFunctionFromString( const OUString& sFunction )
+sheet::GeneralFunction ScXMLConverter::GetFunctionFromString( std::u16string_view sFunction )
 {
     if( IsXMLToken(sFunction, XML_SUM ) )
         return sheet::GeneralFunction_SUM;
@@ -70,7 +70,7 @@ sheet::GeneralFunction ScXMLConverter::GetFunctionFromString( const OUString& sF
     return sheet::GeneralFunction_NONE;
 }
 
-ScGeneralFunction ScXMLConverter::GetFunctionFromString2( const OUString& sFunction )
+ScGeneralFunction ScXMLConverter::GetFunctionFromString2( std::u16string_view sFunction )
 {
     if( IsXMLToken(sFunction, XML_SUM ) )
         return ScGeneralFunction::SUM;
@@ -101,7 +101,7 @@ ScGeneralFunction ScXMLConverter::GetFunctionFromString2( const OUString& sFunct
     return ScGeneralFunction::NONE;
 }
 
-ScSubTotalFunc ScXMLConverter::GetSubTotalFuncFromString( const OUString& sFunction )
+ScSubTotalFunc ScXMLConverter::GetSubTotalFuncFromString( std::u16string_view sFunction )
 {
     if( IsXMLToken(sFunction, XML_SUM ) )
         return SUBTOTAL_FUNC_SUM;
@@ -187,7 +187,7 @@ void ScXMLConverter::GetStringFromFunction(
 }
 
 sheet::DataPilotFieldOrientation ScXMLConverter::GetOrientationFromString(
-    const OUString& rString )
+    std::u16string_view rString )
 {
     if( IsXMLToken(rString, XML_COLUMN ) )
         return sheet::DataPilotFieldOrientation_COLUMN;
@@ -230,7 +230,7 @@ void ScXMLConverter::GetStringFromOrientation(
     ScRangeStringConverter::AssignString( rString, sOrientStr, false );
 }
 
-ScDetectiveObjType ScXMLConverter::GetDetObjTypeFromString( const OUString& rString )
+ScDetectiveObjType ScXMLConverter::GetDetObjTypeFromString( std::u16string_view rString )
 {
     if( IsXMLToken(rString, XML_FROM_SAME_TABLE ) )
         return SC_DETOBJ_ARROW;
@@ -241,7 +241,7 @@ ScDetectiveObjType ScXMLConverter::GetDetObjTypeFromString( const OUString& rStr
     return SC_DETOBJ_NONE;
 }
 
-bool ScXMLConverter::GetDetOpTypeFromString( ScDetOpType& rDetOpType, const OUString& rString )
+bool ScXMLConverter::GetDetOpTypeFromString( ScDetOpType& rDetOpType, std::u16string_view rString )
 {
     if( IsXMLToken(rString, XML_TRACE_DEPENDENTS ) )
         rDetOpType = SCDETOP_ADDSUCC;
diff --git a/sc/source/filter/xml/XMLConverter.hxx b/sc/source/filter/xml/XMLConverter.hxx
index 2f8c08383353..8e149485f83d 100644
--- a/sc/source/filter/xml/XMLConverter.hxx
+++ b/sc/source/filter/xml/XMLConverter.hxx
@@ -47,13 +47,13 @@ public:
 // IMPORT: GeneralFunction / ScSubTotalFunc
     static css::sheet::GeneralFunction
                         GetFunctionFromString(
-                            const OUString& rString );
+                            std::u16string_view rString );
     static ScGeneralFunction
                         GetFunctionFromString2(
-                            const OUString& rString );
+                            std::u16string_view rString );
 
     static ScSubTotalFunc GetSubTotalFuncFromString(
-                            const OUString& rString );
+                            std::u16string_view rString );
 
 // EXPORT: GeneralFunctio2 / ScSubTotalFunc
     static void         GetStringFromFunction(
@@ -66,7 +66,7 @@ public:
 // IMPORT: DataPilotFieldOrientation
     static css::sheet::DataPilotFieldOrientation
                         GetOrientationFromString(
-                            const OUString& rString );
+                            std::u16string_view rString );
 
 // EXPORT: DataPilotFieldOrientation
     static void         GetStringFromOrientation(
@@ -76,10 +76,10 @@ public:
 // IMPORT: Detective
     static ScDetectiveObjType
                         GetDetObjTypeFromString(
-                            const OUString& rString );
+                            std::u16string_view rString );
     static bool         GetDetOpTypeFromString(
                             ScDetOpType& rDetOpType,
-                            const OUString& rString );
+                            std::u16string_view rString );
 
 // EXPORT: Detective
     static void         GetStringFromDetObjType(
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index 9b811176faaf..5b5708e7a68b 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -347,7 +347,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL ScXMLConditionContext::
 }
 
 void ScXMLConditionContext::GetOperator(
-    const OUString& aOpStr, ScQueryParam& rParam, ScQueryEntry& rEntry)
+    std::u16string_view aOpStr, ScQueryParam& rParam, ScQueryEntry& rEntry)
 {
     rParam.eSearchType = utl::SearchParam::SearchType::Normal;
     if (IsXMLToken(aOpStr, XML_MATCH))
@@ -360,9 +360,9 @@ void ScXMLConditionContext::GetOperator(
         rParam.eSearchType = utl::SearchParam::SearchType::Regexp;
         rEntry.eOp = SC_NOT_EQUAL;
     }
-    else if (aOpStr == "=")
+    else if (aOpStr == u"=")
         rEntry.eOp = SC_EQUAL;
-    else if (aOpStr == "!=")
+    else if (aOpStr == u"!=")
         rEntry.eOp = SC_NOT_EQUAL;
     else if (IsXMLToken(aOpStr, XML_BOTTOM_PERCENT))
         rEntry.eOp = SC_BOTPERC;
@@ -370,13 +370,13 @@ void ScXMLConditionContext::GetOperator(
         rEntry.eOp = SC_BOTVAL;
     else if (IsXMLToken(aOpStr, XML_EMPTY))
         rEntry.SetQueryByEmpty();
-    else if (aOpStr == ">")
+    else if (aOpStr == u">")
         rEntry.eOp = SC_GREATER;
-    else if (aOpStr == ">=")
+    else if (aOpStr == u">=")
         rEntry.eOp = SC_GREATER_EQUAL;
-    else if (aOpStr == "<")
+    else if (aOpStr == u"<")
         rEntry.eOp = SC_LESS;
-    else if (aOpStr == "<=")
+    else if (aOpStr == u"<=")
         rEntry.eOp = SC_LESS_EQUAL;
     else if (IsXMLToken(aOpStr, XML_NOEMPTY))
         rEntry.SetQueryByNonEmpty();
@@ -695,7 +695,7 @@ ScXMLDPConditionContext::~ScXMLDPConditionContext()
 }
 
 void ScXMLDPConditionContext::getOperatorXML(
-    const OUString& sTempOperator, ScQueryOp& aFilterOperator, utl::SearchParam::SearchType& rSearchType)
+    std::u16string_view sTempOperator, ScQueryOp& aFilterOperator, utl::SearchParam::SearchType& rSearchType)
 {
     rSearchType = utl::SearchParam::SearchType::Normal;
     if (IsXMLToken(sTempOperator, XML_MATCH))
@@ -708,21 +708,21 @@ void ScXMLDPConditionContext::getOperatorXML(
         rSearchType = utl::SearchParam::SearchType::Regexp;
         aFilterOperator = SC_NOT_EQUAL;
     }
-    else if (sTempOperator == "=")
+    else if (sTempOperator == u"=")
         aFilterOperator = SC_EQUAL;
-    else if (sTempOperator == "!=")
+    else if (sTempOperator == u"!=")
         aFilterOperator = SC_NOT_EQUAL;
     else if (IsXMLToken(sTempOperator, XML_BOTTOM_PERCENT))
         aFilterOperator = SC_BOTPERC;
     else if (IsXMLToken(sTempOperator, XML_BOTTOM_VALUES))
         aFilterOperator = SC_BOTVAL;
-    else if (sTempOperator == ">")
+    else if (sTempOperator == u">")
         aFilterOperator = SC_GREATER;
-    else if (sTempOperator == ">=")
+    else if (sTempOperator == u">=")
         aFilterOperator = SC_GREATER_EQUAL;
-    else if (sTempOperator == "<")
+    else if (sTempOperator == u"<")
         aFilterOperator = SC_LESS;
-    else if (sTempOperator == "<=")
+    else if (sTempOperator == u"<=")
         aFilterOperator = SC_LESS_EQUAL;
     else if (IsXMLToken(sTempOperator, XML_TOP_PERCENT))
         aFilterOperator = SC_TOPPERC;
diff --git a/sc/source/filter/xml/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx
index 076253b2f117..41a0d103ffc7 100644
--- a/sc/source/filter/xml/xmlfilti.hxx
+++ b/sc/source/filter/xml/xmlfilti.hxx
@@ -133,7 +133,7 @@ public:
 
     virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
 
-    static void GetOperator(const OUString& aOpStr, ScQueryParam& rParam, ScQueryEntry& rEntry);
+    static void GetOperator(std::u16string_view aOpStr, ScQueryParam& rParam, ScQueryEntry& rEntry);
     void AddSetItem(const ScQueryEntry::Item& rItem);
 };
 
@@ -259,7 +259,7 @@ public:
     virtual ~ScXMLDPConditionContext() override;
 
     static void getOperatorXML(
-        const OUString& sTempOperator, ScQueryOp& aFilterOperator, utl::SearchParam::SearchType& rSearchType);
+        std::u16string_view sTempOperator, ScQueryOp& aFilterOperator, utl::SearchParam::SearchType& rSearchType);
     virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
 };
 
diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx
index 0744e3d85997..633966845ef0 100644
--- a/sc/source/filter/xml/xmlsorti.cxx
+++ b/sc/source/filter/xml/xmlsorti.cxx
@@ -162,7 +162,7 @@ void SAL_CALL ScXMLSortContext::endFastElement( sal_Int32 /*nElement*/ )
     pDatabaseRangeContext->SetSortSequence(aSortDescriptor);
 }
 
-void ScXMLSortContext::AddSortField(const OUString& sFieldNumber, const OUString& sDataType, const OUString& sOrder)
+void ScXMLSortContext::AddSortField(const OUString& sFieldNumber, const OUString& sDataType, std::u16string_view sOrder)
 {
     util::SortField aSortField;
     aSortField.Field = sFieldNumber.toInt32();
diff --git a/sc/source/filter/xml/xmlsorti.hxx b/sc/source/filter/xml/xmlsorti.hxx
index 0e20453d5d12..e40bd31eed20 100644
--- a/sc/source/filter/xml/xmlsorti.hxx
+++ b/sc/source/filter/xml/xmlsorti.hxx
@@ -57,7 +57,7 @@ public:
 
     virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
 
-    void AddSortField(const OUString& sFieldNumber, const OUString& sDataType, const OUString& sOrder);
+    void AddSortField(const OUString& sFieldNumber, const OUString& sDataType, std::u16string_view sOrder);
 };
 
 class ScXMLSortByContext : public ScXMLImportContext
diff --git a/xmloff/inc/XMLNumberStylesImport.hxx b/xmloff/inc/XMLNumberStylesImport.hxx
index 88bbdf27892b..092c2410f9cd 100644
--- a/xmloff/inc/XMLNumberStylesImport.hxx
+++ b/xmloff/inc/XMLNumberStylesImport.hxx
@@ -41,7 +41,7 @@ class SdXMLNumberFormatImportContext final : public SvXMLNumFormatContext
 
     bool compareStyle( const SdXMLFixedDataStyle* pStyle, sal_Int16& nIndex ) const;
 
-    void add( OUString const & rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString const & rText );
+    void add( std::u16string_view rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString const & rText );
 
 public:
 
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index f6c8e681a265..4f9a161b3273 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -195,7 +195,7 @@ OUString GetNewChartTypeName( const OUString & rOldChartTypeName )
 }
 
 OUString GetChartTypeByClassName(
-    const OUString & rClassName, bool bUseOldNames )
+    std::u16string_view rClassName, bool bUseOldNames )
 {
     OUStringBuffer aResultBuffer;
     bool bInternalType = false;
diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx
index e2fc6cc9c308..6097707b7f78 100644
--- a/xmloff/source/chart/SchXMLTools.hxx
+++ b/xmloff/source/chart/SchXMLTools.hxx
@@ -70,7 +70,7 @@ namespace SchXMLTools
     SchXMLChartTypeEnum GetChartTypeEnum( std::u16string_view rClassName );
 
     OUString GetChartTypeByClassName(
-        const OUString & rClassName, bool bUseOldNames );
+        std::u16string_view rClassName, bool bUseOldNames );
 
     ::xmloff::token::XMLTokenEnum getTokenByChartType(
         const OUString & rChartTypeService, bool bUseOldNames );
diff --git a/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx b/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx
index 1eb374a41f1a..dd24c134052d 100644
--- a/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx
+++ b/xmloff/source/chart/XMLSymbolTypePropertyHdl.cxx
@@ -84,7 +84,7 @@ bool lcl_convertEnum(
 
 bool lcl_convertEnum(
     sal_Int32 & rEnum,
-    const OUString & rValue,
+    std::u16string_view rValue,
     const SvXMLSignedEnumMapEntry *pMap )
 {
     while( pMap->eToken != XML_TOKEN_INVALID )
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index efcd2d421e1a..cd3a85f469d5 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -3459,14 +3459,16 @@ namespace xmloff::token {
 
     // does rString represent eToken?
     bool IsXMLToken(
-        const OUString& rString,
+        std::u16string_view rString,
         enum XMLTokenEnum eToken )
     {
         assert(XML_TOKEN_INVALID < eToken);
         assert(eToken < XML_TOKEN_END);
 
         const XMLTokenEntry* pToken = &aTokenList[static_cast<sal_uInt16>(eToken)];
-        return rString.equalsAsciiL( pToken->pChar, pToken->nLength );
+        return static_cast<sal_Int32>(rString.size()) == pToken->nLength &&
+               rtl_ustr_asciil_reverseEquals_WithLength(
+                    rString.data(), pToken->pChar, pToken->nLength );
     }
 
     bool IsXMLToken(
@@ -3480,6 +3482,7 @@ namespace xmloff::token {
         return aIter.isString( pToken->pChar );
     }
 
+    // does aStr represent eToken?
     bool IsXMLToken(
         std::string_view aStr,
         enum XMLTokenEnum eToken )
@@ -3488,7 +3491,7 @@ namespace xmloff::token {
         assert(eToken < XML_TOKEN_END);
 
         const XMLTokenEntry* pToken = &aTokenList[static_cast<sal_uInt16>(eToken)];
-        return aStr == pToken->pChar;
+        return aStr == std::string_view(pToken->pChar, pToken->nLength);
     }
 }
 
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index b1143fd38cc1..48c94ed3a3fb 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -666,7 +666,7 @@ void SvXMLUnitConverter::convertPosition3D( OUStringBuffer &rBuffer,
 bool SvXMLUnitConverter::convertNumFormat(
         sal_Int16& rType,
         const OUString& rNumFmt,
-        const OUString& rNumLetterSync,
+        std::u16string_view rNumLetterSync,
         bool bNumberNone ) const
 {
     bool bRet = true;
diff --git a/xmloff/source/draw/XMLNumberStyles.cxx b/xmloff/source/draw/XMLNumberStyles.cxx
index 3d4407d8a5df..33bafa2b4435 100644
--- a/xmloff/source/draw/XMLNumberStyles.cxx
+++ b/xmloff/source/draw/XMLNumberStyles.cxx
@@ -600,7 +600,7 @@ SdXMLNumberFormatImportContext::~SdXMLNumberFormatImportContext()
 {
 }
 
-void SdXMLNumberFormatImportContext::add( OUString const & rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString const & rText )
+void SdXMLNumberFormatImportContext::add( std::u16string_view rNumberStyle, bool bLong, bool bTextual, bool bDecimal02, OUString const & rText )
 {
     if (mnIndex == 16)
         return;
diff --git a/xmloff/source/style/PageMasterPropHdl.cxx b/xmloff/source/style/PageMasterPropHdl.cxx
index ba75c03f20e1..e1a67e6a322e 100644
--- a/xmloff/source/style/PageMasterPropHdl.cxx
+++ b/xmloff/source/style/PageMasterPropHdl.cxx
@@ -117,7 +117,7 @@ bool XMLPMPropHdl_NumFormat::importXML(
 {
     sal_Int16 nSync = sal_Int16();
     sal_Int16 nNumType = NumberingType::NUMBER_NONE;
-    rUnitConverter.convertNumFormat( nNumType, rStrImpValue, OUString(), true );
+    rUnitConverter.convertNumFormat( nNumType, rStrImpValue, u"", true );
 
     if( !(rValue >>= nSync) )
         nSync = NumberingType::NUMBER_NONE;
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 264a57282a8e..ced74c90aab5 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -449,7 +449,7 @@ bool SvXMLStylesContext::InsertStyleFamily( XmlStyleFamily ) const
     return true;
 }
 
-XmlStyleFamily SvXMLStylesContext::GetFamily( const OUString& rValue )
+XmlStyleFamily SvXMLStylesContext::GetFamily( std::u16string_view rValue )
 {
     XmlStyleFamily nFamily = XmlStyleFamily::DATA_STYLE;
     if( IsXMLToken( rValue, XML_PARAGRAPH ) )
diff --git a/xmloff/source/transform/FrameOASISTContext.cxx b/xmloff/source/transform/FrameOASISTContext.cxx
index 7bb1f2793a9b..e2c2295c8cef 100644
--- a/xmloff/source/transform/FrameOASISTContext.cxx
+++ b/xmloff/source/transform/FrameOASISTContext.cxx
@@ -33,7 +33,7 @@ using namespace ::com::sun::star::xml::sax;
 using namespace ::xmloff::token;
 
 bool XMLFrameOASISTransformerContext::IsLinkedEmbeddedObject(
-            const OUString& rLocalName,
+            std::u16string_view rLocalName,
             const Reference< XAttributeList >& rAttrList )
 {
     if( !(IsXMLToken( rLocalName, XML_OBJECT ) ||
diff --git a/xmloff/source/transform/FrameOASISTContext.hxx b/xmloff/source/transform/FrameOASISTContext.hxx
index bdd17957b728..90402edddbe0 100644
--- a/xmloff/source/transform/FrameOASISTContext.hxx
+++ b/xmloff/source/transform/FrameOASISTContext.hxx
@@ -31,7 +31,7 @@ class XMLFrameOASISTransformerContext : public XMLTransformerContext
     bool m_bIgnoreElement;
 
     bool IsLinkedEmbeddedObject(
-        const OUString& rLocalName,
+        std::u16string_view rLocalName,
         const css::uno::Reference< css::xml::sax::XAttributeList >& rAttrList );
 
 public:
diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx
index 2f1b48f24a61..d8afd425d767 100644
--- a/xmloff/source/transform/StyleOASISTContext.cxx
+++ b/xmloff/source/transform/StyleOASISTContext.cxx
@@ -83,7 +83,7 @@ public:
 
     virtual void Export() override;
 
-    static XMLPropType GetPropType( const OUString& rLocalName );
+    static XMLPropType GetPropType( std::u16string_view rLocalName );
 
     static OUString const & MergeUnderline( XMLTokenEnum eUnderline,
                                            bool bBold, bool bDouble );
@@ -598,7 +598,7 @@ void XMLPropertiesTContext_Impl::Export()
     GetTransformer().GetDocHandler()->endElement( GetExportQName() );
 }
 
-XMLPropType XMLPropertiesTContext_Impl::GetPropType( const OUString& rLocalName )
+XMLPropType XMLPropertiesTContext_Impl::GetPropType( std::u16string_view rLocalName )
 {
     XMLPropType eProp = XML_PROP_TYPE_END;
     if( IsXMLToken( rLocalName, XML_GRAPHIC_PROPERTIES )  )


More information about the Libreoffice-commits mailing list