[Libreoffice-commits] core.git: Branch 'libreoffice-6-3' - dbaccess/source

Tamas Bunth (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 2 15:25:10 UTC 2019


 dbaccess/source/ui/uno/copytablewizard.cxx |   11 -----------
 1 file changed, 11 deletions(-)

New commits:
commit 3ae4ce3919a4e61afa94c7eb02c03c05cb1cc3f5
Author:     Tamas Bunth <tamas.bunth at collabora.co.uk>
AuthorDate: Sat Aug 31 18:27:44 2019 +0200
Commit:     Xisco Faulí <xiscofauli at libreoffice.org>
CommitDate: Mon Sep 2 17:24:30 2019 +0200

    dbaccess: delete old paste autoincrement logic
    
    Change-Id: I6a4392c9e93842838022370fe6c54908adcc627b
    Reviewed-on: https://gerrit.libreoffice.org/78358
    Tested-by: Jenkins
    Reviewed-by: Tamás Bunth <btomi96 at gmail.com>
    (cherry picked from commit 376cc3ea0fc2e0f209763a2a27c5852136332c86)
    Reviewed-on: https://gerrit.libreoffice.org/78400
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 8d9bc43a4193..d8dd195701cf 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1096,7 +1096,6 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
 
     const OCopyTableWizard& rWizard             = impl_getDialog_throw();
     ODatabaseExport::TPositions aColumnPositions = rWizard.GetColumnPositions();
-    bool bAutoIncrement                         = rWizard.shouldCreatePrimaryKey();
 
     Reference< XRow > xRow              ( _rxSourceResultSet, UNO_QUERY_THROW );
     Reference< XRowLocate > xRowLocate  ( _rxSourceResultSet, UNO_QUERY_THROW );
@@ -1168,7 +1167,6 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
         aCopyEvent.Error.clear();
         try
         {
-            bool bInsertAutoIncrement = true;
             // notify listeners
             m_aCopyTableListeners.notifyEach( &XCopyTableListener::copyingRow, aCopyEvent );
 
@@ -1188,19 +1186,10 @@ void CopyTableWizard::impl_copyRows_throw( const Reference< XResultSet >& _rxSou
                 else if( xMeta->isAutoIncrement( rColumnPos.second ) )
                 {
                     // it is auto incremented. Let the DBMS deal with it.
-                    // TODO initial value could be set when defining the
-                    // table
                     ++nSourceColumn;
                     continue;
                 }
 
-                if ( bAutoIncrement && bInsertAutoIncrement )
-                {
-                    xStatementParams->setInt( 1, nRowCount );
-                    bInsertAutoIncrement = false;
-                    continue;
-                }
-
                 if ( ( nSourceColumn < 1 ) || ( nSourceColumn >= static_cast<sal_Int32>(aSourceColTypes.size()) ) )
                 {   // ( we have to check here against 1 because the parameters are 1 based)
                     ::dbtools::throwSQLException("Internal error: invalid column type index.",


More information about the Libreoffice-commits mailing list