summaryrefslogtreecommitdiff
path: root/xmloff/source/draw
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/draw
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/draw')
-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
4 files changed, 7 insertions, 7 deletions
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();