summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-10-19 10:30:09 +0200
committerStephan Bergmann <sbergman@redhat.com>2023-10-19 19:31:54 +0200
commitfa869ef61c790b6407ef6eae3eefc094d13c1361 (patch)
tree30bc5da33abb54a02b12d8182f94150941c119d8 /cui
parent3afe381c840f3c3687800410066d6738191c7480 (diff)
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: cui
Change-Id: I4c06aabb88e15975ae6e1e6b783aa0a9237c1617 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158186 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/acccfg.cxx4
-rw-r--r--cui/source/customize/cfgutil.cxx6
-rw-r--r--cui/source/customize/macropg.cxx2
-rw-r--r--cui/source/dialogs/colorpicker.cxx2
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/dialogs/hlinettp.cxx2
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx6
-rw-r--r--cui/source/dialogs/showcols.cxx2
-rw-r--r--cui/source/options/optasian.cxx4
-rw-r--r--cui/source/options/optgdlg.cxx14
-rw-r--r--cui/source/options/optinet2.cxx16
-rw-r--r--cui/source/options/optlanguagetool.cxx2
-rw-r--r--cui/source/options/optlingu.cxx8
-rw-r--r--cui/source/options/optpath.cxx4
-rw-r--r--cui/source/options/treeopt.cxx2
-rw-r--r--cui/source/tabpages/chardlg.cxx2
16 files changed, 39 insertions, 39 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 54b7eb73c81a..027ac72968e8 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -69,9 +69,9 @@
using namespace css;
-constexpr OUStringLiteral FOLDERNAME_UICONFIG = u"Configurations2";
+constexpr OUString FOLDERNAME_UICONFIG = u"Configurations2"_ustr;
-constexpr OUStringLiteral MEDIATYPE_PROPNAME = u"MediaType";
+constexpr OUString MEDIATYPE_PROPNAME = u"MediaType"_ustr;
const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
KEY_F2,
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 3039486a2f30..3a2cdbc1b05e 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -79,9 +79,9 @@ const char CMDURL_STYLEPROT_ONLY[] = ".uno:StyleApply?";
const char CMDURL_SPART_ONLY [] = "Style:string=";
const char CMDURL_FPART_ONLY [] = "FamilyName:string=";
-constexpr OUStringLiteral STYLEPROP_UINAME = u"DisplayName";
-constexpr OUStringLiteral MACRO_SELECTOR_CONFIGNAME = u"MacroSelectorDialog";
-constexpr OUStringLiteral LAST_RUN_MACRO_INFO = u"LastRunMacro";
+constexpr OUString STYLEPROP_UINAME = u"DisplayName"_ustr;
+constexpr OUString MACRO_SELECTOR_CONFIGNAME = u"MacroSelectorDialog"_ustr;
+constexpr OUString LAST_RUN_MACRO_INFO = u"LastRunMacro"_ustr;
OUString SfxStylesInfo_Impl::generateCommand(
std::u16string_view sFamily, std::u16string_view sStyle)
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index 6a22ee2c3d99..b1a1094733ea 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -38,7 +38,7 @@
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-constexpr OUStringLiteral aVndSunStarUNO = u"vnd.sun.star.UNO:";
+constexpr OUString aVndSunStarUNO = u"vnd.sun.star.UNO:"_ustr;
SvxMacroTabPage_Impl::SvxMacroTabPage_Impl( const SfxItemSet& rAttrSet )
: bReadOnly(false)
diff --git a/cui/source/dialogs/colorpicker.cxx b/cui/source/dialogs/colorpicker.cxx
index 24dda1936a2a..87f50b534c26 100644
--- a/cui/source/dialogs/colorpicker.cxx
+++ b/cui/source/dialogs/colorpicker.cxx
@@ -1266,7 +1266,7 @@ com_sun_star_cui_ColorPicker_get_implementation(
}
-constexpr OUStringLiteral gsColorKey( u"Color" );
+constexpr OUString gsColorKey( u"Color"_ustr );
constexpr OUStringLiteral gsModeKey( u"Mode" );
ColorPicker::ColorPicker()
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 530ef109c216..9a1a2e26a4ed 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -707,7 +707,7 @@ void TPGalleryThemeProperties::FillFilterList()
#if HAVE_FEATURE_AVMEDIA
// media filters
- static constexpr OUStringLiteral aWildcard = u"*.";
+ static constexpr OUString aWildcard = u"*."_ustr;
::avmedia::FilterNameVector aFilters= ::avmedia::MediaWindow::getMediaFilters();
for(const std::pair<OUString,OUString> & aFilter : aFilters)
diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx
index a01673550851..8ffdb2053f5b 100644
--- a/cui/source/dialogs/hlinettp.cxx
+++ b/cui/source/dialogs/hlinettp.cxx
@@ -24,7 +24,7 @@
#include <hlinettp.hxx>
#include <hlmarkwn_def.hxx>
-constexpr OUStringLiteral sAnonymous = u"anonymous";
+constexpr OUString sAnonymous = u"anonymous"_ustr;
/*************************************************************************
|*
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index 96b61a7e2806..7eb2ced02489 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -159,9 +159,9 @@ namespace
}
}
-constexpr OUStringLiteral TG_SETTING_MANAGER = u"TargetInDocument";
-constexpr OUStringLiteral TG_SETTING_LASTMARK = u"LastSelectedMark";
-constexpr OUStringLiteral TG_SETTING_LASTPATH = u"LastSelectedPath";
+constexpr OUString TG_SETTING_MANAGER = u"TargetInDocument"_ustr;
+constexpr OUString TG_SETTING_LASTMARK = u"LastSelectedMark"_ustr;
+constexpr OUString TG_SETTING_LASTPATH = u"LastSelectedPath"_ustr;
void SvxHlinkDlgMarkWnd::RestoreLastSelection()
{
diff --git a/cui/source/dialogs/showcols.cxx b/cui/source/dialogs/showcols.cxx
index ec281b8a3c30..ae468b02009a 100644
--- a/cui/source/dialogs/showcols.cxx
+++ b/cui/source/dialogs/showcols.cxx
@@ -24,7 +24,7 @@
#include <tools/debug.hxx>
#include <comphelper/diagnose_ex.hxx>
-constexpr OUStringLiteral CUIFM_PROP_HIDDEN = u"Hidden";
+constexpr OUString CUIFM_PROP_HIDDEN = u"Hidden"_ustr;
constexpr OUStringLiteral CUIFM_PROP_LABEL = u"Label";
FmShowColsDialog::FmShowColsDialog(weld::Window* pParent)
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index f0e24653e823..e0ce4a3a6377 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -42,8 +42,8 @@ using namespace com::sun::star::i18n;
using namespace com::sun::star::frame;
using namespace com::sun::star::beans;
-constexpr OUStringLiteral cIsKernAsianPunctuation = u"IsKernAsianPunctuation";
-constexpr OUStringLiteral cCharacterCompressionType = u"CharacterCompressionType";
+constexpr OUString cIsKernAsianPunctuation = u"IsKernAsianPunctuation"_ustr;
+constexpr OUString cCharacterCompressionType = u"CharacterCompressionType"_ustr;
namespace {
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 489fa2216bac..c8a569a9845e 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1032,11 +1032,11 @@ struct LanguageConfig_Impl
static bool bLanguageCurrentDoc_Impl = false;
// some things we'll need...
-constexpr OUStringLiteral sAccessSrvc = u"com.sun.star.configuration.ConfigurationAccess";
+constexpr OUString sAccessSrvc = u"com.sun.star.configuration.ConfigurationAccess"_ustr;
constexpr OUStringLiteral sAccessUpdSrvc = u"com.sun.star.configuration.ConfigurationUpdateAccess";
-constexpr OUStringLiteral sInstalledLocalesPath = u"org.openoffice.Setup/Office/InstalledLocales";
-constexpr OUStringLiteral sUserLocalePath = u"org.openoffice.Office.Linguistic/General";
-constexpr OUStringLiteral sUserLocaleKey = u"UILocale";
+constexpr OUString sInstalledLocalesPath = u"org.openoffice.Setup/Office/InstalledLocales"_ustr;
+constexpr OUString sUserLocalePath = u"org.openoffice.Office.Linguistic/General"_ustr;
+constexpr OUString sUserLocaleKey = u"UILocale"_ustr;
static Sequence< OUString > seqInstalledLanguages;
static OUString lcl_getDatePatternsConfigString( const LocaleDataWrapper& rLocaleWrapper )
@@ -1104,7 +1104,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon
css::configuration::theDefaultProvider::get(
comphelper::getProcessComponentContext()));
// find out which locales are currently installed and add them to the listbox
- Sequence< Any > theArgs{ Any(NamedValue("nodepath", Any(OUString(sInstalledLocalesPath)))) };
+ Sequence< Any > theArgs{ Any(NamedValue("nodepath", Any(sInstalledLocalesPath))) };
Reference< XNameAccess > theNameAccess(
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs ), UNO_QUERY_THROW );
seqInstalledLanguages = theNameAccess->getElementNames();
@@ -1136,7 +1136,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon
m_xUserInterfaceLB->set_active(0);
// find out whether the user has a specific locale specified
- Sequence< Any > theArgs2{ Any(NamedValue("nodepath", Any(OUString(sUserLocalePath)))) };
+ Sequence< Any > theArgs2{ Any(NamedValue("nodepath", Any(sUserLocalePath))) };
theNameAccess.set(
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs2 ), UNO_QUERY_THROW );
if (theNameAccess->hasByName(sUserLocaleKey))
@@ -1330,7 +1330,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
Reference< XMultiServiceFactory > theConfigProvider(
css::configuration::theDefaultProvider::get(
comphelper::getProcessComponentContext()));
- Sequence< Any > theArgs{ Any(NamedValue("nodepath", Any(OUString(sUserLocalePath)))) };
+ Sequence< Any > theArgs{ Any(NamedValue("nodepath", Any(sUserLocalePath))) };
Reference< XPropertySet >xProp(
theConfigProvider->createInstanceWithArguments(sAccessUpdSrvc, theArgs ), UNO_QUERY_THROW );
if ( m_sUserLocaleValue != aLangString)
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 8ca6a5488a78..29fe7d758d8d 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -93,14 +93,14 @@ IMPL_LINK(SvxProxyTabPage, PortChangedHdl, weld::Entry&, rEdit, void)
}
}
-constexpr OUStringLiteral g_aProxyModePN = u"ooInetProxyType";
-constexpr OUStringLiteral g_aHttpProxyPN = u"ooInetHTTPProxyName";
-constexpr OUStringLiteral g_aHttpPortPN = u"ooInetHTTPProxyPort";
-constexpr OUStringLiteral g_aHttpsProxyPN = u"ooInetHTTPSProxyName";
-constexpr OUStringLiteral g_aHttpsPortPN = u"ooInetHTTPSProxyPort";
-constexpr OUStringLiteral g_aFtpProxyPN = u"ooInetFTPProxyName";
-constexpr OUStringLiteral g_aFtpPortPN = u"ooInetFTPProxyPort";
-constexpr OUStringLiteral g_aNoProxyDescPN = u"ooInetNoProxy";
+constexpr OUString g_aProxyModePN = u"ooInetProxyType"_ustr;
+constexpr OUString g_aHttpProxyPN = u"ooInetHTTPProxyName"_ustr;
+constexpr OUString g_aHttpPortPN = u"ooInetHTTPProxyPort"_ustr;
+constexpr OUString g_aHttpsProxyPN = u"ooInetHTTPSProxyName"_ustr;
+constexpr OUString g_aHttpsPortPN = u"ooInetHTTPSProxyPort"_ustr;
+constexpr OUString g_aFtpProxyPN = u"ooInetFTPProxyName"_ustr;
+constexpr OUString g_aFtpPortPN = u"ooInetFTPProxyPort"_ustr;
+constexpr OUString g_aNoProxyDescPN = u"ooInetNoProxy"_ustr;
IMPL_STATIC_LINK(SvxProxyTabPage, NumberOnlyTextFilterHdl, OUString&, rTest, bool)
{
diff --git a/cui/source/options/optlanguagetool.cxx b/cui/source/options/optlanguagetool.cxx
index 4e1b909cc0a8..fab94987a32d 100644
--- a/cui/source/options/optlanguagetool.cxx
+++ b/cui/source/options/optlanguagetool.cxx
@@ -24,7 +24,7 @@
#include <strings.hrc>
using LanguageToolCfg = officecfg::Office::Linguistic::GrammarChecking::LanguageTool;
-constexpr OUStringLiteral LANGUAGETOOL_DEFAULT_URL = u"https://api.languagetool.org/v2";
+constexpr OUString LANGUAGETOOL_DEFAULT_URL = u"https://api.languagetool.org/v2"_ustr;
OptLanguageToolTabPage::OptLanguageToolTabPage(weld::Container* pPage,
weld::DialogController* pController,
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 4246b607d2d0..b7ac60f5f186 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -71,10 +71,10 @@ using namespace css::uno;
using namespace css::linguistic2;
using namespace css::beans;
-constexpr OUStringLiteral cSpell(SN_SPELLCHECKER);
-constexpr OUStringLiteral cGrammar(SN_GRAMMARCHECKER);
-constexpr OUStringLiteral cHyph(SN_HYPHENATOR);
-constexpr OUStringLiteral cThes(SN_THESAURUS);
+constexpr OUString cSpell(SN_SPELLCHECKER);
+constexpr OUString cGrammar(SN_GRAMMARCHECKER);
+constexpr OUString cHyph(SN_HYPHENATOR);
+constexpr OUString cThes(SN_THESAURUS);
// static ----------------------------------------------------------------
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index af3df0d15e28..7832c260075b 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -54,8 +54,8 @@ using namespace svx;
// define ----------------------------------------------------------------
constexpr OUStringLiteral POSTFIX_INTERNAL = u"_internal";
-constexpr OUStringLiteral POSTFIX_USER = u"_user";
-constexpr OUStringLiteral POSTFIX_WRITABLE = u"_writable";
+constexpr OUString POSTFIX_USER = u"_user"_ustr;
+constexpr OUString POSTFIX_WRITABLE = u"_writable"_ustr;
constexpr OUStringLiteral VAR_ONE = u"%1";
constexpr OUStringLiteral IODLG_CONFIGNAME = u"FilePicker_Save";
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 1b5e29e2aca2..0735ce8dcebb 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -126,7 +126,7 @@ using namespace ::com::sun::star::util;
LastPageSaver* OfaTreeOptionsDialog::pLastPageSaver = nullptr;
// some stuff for easier changes for SvtViewOptions
-constexpr OUStringLiteral VIEWOPT_DATANAME = u"page data";
+constexpr OUString VIEWOPT_DATANAME = u"page data"_ustr;
static void SetViewOptUserItem( SvtViewOptions& rOpt, const OUString& rData )
{
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index 56eb92e9b172..3075f3fc4258 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -2995,7 +2995,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet )
void SvxCharPositionPage::FillUserData()
{
- static constexpr OUStringLiteral cTok( u";" );
+ static constexpr OUString cTok( u";"_ustr );
OUString sUser = OUString::number( m_nSuperEsc ) + cTok +
OUString::number( m_nSubEsc ) + cTok +