diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-23 16:07:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-27 14:07:56 +0200 |
commit | c7c6f0af6c836ebe0968967a1e7c8320b0ac17d6 (patch) | |
tree | 4bc5b2fa623b9765b88bbfe7de10a7590c87d5c8 /reportdesign | |
parent | 99482297c7dd497e41fad2e7193759043e305101 (diff) |
loplugin:stringadd convert chained append to +
which can use the more efficient *StringConcat
Also fix a crash in stringview plugin which
started happening while I working on this.
Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/filter/xml/xmlControlProperty.cxx | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx index 1bc323d466c1..4cebfa18a7ea 100644 --- a/reportdesign/source/filter/xml/xmlControlProperty.cxx +++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx @@ -188,9 +188,9 @@ Any OXMLControlProperty::convertString(const css::uno::Type& _rExpectedType, con bool bSuccess = ::sax::Converter::convertBool(bValue, _rReadCharacters); OSL_ENSURE(bSuccess, - OStringBuffer("OXMLControlProperty::convertString: could not convert \""). - append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)). - append("\" into a boolean!").getStr()); + OStringBuffer("OXMLControlProperty::convertString: could not convert \"" + + OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US) + + "\" into a boolean!").getStr()); aReturn <<= bValue; } break; @@ -201,9 +201,9 @@ Any OXMLControlProperty::convertString(const css::uno::Type& _rExpectedType, con bool bSuccess = ::sax::Converter::convertNumber(nValue, _rReadCharacters); OSL_ENSURE(bSuccess, - OStringBuffer("OXMLControlProperty::convertString: could not convert \""). - append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)). - append("\" into an integer!").getStr()); + OStringBuffer("OXMLControlProperty::convertString: could not convert \"" + + OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US) + + "\" into an integer!").getStr()); if (TypeClass_SHORT == _rExpectedType.getTypeClass()) aReturn <<= static_cast<sal_Int16>(nValue); else @@ -221,9 +221,9 @@ Any OXMLControlProperty::convertString(const css::uno::Type& _rExpectedType, con bool bSuccess = ::sax::Converter::convertDouble(nValue, _rReadCharacters); OSL_ENSURE(bSuccess, - OStringBuffer("OXMLControlProperty::convertString: could not convert \""). - append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)). - append("\" into a double!").getStr()); + OStringBuffer("OXMLControlProperty::convertString: could not convert \"" + + OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US) + + "\" into a double!").getStr()); aReturn <<= nValue; } break; @@ -250,9 +250,9 @@ Any OXMLControlProperty::convertString(const css::uno::Type& _rExpectedType, con bool bSuccess = ::sax::Converter::convertDouble(nValue, _rReadCharacters); OSL_ENSURE(bSuccess, - OStringBuffer("OPropertyImport::convertString: could not convert \""). - append(OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US)). - append("\" into a double!").getStr()); + OStringBuffer("OPropertyImport::convertString: could not convert \"" + + OUStringToOString(_rReadCharacters, RTL_TEXTENCODING_ASCII_US) + + "\" into a double!").getStr()); // then convert it into the target type switch (nType) |