summaryrefslogtreecommitdiffstats
path: root/basic/source
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2007-08-03 08:56:49 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2007-08-03 08:56:49 +0000
commit8bc2194da83dfbb1b5c9360f964981a34f1dc9e6 (patch)
tree78478e83102ef94322d8c97f7051daaceb07c99a /basic/source
parentINTEGRATION: CWS ab34 (1.6.56); FILE MERGED (diff)
downloadcore-8bc2194da83dfbb1b5c9360f964981a34f1dc9e6.tar.gz
core-8bc2194da83dfbb1b5c9360f964981a34f1dc9e6.zip
INTEGRATION: CWS ab34 (1.6.4); FILE MERGED
2007/07/24 11:16:18 ab 1.6.4.2: #i77072# typo 2007/07/04 14:14:15 ab 1.6.4.1: #i78470# Handle parsing error
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/uno/dlgcont.cxx22
1 files changed, 17 insertions, 5 deletions
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 959ced21a5bf..9c4b999bc49a 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: dlgcont.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: ihi $ $Date: 2007-06-05 15:11:35 $
+ * last change: $Author: hr $ $Date: 2007-08-03 09:56:49 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -98,6 +98,8 @@
#include <svtools/pathoptions.hxx>
#include <xmlscript/xmldlg_imexp.hxx>
#include <cppuhelper/factory.hxx>
+#include <svtools/sfxecode.hxx>
+#include <svtools/ehdl.hxx>
namespace basic
@@ -365,9 +367,19 @@ Any SAL_CALL SfxDialogLibraryContainer::importLibraryElement
source.aInputStream = xInput;
source.sSystemId = aFile;
- // start parsing
- xParser->setDocumentHandler( ::xmlscript::importDialogModel( xDialogModel, xContext ) );
- xParser->parseStream( source );
+ try {
+ // start parsing
+ xParser->setDocumentHandler( ::xmlscript::importDialogModel( xDialogModel, xContext ) );
+ xParser->parseStream( source );
+ }
+ catch( Exception& )
+ {
+ OSL_ENSURE( 0, "Parsing error\n" );
+ SfxErrorContext aEc( ERRCTX_SFX_LOADBASIC, aFile );
+ ULONG nErrorCode = ERRCODE_IO_GENERAL;
+ ErrorHandler::HandleError( nErrorCode );
+ return aRetAny;
+ }
// Create InputStream, TODO: Implement own InputStreamProvider
// to avoid creating the DialogModel here!