chart2/source/model/template/BubbleDataInterpreter.cxx | 3 +-- sc/source/core/tool/rangeutl.cxx | 6 ++---- sfx2/source/doc/docfile.cxx | 4 +--- vcl/source/edit/texteng.cxx | 3 +-- xmloff/source/forms/formcellbinding.cxx | 3 +-- 5 files changed, 6 insertions(+), 13 deletions(-)
New commits: commit ef53a3a12e4f4aaf8ae33985bd22e89b08b8c03b Author: Julien Nabet <serval2...@yahoo.fr> Date: Tue Apr 2 23:00:47 2013 +0200 Some cppcheck cleaning Change-Id: I993bd95b31f1090c747f01a899650e8873dcaada diff --git a/chart2/source/model/template/BubbleDataInterpreter.cxx b/chart2/source/model/template/BubbleDataInterpreter.cxx index be2f1f0..8dc2ff9 100644 --- a/chart2/source/model/template/BubbleDataInterpreter.cxx +++ b/chart2/source/model/template/BubbleDataInterpreter.cxx @@ -69,10 +69,9 @@ chart2::InterpretedData SAL_CALL BubbleDataInterpreter::interpretDataSource( bool bHasCategories = HasCategories( aArguments, aData ); bool bUseCategoriesAsX = UseCategoriesAsX( aArguments ); - bool bSetXValues = false; sal_Int32 nDataSeqCount = aData.getLength(); - bSetXValues = bHasCategories ? ( (nDataSeqCount-1) > 2 && (nDataSeqCount-1) % 2 != 0 ) + bool bSetXValues = bHasCategories ? ( (nDataSeqCount-1) > 2 && (nDataSeqCount-1) % 2 != 0 ) :( nDataSeqCount > 2 && nDataSeqCount % 2 != 0 ); bool bCategoriesUsed = false; diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 8177298..2f3f439 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -188,11 +188,10 @@ sal_Bool ScRangeUtil::IsAbsArea( const String& rAreaStr, ScRefAddress* pEndPos, ScAddress::Details const & rDetails ) const { - sal_Bool bIsAbsArea = false; ScRefAddress startPos; ScRefAddress endPos; - bIsAbsArea = ConvertDoubleRef( pDoc, rAreaStr, nTab, startPos, endPos, rDetails ); + sal_Bool bIsAbsArea = ConvertDoubleRef( pDoc, rAreaStr, nTab, startPos, endPos, rDetails ); if ( bIsAbsArea ) { @@ -229,10 +228,9 @@ sal_Bool ScRangeUtil::IsAbsPos( const String& rPosStr, ScRefAddress* pPosTripel, ScAddress::Details const & rDetails ) const { - sal_Bool bIsAbsPos = false; ScRefAddress thePos; - bIsAbsPos = ConvertSingleRef( pDoc, rPosStr, nTab, thePos, rDetails ); + sal_Bool bIsAbsPos = ConvertSingleRef( pDoc, rPosStr, nTab, thePos, rDetails ); thePos.SetRelCol( false ); thePos.SetRelRow( false ); thePos.SetRelTab( false ); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 5afe39c..1f1525c 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -3240,10 +3240,8 @@ sal_Bool SfxMedium::SaveVersionList_Impl( sal_Bool /*bUseXML*/ ) //---------------------------------------------------------------- sal_Bool SfxMedium::IsReadOnly() { - bool bReadOnly = false; - // a) ReadOnly filter cant produce read/write contents! - bReadOnly = ( + bool bReadOnly = ( (pImp->m_pFilter ) && ((pImp->m_pFilter->GetFilterFlags() & SFX_FILTER_OPENREADONLY) == SFX_FILTER_OPENREADONLY) ); diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 2372768..261144a 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -1969,9 +1969,8 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan if ( !IsFormatted() ) FormatDoc(); - bool bTransparent = false; Window* pOutWin = dynamic_cast<Window*>(pOutDev); - bTransparent = (pOutWin && pOutWin->IsPaintTransparent()); + bool bTransparent = (pOutWin && pOutWin->IsPaintTransparent()); long nY = rStartPos.Y(); diff --git a/xmloff/source/forms/formcellbinding.cxx b/xmloff/source/forms/formcellbinding.cxx index 4f0c522..72c39c7 100644 --- a/xmloff/source/forms/formcellbinding.cxx +++ b/xmloff/source/forms/formcellbinding.cxx @@ -363,9 +363,8 @@ bool FormCellBindingHelper::isCellRangeListSource( const Reference< XListEntrySo //------------------------------------------------------------------------ bool FormCellBindingHelper::doesComponentSupport( const Reference< XInterface >& _rxComponent, const ::rtl::OUString& _rService ) const { - bool bDoes = false; Reference< XServiceInfo > xSI( _rxComponent, UNO_QUERY ); - bDoes = xSI.is() && xSI->supportsService( _rService ); + bool bDoes = xSI.is() && xSI->supportsService( _rService ); return bDoes; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits