include/vcl/opengl/OpenGLContext.hxx | 1 + sd/source/ui/view/drviewse.cxx | 5 ++++- svl/source/items/macitem.cxx | 7 ++++++- sw/source/uibase/docvw/edtwin.cxx | 29 ++++++++++++++++------------- vcl/unx/generic/gdi/salgdi.cxx | 3 ++- 5 files changed, 29 insertions(+), 16 deletions(-)
New commits: commit 8a68c3fecde9f688e07784e79ae661f821654453 Author: Caolán McNamara <[email protected]> Date: Sun Nov 16 20:22:09 2014 +0000 coverity#1242630 reorganize to help coverity out Change-Id: I18124cd8d7aadbab22114fa9d38607b43862f9ea diff --git a/svl/source/items/macitem.cxx b/svl/source/items/macitem.cxx index 24c4cc7..29d27403 100644 --- a/svl/source/items/macitem.cxx +++ b/svl/source/items/macitem.cxx @@ -103,6 +103,11 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion ) short nMacro(0); rStrm.ReadInt16(nMacro); + if (nMacro < 0) + { + SAL_WARN("editeng", "Parsing error: negative value " << nMacro); + return rStrm; + } const size_t nMinStringSize = rStrm.GetStreamCharSet() == RTL_TEXTENCODING_UNICODE ? 4 : 2; size_t nMinRecordSize = 2 + 2*nMinStringSize; @@ -110,7 +115,7 @@ SvStream& SvxMacroTableDtor::Read( SvStream& rStrm, sal_uInt16 nVersion ) nMinRecordSize+=2; const size_t nMaxRecords = rStrm.remainingSize() / nMinRecordSize; - if (nMacro > 0 && static_cast<size_t>(nMacro) > nMaxRecords) + if (static_cast<size_t>(nMacro) > nMaxRecords) { SAL_WARN("editeng", "Parsing error: " << nMaxRecords << " max possible entries, but " << nMacro<< " claimed, truncating"); commit 8877a2fbf5b71c45fd8af308884f9f52e34d7e9f Author: Caolán McNamara <[email protected]> Date: Sun Nov 16 20:14:37 2014 +0000 coverity#982483 Dereference after null check Change-Id: I6098e597cb00fccff4cf4611a8ac82badf1bdf02 diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 329944b..d10edec 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -4064,21 +4064,24 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt) bool bIsSelectionGfx = rSh.GetSelectionType() & nsSelectionType::SEL_GRF; bool bisResize = eSdrMoveHdl != HDL_MOVE; - if ( rMEvt.IsShift() ) - { - pSdrView->SetAngleSnapEnabled(!bIsSelectionGfx); - if (bisResize) - pSdrView->SetOrtho(!bIsSelectionGfx); - else - pSdrView->SetOrtho(true); - } - else + if (pSdrView) { - pSdrView->SetAngleSnapEnabled(bIsSelectionGfx); - if (bisResize) - pSdrView->SetOrtho(bIsSelectionGfx); + if (rMEvt.IsShift()) + { + pSdrView->SetAngleSnapEnabled(!bIsSelectionGfx); + if (bisResize) + pSdrView->SetOrtho(!bIsSelectionGfx); + else + pSdrView->SetOrtho(true); + } else - pSdrView->SetOrtho(false); + { + pSdrView->SetAngleSnapEnabled(bIsSelectionGfx); + if (bisResize) + pSdrView->SetOrtho(bIsSelectionGfx); + else + pSdrView->SetOrtho(false); + } } rSh.Drag( &aDocPt, rMEvt.IsShift() ); commit d7df2dbc6528cd91bb9628f9659605d4516f8d28 Author: Caolán McNamara <[email protected]> Date: Sun Nov 16 20:12:16 2014 +0000 coverity#708662 Uninitialized scalar field Change-Id: I6b694659077abce4ca7c67cf0298c9b882a2b964 diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index fc2ca50..b425cd7 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -80,7 +80,8 @@ X11SalGraphics::X11SalGraphics(): hBrush_(None), bWindow_(false), bPrinter_(false), - bVirDev_(false) + bVirDev_(false), + bFontGC_(false) { if (OpenGLHelper::isVCLOpenGLEnabled()) { commit 137a64367b2e232c9a159ce8fbad1ab2651c74bf Author: Caolán McNamara <[email protected]> Date: Sun Nov 16 20:11:05 2014 +0000 coverity#1187864 Uninitialized scalar field Change-Id: I80df95f70de515a0247827a89297cdfdf0399989 diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx index 5ca9602..215f5fe 100644 --- a/include/vcl/opengl/OpenGLContext.hxx +++ b/include/vcl/opengl/OpenGLContext.hxx @@ -132,6 +132,7 @@ struct GLWindow dpy(NULL), screen(0), win(0), + pix(0), #if defined( GLX_EXT_texture_from_pixmap ) fbc(0), #endif commit 8652830eeea97c98a7b910651630c3c0d8c354ec Author: Caolán McNamara <[email protected]> Date: Sun Nov 16 20:09:51 2014 +0000 coverity#1251173 Dereference before null check Change-Id: I5fb5ef73a40162dea1356dde03ceaa75a65f842a diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index f5b977c..100d1f8 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -626,6 +626,9 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) void DrawViewShell::FuDeleteSelectedObjects() { + if( !mpDrawView ) + return; + bool bConsumed = false; //if any placeholders are selected @@ -667,7 +670,7 @@ void DrawViewShell::FuDeleteSelectedObjects() bConsumed = true; } - if (!bConsumed && mpDrawView) + if (!bConsumed) { ::vcl::KeyCode aKCode(KEY_DELETE); KeyEvent aKEvt( 0, aKCode);
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
