summaryrefslogtreecommitdiff
path: root/comphelper/source
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2002-01-09 14:05:39 +0000
committerFrank Schönheit <fs@openoffice.org>2002-01-09 14:05:39 +0000
commit42c36fb9b4c8775b63437aec8394cb9ee7a79b70 (patch)
tree9b6f62c210a270f24d2cbe53dd5850b0727dd6c4 /comphelper/source
parentfb7ce6388891483455df2158f0b430f5c87a9c35 (diff)
#96068# uno_type_assignData instead of uno_type_copyData
Diffstat (limited to 'comphelper/source')
-rw-r--r--comphelper/source/property/propertycontainer.cxx25
1 files changed, 20 insertions, 5 deletions
diff --git a/comphelper/source/property/propertycontainer.cxx b/comphelper/source/property/propertycontainer.cxx
index b0f3ed248878..335b34783cc8 100644
--- a/comphelper/source/property/propertycontainer.cxx
+++ b/comphelper/source/property/propertycontainer.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: propertycontainer.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: hr $ $Date: 2001-09-27 11:14:04 $
+ * last change: $Author: fs $ $Date: 2002-01-09 15:05:39 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -363,13 +363,25 @@ void OPropertyContainer::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, co
case PropertyDescription::ltHoldMyself:
m_aHoldProperties[aPos->aLocation.nOwnClassVectorIndex] = _rValue;
break;
+
case PropertyDescription::ltDerivedClassAnyType:
*reinterpret_cast< Any* >(aPos->aLocation.pDerivedClassMember) = _rValue;
break;
+
case PropertyDescription::ltDerivedClassRealType:
- OSL_ENSURE(_rValue.getValueType().equals(aPos->aType),
- "OPropertyContainer::setFastPropertyValue_NoBroadcast : ooops .... the value is of the wrong type !");
- uno_type_copyData(aPos->aLocation.pDerivedClassMember, const_cast<void*>(_rValue.getValue()), aPos->aType.getTypeLibType(), cpp_acquire);
+#ifdef _DEBUG
+ sal_Bool bSuccess =
+#endif
+ // copy the data from the to-be-set value
+ uno_type_assignData(
+ aPos->aLocation.pDerivedClassMember, aPos->aType.getTypeLibType(),
+ const_cast< void* >( _rValue.getValue() ), _rValue.getValueType().getTypeLibType(),
+ cpp_queryInterface,
+ cpp_acquire, cpp_release );
+
+ OSL_ENSURE( bSuccess,
+ "OPropertyContainer::setFastPropertyValue_NoBroadcast : ooops .... the value could not be assigned!");
+
break;
}
}
@@ -499,6 +511,9 @@ void OPropertyContainer::describeProperties(Sequence< Property >& _rProps) const
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.9 2001/09/27 11:14:04 hr
+ * #65293#: includes
+ *
* Revision 1.8 2001/08/17 09:07:32 fs
* #91038# convertFastPropertyValue: allow for assigning different XInterface derivees
*