[Libreoffice-commits] core.git: sot/source

Noel Grandin noel at peralex.com
Thu Aug 6 05:04:45 PDT 2015


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

New commits:
commit 0c08cb23b4902f19ed0e1050b5c9a52164c0d2ac
Author: Noel Grandin <noel at peralex.com>
Date:   Thu Aug 6 14:04:02 2015 +0200

    tdf#93018 - Copying forms not working anymore (part2)
    
    I missed a similar bug lower down
    
    Change-Id: I673c69dd1d36cc1b502a7de7821a05d859313aac

diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 78a7d13..24604dd 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -287,16 +287,14 @@ SotClipboardFormatId SotExchange::RegisterFormatMimeType( const OUString& rMimeT
             return static_cast<SotClipboardFormatId>(i + static_cast<int>(SotClipboardFormatId::USER_END) + 1);
     }
 
-    // nMax ist der neue Platz
     DataFlavor* pNewFlavor = new DataFlavor;
-
     pNewFlavor->MimeType = rMimeType;
     pNewFlavor->HumanPresentableName = rMimeType;
     pNewFlavor->DataType = cppu::UnoType<OUString>::get();
 
     rL.push_back( pNewFlavor );
 
-    return static_cast<SotClipboardFormatId>(static_cast<int>(nMax) + static_cast<int>(SotClipboardFormatId::USER_END) + 1);
+    return static_cast<SotClipboardFormatId>(static_cast<int>(rL.size()-1) + static_cast<int>(SotClipboardFormatId::USER_END) + 1);
 }
 
 /*************************************************************************


More information about the Libreoffice-commits mailing list