diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-04-18 10:12:44 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-04-18 10:12:44 +0000 |
commit | 9f7d869d966034cf4111621e58fdd6ffef9c8587 (patch) | |
tree | 0b085e83e657bfe8d7b6613ff90a37d438390511 /xmloff | |
parent | 11388bc9f2fe6dfd5d3939558861c7e7d7a549f5 (diff) |
INTEGRATION: CWS impress46 (1.103.22); FILE MERGED
2005/04/11 14:41:20 sj 1.103.22.1: #i47089# fixed unhandled excepton
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/ximpshap.cxx | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx index 9fbce9a5e8be..b8c0b11abaf8 100644 --- a/xmloff/source/draw/ximpshap.cxx +++ b/xmloff/source/draw/ximpshap.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ximpshap.cxx,v $ * - * $Revision: 1.104 $ + * $Revision: 1.105 $ * - * last change: $Author: obo $ $Date: 2005-04-12 16:53:18 $ + * last change: $Author: obo $ $Date: 2005-04-18 11:12:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -166,6 +166,10 @@ #include <com/sun/star/drawing/PolyPolygonBezierCoords.hpp> #endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_ +#include <com/sun/star/beans/XPropertySetInfo.hpp> +#endif + #ifndef _COM_SUN_STAR_DRAWING_CONNECTORTYPE_HPP_ #include <com/sun/star/drawing/ConnectorType.hpp> #endif @@ -2952,10 +2956,15 @@ void SdXMLPluginShapeContext::EndElement() if ( maSize.Width && maSize.Height ) { - // the visual area for a plugin must be set on loading - awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height ); - aAny <<= aRect; - xProps->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "VisibleArea" ) ), aAny ); + const rtl::OUString sVisibleArea( RTL_CONSTASCII_USTRINGPARAM( "VisibleArea" ) ); + uno::Reference< beans::XPropertySetInfo > aXPropSetInfo( xProps->getPropertySetInfo() ); + if ( !aXPropSetInfo.is() || aXPropSetInfo->hasPropertyByName( sVisibleArea ) ) + { + // the visual area for a plugin must be set on loading + awt::Rectangle aRect( 0, 0, maSize.Width, maSize.Height ); + aAny <<= aRect; + xProps->setPropertyValue( sVisibleArea, aAny ); + } } if( !mbMedia ) |