From 8c70ec3229a89c3c128dfa70669f45dca321e226 Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Thu, 14 Aug 2008 11:10:35 +0000 Subject: INTEGRATION: CWS dba30h_DEV300 (1.63.12); FILE MERGED 2008/08/11 20:12:41 fs 1.63.12.1: #i92668# --- dbaccess/source/ui/app/AppController.cxx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index 33c6b25dbe49..ccf76be41a7e 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: AppController.cxx,v $ - * $Revision: 1.63 $ + * $Revision: 1.64 $ * * This file is part of OpenOffice.org. * @@ -2076,11 +2076,14 @@ void OApplicationController::newElement( ElementType _eType, sal_Bool _bSQLView case E_REPORT: { ::std::auto_ptr aHelper = getDocumentsAccess(_eType); - Reference< XComponent > xComponent,xDefinition; - sal_Int32 nCommandType = -1; - const ::rtl::OUString sName(getCurrentlySelectedName(nCommandType)); - xComponent = aHelper->newDocument(_eType == E_FORM ? ID_FORM_NEW_TEXT : ID_REPORT_NEW_TEXT,xDefinition,nCommandType,sName); - addDocumentListener(xComponent,xDefinition); + if ( aHelper->isConnected() ) + { + Reference< XComponent > xComponent,xDefinition; + sal_Int32 nCommandType = -1; + const ::rtl::OUString sName(getCurrentlySelectedName(nCommandType)); + xComponent = aHelper->newDocument(_eType == E_FORM ? ID_FORM_NEW_TEXT : ID_REPORT_NEW_TEXT,xDefinition,nCommandType,sName); + addDocumentListener(xComponent,xDefinition); + } } break; case E_QUERY: -- cgit