summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-04-27 21:14:04 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-04-28 14:34:10 +0200
commit8e7b61c48544b722b1cea41c9e2e6b1e01191be9 (patch)
treedd4bd4a4a03f745e8bc2ce3b3c5c3d7cf7c9a622
parent9ee7a841d41a5517fd567b17b936ea4c0141e157 (diff)
IsDropFormatSupported can be const
Change-Id: I8a1c1d862a998fb0bef912bea5b6b4dd058c127f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93059 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--include/vcl/transfer.hxx2
-rw-r--r--vcl/source/treelist/transfer2.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/vcl/transfer.hxx b/include/vcl/transfer.hxx
index 234871576031..e374192378fb 100644
--- a/include/vcl/transfer.hxx
+++ b/include/vcl/transfer.hxx
@@ -476,7 +476,7 @@ public:
virtual ~DropTargetHelper();
// typically called by the application in ::AcceptDrop and ::ExecuteDrop and (see above)
- bool IsDropFormatSupported( SotClipboardFormatId nFormat );
+ bool IsDropFormatSupported(SotClipboardFormatId nFormat) const;
const DataFlavorExVector& GetDataFlavorExVector() const {return maFormats; }
diff --git a/vcl/source/treelist/transfer2.cxx b/vcl/source/treelist/transfer2.cxx
index 349b69609910..26407021ff52 100644
--- a/vcl/source/treelist/transfer2.cxx
+++ b/vcl/source/treelist/transfer2.cxx
@@ -295,7 +295,7 @@ sal_Int8 DropTargetHelper::ExecuteDrop( const ExecuteDropEvent& )
}
-bool DropTargetHelper::IsDropFormatSupported( SotClipboardFormatId nFormat )
+bool DropTargetHelper::IsDropFormatSupported(SotClipboardFormatId nFormat) const
{
return std::any_of(maFormats.begin(), maFormats.end(),
[&](const DataFlavorEx& data) { return data.mnSotId == nFormat; });