diff options
author | Andre Fischer <af@openoffice.org> | 2002-11-25 11:49:49 +0000 |
---|---|---|
committer | Andre Fischer <af@openoffice.org> | 2002-11-25 11:49:49 +0000 |
commit | 03ab1a4b2fcda72ec5709a6caf3899b77dffd8e9 (patch) | |
tree | 196589a5d7f98da490190874eb4bc2aa1293d03e /svtools/source/control/valueacc.cxx | |
parent | ad118e2b99ef28e480ddfd5f4311a60ba8decd7f (diff) |
#104955# Added the 'no fill' button as accessible child.
Diffstat (limited to 'svtools/source/control/valueacc.cxx')
-rw-r--r-- | svtools/source/control/valueacc.cxx | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx index 8adaed17c0d5..978dca6e00ea 100644 --- a/svtools/source/control/valueacc.cxx +++ b/svtools/source/control/valueacc.cxx @@ -2,9 +2,9 @@ * * $RCSfile: valueacc.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: af $ $Date: 2002-11-20 16:35:31 $ + * last change: $Author: af $ $Date: 2002-11-25 12:49:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -213,7 +213,11 @@ sal_Int32 SAL_CALL ValueSetAcc::getAccessibleChildCount() throw (uno::RuntimeException) { const vos::OGuard aSolarGuard( Application::GetSolarMutex() ); - return( mpParent->ImplGetVisibleItemCount() ); + sal_Int32 nCount = 0; + if ((mpParent->GetStyle() & ~WB_NONEFIELD) != 0) + nCount += 1; + nCount += mpParent->ImplGetVisibleItemCount(); + return nCount; } // ----------------------------------------------------------------------------- @@ -223,7 +227,17 @@ uno::Reference< accessibility::XAccessible > SAL_CALL ValueSetAcc::getAccessible { const vos::OGuard aSolarGuard( Application::GetSolarMutex() ); uno::Reference< accessibility::XAccessible > xRet; - ValueSetItem* pItem = mpParent->ImplGetVisibleItem( static_cast< USHORT >( i ) ); + ValueSetItem* pItem = NULL; + + if ((mpParent->GetStyle() & ~WB_NONEFIELD) != 0) + if (i == 0) + // When present the first item is the then allways visible none field. + pItem = mpParent->ImplGetItem (VALUESET_ITEM_NONEITEM); + else + // Shift down the index to compensate for the none field. + i -= 1; + if (pItem == NULL) + pItem = mpParent->ImplGetVisibleItem( static_cast< USHORT >( i ) ); if( pItem ) xRet = pItem->GetAccessible(); |