summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /xmloff/source
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.cxx2
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx2
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx32
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx10
-rw-r--r--xmloff/source/chart/SchXMLTools.cxx2
-rw-r--r--xmloff/source/chart/SchXMLTools.hxx2
-rw-r--r--xmloff/source/draw/XMLGraphicsDefaultStyle.cxx6
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx4
-rw-r--r--xmloff/source/draw/sdxmlexp_impl.hxx2
-rw-r--r--xmloff/source/draw/ximpstyl.cxx2
-rw-r--r--xmloff/source/forms/formcellbinding.cxx2
-rw-r--r--xmloff/source/style/xmlnumfi.cxx4
-rw-r--r--xmloff/source/style/xmlprmap.cxx4
-rw-r--r--xmloff/source/table/XMLTableExport.cxx2
-rw-r--r--xmloff/source/text/txtexppr.cxx4
-rw-r--r--xmloff/source/text/txtimp.cxx6
-rw-r--r--xmloff/source/text/txtlists.cxx8
17 files changed, 47 insertions, 47 deletions
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index b4a6490e5a8d..d395fbae78f2 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -521,7 +521,7 @@ void SchXMLAxisContext::CreateAxis()
}
m_rbAxisPositionAttributeImported = m_rbAxisPositionAttributeImported || SchXMLTools::getPropertyFromContext(
- "CrossoverPosition", pPropStyleContext, pStylesCtxt ).hasValue();
+ u"CrossoverPosition", pPropStyleContext, pStylesCtxt ).hasValue();
}
}
}
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 4c526f9b8236..af1f9e33bd4b 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2275,7 +2275,7 @@ void disableLinkedNumberFormat(
}
// Entry not found. Insert a new entry for this.
- sal_Int32 nIndex = rMapper->GetEntryIndex(XML_NAMESPACE_CHART, "link-data-style-to-source", 0);
+ sal_Int32 nIndex = rMapper->GetEntryIndex(XML_NAMESPACE_CHART, u"link-data-style-to-source", 0);
XMLPropertyState aState(nIndex);
aState.maValue <<= false;
rPropStates.push_back(aState);
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 521fcb58ce41..d64cb89ec573 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -305,7 +305,7 @@ void SchXMLPlotAreaContext::StartElement( const uno::Reference< xml::sax::XAttri
//lines on/off
//this old property is not supported fully anymore with the new chart, so we need to get the information a little bit different from similar properties
mrSeriesDefaultsAndStyles.maLinesOnProperty = SchXMLTools::getPropertyFromContext(
- "Lines", pPropStyleContext, pStylesCtxt );
+ u"Lines", pPropStyleContext, pStylesCtxt );
//handle automatic position and size
m_aOuterPositioning.readAutomaticPositioningProperties( pPropStyleContext, pStylesCtxt );
@@ -854,9 +854,9 @@ void SchXMLPositionAttributesHelper::readAutomaticPositioningProperties( XMLProp
{
//handle automatic position and size
SchXMLTools::getPropertyFromContext(
- "AutomaticSize", pPropStyleContext, pStylesCtxt ) >>= m_bAutoSize;
+ u"AutomaticSize", pPropStyleContext, pStylesCtxt ) >>= m_bAutoSize;
SchXMLTools::getPropertyFromContext(
- "AutomaticPosition", pPropStyleContext, pStylesCtxt ) >>= m_bAutoPosition;
+ u"AutomaticPosition", pPropStyleContext, pStylesCtxt ) >>= m_bAutoPosition;
}
}
@@ -1097,7 +1097,7 @@ void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, const uno::
XMLPropStyleContext * pSeriesStyleContext =
const_cast< XMLPropStyleContext * >( dynamic_cast< const XMLPropStyleContext * >( pStyle ));
- uno::Any aAny = SchXMLTools::getPropertyFromContext("ErrorBarStyle",
+ uno::Any aAny = SchXMLTools::getPropertyFromContext(u"ErrorBarStyle",
pSeriesStyleContext,pStylesCtxt);
if ( !aAny.hasValue() )
@@ -1107,68 +1107,68 @@ void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, const uno::
aAny >>= aBarStyle;
xBarProp->setPropertyValue("ErrorBarStyle", aAny);
- aAny = SchXMLTools::getPropertyFromContext("ShowPositiveError",
+ aAny = SchXMLTools::getPropertyFromContext(u"ShowPositiveError",
pSeriesStyleContext,pStylesCtxt);
if(aAny.hasValue())
xBarProp->setPropertyValue("ShowPositiveError",aAny);
- aAny = SchXMLTools::getPropertyFromContext("ShowNegativeError",
+ aAny = SchXMLTools::getPropertyFromContext(u"ShowNegativeError",
pSeriesStyleContext,pStylesCtxt);
if(aAny.hasValue())
xBarProp->setPropertyValue("ShowNegativeError",aAny);
- aAny = SchXMLTools::getPropertyFromContext("PositiveError",
+ aAny = SchXMLTools::getPropertyFromContext(u"PositiveError",
pSeriesStyleContext, pStylesCtxt);
if(aAny.hasValue())
xBarProp->setPropertyValue("PositiveError", aAny);
else
{
- aAny = SchXMLTools::getPropertyFromContext("ConstantErrorHigh",
+ aAny = SchXMLTools::getPropertyFromContext(u"ConstantErrorHigh",
pSeriesStyleContext, pStylesCtxt);
if(aAny.hasValue())
xBarProp->setPropertyValue("PositiveError", aAny);
}
- aAny = SchXMLTools::getPropertyFromContext("NegativeError",
+ aAny = SchXMLTools::getPropertyFromContext(u"NegativeError",
pSeriesStyleContext, pStylesCtxt);
if(aAny.hasValue())
xBarProp->setPropertyValue("NegativeError", aAny);
else
{
- aAny = SchXMLTools::getPropertyFromContext("ConstantErrorLow",
+ aAny = SchXMLTools::getPropertyFromContext(u"ConstantErrorLow",
pSeriesStyleContext, pStylesCtxt);
if(aAny.hasValue())
xBarProp->setPropertyValue("NegativeError", aAny);
}
- aAny = SchXMLTools::getPropertyFromContext("ErrorBarRangePositive",
+ aAny = SchXMLTools::getPropertyFromContext(u"ErrorBarRangePositive",
pSeriesStyleContext, pStylesCtxt);
if( aAny.hasValue() )
{
aAny >>= aPosRange;
}
- aAny = SchXMLTools::getPropertyFromContext("ErrorBarRangeNegative",
+ aAny = SchXMLTools::getPropertyFromContext(u"ErrorBarRangeNegative",
pSeriesStyleContext, pStylesCtxt);
if( aAny.hasValue() )
{
aAny >>= aNegRange;
}
- aAny = SchXMLTools::getPropertyFromContext("Weight",
+ aAny = SchXMLTools::getPropertyFromContext(u"Weight",
pSeriesStyleContext, pStylesCtxt);
if( aAny.hasValue() )
{
xBarProp->setPropertyValue("Weight", aAny);
}
- aAny = SchXMLTools::getPropertyFromContext("PercentageError",
+ aAny = SchXMLTools::getPropertyFromContext(u"PercentageError",
pSeriesStyleContext, pStylesCtxt);
if( aAny.hasValue() && aBarStyle == css::chart::ErrorBarStyle::RELATIVE )
{
@@ -1180,12 +1180,12 @@ void SetErrorBarPropertiesFromStyleName( const OUString& aStyleName, const uno::
{
case css::chart::ErrorBarStyle::ERROR_MARGIN:
{
- aAny = SchXMLTools::getPropertyFromContext("NegativeError",
+ aAny = SchXMLTools::getPropertyFromContext(u"NegativeError",
pSeriesStyleContext,pStylesCtxt);
xBarProp->setPropertyValue("NegativeError",aAny);
- aAny = SchXMLTools::getPropertyFromContext("PositiveError",
+ aAny = SchXMLTools::getPropertyFromContext(u"PositiveError",
pSeriesStyleContext,pStylesCtxt);
xBarProp->setPropertyValue("PositiveError",aAny);
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index 992a03d64113..939e2c3ae29c 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -165,7 +165,7 @@ void lcl_setSymbolSizeIfNeeded( const uno::Reference< beans::XPropertySet >& xSe
void lcl_resetSymbolSizeForPointsIfNecessary( const uno::Reference< beans::XPropertySet >& xPointProp, const SvXMLImport& rImport
, const XMLPropStyleContext * pPropStyleContext, const SvXMLStylesContext* pStylesCtxt )
{
- uno::Any aASymbolSize( SchXMLTools::getPropertyFromContext( "SymbolSize", pPropStyleContext, pStylesCtxt ) );
+ uno::Any aASymbolSize( SchXMLTools::getPropertyFromContext( u"SymbolSize", pPropStyleContext, pStylesCtxt ) );
if( !aASymbolSize.hasValue() )
lcl_setSymbolSizeIfNeeded( xPointProp, rImport );
}
@@ -173,7 +173,7 @@ void lcl_resetSymbolSizeForPointsIfNecessary( const uno::Reference< beans::XProp
void lcl_setLinkNumberFormatToSourceIfNeeded( const uno::Reference< beans::XPropertySet >& xPointProp
, const XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt )
{
- uno::Any aAny( SchXMLTools::getPropertyFromContext("LinkNumberFormatToSource", pPropStyleContext, pStylesCtxt) );
+ uno::Any aAny( SchXMLTools::getPropertyFromContext(u"LinkNumberFormatToSource", pPropStyleContext, pStylesCtxt) );
if( aAny.hasValue() )
return;
@@ -519,7 +519,7 @@ void SchXMLSeries2Context::StartElement( const uno::Reference< xml::sax::XAttrib
const XMLPropStyleContext* pPropStyleContext = dynamic_cast< const XMLPropStyleContext * >( pStyle );
- uno::Any aASymbolSize( SchXMLTools::getPropertyFromContext( "SymbolSize"
+ uno::Any aASymbolSize( SchXMLTools::getPropertyFromContext( u"SymbolSize"
, pPropStyleContext, pStylesCtxt ) );
mbSymbolSizeIsMissingInFile = !aASymbolSize.hasValue();
}
@@ -981,7 +981,7 @@ void SchXMLSeries2Context::setStylesToRegressionCurves(
if( pCurrent )
{
pPropStyleContext = pCurrent;
- uno::Any aAny = SchXMLTools::getPropertyFromContext("RegressionType", pPropStyleContext, pStylesCtxt);
+ uno::Any aAny = SchXMLTools::getPropertyFromContext(u"RegressionType", pPropStyleContext, pStylesCtxt);
if ( aAny.hasValue() )
{
aAny >>= aServiceName;
@@ -995,7 +995,7 @@ void SchXMLSeries2Context::setStylesToRegressionCurves(
if( pCurrent )
{
pPropStyleContext = pCurrent;
- uno::Any aAny = SchXMLTools::getPropertyFromContext("RegressionType", pPropStyleContext, pStylesCtxt);
+ uno::Any aAny = SchXMLTools::getPropertyFromContext(u"RegressionType", pPropStyleContext, pStylesCtxt);
if ( aAny.hasValue() )
{
aAny >>= aServiceName;
diff --git a/xmloff/source/chart/SchXMLTools.cxx b/xmloff/source/chart/SchXMLTools.cxx
index 6ac7475a1afd..4c2a94c2292b 100644
--- a/xmloff/source/chart/SchXMLTools.cxx
+++ b/xmloff/source/chart/SchXMLTools.cxx
@@ -524,7 +524,7 @@ void CreateCategories(
}
}
-uno::Any getPropertyFromContext( const OUString& rPropertyName, const XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt )
+uno::Any getPropertyFromContext( std::u16string_view rPropertyName, const XMLPropStyleContext* pPropStyleContext, const SvXMLStylesContext* pStylesCtxt )
{
uno::Any aRet;
if( !pPropStyleContext || !pStylesCtxt )
diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx
index f57b41713ae1..f734faebaded 100644
--- a/xmloff/source/chart/SchXMLTools.hxx
+++ b/xmloff/source/chart/SchXMLTools.hxx
@@ -96,7 +96,7 @@ namespace SchXMLTools
sal_Int32 nDimensionIndex,
tSchXMLLSequencesPerIndex * pLSequencesPerIndex = nullptr );
- css::uno::Any getPropertyFromContext( const OUString& rPropertyName, const XMLPropStyleContext * pPropStyleContext, const SvXMLStylesContext* pStylesCtxt );
+ css::uno::Any getPropertyFromContext( std::u16string_view rPropertyName, const XMLPropStyleContext * pPropStyleContext, const SvXMLStylesContext* pStylesCtxt );
void exportText( SvXMLExport& rExport, const OUString& rText, bool bConvertTabsLFs );
diff --git a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
index 8795e0a7a645..c6c07e27ebcc 100644
--- a/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
+++ b/xmloff/source/draw/XMLGraphicsDefaultStyle.cxx
@@ -156,7 +156,7 @@ void XMLGraphicsDefaultStyle::SetDefaults()
GetStyles()->GetImportPropertyMapper(GetFamily())
->getPropertySetMapper());
sal_Int32 const nStrokeIndex(
- pImpPrMap->GetEntryIndex(XML_NAMESPACE_SVG, "stroke-color", 0));
+ pImpPrMap->GetEntryIndex(XML_NAMESPACE_SVG, u"stroke-color", 0));
if (std::none_of(GetProperties().begin(), GetProperties().end(),
XMLPropertyByIndex(nStrokeIndex)))
{
@@ -167,7 +167,7 @@ void XMLGraphicsDefaultStyle::SetDefaults()
Color const nFillColor( bIsAOO4
? Color(0xCF, 0xE7, 0xF5) : Color(153, 204, 255));
sal_Int32 const nFillIndex(
- pImpPrMap->GetEntryIndex(XML_NAMESPACE_DRAW, "fill-color", 0));
+ pImpPrMap->GetEntryIndex(XML_NAMESPACE_DRAW, u"fill-color", 0));
if (std::none_of(GetProperties().begin(), GetProperties().end(),
XMLPropertyByIndex(nFillIndex)))
{
@@ -176,7 +176,7 @@ void XMLGraphicsDefaultStyle::SetDefaults()
if (xInfo->hasPropertyByName("FillColor2"))
{
sal_Int32 const nFill2Index(pImpPrMap->GetEntryIndex(
- XML_NAMESPACE_DRAW, "secondary-fill-color", 0));
+ XML_NAMESPACE_DRAW, u"secondary-fill-color", 0));
if (std::none_of(GetProperties().begin(), GetProperties().end(),
XMLPropertyByIndex(nFill2Index)))
{
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index f7c4410659ed..c7a6b44401aa 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -1271,9 +1271,9 @@ void SdXMLExport::ImpWritePageMasterInfos()
}
}
-ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetPageMasterInfoByName(const OUString& rName)
+ImpXMLEXPPageMasterInfo* SdXMLExport::ImpGetPageMasterInfoByName(std::u16string_view rName)
{
- if(!rName.isEmpty())
+ if(!rName.empty())
{
for(const auto & pInfo : mvPageMasterInfoList)
{
diff --git a/xmloff/source/draw/sdxmlexp_impl.hxx b/xmloff/source/draw/sdxmlexp_impl.hxx
index c2c3f7a16c14..c350bf701e5a 100644
--- a/xmloff/source/draw/sdxmlexp_impl.hxx
+++ b/xmloff/source/draw/sdxmlexp_impl.hxx
@@ -122,7 +122,7 @@ class SdXMLExport : public SvXMLExport
void ImpWritePageMasterInfos();
void ImpPrepAutoLayoutInfos();
HeaderFooterPageSettingsImpl ImpPrepDrawPageHeaderFooterDecls( const css::uno::Reference< css::drawing::XDrawPage >& xDrawPage );
- ImpXMLEXPPageMasterInfo* ImpGetPageMasterInfoByName(const OUString& rName);
+ ImpXMLEXPPageMasterInfo* ImpGetPageMasterInfoByName(std::u16string_view rName);
void ImpPrepDrawPageInfos();
void ImpPrepMasterPageInfos();
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index 9e4fc706fe96..8cf89f450484 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -1102,7 +1102,7 @@ static bool canSkipReset(const OUString &rName, const XMLPropStyleContext* pProp
bool bOldStyleTextAutoGrowHeight(false);
rPropSet->getPropertyValue("TextAutoGrowHeight") >>= bOldStyleTextAutoGrowHeight;
- sal_Int32 nIndexStyle = rPrMap->GetEntryIndex(XML_NAMESPACE_DRAW, "auto-grow-height", 0);
+ sal_Int32 nIndexStyle = rPrMap->GetEntryIndex(XML_NAMESPACE_DRAW, u"auto-grow-height", 0);
if (nIndexStyle != -1)
{
const ::std::vector< XMLPropertyState > &rProperties = pPropStyle->GetProperties();
diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx
index a32239ee551b..f27891c033a7 100644
--- a/xmloff/source/forms/formcellbinding.cxx
+++ b/xmloff/source/forms/formcellbinding.cxx
@@ -83,7 +83,7 @@ namespace
public:
explicit StringCompare( const OUString& _rReference ) : m_sReference( _rReference ) { }
- bool operator()( const OUString& _rCompare )
+ bool operator()( std::u16string_view _rCompare )
{
return ( _rCompare == m_sReference );
}
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index a7f9f1822cca..85c967eea110 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -77,7 +77,7 @@ public:
SvNumberFormatter* GetNumberFormatter() const { return pFormatter; }
const LocaleDataWrapper& GetLocaleData( LanguageType nLang );
- sal_uInt32 GetKeyForName( const OUString& rName );
+ sal_uInt32 GetKeyForName( std::u16string_view rName );
void AddKey( sal_uInt32 nKey, const OUString& rName, bool bRemoveAfterUse );
void SetUsed( sal_uInt32 nKey );
void RemoveVolatileFormats();
@@ -292,7 +292,7 @@ SvXMLNumImpData::SvXMLNumImpData(
SAL_WARN_IF( !rxContext.is(), "xmloff", "got no service manager" );
}
-sal_uInt32 SvXMLNumImpData::GetKeyForName( const OUString& rName )
+sal_uInt32 SvXMLNumImpData::GetKeyForName( std::u16string_view rName )
{
for (const auto& rObj : m_NameEntries)
{
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index 7d81ad0f3456..e6f8cd29ba4c 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -246,7 +246,7 @@ bool XMLPropertySetMapper::importXML(
// If there is no matching entry the method returns -1
sal_Int32 XMLPropertySetMapper::GetEntryIndex(
sal_uInt16 nNamespace,
- const OUString& rStrName,
+ std::u16string_view rStrName,
sal_uInt32 nPropType,
sal_Int32 nStartAt /* = -1 */ ) const
{
@@ -306,7 +306,7 @@ sal_Int32 XMLPropertySetMapper::GetEntryIndex(
sal_Int32 XMLPropertySetMapper::FindEntryIndex(
const char* sApiName,
sal_uInt16 nNameSpace,
- const OUString& sXMLName ) const
+ std::u16string_view sXMLName ) const
{
sal_Int32 nIndex = 0;
sal_Int32 nEntries = GetEntryCount();
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 194f8e7121a1..a238bace6af5 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -417,7 +417,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
// ODF export for a table cell.
- void XMLTableExport::ExportCell( const Reference < XCell >& xCell, const std::shared_ptr< XMLTableInfo >& rTableInfo, const OUString& rDefaultCellStyle )
+ void XMLTableExport::ExportCell( const Reference < XCell >& xCell, const std::shared_ptr< XMLTableInfo >& rTableInfo, std::u16string_view rDefaultCellStyle )
{
bool bIsMerged = false;
sal_Int32 nRowSpan = 0;
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index a381394cbb42..65cdf59b74ee 100644
--- a/xmloff/source/text/txtexppr.cxx
+++ b/xmloff/source/text/txtexppr.cxx
@@ -349,7 +349,7 @@ void XMLTextExportPropertySetMapper::ContextFontHeightFilter(
namespace {
// helper method; implementation below
-bool lcl_IsOutlineStyle(const SvXMLExport&, const OUString&);
+bool lcl_IsOutlineStyle(const SvXMLExport&, std::u16string_view);
void
lcl_checkMultiProperty(XMLPropertyState *const pState,
@@ -1173,7 +1173,7 @@ void XMLTextExportPropertySetMapper::ContextFilter(
namespace {
-bool lcl_IsOutlineStyle(const SvXMLExport &rExport, const OUString & rName)
+bool lcl_IsOutlineStyle(const SvXMLExport &rExport, std::u16string_view rName)
{
Reference< XChapterNumberingSupplier >
xCNSupplier(rExport.GetModel(), UNO_QUERY);
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 2edf2d8f3f37..e5942678447c 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1280,7 +1280,7 @@ static bool lcl_HasListStyle( const OUString& sStyleName,
const Reference < XNameContainer >& xParaStyles,
SvXMLImport const & rImport,
const OUString& sNumberingStyleName,
- const OUString& sOutlineStyleName )
+ std::u16string_view sOutlineStyleName )
{
bool bRet( false );
@@ -1818,8 +1818,8 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
{
if ( !lcl_HasListStyle( sStyleName,
m_xImpl->m_xParaStyles, GetXMLImport(),
- "NumberingStyleName",
- "" ) )
+ u"NumberingStyleName",
+ u"" ) )
{
// heading not in a list --> apply outline style
xPropSet->setPropertyValue( s_NumberingRules,
diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx
index af53ad308d2f..b00852ce44be 100644
--- a/xmloff/source/text/txtlists.cxx
+++ b/xmloff/source/text/txtlists.cxx
@@ -299,7 +299,7 @@ void XMLTextListsHelper::PopListFromStack()
}
}
-bool XMLTextListsHelper::EqualsToTopListStyleOnStack( const OUString& sListId ) const
+bool XMLTextListsHelper::EqualsToTopListStyleOnStack( std::u16string_view sListId ) const
{
return mpListStack && sListId == mpListStack->back().second;
}
@@ -307,12 +307,12 @@ bool XMLTextListsHelper::EqualsToTopListStyleOnStack( const OUString& sListId )
OUString
XMLTextListsHelper::GetNumberedParagraphListId(
const sal_uInt16 i_Level,
- const OUString& i_StyleName)
+ std::u16string_view i_StyleName)
{
- if (i_StyleName.isEmpty()) {
+ if (i_StyleName.empty()) {
SAL_INFO("xmloff.text", "invalid numbered-paragraph: no style-name");
}
- if (!i_StyleName.isEmpty()
+ if (!i_StyleName.empty()
&& (i_Level < mLastNumberedParagraphs.size())
&& (mLastNumberedParagraphs[i_Level].first == i_StyleName) )
{