ooo-build r15366 - in trunk: . patches/vba
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15366 - in trunk: . patches/vba
- Date: Wed, 18 Feb 2009 13:28:48 +0000 (UTC)
Author: noelpwer
Date: Wed Feb 18 13:28:47 2009
New Revision: 15366
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15366&view=rev
Log:
2009-02-17 Noel Power <noel power novell com>
* patches/vba/vba-word-support.diff: fix broken toolbar macro bindings
* patches/vba/vba-word-support-m0.diff:
Modified:
trunk/ChangeLog
trunk/patches/vba/vba-word-support-m0.diff
trunk/patches/vba/vba-word-support.diff
Modified: trunk/patches/vba/vba-word-support-m0.diff
==============================================================================
--- trunk/patches/vba/vba-word-support-m0.diff (original)
+++ trunk/patches/vba/vba-word-support-m0.diff Wed Feb 18 13:28:47 2009
@@ -28039,7 +28039,7 @@
index 0000000..8a39074
--- /dev/null
+++ vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
-@@ -0,0 +1,443 @@
+@@ -0,0 +1,454 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -28077,6 +28077,7 @@
+#include "vbacommandbarcontrol.hxx"
+#include <basic/sbstar.hxx>
+#include <basic/sbmod.hxx>
++#include <basic/sbmeth.hxx>
+
+using namespace com::sun::star;
+using namespace ooo::vba;
@@ -28329,12 +28330,22 @@
+ {
+ // convert the comand url into something like vnd.sun.star.script:Standard.testMacro.Macro1?language=Basic&location=document
+ rtl::OUString aCommandURL;
-+ rtl::OUString sUrlPart = rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.");
++ rtl::OUString sScheme = rtl::OUString::createFromAscii( "vnd.sun.star.script:");
+ SbModule* pModule = StarBASIC::GetActiveModule();
-+ if( pModule && ( _onaction.indexOf( sUrlPart ) == -1 ) )
++ if( pModule )
+ {
-+ rtl::OUString sUrlPart1 = rtl::OUString::createFromAscii( "?language=Basic&location=document");
-+ aCommandURL = sUrlPart.concat( pModule->GetName() ).concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".") ) ).concat( _onaction ).concat( sUrlPart1 );
++ String sTmp = _onaction;
++ if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pModule->Find( sTmp, SbxCLASS_METHOD ) ) )
++ {
++ if( pMethod )
++ {
++ sTmp.Insert( '.', 0 ).Insert( pModule->GetName(), 0 ).Insert( '.', 0 ).Insert( pModule->GetParent()->GetName(), 0 );
++ }
++ }
++
++ rtl::OUString sUrlPart2 = rtl::OUString::createFromAscii( "?language=Basic&location=document");
++ aCommandURL = sScheme.concat( sTmp ).concat( sUrlPart2 );
++ OSL_TRACE("**** METHOD IS %s", rtl::OUStringToOString( aCommandURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+ else
+ {
Modified: trunk/patches/vba/vba-word-support.diff
==============================================================================
--- trunk/patches/vba/vba-word-support.diff (original)
+++ trunk/patches/vba/vba-word-support.diff Wed Feb 18 13:28:47 2009
@@ -28038,7 +28038,7 @@
index 0000000..8a39074
--- /dev/null
+++ vbahelper/source/vbahelper/vbacommandbarcontrol.cxx
-@@ -0,0 +1,443 @@
+@@ -0,0 +1,453 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -28076,6 +28076,7 @@
+#include "vbacommandbarcontrol.hxx"
+#include <basic/sbstar.hxx>
+#include <basic/sbmod.hxx>
++#include <basic/sbmeth.hxx>
+
+using namespace com::sun::star;
+using namespace ooo::vba;
@@ -28328,19 +28329,28 @@
+ {
+ // convert the comand url into something like vnd.sun.star.script:Standard.testMacro.Macro1?language=Basic&location=document
+ rtl::OUString aCommandURL;
-+ rtl::OUString sUrlPart = rtl::OUString::createFromAscii( "vnd.sun.star.script:Standard.");
++ rtl::OUString sScheme = rtl::OUString::createFromAscii( "vnd.sun.star.script:");
+ SbModule* pModule = StarBASIC::GetActiveModule();
-+ if( pModule && ( _onaction.indexOf( sUrlPart ) == -1 ) )
++ if( pModule )
+ {
-+ rtl::OUString sUrlPart1 = rtl::OUString::createFromAscii( "?language=Basic&location=document");
-+ aCommandURL = sUrlPart.concat( pModule->GetName() ).concat( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(".") ) ).concat( _onaction ).concat( sUrlPart1 );
++ String sTmp = _onaction;
++ if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pModule->Find( sTmp, SbxCLASS_METHOD ) ) )
++ {
++ if( pMethod )
++ {
++ sTmp.Insert( '.', 0 ).Insert( pModule->GetName(), 0 ).Insert( '.', 0 ).Insert( pModule->GetParent()->GetName(), 0 );
++ }
++ }
++
++ rtl::OUString sUrlPart2 = rtl::OUString::createFromAscii( "?language=Basic&location=document");
++ aCommandURL = sScheme.concat( sTmp ).concat( sUrlPart2 );
++ OSL_TRACE("**** METHOD IS %s", rtl::OUStringToOString( aCommandURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ }
+ else
+ {
+ aCommandURL = _onaction;
+ }
+ OSL_TRACE(" ScVbaCommandBarControl::setOnAction: %s", rtl::OUStringToOString( aCommandURL, RTL_TEXTENCODING_UTF8 ).getStr() );
-+
+ beans::PropertyValues aPropertyValues;
+ m_xCurrentSettings->getByIndex( m_nPosition ) >>= aPropertyValues;
+ beans::PropertyValues aNewPropertyValues;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]