summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unoshap2.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-11-26 17:15:31 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-11-26 17:15:31 +0000
commitdb36eb17cd7f247c5f63d9b8b24017ff7554d762 (patch)
tree26ab2192a6417151800f9f66a2cb2c805fccf424 /svx/source/unodraw/unoshap2.cxx
parentc2426eabd5b3c72464e4e690f7f0802dcf180e19 (diff)
INTEGRATION: CWS presentationengine01 (1.47.8); FILE MERGED
2004/08/25 13:47:22 ka 1.47.8.1: #i30383#: added Graphic property for GraphicObjectShape
Diffstat (limited to 'svx/source/unodraw/unoshap2.cxx')
-rw-r--r--svx/source/unodraw/unoshap2.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index d3500c1199..1a4d602f27 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unoshap2.cxx,v $
*
- * $Revision: 1.47 $
+ * $Revision: 1.48 $
*
- * last change: $Author: rt $ $Date: 2004-07-12 14:52:28 $
+ * last change: $Author: rt $ $Date: 2004-11-26 18:15:31 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,6 +76,9 @@
#ifndef _COM_SUN_STAR_DRAWING_POINTSEQUENCE_HPP_
#include <com/sun/star/drawing/PointSequence.hpp>
#endif
+#ifndef _COM_SUN_STAR_GRAPHIC_XGRAPHIC_HPP_
+#include <com/sun/star/graphic/XGraphic.hpp>
+#endif
#ifndef _B2D_MATRIX3D_HXX
#include <goodies/matrix3d.hxx>
#endif
@@ -1754,6 +1757,15 @@ void SAL_CALL SvxGraphicObject::setPropertyValue( const OUString& aPropertyName,
((SdrGrafObj*)pObj)->SetGrafStreamURL( aStreamURL );
((SdrGrafObj*)pObj)->ForceSwapOut();
}
+ else if( pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_GRAPHIC)))
+ {
+ Reference< graphic::XGraphic > xGraphic;
+
+ if( !( aValue >>= xGraphic ) )
+ throw lang::IllegalArgumentException();
+
+ static_cast< SdrGrafObj*>( pObj)->SetGraphic( xGraphic );
+ }
else
{
SvxShape::setPropertyValue(aPropertyName, aValue);
@@ -1813,6 +1825,11 @@ uno::Any SAL_CALL SvxGraphicObject::getPropertyValue( const OUString& aPropertyN
return aAny;
}
+ else if( pObj && aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(UNO_NAME_GRAPHOBJ_GRAPHIC)) )
+ {
+ Reference< graphic::XGraphic > xGraphic( static_cast< SdrGrafObj* >( pObj )->GetGraphic().GetXGraphic() );
+ return uno::Any( &xGraphic, ::getCppuType((const Reference<graphic::XGraphic>*)0) );
+ }
else
{
return SvxShape::getPropertyValue(aPropertyName);