summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-17 14:29:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-17 16:39:22 +0100
commit7a54951fbb43c50f8b65876eb0e9672fdcf73e25 (patch)
tree3257fce465743e137383989aae3e6ff83e329494 /comphelper
parentd438c470d783c0245231855b20233c5b3e3e691d (diff)
coverity#1231667 Unchecked return value
Change-Id: I40d8fc61b1e488955faa61c868877c7b6487c529
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/property/propertycontainerhelper.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/comphelper/source/property/propertycontainerhelper.cxx b/comphelper/source/property/propertycontainerhelper.cxx
index 62be2f65695a..ef2496839487 100644
--- a/comphelper/source/property/propertycontainerhelper.cxx
+++ b/comphelper/source/property/propertycontainerhelper.cxx
@@ -366,7 +366,7 @@ bool OPropertyContainerHelper::convertFastPropertyValue(
}
-void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const Any& _rValue)
+bool OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const Any& _rValue)
{
// get the property somebody is asking for
PropertiesIterator aPos = searchHandle(_nHandle);
@@ -375,9 +375,11 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An
OSL_FAIL( "OPropertyContainerHelper::setFastPropertyValue: unknown handle!" );
// should not happen if the derived class has built a correct property set info helper to be used by
// our base class OPropertySetHelper
- return;
+ return false;
}
+ bool bSuccess = true;
+
switch (aPos->eLocated)
{
case PropertyDescription::ltHoldMyself:
@@ -389,11 +391,8 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An
break;
case PropertyDescription::ltDerivedClassRealType:
-#if OSL_DEBUG_LEVEL > 0
- bool bSuccess =
-#endif
// copy the data from the to-be-set value
- uno_type_assignData(
+ bSuccess = uno_type_assignData(
aPos->aLocation.pDerivedClassMember, aPos->aProperty.Type.getTypeLibType(),
const_cast< void* >( _rValue.getValue() ), _rValue.getValueType().getTypeLibType(),
reinterpret_cast< uno_QueryInterfaceFunc >( cpp_queryInterface ),
@@ -405,8 +404,9 @@ void OPropertyContainerHelper::setFastPropertyValue(sal_Int32 _nHandle, const An
break;
}
-}
+ return bSuccess;
+}
void OPropertyContainerHelper::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) const
{