[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - 2 commits - sot/source
Noel Grandin
noel at peralex.com
Fri Aug 7 05:44:51 PDT 2015
sot/source/base/exchange.cxx | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
New commits:
commit cf6869230c3676db068e774a4e2b0a0e43c85390
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
(cherry picked from commit 0c08cb23b4902f19ed0e1050b5c9a52164c0d2ac)
Reviewed-on: https://gerrit.libreoffice.org/17537
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 0d9cf8b..75bf9f1 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);
}
/*************************************************************************
commit 6bc20fff1a1cdd6550e5130356b06de149ee12f6
Author: Noel Grandin <noel at peralex.com>
Date: Thu Aug 6 13:46:36 2015 +0200
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 at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 8b3541f..0d9cf8b 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 )
More information about the Libreoffice-commits
mailing list