[Libreoffice-commits] core.git: dbaccess/source
Julien Nabet
serval2412 at yahoo.fr
Thu Jan 11 10:06:26 UTC 2018
dbaccess/source/ui/misc/WCopyTable.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 2711f7639811929fc9ea8dc168ea28f1c5545e67
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Wed Jan 10 23:24:01 2018 +0100
tdf#114955: Fix primary key management in copy table
When we chose to create a primary key, be sure the other existing
columns won't be in primary key
Change-Id: I523f1b3a4b56c92d48b65cb3d83793b5459c630c
Reviewed-on: https://gerrit.libreoffice.org/47732
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 2bc3a85a00d8..f6f21d745dbd 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -774,6 +774,10 @@ bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos)
{
if ( m_bAddPKFirstTime )
{
+ // tdf#114955: since we chose to create a primary key
+ // be sure all other columns won't be in primary key
+ for (auto const& elem : m_vDestColumns)
+ elem.second->SetPrimaryKey(false);
OFieldDescription* pField = new OFieldDescription();
pField->SetName(m_aKeyName);
pField->FillFromTypeInfo(pTypeInfo,true,true);
More information about the Libreoffice-commits
mailing list