summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-11-15 13:21:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-11-19 07:46:25 +0100
commit193207c5abf339253e15b59f398da0c1f6f43bee (patch)
treeaf181e0b4335d73b4db5b2ccf180779f7c82de5b /sfx2/source
parentb4b3949da1aad091b9f8d0f301f9f7031d6ce295 (diff)
improve loplugin passparamsbyref
I think I managed to disable this when I converted it to use the shared plugin infrastructure. So fix that, and then make it much smarter to avoid various false positives. Change-Id: I0a4657cff3b40a00434924bf764d024dbfd7d5b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176646 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/dispatch.cxx2
-rw-r--r--sfx2/source/dialog/StyleList.cxx2
-rw-r--r--sfx2/source/doc/docfile.cxx2
-rw-r--r--sfx2/source/inc/StyleList.hxx2
-rw-r--r--sfx2/source/view/viewsh.cxx2
5 files changed, 5 insertions, 5 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index f29294872577..e704d324a355 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1523,7 +1523,7 @@ SfxSlotFilterState SfxDispatcher::IsSlotEnabledByFilter_Impl( sal_uInt16 nSID )
return bFound ? SfxSlotFilterState::DISABLED : SfxSlotFilterState::ENABLED;
}
-bool SfxDispatcher::IsCommandAllowedInLokReadOnlyViewMode (OUString commandName) {
+bool SfxDispatcher::IsCommandAllowedInLokReadOnlyViewMode (const OUString & commandName) {
static constexpr OUString allowedList[] = {
u".uno:InsertAnnotation"_ustr,
u".uno:ReplyComment"_ustr,
diff --git a/sfx2/source/dialog/StyleList.cxx b/sfx2/source/dialog/StyleList.cxx
index f534379e53dd..60151d2c83ad 100644
--- a/sfx2/source/dialog/StyleList.cxx
+++ b/sfx2/source/dialog/StyleList.cxx
@@ -137,7 +137,7 @@ std::optional<OUString> sDefaultCharStyleUIName;
StyleList::StyleList(weld::Builder* pBuilder, SfxBindings* pBindings,
SfxCommonTemplateDialog_Impl* Parent, weld::Container* pC,
- OUString treeviewname, OUString flatviewname)
+ const OUString& treeviewname, const OUString& flatviewname)
: m_bHierarchical(false)
, m_bAllowReParentDrop(false)
, m_bNewByExampleDisabled(false)
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 5b6c805cfcd1..13711a5a31c5 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -1745,7 +1745,7 @@ SfxMedium::LockFileResult SfxMedium::LockOrigFileOnDemand(bool bLoading, bool bN
// this either returns non-null or throws exception
uno::Reference<embed::XStorage>
-SfxMedium::TryEncryptedInnerPackage(uno::Reference<embed::XStorage> const xStorage)
+SfxMedium::TryEncryptedInnerPackage(uno::Reference<embed::XStorage> const & xStorage)
{
uno::Reference<embed::XStorage> xRet;
if (xStorage->hasByName(u"encrypted-package"_ustr))
diff --git a/sfx2/source/inc/StyleList.hxx b/sfx2/source/inc/StyleList.hxx
index fe4ff6269bd5..ef2696e5fd34 100644
--- a/sfx2/source/inc/StyleList.hxx
+++ b/sfx2/source/inc/StyleList.hxx
@@ -63,7 +63,7 @@ class StyleList final : public SfxListener
public:
// Constructor
StyleList(weld::Builder* pBuilder, SfxBindings* pBindings, SfxCommonTemplateDialog_Impl* Parent,
- weld::Container* pC, OUString treeviewname, OUString flatviewname);
+ weld::Container* pC, const OUString& treeviewname, const OUString& flatviewname);
// Destructor
~StyleList();
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 46b809472878..d743cd5ddd02 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -3942,7 +3942,7 @@ void SfxViewShell::setBlockedCommandList(const char* blockedCommandList)
}
}
-bool SfxViewShell::isBlockedCommand(OUString command) const
+bool SfxViewShell::isBlockedCommand(const OUString & command) const
{
return mvLOKBlockedCommandList.find(command) != mvLOKBlockedCommandList.end();
}