diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-19 10:30:31 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-20 10:35:44 +0200 |
commit | 96cbf1a4c3093a4cc339da68907f67f9a30f3916 (patch) | |
tree | 3d14fa75d1c187484420eb4741d1e3c19246e2df /svtools | |
parent | 74a6ce486b13f33380959ae58a40300bb84082f2 (diff) |
Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: svtools
Change-Id: Ib4d0e05b802776c682676a7bdaebb5123f6c5013
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158224
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/config/extcolorcfg.cxx | 4 | ||||
-rw-r--r-- | svtools/source/config/fontsubstconfig.cxx | 12 | ||||
-rw-r--r-- | svtools/source/config/miscopt.cxx | 8 | ||||
-rw-r--r-- | svtools/source/config/slidesorterbaropt.cxx | 12 | ||||
-rw-r--r-- | svtools/source/dialogs/colrdlg.cxx | 6 | ||||
-rw-r--r-- | svtools/source/filter/exportdialog.cxx | 4 | ||||
-rw-r--r-- | svtools/source/misc/sampletext.cxx | 4 | ||||
-rw-r--r-- | svtools/source/uno/toolboxcontroller.cxx | 2 | ||||
-rw-r--r-- | svtools/source/uno/unoevent.cxx | 20 |
9 files changed, 36 insertions, 36 deletions
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx index 8707f6b36af3..da3ce6a2de46 100644 --- a/svtools/source/config/extcolorcfg.cxx +++ b/svtools/source/config/extcolorcfg.cxx @@ -318,7 +318,7 @@ void ExtendedColorConfig_Impl::FillComponentColors(const uno::Sequence < OUStrin uno::Sequence < OUString > aColorNames = GetPropertyNames(sEntry); uno::Sequence < OUString > aDefaultColorNames = aColorNames; - static constexpr OUStringLiteral sColor(u"/Color"); + static constexpr OUString sColor(u"/Color"_ustr); lcl_addString(aColorNames,sColor); lcl_addString(aDefaultColorNames,u"/DefaultColor"); uno::Sequence< uno::Any > aColors = GetProperties( aColorNames ); @@ -388,7 +388,7 @@ void ExtendedColorConfig_Impl::ImplCommit() static constexpr OUStringLiteral sColor(u"/Color"); OUString sBase = "ExtendedColorScheme/ColorSchemes/" + m_sLoadedScheme; - static constexpr OUStringLiteral s_sSep(u"/"); + static constexpr OUString s_sSep(u"/"_ustr); for (auto const& configValue : m_aConfigValues) { diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx index 6d7323bb0d44..66a7a4e038ef 100644 --- a/svtools/source/config/fontsubstconfig.cxx +++ b/svtools/source/config/fontsubstconfig.cxx @@ -32,13 +32,13 @@ using namespace com::sun::star::uno; using namespace com::sun::star::beans; -constexpr OUStringLiteral cReplacement = u"Replacement"; -constexpr OUStringLiteral cFontPairs = u"FontPairs"; +constexpr OUString cReplacement = u"Replacement"_ustr; +constexpr OUString cFontPairs = u"FontPairs"_ustr; -constexpr OUStringLiteral cReplaceFont = u"ReplaceFont"; -constexpr OUStringLiteral cSubstituteFont= u"SubstituteFont"; -constexpr OUStringLiteral cOnScreenOnly = u"OnScreenOnly"; -constexpr OUStringLiteral cAlways = u"Always"; +constexpr OUString cReplaceFont = u"ReplaceFont"_ustr; +constexpr OUString cSubstituteFont= u"SubstituteFont"_ustr; +constexpr OUString cOnScreenOnly = u"OnScreenOnly"_ustr; +constexpr OUString cAlways = u"Always"_ustr; namespace svtools { diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx index fe9788eee14b..625086eee24c 100644 --- a/svtools/source/config/miscopt.cxx +++ b/svtools/source/config/miscopt.cxx @@ -44,11 +44,11 @@ using namespace ::com::sun::star; constexpr OUStringLiteral ROOTNODE_MISC = u"Office.Common/Misc"; // PROPERTYHANDLE defines must be sequential from zero for Commit/Load -constexpr OUStringLiteral PROPERTYNAME_SYMBOLSET = u"SymbolSet"; -constexpr OUStringLiteral PROPERTYNAME_ICONTHEME = u"SymbolStyle"; +constexpr OUString PROPERTYNAME_SYMBOLSET = u"SymbolSet"_ustr; +constexpr OUString PROPERTYNAME_ICONTHEME = u"SymbolStyle"_ustr; #define PROPERTYHANDLE_SYMBOLSTYLE 1 -constexpr OUStringLiteral PROPERTYNAME_SIDEBARICONSIZE = u"SidebarIconSize"; -constexpr OUStringLiteral PROPERTYNAME_NOTEBOOKBARICONSIZE = u"NotebookbarIconSize"; +constexpr OUString PROPERTYNAME_SIDEBARICONSIZE = u"SidebarIconSize"_ustr; +constexpr OUString PROPERTYNAME_NOTEBOOKBARICONSIZE = u"NotebookbarIconSize"_ustr; static std::mutex & GetInitMutex() { diff --git a/svtools/source/config/slidesorterbaropt.cxx b/svtools/source/config/slidesorterbaropt.cxx index 784e0894ef27..4001c2de9e08 100644 --- a/svtools/source/config/slidesorterbaropt.cxx +++ b/svtools/source/config/slidesorterbaropt.cxx @@ -35,17 +35,17 @@ using namespace ::com::sun::star; constexpr OUStringLiteral ROOTNODE_SLIDESORTERBAR = u"Office.Impress/MultiPaneGUI/SlideSorterBar/Visible"; -constexpr OUStringLiteral PROPERTYNAME_VISIBLE_IMPRESSVIEW = u"ImpressView"; +constexpr OUString PROPERTYNAME_VISIBLE_IMPRESSVIEW = u"ImpressView"_ustr; #define PROPERTYHANDLE_VISIBLE_IMPRESSVIEW 0 -constexpr OUStringLiteral PROPERTYNAME_VISIBLE_OUTLINEVIEW = u"OutlineView"; +constexpr OUString PROPERTYNAME_VISIBLE_OUTLINEVIEW = u"OutlineView"_ustr; #define PROPERTYHANDLE_VISIBLE_OUTLINEVIEW 1 -constexpr OUStringLiteral PROPERTYNAME_VISIBLE_NOTESVIEW = u"NotesView"; +constexpr OUString PROPERTYNAME_VISIBLE_NOTESVIEW = u"NotesView"_ustr; #define PROPERTYHANDLE_VISIBLE_NOTESVIEW 2 -constexpr OUStringLiteral PROPERTYNAME_VISIBLE_HANDOUTVIEW = u"HandoutView"; +constexpr OUString PROPERTYNAME_VISIBLE_HANDOUTVIEW = u"HandoutView"_ustr; #define PROPERTYHANDLE_VISIBLE_HANDOUTVIEW 3 -constexpr OUStringLiteral PROPERTYNAME_VISIBLE_SLIDESORTERVIEW = u"SlideSorterView"; +constexpr OUString PROPERTYNAME_VISIBLE_SLIDESORTERVIEW = u"SlideSorterView"_ustr; #define PROPERTYHANDLE_VISIBLE_SLIDESORTERVIEW 4 -constexpr OUStringLiteral PROPERTYNAME_VISIBLE_DRAWVIEW = u"DrawView"; +constexpr OUString PROPERTYNAME_VISIBLE_DRAWVIEW = u"DrawView"_ustr; #define PROPERTYHANDLE_VISIBLE_DRAWVIEW 5 static std::mutex & GetInitMutex() diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx index 793772b5f020..67c52b55d754 100644 --- a/svtools/source/dialogs/colrdlg.cxx +++ b/svtools/source/dialogs/colrdlg.cxx @@ -39,7 +39,7 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::ui::dialogs; -constexpr OUStringLiteral sColor = u"Color"; +constexpr OUString sColor = u"Color"_ustr; SvColorDialog::SvColorDialog() : meMode(svtools::ColorPickerMode::Select) @@ -74,7 +74,7 @@ short SvColorDialog::Execute(weld::Window* pParent) Reference< XPropertyAccess > xPropertyAccess( xDialog, UNO_QUERY_THROW ); Sequence< PropertyValue > props{ - comphelper::makePropertyValue(OUString( sColor ), maColor), + comphelper::makePropertyValue(sColor, maColor), comphelper::makePropertyValue("Mode", static_cast<sal_Int16>(meMode)) }; @@ -118,7 +118,7 @@ void SvColorDialog::ExecuteAsync(weld::Window* pParent, const std::function<void Reference< XPropertyAccess > xPropertyAccess( mxDialog, UNO_QUERY_THROW ); Sequence< PropertyValue > props{ - comphelper::makePropertyValue(OUString( sColor ), maColor), + comphelper::makePropertyValue(sColor, maColor), comphelper::makePropertyValue("Mode", static_cast<sal_Int16>(meMode)) }; diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index d68a520db951..22013e1f9e6b 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -197,8 +197,8 @@ uno::Sequence< beans::PropertyValue > ExportDialog::GetFilterData( bool bUpdateC pFilterOptions = new FilterConfigItem( &aFilterData ); } - static constexpr OUStringLiteral sLogicalWidth(u"LogicalWidth"); - static constexpr OUStringLiteral sLogicalHeight(u"LogicalHeight"); + static constexpr OUString sLogicalWidth(u"LogicalWidth"_ustr); + static constexpr OUString sLogicalHeight(u"LogicalHeight"_ustr); if ( mbIsPixelFormat ) { pFilterOptions->WriteInt32("PixelWidth", maSize.Width ); diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index 9000f6f73d6c..101d68362ad9 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -150,8 +150,8 @@ OUString makeShortRepresentativeSymbolTextForSelectedFont(OutputDevice const &rD { if (rDevice.GetFont().GetFamilyName() == "Symbol") { - static constexpr OUStringLiteral aImplAppleSymbolText = - u"\u03BC\u2202\u2211\u220F\u03C0\u222B\u03A9\u221A"; + static constexpr OUString aImplAppleSymbolText = + u"\u03BC\u2202\u2211\u220F\u03C0\u222B\u03A9\u221A"_ustr; bool bHasSampleTextGlyphs = (-1 == rDevice.HasGlyphs(rDevice.GetFont(), aImplAppleSymbolText)); //It's the Apple version diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 4c9611ff7dba..90f44c1d5e4b 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -36,7 +36,7 @@ #include <comphelper/propertyvalue.hxx> const int TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIBLE = 1; -constexpr OUStringLiteral TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIBLE = u"SupportsVisible"; +constexpr OUString TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIBLE = u"SupportsVisible"_ustr; using namespace ::cppu; diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 30f4cbecbdb9..2266d65f2ded 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -36,13 +36,13 @@ using css::lang::IllegalArgumentException; using css::beans::PropertyValue; -constexpr OUStringLiteral sAPI_ServiceName = u"com.sun.star.container.XNameReplace"; -constexpr OUStringLiteral sEventType = u"EventType"; -constexpr OUStringLiteral sMacroName = u"MacroName"; -constexpr OUStringLiteral sLibrary = u"Library"; -constexpr OUStringLiteral sStarBasic = u"StarBasic"; -constexpr OUStringLiteral sScript = u"Script"; -constexpr OUStringLiteral sNone = u"None"; +constexpr OUString sAPI_ServiceName = u"com.sun.star.container.XNameReplace"_ustr; +constexpr OUString sEventType = u"EventType"_ustr; +constexpr OUString sMacroName = u"MacroName"_ustr; +constexpr OUString sLibrary = u"Library"_ustr; +constexpr OUString sStarBasic = u"StarBasic"_ustr; +constexpr OUString sScript = u"Script"_ustr; +constexpr OUString sNone = u"None"_ustr; namespace { @@ -59,7 +59,7 @@ void getAnyFromMacro(Any& rAny, const SvxMacro& rMacro) // create sequence Sequence<PropertyValue> aSequence( // create type - { comphelper::makePropertyValue(sEventType, OUString(sStarBasic)), + { comphelper::makePropertyValue(sEventType, sStarBasic), // macro name comphelper::makePropertyValue(sMacroName, rMacro.GetMacName()), // library name @@ -74,7 +74,7 @@ void getAnyFromMacro(Any& rAny, const SvxMacro& rMacro) // create sequence Sequence<PropertyValue> aSequence( // create type - { comphelper::makePropertyValue(sEventType, OUString(sScript)), + { comphelper::makePropertyValue(sEventType, sScript), // macro name comphelper::makePropertyValue(sScript, rMacro.GetMacName()) }); @@ -94,7 +94,7 @@ void getAnyFromMacro(Any& rAny, const SvxMacro& rMacro) return; // create "None" macro - Sequence<PropertyValue> aSequence{ comphelper::makePropertyValue(sEventType, OUString(sNone)) }; + Sequence<PropertyValue> aSequence{ comphelper::makePropertyValue(sEventType, sNone) }; rAny <<= aSequence; } |