[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sot/source

Noel Grandin noelgrandin at gmail.com
Mon Jun 22 08:14:08 PDT 2015


 sot/source/base/exchange.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1a2c1393dcc950516bcc85470121e6d46e1c2b73
Author: Noel Grandin <noelgrandin at gmail.com>
Date:   Sun Jun 21 14:08:16 2015 +0200

    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 at libreoffice.org>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Tested-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index eac3846..8b3541f 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;


More information about the Libreoffice-commits mailing list