1 diff --git sc/source/ui/vba/vbaworksheet.cxx sc/source/ui/vba/vbaworksheet.cxx
2 index 310f81e..166abfe 100644
3 --- sc/source/ui/vba/vbaworksheet.cxx
4 +++ sc/source/ui/vba/vbaworksheet.cxx
7 #include <com/sun/star/beans/XPropertySet.hpp>
8 #include <com/sun/star/beans/XIntrospectionAccess.hpp>
9 +#include <com/sun/star/beans/XIntrospection.hpp>
10 #include <com/sun/star/container/XNamed.hpp>
11 #include <com/sun/star/util/XProtectable.hpp>
12 #include <com/sun/star/table/XCellRange.hpp>
13 @@ -764,9 +765,9 @@ ScVbaWorksheet::invoke( const ::rtl::OUString& aFunctionName, const uno::Sequenc
17 -ScVbaWorksheet::setValue( const ::rtl::OUString& /*aPropertyName*/, const uno::Any& /*aValue*/ ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
18 +ScVbaWorksheet::setValue( const ::rtl::OUString& aPropertyName, const uno::Any& aValue ) throw (beans::UnknownPropertyException, script::CannotConvertException, reflection::InvocationTargetException, uno::RuntimeException)
20 - throw uno::RuntimeException(); // unsupported operation
21 + setDefaultPropByIntrospection( uno::makeAny( getValue( aPropertyName ) ), aValue );
24 ScVbaWorksheet::getValue( const ::rtl::OUString& aPropertyName ) throw (beans::UnknownPropertyException, uno::RuntimeException)
25 diff --git vbahelper/inc/vbahelper/vbahelper.hxx vbahelper/inc/vbahelper/vbahelper.hxx
26 index 5749839..3fc1a62 100644
27 --- vbahelper/inc/vbahelper/vbahelper.hxx
28 +++ vbahelper/inc/vbahelper/vbahelper.hxx
29 @@ -91,6 +91,7 @@ namespace ooo
30 VBAHELPER_DLLPUBLIC double PixelsToPoints( css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, sal_Bool bVertical);
31 VBAHELPER_DLLPUBLIC sal_Int32 getPointerStyle( const css::uno::Reference< css::frame::XModel >& );
32 VBAHELPER_DLLPUBLIC void setCursorHelper( const css::uno::Reference< css::frame::XModel >& xModel, const Pointer& rPointer, sal_Bool bOverWrite );
33 + VBAHELPER_DLLPUBLIC void setDefaultPropByIntrospection( const css::uno::Any& aObj, const css::uno::Any& aValue ) throw ( css::uno::RuntimeException );
35 class VBAHELPER_DLLPUBLIC Millimeter
37 diff --git vbahelper/source/vbahelper/vbahelper.cxx vbahelper/source/vbahelper/vbahelper.cxx
38 index b95ccf1..acdfb9e 100644
39 --- vbahelper/source/vbahelper/vbahelper.cxx
40 +++ vbahelper/source/vbahelper/vbahelper.cxx
42 #include <com/sun/star/frame/XFrame.hpp>
43 #include <com/sun/star/frame/XDesktop.hpp>
44 #include <com/sun/star/frame/XController.hpp>
45 +#include <com/sun/star/script/XDefaultProperty.hpp>
46 #include <com/sun/star/uno/XComponentContext.hpp>
47 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
48 #include <com/sun/star/beans/XPropertySet.hpp>
49 @@ -952,6 +953,23 @@ String docMacroExists( SfxObjectShell* pShell, const String& sMod, const String&
53 +void setDefaultPropByIntrospection( const uno::Any& aObj, const uno::Any& aValue ) throw ( uno::RuntimeException )
55 + uno::Reference< beans::XIntrospectionAccess > xUnoAccess( getIntrospectionAccess( aObj ) );
57 + // #MAYBE #FIXME sort of a bit of a hack,
58 + uno::Reference< script::XDefaultProperty > xDflt( aObj, uno::UNO_QUERY_THROW );
59 + uno::Reference< beans::XPropertySet > xPropSet;
61 + if ( xUnoAccess.is() )
62 + xPropSet.set( xUnoAccess->queryAdapter( ::getCppuType( (const uno::Reference< beans::XPropertySet > *)0 ) ), uno::UNO_QUERY);
64 + if ( xPropSet.is() )
65 + xPropSet->setPropertyValue( xDflt->getDefaultPropertyName(), aValue );
67 + throw uno::RuntimeException();
70 #define VBA_LEFT "PositionX"
71 #define VBA_TOP "PositionY"
72 UserFormGeometryHelper::UserFormGeometryHelper( const uno::Reference< uno::XComponentContext >& /*xContext*/, const uno::Reference< awt::XControl >& xControl )