summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-06 13:46:36 +0200
committerAndras Timar <andras.timar@collabora.com>2015-08-20 14:13:28 +0200
commit913bfd38f5021e2b7edc00328e51cd841d4f7234 (patch)
treeb1d1b1be99bf7b704aa8d339fad6398f8ab29a0d /sot
parentcbb4e8e97ae0eb247b328d2967bb8ea1c091faf7 (diff)
tdf#93018 - Copying forms not working anymore
Bug introduced by commit fb14be5f8f74f83ba89e15f891ddf1f753dcc62f "create new 'enum class' SotClipboardFormatId to unify types" Change-Id: I3febb927f658ac27d2b864869775db3b71940a5c (cherry picked from commit f7d65b04126b614bbb0b1bc0e7b6309900d4dc8d) Reviewed-on: https://gerrit.libreoffice.org/17536 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sot')
-rw-r--r--sot/source/base/exchange.cxx4
1 files changed, 1 insertions, 3 deletions
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 8b3541f09ad1..0d9cf8b52001 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -253,16 +253,14 @@ SotClipboardFormatId SotExchange::RegisterFormatName( const OUString& rName )
return static_cast<SotClipboardFormatId>(i + static_cast<int>(SotClipboardFormatId::USER_END) + 1);
}
- // nMax ist der neue Platz
DataFlavor* pNewFlavor = new DataFlavor;
-
pNewFlavor->MimeType = rName;
pNewFlavor->HumanPresentableName = rName;
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);
}
SotClipboardFormatId SotExchange::RegisterFormatMimeType( const OUString& rMimeType )