summaryrefslogtreecommitdiff
path: root/forms/source
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
parent8a51d834e78f98c51af3d1078448231c5c6fbe4c (diff)
#98197# correct use of wasNull and enable tristate as default
Diffstat (limited to 'forms/source')
-rw-r--r--forms/source/component/CheckBox.cxx11
-rw-r--r--forms/source/component/Columns.cxx11
2 files changed, 14 insertions, 8 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
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx
index 44ff27d51657..047012cc2c27 100644
--- a/forms/source/component/Columns.cxx
+++ b/forms/source/component/Columns.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Columns.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: vg $ $Date: 2001-09-12 11:10:06 $
+ * 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
@@ -306,6 +306,13 @@ OGridColumn::OGridColumn(const Reference<XMultiServiceFactory>& _rxFactory, cons
decrement(m_refCount);
}
+ if ( m_xAggregateSet.is() )
+ {
+ Reference<XPropertySetInfo> xPropInfo = m_xAggregateSet->getPropertySetInfo();
+ if ( xPropInfo.is() && xPropInfo->hasPropertyByName(PROPERTY_TRISTATE) )
+ m_xAggregateSet->setPropertyValue(PROPERTY_TRISTATE, makeAny(sal_True) );
+ }
+
m_aHidden <<= (sal_Bool)sal_False;
}