[ooo-build-commit] patches/dev300 patches/vba
Noel Power
noelp at kemper.freedesktop.org
Wed Oct 28 13:07:05 PDT 2009
patches/dev300/apply | 2 -
patches/vba/vba-thiscomponent-fix.diff | 58 +++++++++++++++++++++++++++++++++
2 files changed, 59 insertions(+), 1 deletion(-)
New commits:
commit 1019a4c1d32fd962d19f5469b24f24ec9d5bb33a
Author: Noel Power <noel.power at novell.com>
Date: Wed Oct 28 19:43:26 2009 +0000
add back erroneously deleted exposure of vba document object name
* patches/dev300/apply:
* patches/vba/vba-thiscomponent-fix.diff:
diff --git a/patches/dev300/apply b/patches/dev300/apply
index b2aa056..b7d024e 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1641,7 +1641,7 @@ vba-control-api-vis-fix.diff, bnc#542132
vba-fix-isempty.diff, bnc#541749
vba-fix-wsfunction-booleanparam.diff, bnc#541735
vba-fix-errobj-errnum.diff, bcn#541755
-
+vba-thiscomponent-fix.diff
[ VBAObjects ]
SectionOwner => noelpwer
vba-basic-not-fix.diff, i#105321, Fong
diff --git a/patches/vba/vba-thiscomponent-fix.diff b/patches/vba/vba-thiscomponent-fix.diff
new file mode 100644
index 0000000..610d31a
--- /dev/null
+++ b/patches/vba/vba-thiscomponent-fix.diff
@@ -0,0 +1,58 @@
+diff --git sc/source/ui/unoobj/docuno.cxx sc/source/ui/unoobj/docuno.cxx
+index b621d90..9570e22 100644
+--- sc/source/ui/unoobj/docuno.cxx
++++ sc/source/ui/unoobj/docuno.cxx
+@@ -105,6 +105,8 @@
+ using namespace com::sun::star;
+ using namespace com::sun::star::document::VbaEventId;
+
++#define SC_UNO_VBADOCOBJ "ThisVBADocObj" // perhaps we want to actually make this ThisWorkbook ?
++
+ //------------------------------------------------------------------------
+
+ // alles ohne Which-ID, Map nur fuer PropertySetInfo
+@@ -119,6 +121,7 @@ const SfxItemPropertyMapEntry* lcl_GetDocOptPropertyMap()
+ {MAP_CHAR_LEN(SC_UNO_AUTOCONTFOC), 0, &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_BASICLIBRARIES), 0, &getCppuType((uno::Reference< script::XLibraryContainer >*)0), beans::PropertyAttribute::READONLY, 0},
+ {MAP_CHAR_LEN(SC_UNO_DIALOGLIBRARIES), 0, &getCppuType((uno::Reference< script::XLibraryContainer >*)0), beans::PropertyAttribute::READONLY, 0},
++ {MAP_CHAR_LEN(SC_UNO_VBADOCOBJ), 0, &getCppuType((beans::PropertyValue*)0), beans::PropertyAttribute::READONLY, 0},
+ {MAP_CHAR_LEN(SC_UNO_CALCASSHOWN), PROP_UNO_CALCASSHOWN, &getBooleanCppuType(), 0, 0},
+ {MAP_CHAR_LEN(SC_UNONAME_CLOCAL), 0, &getCppuType((lang::Locale*)0), 0, 0},
+ {MAP_CHAR_LEN(SC_UNO_CJK_CLOCAL), 0, &getCppuType((lang::Locale*)0), 0, 0},
+@@ -1581,6 +1584,18 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa
+ {
+ aRet <<= pDocShell->GetDialogContainer();
+ }
++ else if ( aString.EqualsAscii( SC_UNO_VBADOCOBJ ) )
++ {
++ // PropertyValue seems extreme because we store
++ // the model ( as the value member ) of the PropertyValue that is
++ // itself a property of the model ( the intention however is to
++ // store something like a Workbook object... but we don't do that )
++ // yet
++ beans::PropertyValue aProp;
++ aProp.Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisExcelDoc") );
++ aProp.Value <<= pDocShell->GetModel();
++ aRet <<= aProp;
++ }
+ else if ( aString.EqualsAscii( SC_UNO_RUNTIMEUID ) )
+ {
+ aRet <<= getRuntimeUID();
+diff --git sfx2/source/doc/objxtor.cxx sfx2/source/doc/objxtor.cxx
+index e267793..fb43eaf 100644
+--- sfx2/source/doc/objxtor.cxx
++++ sfx2/source/doc/objxtor.cxx
+@@ -147,6 +147,13 @@ void lcl_UpdateAppBasicDocVars( const Reference< XInterface >& _rxComponent, bo
+ {
+ try
+ {
++ // ThisVBADocObj contains a PropertyValue
++ // Name is ( the name of the VBA global to insert )
++ // Value is the Object to insert.
++ // ( note: at the moment the Value is actually the model so
++ // it strictly is not necessary, however we do intend to store
++ // not the model in basic but a custom object, so we keep this
++ // level of indirection for future proofing )
+ beans::PropertyValue aProp;
+ xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ThisVBADocObj") ) ) >>= aProp;
+ rtl::OString sTmp( rtl::OUStringToOString( aProp.Name, RTL_TEXTENCODING_UTF8 ) );
More information about the ooo-build-commit
mailing list