summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2015-06-21 14:08:16 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:51:32 +0200
commitaee15a604da7f96f6baf408b8c7a00b05ff5c3df (patch)
tree8b4769832381a56146ecfdee9504b3339021c93e /sot
parent89812e4e3e91dd090f43a464e2e3c5fada9d43b6 (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>
Diffstat (limited to 'sot')
-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;