diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-05-13 06:56:46 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-05-13 06:56:46 +0000 |
commit | 5bc78eaadb92d7c843bfb892c7120a7e406d9c72 (patch) | |
tree | a66245f7b78b9265e9e6e3b6fc9d3ead3d9ae832 /xmloff | |
parent | c276550e07f8078fe9345985f70e8384d930a83f (diff) |
INTEGRATION: CWS sj20 (1.69.16); FILE MERGED
2005/05/10 11:46:35 af 1.69.16.1: #i48466# Catching UnknownPropertyExceptions when accessing the 'Family' property in collectShapeAutoStyles().
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 48e57a2577ca..cebae283d3bf 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: shapeexport.cxx,v $ * - * $Revision: 1.69 $ + * $Revision: 1.70 $ * - * last change: $Author: obo $ $Date: 2005-04-12 16:46:04 $ + * last change: $Author: rt $ $Date: 2005-05-13 07:56:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -384,12 +384,21 @@ void XMLShapeExport::collectShapeAutoStyles(const uno::Reference< drawing::XShap // get family ID uno::Reference< beans::XPropertySet > xStylePropSet(xStyle, uno::UNO_QUERY); DBG_ASSERT( xStylePropSet.is(), "style without a XPropertySet?" ); - if(xStylePropSet.is()) + try { - OUString aFamilyName; - xStylePropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Family"))) >>= aFamilyName; - if(aFamilyName.getLength() && aFamilyName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("presentation")))) - aShapeInfo.mnFamily = XML_STYLE_FAMILY_SD_PRESENTATION_ID; + if(xStylePropSet.is()) + { + OUString aFamilyName; + xStylePropSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Family"))) >>= aFamilyName; + if(aFamilyName.getLength() && aFamilyName.equals(OUString(RTL_CONSTASCII_USTRINGPARAM("presentation")))) + aShapeInfo.mnFamily = XML_STYLE_FAMILY_SD_PRESENTATION_ID; + } + } + catch(beans::UnknownPropertyException aException) + { + // Ignored. + DBG_ASSERT(false, + "XMLShapeExport::collectShapeAutoStyles: style has no 'Family' property"); } // get parent-style name |