Kaydet (Commit) 728f074a authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: tdf#124148 null-deref on clicking inside empty listbox

since...

commit ce9dab8c
Date:   Thu Mar 28 17:43:29 2019 +0900

    tdf#124148 add configurable margin for the listbox pop-up list

Change-Id: Id0bedb86f4fb74aff230d65f1e4371959814fd0f
Reviewed-on: https://gerrit.libreoffice.org/70151
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 86ba9cdc
...@@ -810,9 +810,11 @@ sal_Int32 ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const ...@@ -810,9 +810,11 @@ sal_Int32 ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const
sal_Int32 nSelect = mnTop; sal_Int32 nSelect = mnTop;
const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nSelect ); const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nSelect );
long nEntryHeight = pEntry->getHeightWithMargin(); while (pEntry)
while( pEntry && rPoint.Y() > nEntryHeight + nY )
{ {
long nEntryHeight = pEntry->getHeightWithMargin();
if (rPoint.Y() <= nEntryHeight + nY)
break;
nY += nEntryHeight; nY += nEntryHeight;
pEntry = mpEntryList->GetEntryPtr( ++nSelect ); pEntry = mpEntryList->GetEntryPtr( ++nSelect );
} }
......
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