summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-04-04 17:19:21 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-04-04 17:19:21 +0000
commitbcce3213d487d414251fcd93b388dc6bcda1b870 (patch)
treee33e13126ab8c19083899723b072593fca9ceebe /svtools
parent73380fbf799bf4dad5c730f2472fd479448f3b49 (diff)
INTEGRATION: CWS os7 (1.27.2.2.32); FILE MERGED
2003/03/20 13:38:38 pb 1.27.2.2.32.1: fix: #107497# expandable state only with children or on demand
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/contnr/svtreebx.cxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/svtools/source/contnr/svtreebx.cxx b/svtools/source/contnr/svtreebx.cxx
index f892b3267947..56f96996da90 100644
--- a/svtools/source/contnr/svtreebx.cxx
+++ b/svtools/source/contnr/svtreebx.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svtreebx.cxx,v $
*
- * $Revision: 1.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: hr $ $Date: 2003-03-27 14:37:40 $
+ * last change: $Author: hr $ $Date: 2003-04-04 18:19:21 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -2575,10 +2575,13 @@ void SvTreeListBox::FillAccessibleEntryStateSet( SvLBoxEntry* pEntry, ::utl::Acc
{
DBG_ASSERT( pEntry, "SvTreeListBox::FillAccessibleEntryStateSet: invalid entry" );
- rStateSet.AddState( AccessibleStateType::EXPANDABLE );
- sal_Int16 nState = IsExpanded( pEntry ) ? (sal_Int16)AccessibleStateType::EXPANDED
- : (sal_Int16)AccessibleStateType::COLLAPSED;
- rStateSet.AddState( nState );
+ if ( pEntry->HasChildsOnDemand() || pEntry->HasChilds() )
+ {
+ rStateSet.AddState( AccessibleStateType::EXPANDABLE );
+ sal_Int16 nState = IsExpanded( pEntry ) ? (sal_Int16)AccessibleStateType::EXPANDED
+ : (sal_Int16)AccessibleStateType::COLLAPSED;
+ rStateSet.AddState( nState );
+ }
if ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED )
rStateSet.AddState( AccessibleStateType::CHECKED );