summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-01-18 15:03:06 +0000
committerKurt Zenker <kz@openoffice.org>2005-01-18 15:03:06 +0000
commit4665a7442784205481f265b13a7d247962fe3213 (patch)
tree6085b0d8907bd8cab4d1ebc7204ed5f380370b8b /sfx2
parent4aae2b7552d30798b4a53676825a56ccd60f4848 (diff)
INTEGRATION: CWS fwkbugfix04 (1.102.6); FILE MERGED
2005/01/06 17:38:53 mba 1.102.6.3: RESYNC: (1.103-1.104); FILE MERGED 2004/12/08 15:11:22 mba 1.102.6.2: RESYNC: (1.102-1.103); FILE MERGED 2004/12/08 11:02:30 mba 1.102.6.1: #118655#: OfficeDispatches should work for slot and uno commands together
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appuno.cxx20
1 files changed, 11 insertions, 9 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 8106bf5326bc..3cbb69d00858 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: appuno.cxx,v $
*
- * $Revision: 1.105 $
+ * $Revision: 1.106 $
*
- * last change: $Author: rt $ $Date: 2005-01-11 14:56:02 $
+ * last change: $Author: kz $ $Date: 2005-01-18 16:03:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1871,26 +1871,28 @@ Reference < XDispatch > SAL_CALL SfxAppDispatchProvider::queryDispatch( const ::
USHORT nId( 0 );
sal_Bool bMasterCommand( sal_False );
Reference < XDispatch > xDisp;
+ const SfxSlot* pSlot = 0;
+ SfxDispatcher* pAppDisp = SFX_APP()->GetAppDispatcher_Impl();
if ( aURL.Protocol.compareToAscii( "slot:" ) == COMPARE_EQUAL ||
aURL.Protocol.compareToAscii( "commandId:" ) == COMPARE_EQUAL )
{
nId = (USHORT) aURL.Path.toInt32();
+ SfxShell* pShell;
+ pAppDisp->GetShellAndSlot_Impl( nId, &pShell, &pSlot, TRUE, TRUE );
}
-
- if ( aURL.Protocol.compareToAscii( ".uno:" ) == COMPARE_EQUAL )
+ else if ( aURL.Protocol.compareToAscii( ".uno:" ) == COMPARE_EQUAL )
{
// Support ".uno" commands. Map commands to slotid
bMasterCommand = SfxOfficeDispatch::IsMasterUnoCommand( aURL );
if ( bMasterCommand )
- nId = SFX_APP()->GetAppDispatcher_Impl()->GetSlotId(
- SfxOfficeDispatch::GetMasterUnoCommand( aURL ) );
+ pSlot = pAppDisp->GetSlot( SfxOfficeDispatch::GetMasterUnoCommand( aURL ) );
else
- nId = SFX_APP()->GetAppDispatcher_Impl()->GetSlotId( aURL.Main );
+ pSlot = pAppDisp->GetSlot( aURL.Main );
}
- if ( nId && SFX_APP()->GetAppDispatcher_Impl()->HasSlot_Impl( nId ) )
+ if ( pSlot )
{
- SfxOfficeDispatch* pDispatch = new SfxOfficeDispatch( SFX_APP()->GetAppDispatcher_Impl(), nId, aURL ) ;
+ SfxOfficeDispatch* pDispatch = new SfxOfficeDispatch( pAppDisp, pSlot, aURL ) ;
pDispatch->SetMasterUnoCommand( bMasterCommand );
xDisp = pDispatch;
}