summaryrefslogtreecommitdiff
path: root/vcl/source/window/dlgctrl.cxx
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2002-07-31 07:40:21 +0000
committerThomas Benisch <tbe@openoffice.org>2002-07-31 07:40:21 +0000
commit9adec94ae1a34c48da4d3bbb7bb4b58c0259b22c (patch)
tree2c1fa66de2a042dbcdc2a510b670e3db458643a5 /vcl/source/window/dlgctrl.cxx
parent7e5e2f5b9fe8d33caafc03b0ec0fb9ad1f4a017a (diff)
#101837# fixed infinite loop in GetLabeledBy()
Diffstat (limited to 'vcl/source/window/dlgctrl.cxx')
-rw-r--r--vcl/source/window/dlgctrl.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index d12678c108e9..850311e45fdf 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dlgctrl.cxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: pl $ $Date: 2002-07-22 15:29:44 $
+ * last change: $Author: tbe $ $Date: 2002-07-31 08:40:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1085,9 +1085,10 @@ Window* Window::GetLabeledBy() const
}
for( USHORT nSearchIndex = nIndex-1; nSearchIndex >= nFormStart; nSearchIndex-- )
{
+ USHORT nFoundIndex = 0;
pSWindow = ::ImplGetChildWindow( ImplGetFrameWindow(),
nSearchIndex,
- nSearchIndex,
+ nFoundIndex,
FALSE );
if( pSWindow && pSWindow->IsVisible() &&
( pSWindow->GetType() == WINDOW_FIXEDTEXT ||
@@ -1097,6 +1098,8 @@ Window* Window::GetLabeledBy() const
pWindow = pSWindow;
break;
}
+ if( nFoundIndex > nSearchIndex || nSearchIndex == 0 )
+ break;
}
}
}