diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-18 14:01:23 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-18 19:46:19 +0100 |
commit | 0011ed25344673d441e2ac59f455428b27fea9d3 (patch) | |
tree | a54d6b660f64f73d5b1154606b6db4e8eb363b2d /basctl/source | |
parent | a1b1f5a472497e04d315323e429f06fa55c19c71 (diff) |
loplugin:stringliteraldefine in basctl
Change-Id: Id9f1d2932b5f602602d0229b8dc9794c01f5cbb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125277
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl/source')
-rw-r--r-- | basctl/source/basicide/baside2.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside2.hxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside2b.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 2 | ||||
-rw-r--r-- | basctl/source/basicide/bastype2.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/bastype3.cxx | 4 | ||||
-rw-r--r-- | basctl/source/basicide/moduldl2.cxx | 4 | ||||
-rw-r--r-- | basctl/source/inc/baside3.hxx | 2 | ||||
-rw-r--r-- | basctl/source/inc/bastypes.hxx | 2 | ||||
-rw-r--r-- | basctl/source/inc/dlgeddef.hxx | 24 |
10 files changed, 24 insertions, 24 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index ff14bd6ccdc2..c7f99e8b8e03 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1405,7 +1405,7 @@ void ModulWindow::OnNewDocument () m_aXEditorWindow->SetLineNumberDisplay(bLineNumbers); } -char const* ModulWindow::GetHid () const +OString ModulWindow::GetHid () const { return HID_BASICIDE_MODULWINDOW; } diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index ab6d7102bd15..e59c148bc3b5 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -378,7 +378,7 @@ public: virtual void Deactivating () override; virtual void OnNewDocument () override; - virtual char const* GetHid () const override; + virtual OString GetHid () const override; virtual ItemType GetType () const override; virtual bool HasActiveEditor () const override; diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index d998193cc2a5..48f429848f66 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -1419,7 +1419,7 @@ void BreakPointWindow::ShowMarker(vcl::RenderContext& rRenderContext) Size const aOutSz = GetOutDev()->GetOutputSize(); tools::Long const nLineHeight = GetTextHeight(); - Image aMarker = GetImage(OUString(bErrorMarker ? std::u16string_view(u"" RID_BMP_ERRORMARKER) : std::u16string_view(u"" RID_BMP_STEPMARKER))); + Image aMarker = GetImage(bErrorMarker ? OUString(RID_BMP_ERRORMARKER) : OUString(RID_BMP_STEPMARKER)); Size aMarkerSz(aMarker.GetSizePixel()); aMarkerSz = rRenderContext.PixelToLogic(aMarkerSz); diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 23eb5ab1e0eb..920e82da3d0a 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1244,7 +1244,7 @@ css::uno::Reference< css::accessibility::XAccessible > DialogWindow::CreateAcces return new AccessibleDialogWindow(this); } -char const* DialogWindow::GetHid () const +OString DialogWindow::GetHid () const { return HID_BASICIDE_DIALOGWINDOW; } diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 20350b41b9f2..afff27b75dfd 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -243,9 +243,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 ? std::u16string_view(u"" RID_BMP_DLGLIB) : std::u16string_view(u"" RID_BMP_DLGLIBNOTLOADED); + sId = bLoaded ? OUString(RID_BMP_DLGLIB) : OUString(RID_BMP_DLGLIBNOTLOADED); else - sId = bLoaded ? std::u16string_view(u"" RID_BMP_MODLIB) : std::u16string_view(u"" RID_BMP_MODLIBNOTLOADED); + sId = bLoaded ? OUString(RID_BMP_MODLIB) : OUString(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 c85fcb734878..edf4c5bae04a 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -101,8 +101,8 @@ IMPL_LINK(SbTreeListBox, RequestingChildrenHdl, const weld::TreeIter&, rEntry, b // exchange image const bool bDlgMode = (nMode & BrowseMode::Dialogs) && !(nMode & BrowseMode::Modules); - auto const aImage(bDlgMode ? std::u16string_view(u"" RID_BMP_DLGLIB) : std::u16string_view(u"" RID_BMP_MODLIB)); - SetEntryBitmaps(rEntry, OUString(aImage)); + auto const aImage(bDlgMode ? OUString(RID_BMP_DLGLIB) : OUString(RID_BMP_MODLIB)); + SetEntryBitmaps(rEntry, aImage); } else { diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index 6c183c33035e..7786ab408de4 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -1338,8 +1338,8 @@ void createLibImpl(weld::Window* pWin, const ScriptDocument& rDocument, BrowseMode nMode = pBasicBox->GetMode(); bool bDlgMode = ( nMode & BrowseMode::Dialogs ) && !( nMode & BrowseMode::Modules ); - const auto sId = bDlgMode ? std::u16string_view(u"" RID_BMP_DLGLIB) : std::u16string_view(u"" RID_BMP_MODLIB); - pBasicBox->AddEntry(aLibName, OUString(sId), xRootEntry.get(), false, std::make_unique<Entry>(OBJ_TYPE_LIBRARY)); + const auto sId = bDlgMode ? OUString(RID_BMP_DLGLIB) : OUString(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); pBasicBox->select(*xRootEntry); diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index f5d367182d0a..cc53d0f11f69 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -107,7 +107,7 @@ public: virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; - virtual char const* GetHid () const override; + virtual OString GetHid () const override; virtual ItemType GetType () const override; }; diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index e6e306a73b5a..e150635befb7 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -233,7 +233,7 @@ public: void SetName( const OUString& aName ) { m_aName = aName; } virtual void OnNewDocument (); - virtual char const* GetHid () const = 0; + virtual OString GetHid () const = 0; virtual ItemType GetType () const = 0; void InsertLibInfo () const; bool Is (ScriptDocument const&, std::u16string_view, std::u16string_view, ItemType, bool bFindSuspended); diff --git a/basctl/source/inc/dlgeddef.hxx b/basctl/source/inc/dlgeddef.hxx index 0cb0a6dc8573..511575a4b9ee 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" -#define DLGED_PROP_DROPDOWN "Dropdown" -#define DLGED_PROP_FORMATSSUPPLIER "FormatsSupplier" -#define DLGED_PROP_HEIGHT "Height" -#define DLGED_PROP_LABEL "Label" -#define DLGED_PROP_NAME "Name" -#define DLGED_PROP_ORIENTATION "Orientation" -#define DLGED_PROP_POSITIONX "PositionX" -#define DLGED_PROP_POSITIONY "PositionY" -#define DLGED_PROP_STEP "Step" -#define DLGED_PROP_TABINDEX "TabIndex" +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"; #define DLGED_PROP_TEXTCOLOR "TextColor" #define DLGED_PROP_TEXTLINECOLOR "TextLineColor" -#define DLGED_PROP_WIDTH "Width" -#define DLGED_PROP_DECORATION "Decoration" +inline constexpr OUStringLiteral DLGED_PROP_WIDTH = u"Width"; +inline constexpr OUStringLiteral DLGED_PROP_DECORATION = u"Decoration"; } // namespace basctl |