User: obo Date: 05/03/18 02:07:10 Modified: /dba/dbaccess/source/ui/app/ AppController.cxx
Log: INTEGRATION: CWS dba25 (1.15.2); FILE MERGED 2005/03/14 13:29:14 fs 1.15.2.5: RESYNC: (1.16-1.17); FILE MERGED 2005/03/08 09:00:36 fs 1.15.2.4: RESYNC: (1.15-1.16); FILE MERGED 2005/03/07 06:40:22 oj 1.15.2.3: #i44066# checkif doc is readonly before asking to save changes 2005/03/04 08:04:52 oj 1.15.2.2: #i43915# only open a connection when preview is needed 2005/03/04 07:19:25 oj 1.15.2.1: #i43880# #i43912# use set connection as activeconnection 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.17&r2=1.18 Delta lines: +37 -5 -------------------- --- AppController.cxx 10 Mar 2005 16:43:10 -0000 1.17 +++ AppController.cxx 18 Mar 2005 10:07:07 -0000 1.18 @@ -586,7 +586,16 @@ return sal_False; Reference<XModifiable> xModi(m_xModel,UNO_QUERY); - if ( m_bCurrentlyModified || (xModi.is() && xModi->isModified()) ) + Reference<XStorable> xStor(getModel(),UNO_QUERY); + + if ( xStor.is() + && !xStor->isReadonly() + && ( m_bCurrentlyModified + || ( xModi.is() + && xModi->isModified() + ) + ) + ) { switch (ExecuteQuerySaveDocument(getView(),getStrippedDatabaseName())) { @@ -1222,6 +1231,7 @@ break; case SID_SELECTALL: getContainer()->selectAll(); + InvalidateAll(); break; case SID_DB_APP_DSRELDESIGN: { @@ -1230,13 +1240,18 @@ if ( xConnection.is() ) { ORelationDesignAccess aHelper(getORB()); - Reference< XComponent > xComponent(aHelper.create(Reference<XDataSource>(m_xDataSource,UNO_QUERY), Reference<XConnection>()),UNO_QUERY); + Reference< XComponent > xComponent(aHelper.create(Reference<XDataSource>(m_xDataSource,UNO_QUERY), getActiveConnection()),UNO_QUERY); addDocumentListener(xComponent,NULL); } } break; case SID_DB_APP_DSUSERADMIN: + { + Reference<XConnection> xConnection; + ensureConnection(xConnection); + if ( xConnection.is() ) openDialog(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.UserAdministrationDialog"))); + } break; case SID_DB_APP_TABLEFILTER: openTableFilterDialog(); @@ -1258,7 +1273,12 @@ askToReconnect(); break; case ID_DIRECT_SQL: + { + Reference<XConnection> xConnection; + ensureConnection(xConnection); + if ( xConnection.is() ) openDirectSQLDialog(); + } break; case SID_DB_APP_VIEW_TABLES: getContainer()->changeContainer(E_TABLE); @@ -1347,6 +1367,7 @@ CommandGroup::INSERT ); implDescribeSupportedFeature( ".uno:DBDelete", SID_DB_APP_DELETE, CommandGroup::EDIT ); + implDescribeSupportedFeature( ".uno:Delete", SID_DB_APP_DELETE, CommandGroup::EDIT ); implDescribeSupportedFeature( ".uno:DBRename", SID_DB_APP_RENAME, CommandGroup::EDIT ); implDescribeSupportedFeature( ".uno:DBEdit", SID_DB_APP_EDIT, CommandGroup::EDIT ); implDescribeSupportedFeature( ".uno:DBOpen", SID_DB_APP_OPEN, CommandGroup::EDIT ); @@ -2000,7 +2021,6 @@ // ----------------------------------------------------------------------------- void OApplicationController::onEntryDeSelect(SvTreeListBox* _pTree) { - getContainer()->showPreview(NULL); InvalidateAll(); } // ----------------------------------------------------------------------------- @@ -2032,6 +2052,18 @@ } break; case E_QUERY: + { + ::rtl::OUString sName = pView->getQualifiedName( _pEntry,NULL); + if ( pView->isPreviewEnabled() ) + { + Reference<XConnection> xConnection; + ensureConnection(xConnection); + if ( xConnection.is() ) + pView->showPreview(getDatabaseName(),xConnection,sName,sal_False); + } + return; + } + break; case E_TABLE: { Reference<XConnection> xConnection; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
