summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-08-14 11:10:35 +0000
committerKurt Zenker <kz@openoffice.org>2008-08-14 11:10:35 +0000
commit8c70ec3229a89c3c128dfa70669f45dca321e226 (patch)
treed777602603d3dec1f553c125aaaa5dbcab7156cf /dbaccess
parent7be7cf5d01bedc080def8c1b37be22ca01686169 (diff)
INTEGRATION: CWS dba30h_DEV300 (1.63.12); FILE MERGED
2008/08/11 20:12:41 fs 1.63.12.1: #i92668#
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/app/AppController.cxx15
1 files changed, 9 insertions, 6 deletions
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<OLinkedDocumentsAccess> 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: