summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2008-01-28 13:16:22 +0000
committerVladimir Glazounov <vg@openoffice.org>2008-01-28 13:16:22 +0000
commitc152159e3f0bc1d6458349fc9d1b9778e918edc9 (patch)
treef1e161c9e38e702163413fcf4b3e153668a93c0a /vcl/source
parent83a173666b4f49ea33f6f7cb2e7a09974dc84c22 (diff)
INTEGRATION: CWS tbe32 (1.54.96); FILE MERGED
2007/10/31 11:40:54 tbe 1.54.96.2: #i71010# warning on wntmsci10 2007/10/30 15:29:29 pl 1.54.96.1: #i71010# add: RadioButton::GetRadioButtonGroup
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/button.cxx33
1 files changed, 31 insertions, 2 deletions
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index fb3def9d7274..1304b0d152dc 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: button.cxx,v $
*
- * $Revision: 1.56 $
+ * $Revision: 1.57 $
*
- * last change: $Author: ihi $ $Date: 2008-01-14 13:04:30 $
+ * last change: $Author: vg $ $Date: 2008-01-28 14:16:22 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -2566,6 +2566,35 @@ void RadioButton::ImplDrawRadioButton( bool bLayout )
// -----------------------------------------------------------------------
+void RadioButton::GetRadioButtonGroup( std::vector< RadioButton* >& io_rGroup, bool bIncludeThis ) const
+{
+ // empty the list
+ io_rGroup.clear();
+
+ // go back to first in group;
+ Window* pFirst = const_cast<RadioButton*>(this);
+ while( ( pFirst->GetStyle() & WB_GROUP ) == 0 )
+ {
+ Window* pWindow = pFirst->GetWindow( WINDOW_PREV );
+ if( pWindow )
+ pFirst = pWindow;
+ else
+ break;
+ }
+ // insert radiobuttons up to next group
+ do
+ {
+ if( pFirst->GetType() == WINDOW_RADIOBUTTON )
+ {
+ if( pFirst != this || bIncludeThis )
+ io_rGroup.push_back( static_cast<RadioButton*>(pFirst) );
+ }
+ pFirst = pFirst->GetWindow( WINDOW_NEXT );
+ } while( pFirst && ( ( pFirst->GetStyle() & WB_GROUP ) == 0 ) );
+}
+
+// -----------------------------------------------------------------------
+
void RadioButton::ImplUncheckAllOther()
{
mpWindowImpl->mnStyle |= WB_TABSTOP;