summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2000-12-11 07:05:22 +0000
committerChristian Lippka <cl@openoffice.org>2000-12-11 07:05:22 +0000
commit7e2cab44c05c5afe4256d4e0807db51ddaa0f430 (patch)
treedcf201a6f83a5343645b5c3be71732b09e19fdc9 /xmloff
parent6476232132cdca5cbc89ca3acea90a03c4fdcef8 (diff)
#81647# catch exceptions for missing styles
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/styleexp.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index 96850bbab316..730c7e87ffc1 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: styleexp.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: cl $ $Date: 2000-11-08 12:35:25 $
+ * last change: $Author: cl $ $Date: 2000-12-11 08:05:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -346,7 +346,18 @@ void XMLStyleExport::exportStyleFamily(
for( sal_Int32 i=0; i < nStyles; i++ )
{
Reference< XStyle > xStyle;
- xStyles->getByIndex( i ) >>= xStyle;
+ try
+ {
+ xStyles->getByIndex( i ) >>= xStyle;
+ }
+ catch( lang::IndexOutOfBoundsException )
+ {
+ // due to bugs in prior versions it is possible that
+ // a binary file is missing some critical styles.
+ // The only possible way to deal with this is to
+ // not export them here and remain silent.
+ continue;
+ }
DBG_ASSERT( xStyle.is(), "Style not found for export!" );
if( xStyle.is() )