Kaydet (Commit) 0ae60c3c authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#705898 Dereference before null check

Change-Id: I16029411bd758914e87c7dc020ff8779218fefaa
üst 3acf5f61
......@@ -1228,11 +1228,14 @@ sal_Bool SdrObjEditView::MouseButtonDown(const MouseEvent& rMEvt, Window* pWin)
}
if (bPostIt) {
Point aPixPos(rMEvt.GetPosPixel());
Rectangle aR(pWin->LogicToPixel(pTextEditOutlinerView->GetOutputArea()));
if (aPixPos.X()<aR.Left ()) aPixPos.X()=aR.Left ();
if (aPixPos.X()>aR.Right ()) aPixPos.X()=aR.Right ();
if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
if (aPixPos.Y()>aR.Bottom()) aPixPos.Y()=aR.Bottom();
if (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 ();
if (aPixPos.Y()<aR.Top ()) aPixPos.Y()=aR.Top ();
if (aPixPos.Y()>aR.Bottom()) aPixPos.Y()=aR.Bottom();
}
MouseEvent aMEvt(aPixPos,rMEvt.GetClicks(),rMEvt.GetMode(),
rMEvt.GetButtons(),rMEvt.GetModifier());
if (pTextEditOutlinerView->MouseButtonDown(aMEvt)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment