From f7d65b04126b614bbb0b1bc0e7b6309900d4dc8d Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Aug 2015 13:46:36 +0200 Subject: tdf#93018 - Copying forms not working anymore Bug introduced by commit fb14be5f8f74f83ba89e15f891ddf1f753dcc62f "create new 'enum class' SotClipboardFormatId to unify types" Change-Id: I3febb927f658ac27d2b864869775db3b71940a5c --- sot/source/base/exchange.cxx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sot/source/base/exchange.cxx') diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx index 599525d2cc29..78a7d13461bb 100644 --- a/sot/source/base/exchange.cxx +++ b/sot/source/base/exchange.cxx @@ -254,16 +254,14 @@ SotClipboardFormatId SotExchange::RegisterFormatName( const OUString& rName ) return static_cast(i + static_cast(SotClipboardFormatId::USER_END) + 1); } - // nMax ist der neue Platz DataFlavor* pNewFlavor = new DataFlavor; - pNewFlavor->MimeType = rName; pNewFlavor->HumanPresentableName = rName; pNewFlavor->DataType = cppu::UnoType::get(); rL.push_back( pNewFlavor ); - return static_cast(static_cast(nMax) + static_cast(SotClipboardFormatId::USER_END) + 1); + return static_cast(static_cast(rL.size()-1) + static_cast(SotClipboardFormatId::USER_END) + 1); } SotClipboardFormatId SotExchange::RegisterFormatMimeType( const OUString& rMimeType ) -- cgit