diff options
author | Kurt Zenker <kz@openoffice.org> | 2008-03-06 18:53:06 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2008-03-06 18:53:06 +0000 |
commit | 882baf7bc4f4c2af2a568271bb6012b3f83096fc (patch) | |
tree | e93891e05782587e7c038bcf0d0613b5c5535c07 /sfx2 | |
parent | b7c3701fed59f9f0a5e0fb9a5e339c4c256afad7 (diff) |
INTEGRATION: CWS odbmacros2 (1.23.44); FILE MERGED
2007/12/19 14:51:25 fs 1.23.44.2: #i49133# BasicManager::Insert/set/ResetGlobalUNOConstant superseded by SetGlobalUNOConstant
2007/12/12 14:42:57 fs 1.23.44.1: #i49133# condensed the ThisComponent handling, by using new helpers at the BasicManager
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/control/macrconf.cxx | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx index 5535276cc404..5de0c809317c 100644 --- a/sfx2/source/control/macrconf.cxx +++ b/sfx2/source/control/macrconf.cxx @@ -4,9 +4,9 @@ * * $RCSfile: macrconf.cxx,v $ * - * $Revision: 1.23 $ + * $Revision: 1.24 $ * - * last change: $Author: kz $ $Date: 2007-10-09 15:31:48 $ + * last change: $Author: kz $ $Date: 2008-03-06 19:53:06 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -760,27 +760,9 @@ sal_Bool SfxMacroConfig::ExecuteMacro( SfxObjectShell *pSh, const SvxMacro* pMac if ( pSh && pMgr && pMgr == pAppMgr ) { - SbxBaseRef xOldVar; - SbxVariable *pCompVar = pAppMgr->GetLib(0)->Find( DEFINE_CONST_UNICODE("ThisComponent"), SbxCLASS_PROPERTY ); - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > xInterface ( pSh->GetModel() , ::com::sun::star::uno::UNO_QUERY ); - ::com::sun::star::uno::Any aAny; - aAny <<= xInterface; - if ( pCompVar ) - { - xOldVar = pCompVar->GetObject(); - pCompVar->PutObject( GetSbUnoObject( DEFINE_CONST_UNICODE("ThisComponent"), aAny ) ); - } - else - { - SbxObjectRef xUnoObj = GetSbUnoObject( DEFINE_CONST_UNICODE("ThisComponent"), aAny ); - xUnoObj->SetFlag( SBX_DONTSTORE ); - pAppMgr->GetLib(0)->Insert( xUnoObj ); - pCompVar = pAppMgr->GetLib(0)->Find( DEFINE_CONST_UNICODE("ThisComponent"), SbxCLASS_PROPERTY ); - } - + ::com::sun::star::uno::Any aOldThisComponent = pAppMgr->SetGlobalUNOConstant( "ThisComponent", makeAny( pSh->GetModel() ) ); nErr = Call( 0, aCode, pMgr ); - if ( pCompVar ) - pCompVar->PutObject( xOldVar ); + pAppMgr->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent ); } else if ( pMgr ) nErr = Call( 0, aCode, pMgr ); |