summaryrefslogtreecommitdiff
path: root/svx/source/fmcomp/dbaobjectex.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/fmcomp/dbaobjectex.cxx')
-rw-r--r--svx/source/fmcomp/dbaobjectex.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/svx/source/fmcomp/dbaobjectex.cxx b/svx/source/fmcomp/dbaobjectex.cxx
index bfb427a47897..7d02064faa61 100644
--- a/svx/source/fmcomp/dbaobjectex.cxx
+++ b/svx/source/fmcomp/dbaobjectex.cxx
@@ -94,17 +94,9 @@ namespace svx
bool OComponentTransferable::canExtractComponentDescriptor(const DataFlavorExVector& _rFlavors, bool _bForm )
{
- DataFlavorExVector::const_iterator aEnd = _rFlavors.end();
- for ( DataFlavorExVector::const_iterator aCheck = _rFlavors.begin();
- aCheck != aEnd;
- ++aCheck
- )
- {
- if ( getDescriptorFormatId(_bForm) == aCheck->mnSotId )
- return true;
- }
-
- return false;
+ SotClipboardFormatId nFormatId = getDescriptorFormatId(_bForm);
+ return std::any_of(_rFlavors.begin(), _rFlavors.end(),
+ [&nFormatId](const DataFlavorEx& rCheck) { return nFormatId == rCheck.mnSotId; });
}