summaryrefslogtreecommitdiff
path: root/sc/source/filter/xml
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-19 10:30:24 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-20 09:45:32 +0200
commitda3a91e89f803d1c42b764c90071b30b547e686b (patch)
treeb24e375196cafa667c9cf12a31b53b368886d8c3 /sc/source/filter/xml
parent02411752218670d89726a06f746c2b622ed4efc6 (diff)
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: sc
Change-Id: Ieed908bfa2cb6370ead922dfc00dbdb4f905f3cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158216 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/source/filter/xml')
-rw-r--r--sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx2
-rw-r--r--sc/source/filter/xml/XMLCodeNameProvider.cxx4
-rw-r--r--sc/source/filter/xml/XMLExportDatabaseRanges.cxx2
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx8
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx4
6 files changed, 11 insertions, 11 deletions
diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
index efe429b49faa..076ceda030f9 100644
--- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx
@@ -28,7 +28,7 @@
#include <sax/tools/converter.hxx>
#include <utility>
-constexpr OStringLiteral SC_CHANGE_ID_PREFIX = "ct";
+constexpr OString SC_CHANGE_ID_PREFIX = "ct"_ostr;
ScMyCellInfo::ScMyCellInfo(
ScCellValue aCell, OUString aFormulaAddress, OUString aFormula,
diff --git a/sc/source/filter/xml/XMLCodeNameProvider.cxx b/sc/source/filter/xml/XMLCodeNameProvider.cxx
index 063729d5c2f8..347f21d0f850 100644
--- a/sc/source/filter/xml/XMLCodeNameProvider.cxx
+++ b/sc/source/filter/xml/XMLCodeNameProvider.cxx
@@ -48,8 +48,8 @@ bool XMLCodeNameProvider::_getCodeName( const uno::Any& aAny, OUString& rCodeNam
return false;
}
-constexpr OUStringLiteral gsDocName( u"*doc*" );
-constexpr OUStringLiteral gsCodeNameProp( u"CodeName" );
+constexpr OUString gsDocName( u"*doc*"_ustr );
+constexpr OUString gsCodeNameProp( u"CodeName"_ustr );
XMLCodeNameProvider::XMLCodeNameProvider( ScDocument* pDoc ) :
mpDoc( pDoc )
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index 61c01d236bfa..6905e02d651b 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -50,7 +50,7 @@
#include <map>
//! not found in unonames.hxx
-constexpr OUStringLiteral SC_USERLIST = u"UserList";
+constexpr OUString SC_USERLIST = u"UserList"_ustr;
using namespace com::sun::star;
using namespace xmloff::token;
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index a100c61e5c8d..0708bfd6c25d 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -384,7 +384,7 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
// and the property name is "MacroName".
bool bScriptURL = SfxApplication::IsXScriptURL( rValidation.sErrorTitle );
- static constexpr OUStringLiteral sScript(u"Script");
+ static constexpr OUString sScript(u"Script"_ustr);
uno::Sequence<beans::PropertyValue> aSeq( comphelper::InitPropertySequence({
{ "EventType", uno::Any(bScriptURL ? sScript : OUString("StarBasic")) },
{ "Library", uno::Any(OUString()) },
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 9acae7b1ec0d..e1d1b7bc0f79 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -167,7 +167,7 @@ namespace com::sun::star::uno { class XComponentContext; }
//! not found in unonames.hxx
-constexpr OUStringLiteral SC_LAYERID = u"LayerID";
+constexpr OUString SC_LAYERID = u"LayerID"_ustr;
#define SC_VIEWCHANGES_COUNT 13
#define SC_SHOW_CHANGES 0
@@ -895,7 +895,7 @@ void ScXMLExport::ExportExternalRefCacheStyles()
// Export each unique number format used in the external ref cache.
vector<sal_uInt32> aNumFmts;
pRefMgr->getAllCachedNumberFormats(aNumFmts);
- static constexpr OUStringLiteral aDefaultStyle(u"Default");
+ static constexpr OUString aDefaultStyle(u"Default"_ustr);
for (const auto& rNumFmt : aNumFmts)
{
sal_Int32 nNumFmt = static_cast<sal_Int32>(rNumFmt);
@@ -905,7 +905,7 @@ void ScXMLExport::ExportExternalRefCacheStyles()
uno::Any aVal;
aVal <<= nNumFmt;
vector<XMLPropertyState> aProps;
- aVal <<= OUString(aDefaultStyle);
+ aVal <<= aDefaultStyle;
aProps.emplace_back(nEntryIndex, aVal);
OUString aName;
@@ -1828,7 +1828,7 @@ void ScXMLExport::CopySourceStream( sal_Int64 nStartOffset, sal_Int64 nEndOffset
if ( getExportFlags() & SvXMLExportFlags::PRETTY )
{
- static constexpr OStringLiteral aOutStr("\n ");
+ static constexpr OString aOutStr("\n "_ostr);
uno::Sequence<sal_Int8> aOutSeq( reinterpret_cast<sal_Int8 const *>(aOutStr.getStr()), aOutStr.getLength() );
xDestStream->writeBytes( aOutSeq );
}
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index b440d5ca0392..db113a47b4b1 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -101,7 +101,7 @@
#include <memory>
#include <utility>
-constexpr OUStringLiteral SC_LOCALE = u"Locale";
+constexpr OUString SC_LOCALE = u"Locale"_ustr;
constexpr OUStringLiteral SC_CURRENCYSYMBOL = u"CurrencySymbol";
constexpr OUStringLiteral SC_REPEAT_ROW = u"repeat-row";
constexpr OUStringLiteral SC_FILTER = u"filter";
@@ -1171,7 +1171,7 @@ void SAL_CALL ScXMLImport::startDocument()
xImportInfo.is() ? xImportInfo->getPropertySetInfo() : nullptr);
if (xPropertySetInfo.is())
{
- static constexpr OUStringLiteral sOrganizerMode(u"OrganizerMode");
+ static constexpr OUString sOrganizerMode(u"OrganizerMode"_ustr);
if (xPropertySetInfo->hasPropertyByName(sOrganizerMode))
{
bool bStyleOnly(false);