Tag: cws_src680_dba29
User: fs      
Date: 05/03/30 02:20:33

Modified:
 /dba/dbaccess/source/ui/app/
  AppController.cxx

Log:
 #i45908# renaming a query doesn't need a connection

File Changes:

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

File [changed]: AppController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.18&r2=1.18.6.1
Delta lines:  +13 -12
---------------------
--- AppController.cxx   18 Mar 2005 10:07:07 -0000      1.18
+++ AppController.cxx   30 Mar 2005 10:20:30 -0000      1.18.6.1
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: AppController.cxx,v $
  *
- *  $Revision: 1.18 $
+ *  $Revision: 1.18.6.1 $
  *
- *  last change: $Author: obo $ $Date: 2005/03/18 10:07:07 $
+ *  last change: $Author: fs $ $Date: 2005/03/30 10:20:30 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -1935,18 +1935,19 @@
                                                }
                                        }
                                        break;
-                               case E_QUERY:
-                                       if ( 
xContainer->hasByName(*aList.begin()) )
-                                       {
-                                               
xRename.set(xContainer->getByName(*aList.begin()),UNO_QUERY);
-                                               aDlg.reset( new 
OSaveAsDlg(getView(),CommandType::QUERY,xContainer,xConnection->getMetaData(),xConnection,*aList.begin(),SAD_TITLE_RENAME)
 );
-                                       }
-                                       break;
                                case E_TABLE:
+                    if ( !ensureConnection( xConnection, sal_True ) )
+                        break;
+                    // NO break
+                               case E_QUERY:
                                        if ( 
xContainer->hasByName(*aList.begin()) )
                                        {
                                                
xRename.set(xContainer->getByName(*aList.begin()),UNO_QUERY);
-                                               aDlg.reset( new 
OSaveAsDlg(getView(),CommandType::TABLE,xContainer,xConnection->getMetaData(),xConnection,*aList.begin(),SAD_TITLE_RENAME)
 );
+                        sal_Int32 nCommandType = eType == E_QUERY ? 
CommandType::QUERY : CommandType::TABLE;
+                                           aDlg.reset( new OSaveAsDlg(
+                            getView(), nCommandType, xContainer,
+                            xConnection.is() ? xConnection->getMetaData() : 
Reference< XDatabaseMetaData >(),
+                            xConnection, *aList.begin(), SAD_TITLE_RENAME) );
                                        }
                                        break;
                        }




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

Reply via email to