summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2002-04-25 07:29:03 +0000
committerMathias Bauer <mba@openoffice.org>2002-04-25 07:29:03 +0000
commitfc8cc9273e7fdcac1b88ae4eb72e0292f4d07219 (patch)
tree92f25a34f0e6190eb5c7d1c89b311c8520c1bc3f /sfx2/source
parent381e25bcf99166e7ad1b88c25b83da4bb223bcab (diff)
#98951#: wrong evaluation of uno names
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/control/msgpool.cxx21
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx21
2 files changed, 24 insertions, 18 deletions
diff --git a/sfx2/source/control/msgpool.cxx b/sfx2/source/control/msgpool.cxx
index f052a4193ce0..0d2b41e1fae7 100644
--- a/sfx2/source/control/msgpool.cxx
+++ b/sfx2/source/control/msgpool.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: msgpool.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mba $ $Date: 2002-04-22 16:56:18 $
+ * last change: $Author: mba $ $Date: 2002-04-25 08:29:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -574,19 +574,16 @@ void SfxSlotPool::ReleaseSID( const String &rGroup, const String &rName )
const SfxSlot* SfxSlotPool::GetUnoSlot( const String& rName )
{
const SfxSlot *pSlot = NULL;
- if ( _pParentPool )
- pSlot = _pParentPool->GetUnoSlot( rName );
-
- if ( !pSlot )
+ for ( USHORT nInterface=0; nInterface<_pInterfaces->Count(); nInterface++ )
{
- for ( USHORT nInterface=0; nInterface<_pInterfaces->Count(); nInterface++ )
- {
- pSlot = (*_pInterfaces)[nInterface]->GetSlot( rName );
- if ( pSlot )
- break;
- }
+ pSlot = (*_pInterfaces)[nInterface]->GetSlot( rName );
+ if ( pSlot )
+ break;
}
+ if ( !pSlot && _pParentPool )
+ pSlot = _pParentPool->GetUnoSlot( rName );
+
return pSlot;
}
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index d967b7e45170..601adf9ef08d 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sfxbasecontroller.cxx,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: mba $ $Date: 2002-03-07 18:09:45 $
+ * last change: $Author: mba $ $Date: 2002-04-25 08:28:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -129,6 +129,7 @@
#include <sfxsids.hrc>
#include <workwin.hxx>
#include <stbmgr.hxx>
+#include <objface.hxx>
#include <vos/mutex.hxx>
#include <osl/mutex.hxx>
@@ -687,10 +688,18 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
if ( aURL.Protocol.compareToAscii( ".uno:" ) == COMPARE_EQUAL )
{
- SfxSlotPool& rPool = SFX_APP()->GetSlotPool( pAct );
- const SfxSlot* pSlot = rPool.GetUnoSlot( aURL.Path );
- if ( pSlot )
- nId = pSlot->GetSlotId();
+ SfxShell *pShell=0;
+ USHORT nIdx;
+ for (nIdx=0; (pShell=pAct->GetDispatcher()->GetShell(nIdx)); nIdx++)
+ {
+ const SfxInterface *pIFace = pShell->GetInterface();
+ const SfxSlot* pSlot = pIFace->GetSlot( aURL.Path );
+ if ( pSlot )
+ {
+ nId = pSlot->GetSlotId();
+ break;
+ }
+ }
}
else if ( aURL.Protocol.compareToAscii( "slot:" ) == COMPARE_EQUAL )
{