diff options
author | Jörg Barfurth <jb@openoffice.org> | 2002-08-12 15:06:33 +0000 |
---|---|---|
committer | Jörg Barfurth <jb@openoffice.org> | 2002-08-12 15:06:33 +0000 |
commit | 3783bf0f3860fa547024582aac535b0aaf8d0eb6 (patch) | |
tree | b3b65b5774f979e2d1f02af896e6311c30fe0bbc | |
parent | 39dd01b0d7a62207e160efb25e4545f142bd37bf (diff) |
#102246# Write prop types also when adding a prop not present in the layer before
-rw-r--r-- | configmgr/source/backend/updatedata.cxx | 14 | ||||
-rw-r--r-- | configmgr/source/xml/layerwriter.cxx | 6 |
2 files changed, 15 insertions, 5 deletions
diff --git a/configmgr/source/backend/updatedata.cxx b/configmgr/source/backend/updatedata.cxx index cb01d860cc1c..9dc7b5f22c49 100644 --- a/configmgr/source/backend/updatedata.cxx +++ b/configmgr/source/backend/updatedata.cxx @@ -2,9 +2,9 @@ * * $RCSfile: updatedata.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: jb $ $Date: 2002-07-11 16:58:31 $ + * last change: $Author: jb $ $Date: 2002-08-12 16:06:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -333,6 +333,16 @@ bool PropertyUpdate::setValueFor(OUString const & _aLocale, uno::Any const & _aV OSL_ENSURE(m_aValues.find(_aLocale) == m_aValues.end(), "PropertyUpdate: Locale being added already has a value in this property."); + if (_aValueUpdate.hasValue()) + { + if (m_aType == uno::Type()) + m_aType = _aValueUpdate.getValueType(); + + else + OSL_ENSURE( m_aType == _aValueUpdate.getValueType() || + m_aType.getTypeClass() == uno::TypeClass_ANY, + "ValueType mismatch in PropertyUpdate"); + } return m_aValues.insert( ValueList::value_type(_aLocale,_aValueUpdate) ).second; } // ----------------------------------------------------------------------------- diff --git a/configmgr/source/xml/layerwriter.cxx b/configmgr/source/xml/layerwriter.cxx index 6993a5b271c9..3a1fb568a2b2 100644 --- a/configmgr/source/xml/layerwriter.cxx +++ b/configmgr/source/xml/layerwriter.cxx @@ -2,9 +2,9 @@ * * $RCSfile: layerwriter.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: jb $ $Date: 2002-07-11 17:23:01 $ + * last change: $Author: jb $ $Date: 2002-08-12 16:06:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -258,7 +258,7 @@ void SAL_CALL LayerWriter::overrideProperty( const OUString& aName, sal_Int16 aA m_aFormatter.prepareElement(aInfo); - this->startProp(aType, false); + this->startProp(aType, aType.getTypeClass() != uno::TypeClass_VOID); } // ----------------------------------------------------------------------------- |