summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-06-21 14:08:16 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-06-22 13:20:16 +0000
commit1bcf792993c3d88acfd7ede4567701c5dd6e7e62 (patch)
treee2228fffdfbd05f6fa1fa1fb97ac23a75757acf6
parentd0255f30e34442a70665a91fa7e4b6c92f3dab1b (diff)
tdf#92037 fix dragging DataSources field into document
Bug introduced by my commit fb14be5f8f74f83ba89e15f891ddf1f753dcc62f "create new 'enum class' SotClipboardFormatId to unify types" Change-Id: I7347fb9e653077205476e2b0c2b8107dc9caae0e Reviewed-on: https://gerrit.libreoffice.org/16396 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--sot/source/base/exchange.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index eac3846b6b43..8b3541f09ad1 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -343,7 +343,7 @@ bool SotExchange::GetFormatDataFlavor( SotClipboardFormatId nFormat, DataFlavor&
{
tDataFlavorList& rL = InitFormats_Impl();
- unsigned i = static_cast<int>(nFormat) - static_cast<int>(SotClipboardFormatId::USER_END) + 1;
+ unsigned i = static_cast<int>(nFormat) - static_cast<int>(SotClipboardFormatId::USER_END) - 1;
if( rL.size() > i )
{
@@ -377,7 +377,7 @@ OUString SotExchange::GetFormatMimeType( SotClipboardFormatId nFormat )
{
tDataFlavorList& rL = InitFormats_Impl();
- unsigned i = static_cast<int>(nFormat) - static_cast<int>(SotClipboardFormatId::USER_END) + 1;
+ unsigned i = static_cast<int>(nFormat) - static_cast<int>(SotClipboardFormatId::USER_END) - 1;
if( rL.size() > i )
sMimeType = rL[ i ]->MimeType;