diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-19 16:39:09 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-23 11:04:42 +0200 |
commit | bd6fb0cd3eee3c7d414e55a7678c0097aadc7646 (patch) | |
tree | 5f754d7e485ab31dd4e04782b8eccd50d854d91e /basctl | |
parent | 3501c52176d1122d9de08462435f633cd21de370 (diff) |
Extended loplugin:ostr: Rewrite some O[U]StringLiteral -> O[U]String
...in include files. This is a mix of automatic rewriting in include files and
manual fixups (mostly addressing loplugin:redundantfcast) in source files that
include those.
Change-Id: I1f3cc1e67b9cabd2e9d61a4d9e9a01e587ea35cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158337
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r-- | basctl/inc/bitmaps.hlst | 28 | ||||
-rw-r--r-- | basctl/inc/helpids.h | 24 | ||||
-rw-r--r-- | basctl/inc/strings.hxx | 50 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/bastype2.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/bastype3.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 2 | ||||
-rw-r--r-- | basctl/source/inc/dlgeddef.hxx | 24 |
8 files changed, 68 insertions, 68 deletions
diff --git a/basctl/inc/bitmaps.hlst b/basctl/inc/bitmaps.hlst index b316a2450a39..0dc8e8d2c8c1 100644 --- a/basctl/inc/bitmaps.hlst +++ b/basctl/inc/bitmaps.hlst @@ -9,19 +9,19 @@ #pragma once -inline constexpr OUStringLiteral RID_BMP_BRKENABLED = u"res/im30838.png"; -inline constexpr OUStringLiteral RID_BMP_BRKDISABLED = u"res/im30839.png"; -inline constexpr OUStringLiteral RID_BMP_STEPMARKER = u"res/im30840.png"; -inline constexpr OUStringLiteral RID_BMP_ERRORMARKER = u"res/im30841.png"; -inline constexpr OUStringLiteral RID_BMP_LOCKED = u"res/lock.png"; -inline constexpr OUStringLiteral RID_BMP_INSTALLATION = u"res/harddisk_16.png"; -inline constexpr OUStringLiteral RID_BMP_DOCUMENT = u"res/im30826.png"; -inline constexpr OUStringLiteral RID_BMP_MODLIB = u"res/im30820.png"; -inline constexpr OUStringLiteral RID_BMP_MODLIBNOTLOADED = u"res/im30827.png"; -inline constexpr OUStringLiteral RID_BMP_MODULE = u"res/im30821.png"; -inline constexpr OUStringLiteral RID_BMP_MACRO = u"res/im30822.png"; -inline constexpr OUStringLiteral RID_BMP_DLGLIB = u"res/dialogfolder_16.png"; -inline constexpr OUStringLiteral RID_BMP_DLGLIBNOTLOADED = u"res/dialogfoldernot_16.png"; -inline constexpr OUStringLiteral RID_BMP_DIALOG = u"res/im30823.png"; +inline constexpr OUString RID_BMP_BRKENABLED = u"res/im30838.png"_ustr; +inline constexpr OUString RID_BMP_BRKDISABLED = u"res/im30839.png"_ustr; +inline constexpr OUString RID_BMP_STEPMARKER = u"res/im30840.png"_ustr; +inline constexpr OUString RID_BMP_ERRORMARKER = u"res/im30841.png"_ustr; +inline constexpr OUString RID_BMP_LOCKED = u"res/lock.png"_ustr; +inline constexpr OUString RID_BMP_INSTALLATION = u"res/harddisk_16.png"_ustr; +inline constexpr OUString RID_BMP_DOCUMENT = u"res/im30826.png"_ustr; +inline constexpr OUString RID_BMP_MODLIB = u"res/im30820.png"_ustr; +inline constexpr OUString RID_BMP_MODLIBNOTLOADED = u"res/im30827.png"_ustr; +inline constexpr OUString RID_BMP_MODULE = u"res/im30821.png"_ustr; +inline constexpr OUString RID_BMP_MACRO = u"res/im30822.png"_ustr; +inline constexpr OUString RID_BMP_DLGLIB = u"res/dialogfolder_16.png"_ustr; +inline constexpr OUString RID_BMP_DLGLIBNOTLOADED = u"res/dialogfoldernot_16.png"_ustr; +inline constexpr OUString RID_BMP_DIALOG = u"res/im30823.png"_ustr; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/basctl/inc/helpids.h b/basctl/inc/helpids.h index e34d054ed899..2d656b96bf48 100644 --- a/basctl/inc/helpids.h +++ b/basctl/inc/helpids.h @@ -20,20 +20,20 @@ #include <rtl/ustring.hxx> -inline constexpr OUStringLiteral HID_BASICIDE_OBJECTCAT = u"BASCTL_HID_BASICIDE_OBJECTCAT"; +inline constexpr OUString HID_BASICIDE_OBJECTCAT = u"BASCTL_HID_BASICIDE_OBJECTCAT"_ustr; -inline constexpr OUStringLiteral HID_BASICIDE_REMOVEWATCH = u"BASCTL_HID_BASICIDE_REMOVEWATCH"; +inline constexpr OUString HID_BASICIDE_REMOVEWATCH = u"BASCTL_HID_BASICIDE_REMOVEWATCH"_ustr; -inline constexpr OUStringLiteral HID_BASICIDE_MODULWINDOW = u"BASCTL_HID_BASICIDE_MODULWINDOW"; -inline constexpr OUStringLiteral HID_BASICIDE_DIALOGWINDOW = u"BASCTL_HID_BASICIDE_DIALOGWINDOW"; +inline constexpr OUString HID_BASICIDE_MODULWINDOW = u"BASCTL_HID_BASICIDE_MODULWINDOW"_ustr; +inline constexpr OUString HID_BASICIDE_DIALOGWINDOW = u"BASCTL_HID_BASICIDE_DIALOGWINDOW"_ustr; -inline constexpr OUStringLiteral HID_BASICIDE_EDITORWINDOW = u"BASCTL_HID_BASICIDE_EDITORWINDOW"; -inline constexpr OUStringLiteral HID_BASICIDE_BREAKPOINTWINDOW = u"BASCTL_HID_BASICIDE_BREAKPOINTWINDOW"; -inline constexpr OUStringLiteral HID_BASICIDE_WATCHWINDOW = u"BASCTL_HID_BASICIDE_WATCHWINDOW"; -inline constexpr OUStringLiteral HID_BASICIDE_STACKWINDOW = u"BASCTL_HID_BASICIDE_STACKWINDOW"; -inline constexpr OUStringLiteral HID_BASICIDE_TABBAR = u"BASCTL_HID_BASICIDE_TABBAR"; -inline constexpr OUStringLiteral HID_BASICIDE_WATCHWINDOW_EDIT = u"BASCTL_HID_BASICIDE_WATCHWINDOW_EDIT"; -inline constexpr OUStringLiteral HID_BASICIDE_WATCHWINDOW_LIST = u"BASCTL_HID_BASICIDE_WATCHWINDOW_LIST"; -inline constexpr OUStringLiteral HID_BASICIDE_STACKWINDOW_LIST = u"BASCTL_HID_BASICIDE_STACKWINDOW_LIST"; +inline constexpr OUString HID_BASICIDE_EDITORWINDOW = u"BASCTL_HID_BASICIDE_EDITORWINDOW"_ustr; +inline constexpr OUString HID_BASICIDE_BREAKPOINTWINDOW = u"BASCTL_HID_BASICIDE_BREAKPOINTWINDOW"_ustr; +inline constexpr OUString HID_BASICIDE_WATCHWINDOW = u"BASCTL_HID_BASICIDE_WATCHWINDOW"_ustr; +inline constexpr OUString HID_BASICIDE_STACKWINDOW = u"BASCTL_HID_BASICIDE_STACKWINDOW"_ustr; +inline constexpr OUString HID_BASICIDE_TABBAR = u"BASCTL_HID_BASICIDE_TABBAR"_ustr; +inline constexpr OUString HID_BASICIDE_WATCHWINDOW_EDIT = u"BASCTL_HID_BASICIDE_WATCHWINDOW_EDIT"_ustr; +inline constexpr OUString HID_BASICIDE_WATCHWINDOW_LIST = u"BASCTL_HID_BASICIDE_WATCHWINDOW_LIST"_ustr; +inline constexpr OUString HID_BASICIDE_STACKWINDOW_LIST = u"BASCTL_HID_BASICIDE_STACKWINDOW_LIST"_ustr; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/basctl/inc/strings.hxx b/basctl/inc/strings.hxx index 597092e8c3e2..5481d62de326 100644 --- a/basctl/inc/strings.hxx +++ b/basctl/inc/strings.hxx @@ -13,30 +13,30 @@ // Dialog Controls --------------------------------------------------------------- -inline constexpr OUStringLiteral RID_STR_CLASS_CONTROL = u"Control"; -inline constexpr OUStringLiteral RID_STR_CLASS_DIALOG = u"Dialog"; -inline constexpr OUStringLiteral RID_STR_CLASS_BUTTON = u"CommandButton"; -inline constexpr OUStringLiteral RID_STR_CLASS_RADIOBUTTON = u"OptionButton"; -inline constexpr OUStringLiteral RID_STR_CLASS_CHECKBOX = u"CheckBox"; -inline constexpr OUStringLiteral RID_STR_CLASS_LISTBOX = u"ListBox"; -inline constexpr OUStringLiteral RID_STR_CLASS_COMBOBOX = u"ComboBox"; -inline constexpr OUStringLiteral RID_STR_CLASS_GROUPBOX = u"FrameControl"; -inline constexpr OUStringLiteral RID_STR_CLASS_EDIT = u"TextField"; -inline constexpr OUStringLiteral RID_STR_CLASS_FIXEDTEXT = u"Label"; -inline constexpr OUStringLiteral RID_STR_CLASS_IMAGECONTROL = u"ImageControl"; -inline constexpr OUStringLiteral RID_STR_CLASS_PROGRESSBAR = u"ProgressBar"; -inline constexpr OUStringLiteral RID_STR_CLASS_SCROLLBAR = u"ScrollBar"; -inline constexpr OUStringLiteral RID_STR_CLASS_FIXEDLINE = u"FixedLine"; -inline constexpr OUStringLiteral RID_STR_CLASS_DATEFIELD = u"DateField"; -inline constexpr OUStringLiteral RID_STR_CLASS_TIMEFIELD = u"TimeField"; -inline constexpr OUStringLiteral RID_STR_CLASS_NUMERICFIELD = u"NumericField"; -inline constexpr OUStringLiteral RID_STR_CLASS_CURRENCYFIELD = u"CurrencyField"; -inline constexpr OUStringLiteral RID_STR_CLASS_FORMATTEDFIELD = u"FormattedField"; -inline constexpr OUStringLiteral RID_STR_CLASS_PATTERNFIELD = u"PatternField"; -inline constexpr OUStringLiteral RID_STR_CLASS_FILECONTROL = u"FileControl"; -inline constexpr OUStringLiteral RID_STR_CLASS_TREECONTROL = u"TreeControl"; -inline constexpr OUStringLiteral RID_STR_CLASS_GRIDCONTROL = u"GridControl"; -inline constexpr OUStringLiteral RID_STR_CLASS_SPINCONTROL = u"SpinButton"; -inline constexpr OUStringLiteral RID_STR_CLASS_HYPERLINKCONTROL = u"HyperlinkControl"; +inline constexpr OUString RID_STR_CLASS_CONTROL = u"Control"_ustr; +inline constexpr OUString RID_STR_CLASS_DIALOG = u"Dialog"_ustr; +inline constexpr OUString RID_STR_CLASS_BUTTON = u"CommandButton"_ustr; +inline constexpr OUString RID_STR_CLASS_RADIOBUTTON = u"OptionButton"_ustr; +inline constexpr OUString RID_STR_CLASS_CHECKBOX = u"CheckBox"_ustr; +inline constexpr OUString RID_STR_CLASS_LISTBOX = u"ListBox"_ustr; +inline constexpr OUString RID_STR_CLASS_COMBOBOX = u"ComboBox"_ustr; +inline constexpr OUString RID_STR_CLASS_GROUPBOX = u"FrameControl"_ustr; +inline constexpr OUString RID_STR_CLASS_EDIT = u"TextField"_ustr; +inline constexpr OUString RID_STR_CLASS_FIXEDTEXT = u"Label"_ustr; +inline constexpr OUString RID_STR_CLASS_IMAGECONTROL = u"ImageControl"_ustr; +inline constexpr OUString RID_STR_CLASS_PROGRESSBAR = u"ProgressBar"_ustr; +inline constexpr OUString RID_STR_CLASS_SCROLLBAR = u"ScrollBar"_ustr; +inline constexpr OUString RID_STR_CLASS_FIXEDLINE = u"FixedLine"_ustr; +inline constexpr OUString RID_STR_CLASS_DATEFIELD = u"DateField"_ustr; +inline constexpr OUString RID_STR_CLASS_TIMEFIELD = u"TimeField"_ustr; +inline constexpr OUString RID_STR_CLASS_NUMERICFIELD = u"NumericField"_ustr; +inline constexpr OUString RID_STR_CLASS_CURRENCYFIELD = u"CurrencyField"_ustr; +inline constexpr OUString RID_STR_CLASS_FORMATTEDFIELD = u"FormattedField"_ustr; +inline constexpr OUString RID_STR_CLASS_PATTERNFIELD = u"PatternField"_ustr; +inline constexpr OUString RID_STR_CLASS_FILECONTROL = u"FileControl"_ustr; +inline constexpr OUString RID_STR_CLASS_TREECONTROL = u"TreeControl"_ustr; +inline constexpr OUString RID_STR_CLASS_GRIDCONTROL = u"GridControl"_ustr; +inline constexpr OUString RID_STR_CLASS_SPINCONTROL = u"SpinButton"_ustr; +inline constexpr OUString RID_STR_CLASS_HYPERLINKCONTROL = u"HyperlinkControl"_ustr; /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index f1c1a7303878..e62ba50683fb 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1466,7 +1466,7 @@ void BreakPointWindow::ShowMarker(vcl::RenderContext& rRenderContext) Size const aOutSz = GetOutDev()->GetOutputSize(); tools::Long const nLineHeight = GetTextHeight(); - Image aMarker = GetImage(bErrorMarker ? OUString(RID_BMP_ERRORMARKER) : OUString(RID_BMP_STEPMARKER)); + Image aMarker = GetImage(bErrorMarker ? RID_BMP_ERRORMARKER : RID_BMP_STEPMARKER); Size aMarkerSz(aMarker.GetSizePixel()); aMarkerSz = rRenderContext.PixelToLogic(aMarkerSz); diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index fec1303d8474..8040c25f32c1 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -244,9 +244,9 @@ void SbTreeListBox::ImpCreateLibEntries(const weld::TreeIter& rIter, const Scrip // create tree list box entry OUString sId; if ( ( nMode & BrowseMode::Dialogs ) && !( nMode & BrowseMode::Modules ) ) - sId = bLoaded ? OUString(RID_BMP_DLGLIB) : OUString(RID_BMP_DLGLIBNOTLOADED); + sId = bLoaded ? RID_BMP_DLGLIB : RID_BMP_DLGLIBNOTLOADED; else - sId = bLoaded ? OUString(RID_BMP_MODLIB) : OUString(RID_BMP_MODLIBNOTLOADED); + sId = bLoaded ? RID_BMP_MODLIB : RID_BMP_MODLIBNOTLOADED; std::unique_ptr<weld::TreeIter> xLibRootEntry(m_xControl->make_iterator(&rIter)); bool bLibRootEntry = FindEntry(aLibName, OBJ_TYPE_LIBRARY, *xLibRootEntry); if (bLibRootEntry) diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 43f1b970209e..d26ae83252f6 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -101,7 +101,7 @@ IMPL_LINK(SbTreeListBox, RequestingChildrenHdl, const weld::TreeIter&, rEntry, b // exchange image const bool bDlgMode = (nMode & BrowseMode::Dialogs) && !(nMode & BrowseMode::Modules); - auto const aImage(bDlgMode ? OUString(RID_BMP_DLGLIB) : OUString(RID_BMP_MODLIB)); + auto const aImage(bDlgMode ? RID_BMP_DLGLIB : RID_BMP_MODLIB); SetEntryBitmaps(rEntry, aImage); } else diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index f66f8cfd0e23..1221b0094218 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1354,7 +1354,7 @@ void createLibImpl(weld::Window* pWin, const ScriptDocument& rDocument, BrowseMode nMode = pBasicBox->GetMode(); bool bDlgMode = ( nMode & BrowseMode::Dialogs ) && !( nMode & BrowseMode::Modules ); - const auto sId = bDlgMode ? OUString(RID_BMP_DLGLIB) : OUString(RID_BMP_MODLIB); + const auto sId = bDlgMode ? RID_BMP_DLGLIB : RID_BMP_MODLIB; pBasicBox->AddEntry(aLibName, sId, xRootEntry.get(), false, std::make_unique<Entry>(OBJ_TYPE_LIBRARY)); pBasicBox->AddEntry(aModName, RID_BMP_MODULE, xRootEntry.get(), false, std::make_unique<Entry>(OBJ_TYPE_MODULE)); pBasicBox->set_cursor(*xRootEntry); diff --git a/basctl/source/inc/dlgeddef.hxx b/basctl/source/inc/dlgeddef.hxx index ffb726b21bfc..c10ef16cd8d3 100644 --- a/basctl/source/inc/dlgeddef.hxx +++ b/basctl/source/inc/dlgeddef.hxx @@ -26,20 +26,20 @@ namespace basctl // control properties #define DLGED_PROP_BACKGROUNDCOLOR "BackgroundColor" -inline constexpr OUStringLiteral DLGED_PROP_DROPDOWN = u"Dropdown"; -inline constexpr OUStringLiteral DLGED_PROP_FORMATSSUPPLIER = u"FormatsSupplier"; -inline constexpr OUStringLiteral DLGED_PROP_HEIGHT = u"Height"; -inline constexpr OUStringLiteral DLGED_PROP_LABEL = u"Label"; -inline constexpr OUStringLiteral DLGED_PROP_NAME = u"Name"; -inline constexpr OUStringLiteral DLGED_PROP_ORIENTATION = u"Orientation"; -inline constexpr OUStringLiteral DLGED_PROP_POSITIONX = u"PositionX"; -inline constexpr OUStringLiteral DLGED_PROP_POSITIONY = u"PositionY"; -inline constexpr OUStringLiteral DLGED_PROP_STEP = u"Step"; -inline constexpr OUStringLiteral DLGED_PROP_TABINDEX = u"TabIndex"; +inline constexpr OUString DLGED_PROP_DROPDOWN = u"Dropdown"_ustr; +inline constexpr OUString DLGED_PROP_FORMATSSUPPLIER = u"FormatsSupplier"_ustr; +inline constexpr OUString DLGED_PROP_HEIGHT = u"Height"_ustr; +inline constexpr OUString DLGED_PROP_LABEL = u"Label"_ustr; +inline constexpr OUString DLGED_PROP_NAME = u"Name"_ustr; +inline constexpr OUString DLGED_PROP_ORIENTATION = u"Orientation"_ustr; +inline constexpr OUString DLGED_PROP_POSITIONX = u"PositionX"_ustr; +inline constexpr OUString DLGED_PROP_POSITIONY = u"PositionY"_ustr; +inline constexpr OUString DLGED_PROP_STEP = u"Step"_ustr; +inline constexpr OUString DLGED_PROP_TABINDEX = u"TabIndex"_ustr; #define DLGED_PROP_TEXTCOLOR "TextColor" #define DLGED_PROP_TEXTLINECOLOR "TextLineColor" -inline constexpr OUStringLiteral DLGED_PROP_WIDTH = u"Width"; -inline constexpr OUStringLiteral DLGED_PROP_DECORATION = u"Decoration"; +inline constexpr OUString DLGED_PROP_WIDTH = u"Width"_ustr; +inline constexpr OUString DLGED_PROP_DECORATION = u"Decoration"_ustr; } // namespace basctl |