summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-25 08:14:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-30 12:32:14 +0100
commit8332d6d8200e8ca1f22dd98d9373efd5a431d09c (patch)
treedd45d452202998297b8562743ea6345462304d04 /writerfilter/source/dmapper
parentd05a4cfbdcece491f7385dbeaa7eca03f2fdc1d5 (diff)
loplugin:stringviewparam include comparisons with string literals
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter/source/dmapper')
-rw-r--r--writerfilter/source/dmapper/ConversionHelper.cxx8
-rw-r--r--writerfilter/source/dmapper/ConversionHelper.hxx2
-rw-r--r--writerfilter/source/dmapper/NumberingManager.cxx10
3 files changed, 10 insertions, 10 deletions
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index 26e975bb1342..809e85c90372 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -619,19 +619,19 @@ sal_Int16 ConvertNumberingType(sal_Int32 nFmt)
return nRet;
}
-sal_Int16 ConvertCustomNumberFormat(const OUString& rFormat)
+sal_Int16 ConvertCustomNumberFormat(std::u16string_view rFormat)
{
sal_Int16 nRet = -1;
- if (rFormat == "001, 002, 003, ...")
+ if (rFormat == u"001, 002, 003, ...")
{
nRet = style::NumberingType::ARABIC_ZERO3;
}
- else if (rFormat == "0001, 0002, 0003, ...")
+ else if (rFormat == u"0001, 0002, 0003, ...")
{
nRet = style::NumberingType::ARABIC_ZERO4;
}
- else if (rFormat == "00001, 00002, 00003, ...")
+ else if (rFormat == u"00001, 00002, 00003, ...")
{
nRet = style::NumberingType::ARABIC_ZERO5;
}
diff --git a/writerfilter/source/dmapper/ConversionHelper.hxx b/writerfilter/source/dmapper/ConversionHelper.hxx
index 9f970f668b80..ad0cd615fbec 100644
--- a/writerfilter/source/dmapper/ConversionHelper.hxx
+++ b/writerfilter/source/dmapper/ConversionHelper.hxx
@@ -50,7 +50,7 @@ namespace writerfilter::dmapper::ConversionHelper{
sal_Int16 convertTableJustification( sal_Int32 nIntValue );
css::text::RubyAdjust convertRubyAlign( sal_Int32 nIntValue );
sal_Int16 ConvertNumberingType(sal_Int32 nFmt);
- sal_Int16 ConvertCustomNumberFormat(const OUString& rFormat);
+ sal_Int16 ConvertCustomNumberFormat(std::u16string_view rFormat);
css::util::DateTime ConvertDateStringToDateTime(const OUString& rDateTime);
} // namespace writerfilter::dmapper::ConversionHelper
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index f6e8e454a6a6..ec86b041e216 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -160,15 +160,15 @@ uno::Sequence<beans::PropertyValue> ListLevel::GetProperties(bool bDefaults)
return aLevelProps;
}
-static bool IgnoreForCharStyle(const OUString& aStr, const bool bIsSymbol)
+static bool IgnoreForCharStyle(std::u16string_view aStr, const bool bIsSymbol)
{
//Names found in PropertyIds.cxx, Lines 56-396
- return (aStr=="Adjust" || aStr=="IndentAt" || aStr=="FirstLineIndent"
- || aStr=="FirstLineOffset" || aStr=="LeftMargin"
- || aStr=="CharInteropGrabBag" || aStr=="ParaInteropGrabBag" ||
+ return (aStr==u"Adjust" || aStr==u"IndentAt" || aStr==u"FirstLineIndent"
+ || aStr==u"FirstLineOffset" || aStr==u"LeftMargin"
+ || aStr==u"CharInteropGrabBag" || aStr==u"ParaInteropGrabBag" ||
// We need font names when they are different for the bullet and for the text.
// But leave symbols alone, we only want to keep the font style for letters and numbers.
- (bIsSymbol && aStr=="CharFontName")
+ (bIsSymbol && aStr==u"CharFontName")
);
}
uno::Sequence< beans::PropertyValue > ListLevel::GetCharStyleProperties( )