summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-08-06 14:04:02 +0200
committerEike Rathke <erack@redhat.com>2015-08-07 12:44:41 +0000
commitcf6869230c3676db068e774a4e2b0a0e43c85390 (patch)
tree578f45b8dd29be5c25b67d4645038be90b6d5e49
parent6bc20fff1a1cdd6550e5130356b06de149ee12f6 (diff)
tdf#93018 - Copying forms not working anymore (part2)
I missed a similar bug lower down Change-Id: I673c69dd1d36cc1b502a7de7821a05d859313aac (cherry picked from commit 0c08cb23b4902f19ed0e1050b5c9a52164c0d2ac) Reviewed-on: https://gerrit.libreoffice.org/17537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
-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 0d9cf8b52001..75bf9f166bb2 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -286,16 +286,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);
}
/*************************************************************************