diff options
author | Mathias Bauer <mba@openoffice.org> | 2001-08-16 14:47:51 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2001-08-16 14:47:51 +0000 |
commit | 3586ad9e3214f03764d3acc7ae1167300af70122 (patch) | |
tree | 531618ca30cd1d1b8f58076f0e8dfab54fe582db /sfx2 | |
parent | 5c4b13d1bea4aedb72677f0317d5334638c03918 (diff) |
#91071#: wrong SfxMacrInfo ctor with URL
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/macrconf.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx index 8506ac5c1754..6e80ae3f5c38 100644 --- a/sfx2/source/control/macrconf.cxx +++ b/sfx2/source/control/macrconf.cxx @@ -2,9 +2,9 @@ * * $RCSfile: macrconf.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: mba $ $Date: 2001-08-15 16:47:49 $ + * last change: $Author: mba $ $Date: 2001-08-16 15:47:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -221,16 +221,19 @@ SfxMacroInfo::SfxMacroInfo( const String& rURL ) : if ( rURL.CompareToAscii( "macro:", 6 ) == COMPARE_EQUAL ) { String aTmp = rURL.Copy( 6 ); - if ( aTmp.GetTokenCount('/') == 3 ) + if ( aTmp.GetTokenCount('/') > 3 ) { // 'macro:///lib.mod.proc(args)' => Macro via App-BASIC-Mgr // 'macro://[docname|.]/lib.mod.proc(args)' => Macro via zugehoerigen Doc-BASIC-Mgr if ( aTmp.CompareToAscii("///", 3 ) != COMPARE_EQUAL ) bAppBasic = FALSE; aTmp = rURL.GetToken( 3, '/' ); - aLibName = aTmp.GetToken( 0, '.' ); - aModuleName = aTmp.GetToken( 1, '.' ); - aMethodName = aTmp.GetToken( 2, '.' ); + if ( aTmp.GetTokenCount('.') == 3 ) + { + aLibName = aTmp.GetToken( 0, '.' ); + aModuleName = aTmp.GetToken( 1, '.' ); + aMethodName = aTmp.GetToken( 2, '.' ); + } } } |