Tag: cws_src680_mozab05 User: windly Date: 05/01/16 23:48:27 Modified: /dba/dbaccess/source/ui/app/ AppController.cxx
Log: RESYNC: (1.10-1.11); FILE MERGED 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.10.6.1&r2=1.10.6.2 Delta lines: +20 -13 --------------------- --- AppController.cxx 3 Dec 2004 10:25:59 -0000 1.10.6.1 +++ AppController.cxx 17 Jan 2005 07:48:24 -0000 1.10.6.2 @@ -459,9 +459,9 @@ //-------------------------------------------------------------------- sal_Bool OApplicationController::Construct(Window* _pParent) { - // _pParent->SetSizePixel(_pParent->LogicToPixel( Size(APP_SIZE_WIDTH,APP_SIZE_HEIGHT), MAP_APPFONT )); m_pView = new OApplicationView(_pParent,getORB(),this,this,this,this,this,this); m_pView->SetUniqueId(UID_APP_VIEW); + // late construction sal_Bool bSuccess = sal_False; try @@ -503,7 +503,7 @@ m_pClipbordNotifier->AddRemoveListener( getView(), sal_True ); OApplicationController_CBASE::Construct( _pParent ); - getContainer()->Show(); + getView()->Show(); return sal_True; } @@ -576,7 +576,7 @@ FeatureState aReturn; aReturn.bEnabled = sal_False; // check this first - if ( !getContainer() ) + if ( !getContainer() || m_bReadOnly ) return aReturn; try @@ -657,12 +657,19 @@ case SID_DB_FORM_NEW_PILOT: aReturn.bEnabled = !isDataSourceReadOnly(); break; - case ID_NEW_TABLE_DESIGN: case ID_NEW_VIEW_DESIGN: case SID_DB_NEW_VIEW_SQL: - case ID_NEW_TABLE_DESIGN_AUTO_PILOT: case ID_NEW_VIEW_DESIGN_AUTO_PILOT: aReturn.bEnabled = !isDataSourceReadOnly() && !isConnectionReadOnly(); + if ( aReturn.bEnabled ) + { + Reference<XViewsSupplier> xViewsSup(getActiveConnection(),UNO_QUERY); + aReturn.bEnabled = xViewsSup.is(); + } + break; + case ID_NEW_TABLE_DESIGN: + case ID_NEW_TABLE_DESIGN_AUTO_PILOT: + aReturn.bEnabled = !isDataSourceReadOnly() && !isConnectionReadOnly(); break; case ID_DIRECT_SQL: aReturn.bEnabled = !isConnectionReadOnly(); @@ -891,7 +898,7 @@ { ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::MutexGuard aGuard(m_aMutex); - if ( !getContainer() ) + if ( !getContainer() || m_bReadOnly ) return; // return without execution try @@ -1506,7 +1513,7 @@ Reference<XConnection> xConnection; ensureConnection(xConnection); - if ( xConnection.is() ) + if ( xConnection.is() && getContainer()->getDetailView() ) { getContainer()->getDetailView()->createTablesPage(xConnection); Reference<XTablesSupplier> xTabSup(xConnection,UNO_QUERY); @@ -1535,7 +1542,7 @@ } xLayoutManager->unlock(); xLayoutManager->doLayout(); - if ( bAdd ) + if ( bAdd && getContainer()->getDetailView() ) { Reference< XNameAccess > xContainer = getElements(_eType); addContainerListener(xContainer); @@ -2110,7 +2117,7 @@ pTransfer = copyObject( ); Reference< XTransferable> xEnsureDelete = pTransfer; - if ( pTransfer ) + if ( pTransfer && getContainer()->getDetailView() ) { ElementType eType = getContainer()->getElementType(); pTransfer->StartDrag( getContainer()->getDetailView(), ((eType == E_FORM || eType == E_REPORT) ? DND_ACTION_COPYMOVE : DND_ACTION_COPY) ); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
