Tag: cws_src680_dba24d
User: fs      
Date: 2007-11-19 08:39:04+0000
Modified:
   dba/dbaccess/source/ui/uno/copytablewizard.cxx

Log:
 don't allow result sets as copy source, this is not yet supported

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.11&r2=1.1.2.12
Delta lines:  +17 -2
--------------------
--- copytablewizard.cxx 2007-11-19 08:32:25+0000        1.1.2.11
+++ copytablewizard.cxx 2007-11-19 08:39:01+0000        1.1.2.12
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: copytablewizard.cxx,v $
  *
- *  $Revision: 1.1.2.11 $
+ *  $Revision: 1.1.2.12 $
  *
- *  last change: $Author: fs $ $Date: 2007/11/19 08:32:25 $
+ *  last change: $Author: fs $ $Date: 2007/11/19 08:39:01 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -676,6 +676,21 @@
         OSL_PRECOND( _rxDescriptor.is() && m_xSourceConnection.is(), 
"CopyTableWizard::impl_extractSourceObject_throw: illegal arguments!" );
 
         Reference< XPropertySetInfo > xPSI( 
_rxDescriptor->getPropertySetInfo(), UNO_SET_THROW );
+
+        // in theory, we could allow to use a mere result set as copy source. 
However, since this is currently
+        // not implemented at all, we report this in the initialization phase 
already
+        if ( xPSI->hasPropertyByName( PROPERTY_RESULT_SET ) )
+        {
+            Reference< XResultSet > xSource( _rxDescriptor->getPropertyValue( 
PROPERTY_RESULT_SET ), UNO_QUERY );
+            if ( xSource.is() )
+                throw IllegalArgumentException(
+                    ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Result sets 
not yet supported as source of the copy operation." ) ),
+                        // TODO: resource
+                    *const_cast< CopyTableWizard* >( this ),
+                    1
+                );
+        }
+
         if  (   !xPSI->hasPropertyByName( PROPERTY_COMMAND )
             ||  !xPSI->hasPropertyByName( PROPERTY_COMMAND_TYPE )
             )




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

Reply via email to