summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-20 09:47:06 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-20 13:07:02 +0100
commitcf7306194f5c677fef75e3ff5098676ee302359e (patch)
treea52a0980de72c7f70e4f3ae55126579655440773 /svx
parent24b02a4f2507f40fe9d36c393c59e12c072428c3 (diff)
No longer need to worry about ambiguous operator== in loplugin:stringviewparam
...after 46c5de832868d2812448b2caace3eeaa9237b9f6 "make *String(string_view) constructors explicit" Change-Id: I6e884c762a2fc91f5dd6fbb197a596fd60f17cae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108043 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx3
-rw-r--r--svx/source/stbctrls/selctrl.cxx7
2 files changed, 8 insertions, 2 deletions
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index e7c868e3e210..27f5cbe31425 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -73,6 +73,7 @@
#include <sal/log.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <memory>
+#include <string_view>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::view;
@@ -98,7 +99,7 @@ struct FmGridHeaderData
Reference< XInterface > xDroppedResultSet;
};
-static void SetMenuItem(const OUString& rImgID, const OString &rID, Menu& rMenu, bool bDesignMode)
+static void SetMenuItem(const OUString& rImgID, std::string_view rID, Menu& rMenu, bool bDesignMode)
{
Image aImage(StockImage::Yes, rImgID);
sal_uInt16 nID = rMenu.GetItemId(rID);
diff --git a/svx/source/stbctrls/selctrl.cxx b/svx/source/stbctrls/selctrl.cxx
index 0411d3555758..3c772fc16608 100644
--- a/svx/source/stbctrls/selctrl.cxx
+++ b/svx/source/stbctrls/selctrl.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <vcl/builder.hxx>
#include <vcl/event.hxx>
#include <vcl/menu.hxx>
@@ -48,7 +52,8 @@ public:
OUString GetItemTextForState(sal_uInt16 nState) { return m_xMenu->GetItemText(state_to_id(nState)); }
sal_uInt16 GetState() const { return id_to_state(m_xMenu->GetCurItemIdent()); }
sal_uInt16 Execute(vcl::Window* pWindow, const Point& rPopupPos) { return m_xMenu->Execute(pWindow, rPopupPos); }
- void HideSelectionType(const OString& rIdent) { m_xMenu->HideItem(m_xMenu->GetItemId(rIdent)); }
+ void HideSelectionType(std::string_view rIdent)
+ { m_xMenu->HideItem(m_xMenu->GetItemId(rIdent)); }
};
}