summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorStephan Schäfer <ssa@openoffice.org>2002-05-06 12:15:07 +0000
committerStephan Schäfer <ssa@openoffice.org>2002-05-06 12:15:07 +0000
commitc462b0a8d702dbbffa339db469a9312d6d18e02d (patch)
tree14f80cbbfb9fd0cd9e26fab15e35fdff04de357d /vcl/source/window
parentb4b249da7f4b49b1ed1481aa69ae8e9cdb4a4030 (diff)
#98888# GrabFocusToDocument
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/syswin.cxx16
-rw-r--r--vcl/source/window/window.cxx21
2 files changed, 23 insertions, 14 deletions
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 93e83cec9e50..48929de4dd3d 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: syswin.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: ssa $ $Date: 2002-03-21 18:33:54 $
+ * last change: $Author: ssa $ $Date: 2002-05-06 13:15:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -173,16 +173,8 @@ long SystemWindow::PreNotify( NotifyEvent& rNEvt )
rNEvt.GetKeyEvent()->GetKeyCode().IsMod1() )
{
// Ctrl-F6 goes directly to the document
- Window *pWin = this;
- while( pWin )
- {
- if( !pWin->GetParent() )
- {
- pWin->ImplGetFrameWindow()->GetWindow( WINDOW_CLIENT )->GrabFocus();
- return TRUE;
- }
- pWin = pWin->GetParent();
- }
+ GrabFocusToDocument();
+ return TRUE;
}
else
{
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index cba1edb66a95..4cf99ef515cb 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: window.cxx,v $
*
- * $Revision: 1.82 $
+ * $Revision: 1.83 $
*
- * last change: $Author: obr $ $Date: 2002-04-30 15:10:04 $
+ * last change: $Author: ssa $ $Date: 2002-05-06 13:15:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -6614,6 +6614,22 @@ BOOL Window::HasFocus() const
// -----------------------------------------------------------------------
+void Window::GrabFocusToDocument()
+{
+ Window *pWin = this;
+ while( pWin )
+ {
+ if( !pWin->GetParent() )
+ {
+ pWin->ImplGetFrameWindow()->GetWindow( WINDOW_CLIENT )->GrabFocus();
+ return;
+ }
+ pWin = pWin->GetParent();
+ }
+}
+
+// -----------------------------------------------------------------------
+
BOOL Window::HasChildPathFocus( BOOL bSystemWindow ) const
{
DBG_CHKTHIS( Window, ImplDbgCheckWindow );
@@ -7625,3 +7641,4 @@ BOOL Window::ImplGetCurrentBackgroundColor( Color& rCol )
}
return bRet;
}
+