Kaydet (Commit) 2711f763 authored tarafından Julien Nabet's avatar Julien Nabet Kaydeden (comit) Lionel Elie Mamane

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/47732Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
üst 29d57a3f
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment