diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-19 10:30:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-20 16:14:06 +0200 |
commit | a9a7ab4955bc9e18883331c78de407dd111776ea (patch) | |
tree | c2e48783772397cc45f4ace033401a5625259046 /unotools | |
parent | e7cf25437e590dd74a1f119b2942b2122cdff1aa (diff) |
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: unotools
Change-Id: Ia3722b27955e444b67a97c478739db696fa3dcaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158249
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/bootstrap.cxx | 6 | ||||
-rw-r--r-- | unotools/source/config/dynamicmenuoptions.cxx | 6 | ||||
-rw-r--r-- | unotools/source/config/eventcfg.cxx | 4 | ||||
-rw-r--r-- | unotools/source/config/historyoptions.cxx | 18 | ||||
-rw-r--r-- | unotools/source/config/lingucfg.cxx | 2 | ||||
-rw-r--r-- | unotools/source/config/moduleoptions.cxx | 22 | ||||
-rw-r--r-- | unotools/source/config/optionsdlg.cxx | 8 | ||||
-rw-r--r-- | unotools/source/config/securityoptions.cxx | 8 | ||||
-rw-r--r-- | unotools/source/config/syslocaleoptions.cxx | 12 | ||||
-rw-r--r-- | unotools/source/config/viewoptions.cxx | 8 |
10 files changed, 47 insertions, 47 deletions
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index ef7ba57000c1..6aaac63f8f55 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -37,18 +37,18 @@ // #define this to true, if remembering defaults is not supported properly #define RTL_BOOTSTRAP_DEFAULTS_BROKEN true -constexpr OUStringLiteral BOOTSTRAP_ITEM_PRODUCT_KEY = u"ProductKey"; +constexpr OUString BOOTSTRAP_ITEM_PRODUCT_KEY = u"ProductKey"_ustr; constexpr OUStringLiteral BOOTSTRAP_ITEM_VERSIONFILE = u"Location"; constexpr OUStringLiteral BOOTSTRAP_ITEM_BUILDID = u"buildid"; constexpr OUStringLiteral BOOTSTRAP_ITEM_BASEINSTALLATION = u"BRAND_BASE_DIR"; constexpr OUStringLiteral BOOTSTRAP_ITEM_USERINSTALLATION = u"UserInstallation"; -constexpr OUStringLiteral BOOTSTRAP_ITEM_USERDIR = u"UserDataDir"; +constexpr OUString BOOTSTRAP_ITEM_USERDIR = u"UserDataDir"_ustr; constexpr OUStringLiteral BOOTSTRAP_DEFAULT_BASEINSTALL = u"$SYSBINDIR/.."; -constexpr OUStringLiteral BOOTSTRAP_DIRNAME_USERDIR = u"user"; +constexpr OUString BOOTSTRAP_DIRNAME_USERDIR = u"user"_ustr; typedef char const * AsciiString; diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx index 60c07baacafb..05b9c1707394 100644 --- a/unotools/source/config/dynamicmenuoptions.cxx +++ b/unotools/source/config/dynamicmenuoptions.cxx @@ -39,10 +39,10 @@ constexpr OUStringLiteral DYNAMICMENU_PROPERTYNAME_TITLE = u"Title"; constexpr OUStringLiteral DYNAMICMENU_PROPERTYNAME_IMAGEIDENTIFIER = u"ImageIdentifier"; constexpr OUStringLiteral DYNAMICMENU_PROPERTYNAME_TARGETNAME = u"TargetName"; -constexpr OUStringLiteral PATHDELIMITER = u"/"; +constexpr OUString PATHDELIMITER = u"/"_ustr; -constexpr OUStringLiteral SETNODE_NEWMENU = u"New"; -constexpr OUStringLiteral SETNODE_WIZARDMENU = u"Wizard"; +constexpr OUString SETNODE_NEWMENU = u"New"_ustr; +constexpr OUString SETNODE_WIZARDMENU = u"Wizard"_ustr; #define PROPERTYNAME_URL DYNAMICMENU_PROPERTYNAME_URL #define PROPERTYNAME_TITLE DYNAMICMENU_PROPERTYNAME_TITLE diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx index 085482f7e28f..62f854c003c5 100644 --- a/unotools/source/config/eventcfg.cxx +++ b/unotools/source/config/eventcfg.cxx @@ -240,11 +240,11 @@ void GlobalEventConfig_Impl::replaceByName( const OUString& aName, const Any& aE css::uno::Sequence < css::beans::PropertyValue > GlobalEventConfig_Impl::getByName( const OUString& aName ) { static constexpr OUStringLiteral sEventType = u"EventType"; - static constexpr OUStringLiteral sScript = u"Script"; + static constexpr OUString sScript = u"Script"_ustr; Sequence< beans::PropertyValue > props(2); auto pProps = props.getArray(); pProps[0].Name = sEventType; - pProps[0].Value <<= OUString(sScript); + pProps[0].Value <<= sScript; pProps[1].Name = sScript; EventBindingHash::const_iterator it = m_eventBindingHash.find( aName ); if( it != m_eventBindingHash.end() ) diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx index 8361aa6bc358..52d2292c7932 100644 --- a/unotools/source/config/historyoptions.cxx +++ b/unotools/source/config/historyoptions.cxx @@ -35,15 +35,15 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; namespace { - constexpr OUStringLiteral s_sItemList = u"ItemList"; - constexpr OUStringLiteral s_sOrderList = u"OrderList"; - constexpr OUStringLiteral s_sHistoryItemRef = u"HistoryItemRef"; - constexpr OUStringLiteral s_sFilter = u"Filter"; - constexpr OUStringLiteral s_sTitle = u"Title"; - constexpr OUStringLiteral s_sPassword = u"Password"; - constexpr OUStringLiteral s_sThumbnail = u"Thumbnail"; - constexpr OUStringLiteral s_sReadOnly = u"ReadOnly"; - constexpr OUStringLiteral s_sPinned = u"Pinned"; + constexpr OUString s_sItemList = u"ItemList"_ustr; + constexpr OUString s_sOrderList = u"OrderList"_ustr; + constexpr OUString s_sHistoryItemRef = u"HistoryItemRef"_ustr; + constexpr OUString s_sFilter = u"Filter"_ustr; + constexpr OUString s_sTitle = u"Title"_ustr; + constexpr OUString s_sPassword = u"Password"_ustr; + constexpr OUString s_sThumbnail = u"Thumbnail"_ustr; + constexpr OUString s_sReadOnly = u"ReadOnly"_ustr; + constexpr OUString s_sPinned = u"Pinned"_ustr; } static uno::Reference<container::XNameAccess> GetConfig(); diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 0b39db9172ef..571601e1663a 100644 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -816,7 +816,7 @@ bool SvtLinguConfigItem::IsReadOnly( sal_Int32 nPropertyHandle ) const static SvtLinguConfigItem *pCfgItem = nullptr; static sal_Int32 nCfgItemRefCount = 0; -constexpr OUStringLiteral aG_Dictionaries = u"Dictionaries"; +constexpr OUString aG_Dictionaries = u"Dictionaries"_ustr; SvtLinguConfig::SvtLinguConfig() { diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index 858d2d09e72e..5918b749e647 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -73,17 +73,17 @@ constexpr OUStringLiteral ROOTNODE_FACTORIES = u"Setup/Office/Factories"; #define PROPERTYCOUNT 6 -constexpr OUStringLiteral FACTORYNAME_WRITER = u"com.sun.star.text.TextDocument"; -constexpr OUStringLiteral FACTORYNAME_WRITERWEB = u"com.sun.star.text.WebDocument"; -constexpr OUStringLiteral FACTORYNAME_WRITERGLOBAL = u"com.sun.star.text.GlobalDocument"; -constexpr OUStringLiteral FACTORYNAME_CALC = u"com.sun.star.sheet.SpreadsheetDocument"; -constexpr OUStringLiteral FACTORYNAME_DRAW = u"com.sun.star.drawing.DrawingDocument"; -constexpr OUStringLiteral FACTORYNAME_IMPRESS = u"com.sun.star.presentation.PresentationDocument"; -constexpr OUStringLiteral FACTORYNAME_MATH = u"com.sun.star.formula.FormulaProperties"; -constexpr OUStringLiteral FACTORYNAME_CHART = u"com.sun.star.chart2.ChartDocument"; -constexpr OUStringLiteral FACTORYNAME_DATABASE = u"com.sun.star.sdb.OfficeDatabaseDocument"; -constexpr OUStringLiteral FACTORYNAME_STARTMODULE = u"com.sun.star.frame.StartModule"; -constexpr OUStringLiteral FACTORYNAME_BASIC = u"com.sun.star.script.BasicIDE"; +constexpr OUString FACTORYNAME_WRITER = u"com.sun.star.text.TextDocument"_ustr; +constexpr OUString FACTORYNAME_WRITERWEB = u"com.sun.star.text.WebDocument"_ustr; +constexpr OUString FACTORYNAME_WRITERGLOBAL = u"com.sun.star.text.GlobalDocument"_ustr; +constexpr OUString FACTORYNAME_CALC = u"com.sun.star.sheet.SpreadsheetDocument"_ustr; +constexpr OUString FACTORYNAME_DRAW = u"com.sun.star.drawing.DrawingDocument"_ustr; +constexpr OUString FACTORYNAME_IMPRESS = u"com.sun.star.presentation.PresentationDocument"_ustr; +constexpr OUString FACTORYNAME_MATH = u"com.sun.star.formula.FormulaProperties"_ustr; +constexpr OUString FACTORYNAME_CHART = u"com.sun.star.chart2.ChartDocument"_ustr; +constexpr OUString FACTORYNAME_DATABASE = u"com.sun.star.sdb.OfficeDatabaseDocument"_ustr; +constexpr OUString FACTORYNAME_STARTMODULE = u"com.sun.star.frame.StartModule"_ustr; +constexpr OUString FACTORYNAME_BASIC = u"com.sun.star.script.BasicIDE"_ustr; #define FACTORYCOUNT 11 diff --git a/unotools/source/config/optionsdlg.cxx b/unotools/source/config/optionsdlg.cxx index cc5ee7a60538..c88bd095106c 100644 --- a/unotools/source/config/optionsdlg.cxx +++ b/unotools/source/config/optionsdlg.cxx @@ -28,14 +28,14 @@ using namespace com::sun::star::beans; using namespace com::sun::star::uno; -constexpr OUStringLiteral ROOT_NODE = u"OptionsDialogGroups"; -constexpr OUStringLiteral PAGES_NODE = u"Pages"; -constexpr OUStringLiteral OPTIONS_NODE = u"Options"; +constexpr OUString ROOT_NODE = u"OptionsDialogGroups"_ustr; +constexpr OUString PAGES_NODE = u"Pages"_ustr; +constexpr OUString OPTIONS_NODE = u"Options"_ustr; namespace { enum NodeType{ NT_Group, NT_Page, NT_Option }; } -constexpr OUStringLiteral g_sPathDelimiter = u"/"; +constexpr OUString g_sPathDelimiter = u"/"_ustr; static void ReadNode( const Reference<css::container::XHierarchicalNameAccess>& xHierarchyAccess, SvtOptionsDialogOptions::OptionNodeList & aOptionNodeList, diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index 44517a623358..2a9346a3e945 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -36,10 +36,10 @@ using namespace ::com::sun::star::uno; -constexpr OUStringLiteral PROPERTYNAME_MACRO_TRUSTEDAUTHORS = u"TrustedAuthors"; -constexpr OUStringLiteral PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME = u"SubjectName"; -constexpr OUStringLiteral PROPERTYNAME_TRUSTEDAUTHOR_SERIALNUMBER = u"SerialNumber"; -constexpr OUStringLiteral PROPERTYNAME_TRUSTEDAUTHOR_RAWDATA = u"RawData"; +constexpr OUString PROPERTYNAME_MACRO_TRUSTEDAUTHORS = u"TrustedAuthors"_ustr; +constexpr OUString PROPERTYNAME_TRUSTEDAUTHOR_SUBJECTNAME = u"SubjectName"_ustr; +constexpr OUString PROPERTYNAME_TRUSTEDAUTHOR_SERIALNUMBER = u"SerialNumber"_ustr; +constexpr OUString PROPERTYNAME_TRUSTEDAUTHOR_RAWDATA = u"RawData"_ustr; namespace SvtSecurityOptions diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index 8f08202a7a23..0438402139cf 100644 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -111,12 +111,12 @@ public: constexpr OUStringLiteral ROOTNODE_SYSLOCALE = u"Setup/L10N"; -constexpr OUStringLiteral PROPERTYNAME_LOCALE = u"ooSetupSystemLocale"; -constexpr OUStringLiteral PROPERTYNAME_UILOCALE = u"ooLocale"; -constexpr OUStringLiteral PROPERTYNAME_CURRENCY = u"ooSetupCurrency"; -constexpr OUStringLiteral PROPERTYNAME_DECIMALSEPARATOR = u"DecimalSeparatorAsLocale"; -constexpr OUStringLiteral PROPERTYNAME_DATEPATTERNS = u"DateAcceptancePatterns"; -constexpr OUStringLiteral PROPERTYNAME_IGNORELANGCHANGE = u"IgnoreLanguageChange"; +constexpr OUString PROPERTYNAME_LOCALE = u"ooSetupSystemLocale"_ustr; +constexpr OUString PROPERTYNAME_UILOCALE = u"ooLocale"_ustr; +constexpr OUString PROPERTYNAME_CURRENCY = u"ooSetupCurrency"_ustr; +constexpr OUString PROPERTYNAME_DECIMALSEPARATOR = u"DecimalSeparatorAsLocale"_ustr; +constexpr OUString PROPERTYNAME_DATEPATTERNS = u"DateAcceptancePatterns"_ustr; +constexpr OUString PROPERTYNAME_IGNORELANGCHANGE = u"IgnoreLanguageChange"_ustr; #define PROPERTYHANDLE_LOCALE 0 #define PROPERTYHANDLE_UILOCALE 1 diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx index dc257ca9b471..382af97b2c8b 100644 --- a/unotools/source/config/viewoptions.cxx +++ b/unotools/source/config/viewoptions.cxx @@ -31,10 +31,10 @@ #include <comphelper/diagnose_ex.hxx> constexpr OUStringLiteral PACKAGE_VIEWS = u"org.openoffice.Office.Views"; -constexpr OUStringLiteral PROPERTY_WINDOWSTATE = u"WindowState"; -constexpr OUStringLiteral PROPERTY_PAGEID = u"PageID"; -constexpr OUStringLiteral PROPERTY_VISIBLE = u"Visible"; -constexpr OUStringLiteral PROPERTY_USERDATA = u"UserData"; +constexpr OUString PROPERTY_WINDOWSTATE = u"WindowState"_ustr; +constexpr OUString PROPERTY_PAGEID = u"PageID"_ustr; +constexpr OUString PROPERTY_VISIBLE = u"Visible"_ustr; +constexpr OUString PROPERTY_USERDATA = u"UserData"_ustr; SvtViewOptions::SvtViewOptions( EViewType eType, OUString sViewName ) |