summaryrefslogtreecommitdiff
path: root/sfx2/source/appl/sfxhelp.cxx
diff options
context:
space:
mode:
authorPeter Burow <pb@openoffice.org>2001-08-14 05:16:55 +0000
committerPeter Burow <pb@openoffice.org>2001-08-14 05:16:55 +0000
commit18948f5f4c2bae4166f3f0360b52ae7db15a2323 (patch)
tree20277487a04930a9498fc970dbb0b53d97174786 /sfx2/source/appl/sfxhelp.cxx
parent11348be01b7d751432df83a6ccaedd575250bb18 (diff)
fix: #89945# bring help task to front
Diffstat (limited to 'sfx2/source/appl/sfxhelp.cxx')
-rw-r--r--sfx2/source/appl/sfxhelp.cxx23
1 files changed, 21 insertions, 2 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 07028f61292a..07cba3127ab5 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sfxhelp.cxx,v $
*
- * $Revision: 1.38 $
+ * $Revision: 1.39 $
*
- * last change: $Author: pb $ $Date: 2001-08-10 08:53:36 $
+ * last change: $Author: pb $ $Date: 2001-08-14 06:16:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,6 +75,9 @@
#ifndef _COM_SUN_STAR_AWT_XWINDOW_HPP_
#include <com/sun/star/awt/XWindow.hpp>
#endif
+#ifndef _COM_SUN_STAR_AWT_XTOPWINDOW_HPP_
+#include <com/sun/star/awt/XTopWindow.hpp>
+#endif
#ifndef _COM_SUN_STAR_AWT_POSSIZE_HPP_
#include <com/sun/star/awt/PosSize.hpp>
#endif
@@ -464,6 +467,7 @@ BOOL SfxHelp::Start( const String& rURL, const Window* pWindow )
}
Sequence < PropertyValue > aProps;
sal_Int32 nFlag = FrameSearchFlag::GLOBAL;
+ sal_Bool bHelpTaskExists = sal_False;
if ( aTicket.Len() )
{
xFrame = Reference < XDispatchProvider > ( xActiveTask, UNO_QUERY );
@@ -492,6 +496,8 @@ BOOL SfxHelp::Start( const String& rURL, const Window* pWindow )
xTask->getContainerWindow()->setVisible( sal_True );
}
}
+ else
+ bHelpTaskExists = sal_True;
}
if ( xFrame.is() )
@@ -506,6 +512,19 @@ BOOL SfxHelp::Start( const String& rURL, const Window* pWindow )
if ( xDispatch.is() )
xDispatch->dispatch( aURL, aProps );
+ if ( bHelpTaskExists )
+ {
+ // bring the help task to front
+ Reference < XFrame > xFrameFinder( xDesktop, UNO_QUERY );
+ Reference < XFrame > xTask = xFrameFinder->findFrame( DEFINE_CONST_UNICODE("OFFICE_HELP_TASK"), FrameSearchFlag::TASKS );
+ if ( xTask.is() )
+ {
+ Reference < ::com::sun::star::awt::XTopWindow > xTopWin( xTask->getContainerWindow(), UNO_QUERY );
+ if ( xTopWin.is() )
+ xTopWin->toFront();
+ }
+ }
+
return TRUE;
}
else