summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-19 10:30:32 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-20 15:28:25 +0200
commita841ac096f2794405408ef64189de2c77971c3e6 (patch)
tree020598516b2e6ba68411b0f6ac958b22160badd0 /sw/source/uibase
parenta98000c028a3c68329fdb2047f51f8d271b2290c (diff)
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: sw
Change-Id: I85fff7ed6932c5fc196e18f24fa01074ba4837e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/applab.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx2
-rw-r--r--sw/source/uibase/config/uinums.cxx2
-rw-r--r--sw/source/uibase/dbui/mmconfigitem.cxx2
-rw-r--r--sw/source/uibase/shells/grfsh.cxx2
-rw-r--r--sw/source/uibase/shells/langhelper.cxx6
-rw-r--r--sw/source/uibase/shells/textsh1.cxx10
-rw-r--r--sw/source/uibase/sidebar/PageMarginControl.cxx10
-rw-r--r--sw/source/uibase/uno/SwXFilterOptions.cxx2
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx2
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx2
11 files changed, 21 insertions, 21 deletions
diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx
index 78436664c3cb..f440fefe86e1 100644
--- a/sw/source/uibase/app/applab.cxx
+++ b/sw/source/uibase/app/applab.cxx
@@ -63,7 +63,7 @@
using namespace ::com::sun::star;
-constexpr OUStringLiteral MASTER_LABEL = u"MasterLabel";
+constexpr OUString MASTER_LABEL = u"MasterLabel"_ustr;
static const SwFrameFormat *lcl_InsertBCText( SwWrtShell& rSh, const SwLabItem& rItem,
SwFrameFormat &rFormat,
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 52f9253252b0..a715bef70da1 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -985,7 +985,7 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit)
{
IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
- static constexpr OUStringLiteral sPlus(u" + ");
+ static constexpr OUString sPlus(u" + "_ustr);
if ( SfxStyleFamily::Page == nFamily )
{
if( !pSet )
diff --git a/sw/source/uibase/config/uinums.cxx b/sw/source/uibase/config/uinums.cxx
index 2659a1bb3b05..99d0ceb8c1e5 100644
--- a/sw/source/uibase/config/uinums.cxx
+++ b/sw/source/uibase/config/uinums.cxx
@@ -33,7 +33,7 @@
using namespace ::com::sun::star;
-constexpr OUStringLiteral CHAPTER_FILENAME = u"chapter.cfg";
+constexpr OUString CHAPTER_FILENAME = u"chapter.cfg"_ustr;
/*
Description: Saving a rule
diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx
index 40c9aac78da1..c8f89a44d4c0 100644
--- a/sw/source/uibase/dbui/mmconfigitem.cxx
+++ b/sw/source/uibase/dbui/mmconfigitem.cxx
@@ -56,7 +56,7 @@ using namespace ::com::sun::star::sdb;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::sdbcx;
-constexpr OUStringLiteral cAddressDataAssignments = u"AddressDataAssignments";
+constexpr OUString cAddressDataAssignments = u"AddressDataAssignments"_ustr;
const char cDBColumnAssignments[] = "DBColumnAssignments";
const char cDataSourceName[] = "DataSource/DataSourceName";
const char cDataTableName[] = "DataSource/DataTableName" ;
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index 2e0791116eb0..bb090fed460d 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -66,7 +66,7 @@
#include <flyfrm.hxx>
#include <memory>
-constexpr OUStringLiteral TOOLBOX_NAME = u"colorbar";
+constexpr OUString TOOLBOX_NAME = u"colorbar"_ustr;
class SwGrfShell::SwExternalToolEdit
: public ExternalToolEdit
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index e97d1bdcbef8..113b9a64c06f 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -121,9 +121,9 @@ namespace SwLangHelper
// setting the new language...
if (!aNewLangText.isEmpty())
{
- static constexpr OUStringLiteral aSelectionLangPrefix(u"Current_");
- static constexpr OUStringLiteral aParagraphLangPrefix(u"Paragraph_");
- static constexpr OUStringLiteral aDocumentLangPrefix(u"Default_");
+ static constexpr OUString aSelectionLangPrefix(u"Current_"_ustr);
+ static constexpr OUString aParagraphLangPrefix(u"Paragraph_"_ustr);
+ static constexpr OUString aDocumentLangPrefix(u"Default_"_ustr);
sal_Int32 nPos = 0;
bool bForSelection = true;
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index e93fa6613309..6bcabdd4292d 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -866,9 +866,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
// setting the new language...
if (!aNewLangText.isEmpty())
{
- static constexpr OUStringLiteral aSelectionLangPrefix(u"Current_");
- static constexpr OUStringLiteral aParagraphLangPrefix(u"Paragraph_");
- static constexpr OUStringLiteral aDocumentLangPrefix(u"Default_");
+ static constexpr OUString aSelectionLangPrefix(u"Current_"_ustr);
+ static constexpr OUString aParagraphLangPrefix(u"Paragraph_"_ustr);
+ static constexpr OUString aDocumentLangPrefix(u"Default_"_ustr);
SfxItemSetFixed
<RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
@@ -2077,8 +2077,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
if (pItem2)
sApplyText = pItem2->GetValue();
- static constexpr OUStringLiteral sSpellingRule(u"Spelling_");
- static constexpr OUStringLiteral sGrammarRule(u"Grammar_");
+ static constexpr OUString sSpellingRule(u"Spelling_"_ustr);
+ static constexpr OUString sGrammarRule(u"Grammar_"_ustr);
bool bGrammar = false;
sal_Int32 nPos = 0;
diff --git a/sw/source/uibase/sidebar/PageMarginControl.cxx b/sw/source/uibase/sidebar/PageMarginControl.cxx
index ffeebc15d140..06e073a75c24 100644
--- a/sw/source/uibase/sidebar/PageMarginControl.cxx
+++ b/sw/source/uibase/sidebar/PageMarginControl.cxx
@@ -43,11 +43,11 @@
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/frame/XFrame.hpp>
-constexpr OUStringLiteral SWPAGE_LEFT_GVALUE = u"Sw_Page_Left";
-constexpr OUStringLiteral SWPAGE_RIGHT_GVALUE = u"Sw_Page_Right";
-constexpr OUStringLiteral SWPAGE_TOP_GVALUE = u"Sw_Page_Top";
-constexpr OUStringLiteral SWPAGE_DOWN_GVALUE = u"Sw_Page_Down";
-constexpr OUStringLiteral SWPAGE_MIRROR_GVALUE = u"Sw_Page_Mirrored";
+constexpr OUString SWPAGE_LEFT_GVALUE = u"Sw_Page_Left"_ustr;
+constexpr OUString SWPAGE_RIGHT_GVALUE = u"Sw_Page_Right"_ustr;
+constexpr OUString SWPAGE_TOP_GVALUE = u"Sw_Page_Top"_ustr;
+constexpr OUString SWPAGE_DOWN_GVALUE = u"Sw_Page_Down"_ustr;
+constexpr OUString SWPAGE_MIRROR_GVALUE = u"Sw_Page_Mirrored"_ustr;
namespace
{
diff --git a/sw/source/uibase/uno/SwXFilterOptions.cxx b/sw/source/uibase/uno/SwXFilterOptions.cxx
index 124b8abf8497..f73a4b0dd023 100644
--- a/sw/source/uibase/uno/SwXFilterOptions.cxx
+++ b/sw/source/uibase/uno/SwXFilterOptions.cxx
@@ -37,7 +37,7 @@ using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::document;
using namespace ::com::sun::star::lang;
-constexpr OUStringLiteral FILTER_OPTIONS_NAME = u"FilterOptions";
+constexpr OUString FILTER_OPTIONS_NAME = u"FilterOptions"_ustr;
SwXFilterOptions::SwXFilterOptions()
{
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index e06c5bbf803b..c940a148afb9 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -718,7 +718,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aURLObj.SetSmartURL( aCurOutputURL );
OUString aPath = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
- static constexpr OUStringLiteral aDelim( u"/" );
+ static constexpr OUString aDelim( u"/"_ustr );
if (!aPath.isEmpty() && !aPath.endsWith(aDelim))
aPath += aDelim;
if (bCurFileNameFromColumn)
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index b84bad1531c9..c1a2ae573e2d 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3455,7 +3455,7 @@ OString SwXTextDocument::getViewRenderState(SfxViewShell* pViewShell)
namespace
{
-inline constexpr OUStringLiteral SELECTED_DATE_FORMAT = u"YYYY-MM-DD";
+inline constexpr OUString SELECTED_DATE_FORMAT = u"YYYY-MM-DD"_ustr;
}
void SwXTextDocument::executeContentControlEvent(const StringMap& rArguments)