summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2001-06-26 13:51:18 +0000
committerMathias Bauer <mba@openoffice.org>2001-06-26 13:51:18 +0000
commite17d47083246216eb2363181388ddadbdaf93f0a (patch)
tree92f5a7f474955dd469c5e08e4489ff99f23b21a6 /sfx2
parent71f37d8e51ce90ae109ba3297e9d6c074ec5cef7 (diff)
#88838#: trigger help agent by focus events
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/basedlgs.cxx12
-rw-r--r--sfx2/source/dialog/dockwin.cxx9
-rw-r--r--sfx2/source/dialog/tabdlg.cxx19
-rw-r--r--sfx2/source/view/topfrm.cxx8
4 files changed, 40 insertions, 8 deletions
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 7630330705d1..31a2463a2ce6 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: basedlgs.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: pb $ $Date: 2000-11-30 09:58:00 $
+ * last change: $Author: mba $ $Date: 2001-06-26 14:51:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -89,6 +89,7 @@
#include "accmgr.hxx"
#include "childwin.hxx"
#include "viewsh.hxx"
+#include "sfxhelp.hxx"
static String aEmptyString;
@@ -408,6 +409,9 @@ long SfxModelessDialog::Notify( NotifyEvent& rEvt )
*/
pBindings->SetActiveFrame( pMgr->GetFrame() );
pMgr->Activate_Impl();
+ Window* pWindow = rEvt.GetWindow();
+ if ( pWindow->GetHelpId() )
+ SfxHelp::OpenHelpAgent( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), pWindow->GetHelpId() );
}
else if ( rEvt.GetType() == EVENT_LOSEFOCUS && !HasChildPathFocus() )
{
@@ -505,10 +509,14 @@ long SfxFloatingWindow::Notify( NotifyEvent& rEvt )
return sal_True;
}
*/
+
if ( rEvt.GetType() == EVENT_GETFOCUS )
{
pBindings->SetActiveFrame( pMgr->GetFrame() );
pMgr->Activate_Impl();
+ Window* pWindow = rEvt.GetWindow();
+ if ( pWindow->GetHelpId() )
+ SfxHelp::OpenHelpAgent( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), pWindow->GetHelpId() );
}
else if ( rEvt.GetType() == EVENT_LOSEFOCUS )
{
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 9d71f5bcfb2a..9c5a3da43a97 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dockwin.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: pb $ $Date: 2001-03-21 09:37:55 $
+ * last change: $Author: mba $ $Date: 2001-06-26 14:51:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,6 +75,7 @@
#include "splitwin.hxx"
#include "viewsh.hxx"
#include "accmgr.hxx"
+#include "sfxhelp.hxx"
#define MAX_TOGGLEAREA_WIDTH 100 // max. 100 Pixel
#define MAX_TOGGLEAREA_HEIGHT 100 // max. 100 Pixel
@@ -1432,6 +1433,10 @@ long SfxDockingWindow::Notify( NotifyEvent& rEvt )
pImp->pSplitWin->SetActiveWindow_Impl( this );
else
pMgr->Activate_Impl();
+
+ Window* pWindow = rEvt.GetWindow();
+ if ( pWindow->GetHelpId() )
+ SfxHelp::OpenHelpAgent( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame(), pWindow->GetHelpId() );
/*
// Nur wg. PlugIn
SfxViewFrame *pFrame = pBindings->GetDispatcher_Impl()->GetFrame();
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index f7f592c6d3d9..f3a8f90723a8 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: tabdlg.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: mba $ $Date: 2001-06-18 10:14:17 $
+ * last change: $Author: mba $ $Date: 2001-06-26 14:51:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1654,3 +1654,18 @@ void SfxTabDialog::SetInputSet( const SfxItemSet* pInSet )
}
}
+#if SUPD>=636
+long SfxTabDialog::Notify( NotifyEvent& rNEvt )
+{
+ if ( rNEvt.GetType() == EVENT_GETFOCUS )
+ {
+ Window* pWindow = rNEvt.GetWindow();
+ SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+ if ( pWindow->GetHelpId() && pViewFrame )
+ SfxHelp::OpenHelpAgent( pViewFrame->GetFrame(), pWindow->GetHelpId() );
+ }
+
+ return TabDialog::Notify( rNEvt );
+}
+#endif
+
diff --git a/sfx2/source/view/topfrm.cxx b/sfx2/source/view/topfrm.cxx
index 76c592eb0dd2..b77350f4f093 100644
--- a/sfx2/source/view/topfrm.cxx
+++ b/sfx2/source/view/topfrm.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: topfrm.cxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: mba $ $Date: 2001-06-21 13:57:41 $
+ * last change: $Author: mba $ $Date: 2001-06-26 14:51:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -125,6 +125,7 @@
#include "splitwin.hxx"
#include "appdata.hxx"
#include "arrdecl.hxx"
+#include "sfxhelp.hxx"
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::frame;
@@ -192,6 +193,9 @@ long SfxTopWindow_Impl::Notify( NotifyEvent& rNEvt )
pContainer = pCurrent;
if ( pView && pView != pContainer )
pView->MakeActive_Impl( FALSE );
+ Window* pWindow = rNEvt.GetWindow();
+ if ( pWindow->GetHelpId() )
+ SfxHelp::OpenHelpAgent( pFrame, pWindow->GetHelpId() );
return sal_True;
}