summaryrefslogtreecommitdiff
path: root/sfx2/source/view
diff options
context:
space:
mode:
authorPeter Burow <pb@openoffice.org>2001-08-21 09:22:06 +0000
committerPeter Burow <pb@openoffice.org>2001-08-21 09:22:06 +0000
commitfa1e9b2277b79dc0695ecdc3787762be6c9b708b (patch)
tree86579f71cf186666b89f03918c326f29d1648cd6 /sfx2/source/view
parent9a610ccec5273a4c48a79129921ec1553acac74e (diff)
fix: #91290# disable <STRG><F4> if not task frame (e.g. Help-Frame)
Diffstat (limited to 'sfx2/source/view')
-rw-r--r--sfx2/source/view/topfrm.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/sfx2/source/view/topfrm.cxx b/sfx2/source/view/topfrm.cxx
index b449e091c0ac..f73a89427fdb 100644
--- a/sfx2/source/view/topfrm.cxx
+++ b/sfx2/source/view/topfrm.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: topfrm.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: mba $ $Date: 2001-08-17 15:50:34 $
+ * last change: $Author: pb $ $Date: 2001-08-21 10:22:06 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -69,6 +69,9 @@
#ifndef _COM_SUN_STAR_FRAME_XFRAME_HPP_
#include <com/sun/star/frame/XFrame.hpp>
#endif
+#ifndef _COM_SUN_STAR_FRAME_XTASK_HPP_
+#include <com/sun/star/frame/XTask.hpp>
+#endif
#ifndef _UNOTOOLS_PROCESSFACTORY_HXX
#include <comphelper/processfactory.hxx>
#endif
@@ -1033,6 +1036,11 @@ void SfxTopViewFrame::Exec_Impl(SfxRequest &rReq )
case SID_CLOSEWIN:
{
+ // disable CloseWin, if frame is not a task
+ Reference < XTask > xTask( GetFrame()->GetFrameInterface(), UNO_QUERY );
+ if ( !xTask.is() )
+ break;
+
if ( GetViewShell()->PrepareClose() )
{
// weitere Views auf dasselbe Doc?
@@ -1104,6 +1112,14 @@ void SfxTopViewFrame::GetState_Impl( SfxItemSet &rSet )
break;
case SID_CLOSEWIN:
+ {
+ // disable CloseWin, if frame is not a task
+ Reference < XTask > xTask( GetFrame()->GetFrameInterface(), UNO_QUERY );
+ if ( !xTask.is() )
+ rSet.DisableItem(nWhich);
+ break;
+ }
+
case SID_SHOWPOPUPS :
break;