filter/source/msfilter/eschesdo.cxx | 2 +- filter/source/msfilter/msdffimp.cxx | 6 ++++-- svx/source/accessibility/ChildrenManagerImpl.cxx | 9 +++++---- sw/source/core/unocore/unoobj.cxx | 5 +++++ sw/source/ui/frmdlg/column.cxx | 4 +--- 5 files changed, 16 insertions(+), 10 deletions(-)
New commits: commit ddfebe55c95f5d498618ae0e3a8f60b48cc577f1 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jan 29 15:10:46 2014 +0000 coverity#1132706 Dereference before null check Change-Id: Ic59a2e7425ed117f1ba43ed438650bfb5eed77cb diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index 71bafc8..f0ad75a 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -992,13 +992,14 @@ void ChildrenManagerImpl::UpdateSelection (void) } } - Window *pParentWidow = maShapeTreeInfo.GetWindow(); + Window *pParentWindow = maShapeTreeInfo.GetWindow(); bool bShapeActive= false; // For table cell, the table's parent must be checked to make sure it has focus. - Window *pPWindow = pParentWidow->GetParent(); - if (pParentWidow && ( pParentWidow->HasFocus() || (pPWindow && pPWindow->HasFocus()))) + if (pParentWindow) { - bShapeActive =true; + Window *pPWindow = pParentWindow->GetParent(); + if (pParentWindow->HasFocus() || (pPWindow && pPWindow->HasFocus())) + bShapeActive =true; } // Move focus from current to newly focused shape. if (pCurrentlyFocusedShape != pNewFocusedShape) commit 7522ffd1c7bbec69e593c7492297743425dda601 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jan 29 15:02:39 2014 +0000 coverity#1157758 Dead default in switch Change-Id: I1df0e8e159daff0ad29894c8d8f1984cd70fd130 diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 25b2728..c58aa29 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -468,10 +468,8 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) case 3: aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM3 ); break; - case 4: - aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM4 ); - break; default: + aItemText = SW_RESSTR( STR_COLUMN_VALUESET_ITEM4 ); break; } m_pDefaultVS->InsertItem( i + 1, aItemText, i ); commit a701b7deadb5ce08d25ce86a2768b6222eb035a9 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jan 29 15:00:22 2014 +0000 coverity#1157789 Division or modulo by zero Change-Id: I7c6fc34702acce21759dad00626ff4ffcd0ced95 diff --git a/filter/source/msfilter/eschesdo.cxx b/filter/source/msfilter/eschesdo.cxx index 6d5f8a6..a7d7e41 100644 --- a/filter/source/msfilter/eschesdo.cxx +++ b/filter/source/msfilter/eschesdo.cxx @@ -332,7 +332,7 @@ sal_uInt32 ImplEESdrWriter::ImplWriteShape( ImplEESdrObject& rObj, if ( nLength > rObj.GetRect().GetHeight() ) nLength = rObj.GetRect().GetHeight(); nLength >>= 1; - if ( nRadius >= nLength ) + if ( nRadius >= nLength || nLength == 0 ) nRadius = 0x2a30; // 0x2a30 is PPTs maximum radius else nRadius = ( 0x2a30 * nRadius ) / nLength; commit ca1c17d7e589ada7ef145fc02bb7f37c5da1c57c Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jan 29 14:56:43 2014 +0000 coverity#1157791 Division or modulo by zero Change-Id: I6b46a037b0d5f13681ad4936ddd56fd80c8128fb diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index ea41e1f..54b8dd6 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -4488,8 +4488,10 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r fYOfs = ((double)aPolyBoundRect.Top() - (double)aPolyPieRect.Top() ) * fYScale; } - fXScale = (double)aPolyBoundRect.GetWidth() / (double)aPolyPieRect.GetWidth(); - fYScale = (double)aPolyBoundRect.GetHeight() / (double)aPolyPieRect.GetHeight(); + if ( aPolyPieRect.GetWidth() ) + fXScale = (double)aPolyBoundRect.GetWidth() / (double)aPolyPieRect.GetWidth(); + if ( aPolyPieRect.GetHeight() ) + fYScale = (double)aPolyBoundRect.GetHeight() / (double)aPolyPieRect.GetHeight(); Rectangle aOldBoundRect( aObjData.aBoundRect ); aObjData.aBoundRect = Rectangle( Point( aLogicRect.Left() + (sal_Int32)fXOfs, aLogicRect.Top() + (sal_Int32)fYOfs ), commit 2fbca907614491b5b29d825d8b3d5f74873e8593 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Jan 29 14:50:14 2014 +0000 coverity#1158060 Dereference after null check Change-Id: I6e87e36aeb3416a38c11402ebc5bfb59b123173d diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx index 705a018..15a3df9 100644 --- a/sw/source/core/unocore/unoobj.cxx +++ b/sw/source/core/unocore/unoobj.cxx @@ -1190,6 +1190,11 @@ throw (uno::RuntimeException) if ( eSearchNodeType == SwTableBoxStartNode ) { + if (!pOwnStartNode || !pTmp) + { + throw uno::RuntimeException(); + } + if ( pOwnStartNode->FindTableNode() != pTmp->FindTableNode() ) { throw uno::RuntimeException();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits