ooo-build r12763 - in trunk: . patches/vba
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12763 - in trunk: . patches/vba
- Date: Tue, 3 Jun 2008 15:34:12 +0000 (UTC)
Author: noelpwer
Date: Tue Jun 3 15:34:12 2008
New Revision: 12763
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12763&view=rev
Log:
2008-06-03 Noel Power <noel power novell com>
* patches/vba/ObjectModule.diff: tweak GetScMacro call now do the search
for the macro ( previously the find was done earlier in the import,
changed now because the order of import has changed )
Modified:
trunk/ChangeLog
trunk/patches/vba/ObjectModule.diff
Modified: trunk/patches/vba/ObjectModule.diff
==============================================================================
--- trunk/patches/vba/ObjectModule.diff (original)
+++ trunk/patches/vba/ObjectModule.diff Tue Jun 3 15:34:12 2008
@@ -1109,39 +1109,73 @@
case 0xDE: Olesize(); break;
case 0x01BA: Codename( TRUE ); break;
-diff --git sc/source/filter/excel/xiescher.cxx sc/source/filter/excel/xiescher.cxx
-index 2b96bbf..be29bd4 100644
---- sc/source/filter/excel/xiescher.cxx
-+++ sc/source/filter/excel/xiescher.cxx
-@@ -825,8 +825,17 @@ OUString XclImpTbxControlObj::GetService
-
- bool XclImpTbxControlObj::FillMacroDescriptor( ScriptEventDescriptor& rEvent ) const
- {
-- if( GetMacroName().Len() > 0 )
-- {
-+ // *FIXME needs a ResolveMacro method
-+ String sTmp = GetMacroName();
-+ if( sTmp.Len() > 0 )
-+ {
-+ if ( ( sTmp.Search( '.' ) == STRING_NOTFOUND) )
-+ if( SfxObjectShell* pDocShell = GetDocShell() )
-+ if( StarBASIC* pBasic = pDocShell->GetBasic() )
-+ if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sTmp, SbxCLASS_METHOD ) ) )
-+ if( SbModule* pModule = pMethod->GetModule() )
-+ sTmp.Insert( '.', 0 ).Insert( pModule->GetName(), 0 );
-+
- // type of action is dependent on control type
- rEvent.ListenerType = XclControlObjHelper::GetTbxListenerType( GetObjType() );
- rEvent.EventMethod = XclControlObjHelper::GetTbxEventMethod( GetObjType() );
-@@ -834,7 +843,7 @@ bool XclImpTbxControlObj::FillMacroDescr
+diff -rup sc/source/filter/excel/xiescher.cxx sc.patched/source/filter/excel/xiescher.cxx
+--- sc/source/filter/excel/xiescher.cxx 2008-06-03 16:08:20.000000000 +0100
++++ sc.patched/source/filter/excel/xiescher.cxx 2008-06-03 16:36:05.000000000 +0100
+@@ -834,7 +834,7 @@ bool XclImpTbxControlObj::FillMacroDescr
{
// set the macro name
rEvent.ScriptType = XclControlObjHelper::GetTbxScriptType();
- rEvent.ScriptCode = XclControlObjHelper::GetScMacroName( GetMacroName() );
-+ rEvent.ScriptCode = XclControlObjHelper::GetScMacroName( sTmp );
++ rEvent.ScriptCode = XclControlObjHelper::GetScMacroName( GetMacroName(), GetDocShell() );
return true;
}
}
+@@ -1711,7 +1711,7 @@ SdrObject* XclImpDffManager::ProcessObj(
+ if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( xSdrObj.get(), TRUE ) )
+ {
+ if ( rMacro.Len() > 0 )
+- pInfo->SetMacro( XclControlObjHelper::GetScMacroName( rMacro ) );
++ pInfo->SetMacro( XclControlObjHelper::GetScMacroName( rMacro, GetDocShell() ) );
+ if ( aHlink.getLength() > 0 )
+ pInfo->SetHlink( aHlink );
+ }
+diff -rup sc/source/filter/excel/xlescher.cxx sc.patched/source/filter/excel/xlescher.cxx
+--- sc/source/filter/excel/xlescher.cxx 2008-05-29 23:19:09.000000000 +0100
++++ sc/source/filter/excel/xlescher.cxx 2008-06-03 15:38:21.000000000 +0100
+@@ -37,7 +37,10 @@
+ #include "xistream.hxx"
+ #include "xestream.hxx"
+ #include "globstr.hrc"
+-
++#include <sfx2/objsh.hxx>
++#include <basic/sbstar.hxx>
++#include <basic/sbmod.hxx>
++#include <basic/sbmeth.hxx>
+ using ::rtl::OUString;
+ using ::com::sun::star::uno::Reference;
+ using ::com::sun::star::uno::UNO_QUERY;
+@@ -405,9 +408,16 @@ OUString XclControlObjHelper::GetTbxScri
+ #define EXC_TBX_MACRONAME_PRE "vnd.sun.star.script:Standard."
+ #define EXC_TBX_MACRONAME_SUF "?language=Basic&location=document"
+
+-OUString XclControlObjHelper::GetScMacroName( const String& rXclMacroName )
++OUString XclControlObjHelper::GetScMacroName( const String& rXclMacroName, SfxObjectShell* pDocShell )
+ {
+- return CREATE_OUSTRING( EXC_TBX_MACRONAME_PRE ) + rXclMacroName + CREATE_OUSTRING( EXC_TBX_MACRONAME_SUF );
++ String sTmp( rXclMacroName );
++ if ( ( sTmp.Search( '.' ) == STRING_NOTFOUND) && pDocShell )
++ if( StarBASIC* pBasic = pDocShell->GetBasic() )
++ if( SbMethod* pMethod = dynamic_cast< SbMethod* >( pBasic->Find( sTmp, SbxCLASS_METHOD ) ) )
++ if( SbModule* pModule = pMethod->GetModule() )
++ sTmp.Insert( '.', 0 ).Insert( pModule->GetName(), 0 );
++
++ return CREATE_OUSTRING( EXC_TBX_MACRONAME_PRE ) + sTmp + CREATE_OUSTRING( EXC_TBX_MACRONAME_SUF );
+ }
+
+ String XclControlObjHelper::GetXclMacroName( const OUString& rScMacroName )
+diff -rup sc/source/filter/inc/xlescher.hxx sc.patched/source/filter/inc/xlescher.hxx
+--- sc/source/filter/inc/xlescher.hxx 2008-05-29 23:19:09.000000000 +0100
++++ sc.patched/source/filter/inc/xlescher.hxx 2008-06-03 15:28:12.000000000 +0100
+@@ -279,7 +279,7 @@ public:
+ static ::rtl::OUString GetTbxScriptType();
+
+ /** Returns the Calc macro name from an Excel macro name. */
+- static ::rtl::OUString GetScMacroName( const String& rXclMacroName );
++ static ::rtl::OUString GetScMacroName( const String& rXclMacroName, SfxObjectShell* pShell = NULL );
+ /** Returns the Excel macro name from a Calc macro name. */
+ static String GetXclMacroName( const ::rtl::OUString& rScMacroName );
+ };
diff --git sc/source/ui/docshell/docfunc.cxx sc/source/ui/docshell/docfunc.cxx
index c0253ae..79e8eed 100644
--- sc/source/ui/docshell/docfunc.cxx
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]