diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-10 13:19:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-10 18:44:00 +0200 |
commit | 40dde4385cd913ac08292ad3be28bf17de9d296c (patch) | |
tree | 9d7cb5602808e1ff5831fabfa8d3405d416a682b /vcl/source/helper | |
parent | ca5c9591ba38ad83415a2d4ced98bfc74d30b032 (diff) |
loplugin:ostr in vcl
Change-Id: I5b6ee5bda0c5ff69d297f7f8e87d4c3f3d21791c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167470
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'vcl/source/helper')
-rw-r--r-- | vcl/source/helper/canvasbitmap.cxx | 4 | ||||
-rw-r--r-- | vcl/source/helper/commandinfoprovider.cxx | 20 | ||||
-rw-r--r-- | vcl/source/helper/driverblocklist.cxx | 22 |
3 files changed, 23 insertions, 23 deletions
diff --git a/vcl/source/helper/canvasbitmap.cxx b/vcl/source/helper/canvasbitmap.cxx index 7243eee4bf97..2806aa0726cf 100644 --- a/vcl/source/helper/canvasbitmap.cxx +++ b/vcl/source/helper/canvasbitmap.cxx @@ -586,7 +586,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::getIndex( uno::Sequence< double >& o_entry, s (m_pBmpAcc->HasPalette() ? m_pBmpAcc->GetPaletteEntryCount() : 0 ) : 0 ); OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range"); if( nIndex < 0 || nIndex >= nCount ) - throw lang::IndexOutOfBoundsException("Palette index out of range", + throw lang::IndexOutOfBoundsException(u"Palette index out of range"_ustr, static_cast<rendering::XBitmapPalette*>(this)); const BitmapColor aCol = m_pBmpAcc->GetPaletteColor(sal::static_int_cast<sal_uInt16>(nIndex)); @@ -608,7 +608,7 @@ sal_Bool SAL_CALL VclCanvasBitmap::setIndex( const uno::Sequence< double >&, sal OSL_ENSURE(nIndex >= 0 && nIndex < nCount,"Palette index out of range"); if( nIndex < 0 || nIndex >= nCount ) - throw lang::IndexOutOfBoundsException("Palette index out of range", + throw lang::IndexOutOfBoundsException(u"Palette index out of range"_ustr, static_cast<rendering::XBitmapPalette*>(this)); return false; // read-only implementation diff --git a/vcl/source/helper/commandinfoprovider.cxx b/vcl/source/helper/commandinfoprovider.cxx index eb964b34b8ee..86ea1f0397cb 100644 --- a/vcl/source/helper/commandinfoprovider.cxx +++ b/vcl/source/helper/commandinfoprovider.cxx @@ -244,30 +244,30 @@ static OUString GetCommandProperty(const OUString& rsProperty, const Sequence<be OUString GetLabelForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties) { - return GetCommandProperty("Name", rProperties); + return GetCommandProperty(u"Name"_ustr, rProperties); } OUString GetMenuLabelForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties) { // Here we want to use "Label", not "Name". "Name" is a stripped-down version of "Label" without accelerators // and ellipsis. In the menu, we want to have those accelerators and ellipsis. - return GetCommandProperty("Label", rProperties); + return GetCommandProperty(u"Label"_ustr, rProperties); } OUString GetPopupLabelForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties) { - OUString sPopupLabel(GetCommandProperty("PopupLabel", rProperties)); + OUString sPopupLabel(GetCommandProperty(u"PopupLabel"_ustr, rProperties)); if (!sPopupLabel.isEmpty()) return sPopupLabel; - return GetCommandProperty("Label", rProperties); + return GetCommandProperty(u"Label"_ustr, rProperties); } OUString GetTooltipLabelForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties) { - OUString sLabel(GetCommandProperty("TooltipLabel", rProperties)); + OUString sLabel(GetCommandProperty(u"TooltipLabel"_ustr, rProperties)); if (!sLabel.isEmpty()) return sLabel; - return GetCommandProperty("Label", rProperties); + return GetCommandProperty(u"Label"_ustr, rProperties); } OUString GetTooltipForCommand( @@ -275,7 +275,7 @@ OUString GetTooltipForCommand( const css::uno::Sequence<css::beans::PropertyValue>& rProperties, const Reference<frame::XFrame>& rxFrame) { - OUString sLabel(GetCommandProperty("TooltipLabel", rProperties)); + OUString sLabel(GetCommandProperty(u"TooltipLabel"_ustr, rProperties)); if (sLabel.isEmpty()) { sLabel = GetPopupLabelForCommand(rProperties); // Remove '...' at the end and mnemonics (we don't want those in tooltips) @@ -334,7 +334,7 @@ vcl::KeyCode GetCommandKeyCodeShortcut (const OUString& rsCommandName, const Ref OUString GetRealCommandForCommand(const css::uno::Sequence<css::beans::PropertyValue>& rProperties) { - return GetCommandProperty("TargetURL", rProperties); + return GetCommandProperty(u"TargetURL"_ustr, rProperties); } Reference<graphic::XGraphic> GetXGraphicForCommand(const OUString& rsCommandName, @@ -416,12 +416,12 @@ sal_Int32 GetPropertiesForCommand ( bool IsRotated(const OUString& rsCommandName, const OUString& rsModuleName) { - return ResourceHasKey("private:resource/image/commandrotateimagelist", rsCommandName, rsModuleName); + return ResourceHasKey(u"private:resource/image/commandrotateimagelist"_ustr, rsCommandName, rsModuleName); } bool IsMirrored(const OUString& rsCommandName, const OUString& rsModuleName) { - return ResourceHasKey("private:resource/image/commandmirrorimagelist", rsCommandName, rsModuleName); + return ResourceHasKey(u"private:resource/image/commandmirrorimagelist"_ustr, rsCommandName, rsModuleName); } bool IsExperimental(const OUString& rsCommandName, const OUString& rModuleName) diff --git a/vcl/source/helper/driverblocklist.cxx b/vcl/source/helper/driverblocklist.cxx index e17b45e7a922..b14b146491fd 100644 --- a/vcl/source/helper/driverblocklist.cxx +++ b/vcl/source/helper/driverblocklist.cxx @@ -101,23 +101,23 @@ static OUString GetVendorId(std::string_view rString) { if (rString == "all") { - return ""; + return u""_ustr; } else if (rString == "intel") { - return "0x8086"; + return u"0x8086"_ustr; } else if (rString == "nvidia") { - return "0x10de"; + return u"0x10de"_ustr; } else if (rString == "amd") { - return "0x1002"; + return u"0x1002"_ustr; } else if (rString == "microsoft") { - return "0x1414"; + return u"0x1414"_ustr; } else { @@ -133,15 +133,15 @@ OUString GetVendorId(DeviceVendor id) switch (id) { case VendorAll: - return ""; + return u""_ustr; case VendorIntel: - return "0x8086"; + return u"0x8086"_ustr; case VendorNVIDIA: - return "0x10de"; + return u"0x10de"_ustr; case VendorAMD: - return "0x1002"; + return u"0x1002"_ustr; case VendorMicrosoft: - return "0x1414"; + return u"0x1414"_ustr; } abort(); } @@ -636,7 +636,7 @@ bool FindBlocklistedDeviceInList(std::vector<DriverInfo>& aDeviceInfos, VersionT } if (std::none_of(aDeviceInfos[i].maDevices.begin(), aDeviceInfos[i].maDevices.end(), - compareIgnoreAsciiCase("all")) + compareIgnoreAsciiCase(u"all"_ustr)) && std::none_of(aDeviceInfos[i].maDevices.begin(), aDeviceInfos[i].maDevices.end(), compareIgnoreAsciiCase(sAdapterDeviceID))) { |