Tag: cws_src680_dba24d
User: fs      
Date: 2007-11-19 10:55:07+0000
Modified:
   dba/dbaccess/source/ui/uno/copytablewizard.cxx

Log:
 #i81658# if the user cancelled the parameter request, return RET_CANCEL as 
overall execution result

File Changes:

Directory: /dba/dbaccess/source/ui/uno/
=======================================

File [changed]: copytablewizard.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/uno/copytablewizard.cxx?r1=1.1.2.14&r2=1.1.2.15
Delta lines:  +19 -3
--------------------
--- copytablewizard.cxx 2007-11-19 09:49:49+0000        1.1.2.14
+++ copytablewizard.cxx 2007-11-19 10:55:04+0000        1.1.2.15
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: copytablewizard.cxx,v $
  *
- *  $Revision: 1.1.2.14 $
+ *  $Revision: 1.1.2.15 $
  *
- *  last change: $Author: fs $ $Date: 2007/11/19 09:49:49 $
+ *  last change: $Author: fs $ $Date: 2007/11/19 10:55:04 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -345,6 +345,7 @@
         InteractionHandler              m_xInteractionHandler;
         ::cppu::OInterfaceContainerHelper
                                         m_aCopyTableListeners;
+        sal_Int16                       m_nOverrideExecutionResult;
     };
 
     //=========================================================================
@@ -385,6 +386,7 @@
         ,m_bSourceSelectionBookmarks( true )
         ,m_xDestConnection()
         ,m_aCopyTableListeners( m_aMutex )
+        ,m_nOverrideExecutionResult( -1 )
     {
     }
 
@@ -539,7 +541,13 @@
     ::sal_Int16 SAL_CALL CopyTableWizard::execute(  ) throw (RuntimeException)
     {
         CopyTableAccessGuard aGuard( *this );
-        return CopyTableWizard_DialogBase::execute();
+
+        m_nOverrideExecutionResult = -1;
+        sal_Int16 nExecutionResult = CopyTableWizard_DialogBase::execute();
+        if ( m_nOverrideExecutionResult )
+            nExecutionResult = m_nOverrideExecutionResult;
+
+        return nExecutionResult;
     }
 
     //-------------------------------------------------------------------------
@@ -1347,6 +1355,14 @@
         catch( const Exception& )
         {
             aError = ::cppu::getCaughtException();
+
+            // silence the error of the user cancelling the parameter's dialog
+            SQLException aSQLError;
+            if ( ( aError >>= aSQLError ) && ( aSQLError.ErrorCode == 
::dbtools::ParameterInteractionCancelled ) )
+            {
+                aError.clear();
+                m_nOverrideExecutionResult = RET_CANCEL;
+            }
         }
 
         if ( aError.hasValue() && m_xInteractionHandler.is() )




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to