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>
This commit is contained in:
Caolán McNamara 2020-04-27 21:14:04 +01:00
parent 9ee7a841d4
commit 8e7b61c485
2 changed files with 2 additions and 2 deletions

View file

@ -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; }

View file

@ -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; });