summaryrefslogtreecommitdiff
path: root/automation
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2004-12-10 16:13:40 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2004-12-10 16:13:40 +0000
commitbb3c3f9c3cf4f22c2a0cc3252efb6b9d3b094872 (patch)
tree2c287a00385bec4531f9dcb719c91a094171a568 /automation
parenta3dbb7c2665e91e66292080ce8c2dac1930988b0 (diff)
INTEGRATION: CWS gh9 (1.13.4); FILE MERGED
2004/11/25 14:39:28 gh 1.13.4.1: #i32292#continue searching for a window even though a toolbox itemwindow was found already
Diffstat (limited to 'automation')
-rw-r--r--automation/source/server/sta_list.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/automation/source/server/sta_list.cxx b/automation/source/server/sta_list.cxx
index 482f9292b41d..6fce89fee050 100644
--- a/automation/source/server/sta_list.cxx
+++ b/automation/source/server/sta_list.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: sta_list.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: hr $ $Date: 2004-11-09 16:52:26 $
+ * last change: $Author: rt $ $Date: 2004-12-10 17:13:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -476,8 +476,9 @@ BOOL SearchUID::IsWinOK( Window *pWin )
// Same as above.
if ( ( pItemWin->IsEnabled() || HasSearchFlag( SEARCH_FIND_DISABLED ) ) && pItemWin->IsVisible() )
{
- pAlternateResult = pItemWin; // since we cannot return a Window here
- return TRUE;
+ if ( !pAlternateResult ) // only take the first found ItemWindow #i35365
+ pAlternateResult = pItemWin; // since we cannot return a Window here
+ return FALSE; // continue searching to prefer a window with the right ID #i32292
}
else if ( !pMaybeResult )
{
@@ -498,12 +499,12 @@ Window* StatementList::SearchTree( SmartId aUId ,BOOL bSearchButtonOnToolbox )
SearchUID aSearch(aUId,bSearchButtonOnToolbox);
Window *pResult = SearchAllWin( NULL, aSearch );
- if ( !pResult )
- return aSearch.GetMaybeWin();
+ if ( pResult )
+ return pResult;
else if ( aSearch.GetAlternateResultWin() )
return aSearch.GetAlternateResultWin();
else
- return pResult;
+ return aSearch.GetMaybeWin();
}