[Libreoffice-commits] core.git: 2 commits - svx/source vcl/source
Caolán McNamara
caolanm at redhat.com
Sat Jan 14 11:20:49 UTC 2017
svx/source/svdraw/svdedxv.cxx | 4 ++--
vcl/source/control/field2.cxx | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit d7e28300057645362ce32909c077b107f0a5c270
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jan 14 11:18:18 2017 +0000
coverity#1398583 Dereference after null check
and
coverity#1398580 Dereference after null check
Change-Id: Ib02a05d97c2ee2824eb1e8ad7fa97022fd573879
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 1fe56c8..9b4faf0 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1484,7 +1484,7 @@ bool SdrObjEditView::MouseButtonUp(const MouseEvent& rMEvt, vcl::Window* pWin)
else if (pTextEditWin!=nullptr) aPt=pTextEditWin->PixelToLogic(aPt);
bPostIt=IsTextEditHit(aPt);
}
- if (bPostIt) {
+ if (bPostIt && pWin) {
Point aPixPos(rMEvt.GetPosPixel());
Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
@@ -1558,7 +1558,7 @@ bool SdrObjEditView::Command(const CommandEvent& rCEvt, vcl::Window* pWin)
}
if (bPostIt) {
Point aPixPos(rCEvt.GetMousePosPixel());
- if (rCEvt.IsMouseEvent()) {
+ if (rCEvt.IsMouseEvent() && pWin) {
Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
commit 9a9a3e8954c9e0adda76539b158e7ca8af1bd9b0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat Jan 14 11:14:46 2017 +0000
coverity#735343 Unchecked return value
Change-Id: I18c605511094ad48557a24a89a391d8361a001a7
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index 2cb03cf..a2c740b 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -1687,7 +1687,7 @@ void DateFormatter::Reformat()
if ( !aStr.isEmpty() )
{
ImplSetText( aStr );
- ImplDateGetValue( aStr, maLastDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() );
+ (void)ImplDateGetValue(aStr, maLastDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings());
}
else
{
More information about the Libreoffice-commits
mailing list