[ooo-build-commit] patches/vba
Noel Power
noelp at kemper.freedesktop.org
Wed Dec 9 05:33:54 PST 2009
patches/vba/vba-dont-load-for-odf.diff | 76 +++++++++++++++++++++++----------
1 file changed, 54 insertions(+), 22 deletions(-)
New commits:
commit 3cc2ab5dea911717da6aad7f9d98ed0c41567688
Author: Noel Power <noel.power at novell.com>
Date: Wed Dec 9 13:30:57 2009 +0000
fix fake vba events
* patches/vba/vba-dont-load-for-odf.diff:
diff --git a/patches/vba/vba-dont-load-for-odf.diff b/patches/vba/vba-dont-load-for-odf.diff
index 2b2fd2a..c37da55 100644
--- a/patches/vba/vba-dont-load-for-odf.diff
+++ b/patches/vba/vba-dont-load-for-odf.diff
@@ -122,7 +122,7 @@ index 3eb6c9d..502a0bd 100644
}
return xRet;
diff --git sc/util/makefile.mk sc/util/makefile.mk
-index 179b9bb..cec3387 100644
+index a306809..995ed36 100644
--- sc/util/makefile.mk
+++ sc/util/makefile.mk
@@ -79,7 +79,6 @@ SHL1IMPLIB= sci
@@ -134,38 +134,70 @@ index 179b9bb..cec3387 100644
$(SFXLIB) \
$(SVTOOLLIB) \
diff --git svx/source/form/fmundo.cxx svx/source/form/fmundo.cxx
-index c438b74..dd72639 100644
+index c438b74..9c91b48 100644
--- svx/source/form/fmundo.cxx
+++ svx/source/form/fmundo.cxx
-@@ -108,12 +108,23 @@ public:
- {
- Reference< XMultiComponentFactory > xMFac(
- xCtx->getServiceManager(), UNO_QUERY );
+@@ -98,25 +98,7 @@ class ScriptEventListenerWrapper : public ScriptEventListener_BASE
+ public:
+ ScriptEventListenerWrapper( FmFormModel& _rModel) throw ( RuntimeException ) : pModel(&_rModel)
+ {
+- Reference < XPropertySet > xProps(
+- ::comphelper::getProcessServiceFactory(), UNO_QUERY );
+- if ( xProps.is() )
+- {
+- Reference< XComponentContext > xCtx( xProps->getPropertyValue(
+- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY );
+- if ( xCtx.is() )
+- {
+- Reference< XMultiComponentFactory > xMFac(
+- xCtx->getServiceManager(), UNO_QUERY );
- if ( xMFac.is() )
-+ SfxObjectShellRef xObjSh = pModel->GetObjectShell();
-+ Reference< XMultiServiceFactory > xDocFac;
-+ if ( xObjSh.Is() )
-+ xDocFac.set( xObjSh->GetModel(), UNO_QUERY );
-+
-+ if ( xMFac.is() && xDocFac.is() )
- {
+- {
- m_vbaListener.set( xMFac->createInstanceWithContext(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "ooo.vba.EventListener" ) ), xCtx ),
- UNO_QUERY_THROW );
-+ // bit of a hack, code name provider
-+ // will only created if this is a 'supported;
-+ // alien document
-+
-+ Reference< XInterface > xNameQuery( xDocFac->createInstance( rtl::OUString::createFromAscii( "ooo.vba.VBACodeNameProvider" ) ) );
-+ if ( xNameQuery.is() )
+- }
+- }
+- }
++
+ }
+ // XEventListener
+ virtual void SAL_CALL disposing(const EventObject& ) throw( RuntimeException ){}
+@@ -144,6 +126,33 @@ public:
+ private:
+ void setModel()
+ {
++ if ( !m_vbaListener.is() )
++ {
++ Reference < XPropertySet > xProps(
++ ::comphelper::getProcessServiceFactory(), UNO_QUERY );
++ if ( xProps.is() )
++ {
++ Reference< XComponentContext > xCtx( xProps->getPropertyValue(
++ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY );
++ if ( xCtx.is() )
++ {
++ Reference< XMultiComponentFactory > xMFac(
++ xCtx->getServiceManager(), UNO_QUERY );
++ SfxObjectShellRef xObjSh = pModel->GetObjectShell();
++ Reference< XMultiServiceFactory > xDocFac;
++ if ( xObjSh.Is() )
++ xDocFac.set( xObjSh->GetModel(), UNO_QUERY );
++
++ if ( xMFac.is() )
++ {
+ m_vbaListener.set( xMFac->createInstanceWithContext(
+ rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "ooo.vba.EventListener" ) ), xCtx ),
+ UNO_QUERY_THROW );
- }
- }
- }
++ }
++ }
++ }
++ }
+ Reference< XPropertySet > xProps( m_vbaListener, UNO_QUERY );
+ if ( xProps.is() )
+ {
diff --git sw/source/core/doc/doc.cxx sw/source/core/doc/doc.cxx
index 914a843..aba6e2f 100644
--- sw/source/core/doc/doc.cxx
More information about the ooo-build-commit
mailing list