diff options
author | Frank Schönheit <fs@openoffice.org> | 2000-10-18 14:53:24 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2000-10-18 14:53:24 +0000 |
commit | e18aa197bd5695ea1898eec52a915f496291f925 (patch) | |
tree | db09a67155ef536674529b19108c16b3c8beddd9 /configmgr | |
parent | 40b772d8cfaa28a2d10ccf3abeca6c0921e8f5c6 (diff) |
set(Default)Value: let the m_aType flip if it was ANY previously
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/tree/cmtree.cxx | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/configmgr/source/tree/cmtree.cxx b/configmgr/source/tree/cmtree.cxx index ea565365f3e8..1b18edc7d9fc 100644 --- a/configmgr/source/tree/cmtree.cxx +++ b/configmgr/source/tree/cmtree.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cmtree.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:13:42 $ + * last change: $Author: fs $ $Date: 2000-10-18 15:53:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -385,11 +385,23 @@ namespace configmgr void ValueNode::setValue(Any aValue) { m_aValue = aValue; + // flip the type if necessary + if ( (m_aType.getTypeClass() == TypeClass_ANY) + && (aValue.getValueType().getTypeClass() != TypeClass_ANY) + && (aValue.getValueType().getTypeClass() != TypeClass_VOID) + ) + m_aType = aValue.getValueType(); } void ValueNode::changeDefault(Any aValue) { m_aDefaultValue = aValue; + // flip the type if necessary + if ( (m_aType.getTypeClass() == TypeClass_ANY) + && (aValue.getValueType().getTypeClass() != TypeClass_ANY) + && (aValue.getValueType().getTypeClass() != TypeClass_VOID) + ) + m_aType = aValue.getValueType(); } void ValueNode::setDefault() |