ooo-build r14818 - in trunk: . patches/vba



Author: noelpwer
Date: Wed Dec 10 16:53:42 2008
New Revision: 14818
URL: http://svn.gnome.org/viewvc/ooo-build?rev=14818&view=rev

Log:
2008-12-10  Noel Power  <noel power novell com>

        * patches/vba/variant-property.diff: fix i#93214
        * patches/vba/vba-word-support.diff: ensure VBAGlobals are *Always* 
        added ( for calc at least )


Modified:
   trunk/ChangeLog
   trunk/patches/vba/variant-property.diff
   trunk/patches/vba/vba-word-support.diff

Modified: trunk/patches/vba/variant-property.diff
==============================================================================
--- trunk/patches/vba/variant-property.diff	(original)
+++ trunk/patches/vba/variant-property.diff	Wed Dec 10 16:53:42 2008
@@ -1,3 +1,17 @@
+diff --git basic/source/classes/sb.cxx basic/source/classes/sb.cxx
+index e47234f..349c2cc 100644
+--- basic/source/classes/sb.cxx
++++ basic/source/classes/sb.cxx
+@@ -433,7 +433,8 @@ SbClassModuleObject::SbClassModuleObject( SbModule* pClassModule )
+ 			SbProcedureProperty* pNewProp = new SbProcedureProperty
+ 				( pProcedureProp->GetName(), pProcedureProp->GetType() );
+ 				// ( pProcedureProp->GetName(), pProcedureProp->GetType(), this );
+-			pNewProp->ResetFlag( SBX_NO_BROADCAST );
++			pNewProp->SetFlags( nFlags_ ); // Copy flags
++			pNewProp->ResetFlag( SBX_NO_BROADCAST ); // except the Broadcast if it was set
+ 			pProcedureProp->SetFlags( nFlags_ );
+ 			pProps->PutDirect( pNewProp, i );
+ 			StartListening( pNewProp->GetBroadcaster(), TRUE );
 diff --git basic/source/comp/dim.cxx basic/source/comp/dim.cxx
 index e0c93fa..d2dc366 100644
 --- basic/source/comp/dim.cxx

Modified: trunk/patches/vba/vba-word-support.diff
==============================================================================
--- trunk/patches/vba/vba-word-support.diff	(original)
+++ trunk/patches/vba/vba-word-support.diff	Wed Dec 10 16:53:42 2008
@@ -496,30 +496,23 @@
      // prevent unnecessary broadcasts and updates
      DBG_ASSERT(pModificator == NULL, "The Modificator should not exist");
  	pModificator = new ScDocShellModificator( *this );
-@@ -369,7 +371,26 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
+@@ -369,7 +371,19 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
      }
      else
  		aDocument.SetInsertingFromOtherDoc( FALSE );
 -
-+	// see if vba mode is enabled, if so add globals
++	// add vba globals ( if they are availabl )
 +	SfxObjectShell* pShell = aDocument.GetDocumentShell();
 +	if ( pShell )
 +	{
-+		StarBASIC* pStd = pShell->GetBasic();
-+		if ( pStd )
-+		{
-+			if ( pStd->isVBAEnabled() )
-+			{
-+				uno::Reference < uno::XComponentContext > xCtx;
-+				uno::Reference < beans::XPropertySet > xProps(
-+					::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
-+				xCtx.set( xProps->getPropertyValue( rtl::OUString(
-+					RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))),
-+					uno::UNO_QUERY_THROW );
-+				uno::Any aGlobs = uno::makeAny( xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/ooo.vba.theGlobals") ) );
-+				pShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
-+			}
-+		}
++		uno::Reference < uno::XComponentContext > xCtx;
++		uno::Reference < beans::XPropertySet > xProps(
++			::comphelper::getProcessServiceFactory(), uno::UNO_QUERY_THROW );
++		xCtx.set( xProps->getPropertyValue( rtl::OUString(
++			RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))),
++				uno::UNO_QUERY_THROW );
++		uno::Any aGlobs = uno::makeAny( xCtx->getValueByName( ::rtl::OUString::createFromAscii( "/singletons/ooo.vba.theGlobals") ) );
++		pShell->GetBasicManager()->SetGlobalUNOConstant( "VBAGlobals", aGlobs );
 +	}
          // suppress VBA events when loading the xml
          uno::Reference< document::XVbaEventsHelper > xEvt( aDocument.GetVbaEventsHelper() );



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]