diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-01-28 20:29:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-29 09:25:12 +0100 |
commit | 1250aecd71fabde4dba990bfceb61bbe8e06b8ea (patch) | |
tree | 3c42ffdf68b7e81aba29228631a8cd34e2f11830 /sc/source/filter/xml/xmlimprt.cxx | |
parent | 4f3987e0b1a995431478769c898b5ef151745254 (diff) |
loplugin:stringviewparam extend to new..
O[U]StringBuffer methods
Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter/xml/xmlimprt.cxx')
-rw-r--r-- | sc/source/filter/xml/xmlimprt.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 1111f2349b99..a3b784f1b419 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -807,7 +807,7 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa SvXMLUnitConverter::convertPropertySet(xProperties, aFilteredProps); } -sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, const OUString& rCurrency) +sal_Int32 ScXMLImport::SetCurrencySymbol(const sal_Int32 nKey, std::u16string_view rCurrency) { uno::Reference <util::XNumberFormatsSupplier> xNumberFormatsSupplier(GetNumberFormatsSupplier()); if (xNumberFormatsSupplier.is()) @@ -913,7 +913,7 @@ bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const OUString void ScXMLImport::SetType(const uno::Reference <beans::XPropertySet>& rProperties, sal_Int32& rNumberFormat, const sal_Int16 nCellType, - const OUString& rCurrency) + std::u16string_view rCurrency) { if (!mbImportStyles) return; @@ -966,7 +966,7 @@ void ScXMLImport::SetType(const uno::Reference <beans::XPropertySet>& rPropertie rProperties->setPropertyValue( gsNumberFormat, uno::makeAny(xNumberFormatTypes->getStandardFormat(nCellType, aLocale)) ); } } - else if (!rCurrency.isEmpty() && !sCurrentCurrency.isEmpty()) + else if (!rCurrency.empty() && !sCurrentCurrency.isEmpty()) { if (sCurrentCurrency != rCurrency) if (!IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency)) @@ -982,7 +982,7 @@ void ScXMLImport::SetType(const uno::Reference <beans::XPropertySet>& rPropertie } else { - if ((nCellType == util::NumberFormat::CURRENCY) && !rCurrency.isEmpty() && !sCurrentCurrency.isEmpty() && + if ((nCellType == util::NumberFormat::CURRENCY) && !rCurrency.empty() && !sCurrentCurrency.isEmpty() && sCurrentCurrency != rCurrency && !IsCurrencySymbol(rNumberFormat, sCurrentCurrency, rCurrency)) rProperties->setPropertyValue( gsNumberFormat, uno::makeAny(SetCurrencySymbol(rNumberFormat, rCurrency))); } |