svtools/source/contnr/treelistbox.cxx | 15 +++++++------ xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx | 4 +-- xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx | 2 - xmloff/source/draw/ximp3dscene.cxx | 6 ++--- xmloff/source/forms/elementimport.cxx | 4 +-- xmloff/source/forms/officeforms.cxx | 2 - 6 files changed, 18 insertions(+), 15 deletions(-)
New commits: commit 221a3413af1b0f86a78c141fb2ea8fe969911dfb Author: Caolán McNamara <[email protected]> Date: Mon Dec 12 09:10:39 2016 +0000 coverity#1397056 Dereference null return value Change-Id: Ieda3afdbdbcc8aa21f6584edc21738c4edb84000 diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 230b90d..67d8e95 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -1844,12 +1844,15 @@ void SvTreeListBox::SetCheckButtonState( SvTreeListEntry* pEntry, SvButtonState void SvTreeListBox::SetCheckButtonInvisible( SvTreeListEntry* pEntry) { - if( nTreeFlags & SvTreeFlags::CHKBTN ) - { - SvLBoxButton* pItem = static_cast<SvLBoxButton*>(pEntry->GetFirstItem(SvLBoxItemType::Button)); - pItem->SetStateInvisible(); - InvalidateEntry( pEntry ); - } + SvLBoxButton* pItem = (nTreeFlags & SvTreeFlags::CHKBTN) ? + static_cast<SvLBoxButton*>(pEntry->GetFirstItem(SvLBoxItemType::Button)) : + nullptr; + + if (!pItem) + return; + + pItem->SetStateInvisible(); + InvalidateEntry(pEntry); } SvButtonState SvTreeListBox::GetCheckButtonState( SvTreeListEntry* pEntry ) const commit 3249009bb77933fe1c3402f5f2110048753c8a66 Author: Caolán McNamara <[email protected]> Date: Mon Dec 12 09:01:59 2016 +0000 coverity#704109 Unchecked return value and coverity#1397040 Unchecked return value coverity#1397047 Unchecked return value coverity#1397049 Unchecked return value coverity#1397050 Unchecked return value coverity#1397051 Unchecked return value Change-Id: Idf7dd7818b74c661a1f7a757f0bdc16e2d1d5c72 diff --git a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx index 885f533..7e06dce 100644 --- a/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx +++ b/xmloff/source/chart/SchXMLRegressionCurveObjectContext.cxx @@ -153,10 +153,10 @@ void SchXMLEquationContext::StartElement( const uno::Reference< xml::sax::XAttri bHasYPos = true; break; case XML_TOK_REGEQ_DISPLAY_EQUATION: - ::sax::Converter::convertBool(bShowEquation, aValue); + (void)::sax::Converter::convertBool(bShowEquation, aValue); break; case XML_TOK_REGEQ_DISPLAY_R_SQUARE: - ::sax::Converter::convertBool(bShowRSquare, aValue); + (void)::sax::Converter::convertBool(bShowRSquare, aValue); break; case XML_TOK_REGEQ_STYLE_NAME: sAutoStyleName = aValue; diff --git a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx index 7b95f63..12ea12f 100644 --- a/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx +++ b/xmloff/source/chart/XMLErrorIndicatorPropertyHdl.cxx @@ -37,7 +37,7 @@ bool XMLErrorIndicatorPropertyHdl::importXML( const OUString& rStrImpValue, uno::Any& rValue, const SvXMLUnitConverter& /*rUnitConverter*/ ) const { bool bValue(false); - ::sax::Converter::convertBool( bValue, rStrImpValue ); + (void)::sax::Converter::convertBool( bValue, rStrImpValue ); // modify existing value chart::ChartErrorIndicatorType eType = chart::ChartErrorIndicatorType_NONE; diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx index 1d294b4..511b005 100644 --- a/xmloff/source/draw/ximp3dscene.cxx +++ b/xmloff/source/draw/ximp3dscene.cxx @@ -79,12 +79,12 @@ SdXML3DLightContext::SdXML3DLightContext( } case XML_TOK_3DLIGHT_ENABLED: { - ::sax::Converter::convertBool(mbEnabled, sValue); + (void)::sax::Converter::convertBool(mbEnabled, sValue); break; } case XML_TOK_3DLIGHT_SPECULAR: { - ::sax::Converter::convertBool(mbSpecular, sValue); + (void)::sax::Converter::convertBool(mbSpecular, sValue); break; } } @@ -329,7 +329,7 @@ void SdXML3DSceneAttributesHelper::processSceneAttribute( sal_uInt16 nPrefix, co } else if( IsXMLToken( rLocalName, XML_LIGHTING_MODE ) ) { - ::sax::Converter::convertBool(mbLightingMode, rValue); + (void)::sax::Converter::convertBool(mbLightingMode, rValue); return; } } diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx index a733993..117b99f 100644 --- a/xmloff/source/forms/elementimport.cxx +++ b/xmloff/source/forms/elementimport.cxx @@ -1790,14 +1790,14 @@ namespace xmloff // propagate the selected flag bool bSelected(false); - ::sax::Converter::convertBool(bSelected, + (void)::sax::Converter::convertBool(bSelected, _rxAttrList->getValueByName(sSelectedAttribute)); if (bSelected) m_xListBoxImport->implSelectCurrentItem(); // same for the default selected bool bDefaultSelected(false); - ::sax::Converter::convertBool(bDefaultSelected, + (void)::sax::Converter::convertBool(bDefaultSelected, _rxAttrList->getValueByName(sDefaultSelectedAttribute)); if (bDefaultSelected) m_xListBoxImport->implDefaultSelectCurrentItem(); diff --git a/xmloff/source/forms/officeforms.cxx b/xmloff/source/forms/officeforms.cxx index 74a37ac..eb84c82 100644 --- a/xmloff/source/forms/officeforms.cxx +++ b/xmloff/source/forms/officeforms.cxx @@ -75,7 +75,7 @@ namespace xmloff // get and convert the value OUString sAttributeValue = _rxAttributes->getValueByName(sCompleteAttributeName); bool bValue = _bDefault; - ::sax::Converter::convertBool(bValue, sAttributeValue); + (void)::sax::Converter::convertBool(bValue, sAttributeValue); // set the property if (_rxPropInfo->hasPropertyByName(_rPropName))
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
