summaryrefslogtreecommitdiffstats
path: root/forms/source/component/CheckBox.cxx
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2002-03-19 12:18:45 +0000
committerOcke Janssen <oj@openoffice.org>2002-03-19 12:18:45 +0000
commit11e2acae2951b42e52d6dd42af4313182a51b2de (patch)
treee636416ccff07645719901bd3714cb526b7214fe /forms/source/component/CheckBox.cxx
parentfix: #98090# Support and Training added (diff)
downloadcore-11e2acae2951b42e52d6dd42af4313182a51b2de.tar.gz
core-11e2acae2951b42e52d6dd42af4313182a51b2de.zip
#98197# correct use of wasNull and enable tristate as default
Diffstat (limited to 'forms/source/component/CheckBox.cxx')
-rw-r--r--forms/source/component/CheckBox.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx
index 6e9df44e4818..8706a3b0d442 100644
--- a/forms/source/component/CheckBox.cxx
+++ b/forms/source/component/CheckBox.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: CheckBox.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: fs $ $Date: 2002-03-04 14:46:12 $
+ * last change: $Author: oj $ $Date: 2002-03-19 13:18:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -376,16 +376,15 @@ void OCheckBoxModel::_onValueChanged()
if (m_xAggregateSet.is())
{
Any aValue;
- if (m_xColumn->getBoolean())
- aValue <<= (sal_Int16)CB_CHECK;
- else if (m_xColumn->wasNull())
+ sal_Bool bValue = m_xColumn->getBoolean();
+ if (m_xColumn->wasNull())
{
sal_Bool bTriState;
m_xAggregateSet->getPropertyValue(PROPERTY_TRISTATE) >>= bTriState;
aValue <<= (sal_Int16)(bTriState ? CB_DONTKNOW : m_nDefaultChecked);
}
else
- aValue <<= (sal_Int16)CB_NOCHECK;
+ aValue <<= ( bValue ? (sal_Int16)CB_CHECK : (sal_Int16)CB_NOCHECK );
m_bInReset = sal_True;
{ // release our mutex once (it's acquired in the calling method !), as setting aggregate properties
// may cause any uno controls belonging to us to lock the solar mutex, which is potentially dangerous with