summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/baside2b.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/basicide/baside2b.cxx')
-rw-r--r--basctl/source/basicide/baside2b.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 89a22d85ce85..a68e77f069c2 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -880,7 +880,7 @@ void EditorWindow::SetupAndShowCodeCompleteWnd( const std::vector< OUString >& a
}
// show it
pCodeCompleteWnd->Show();
- pCodeCompleteWnd->ResizeListBox();
+ pCodeCompleteWnd->ResizeAndPositionListBox();
pCodeCompleteWnd->SelectFirstEntry();
// correct text selection, and set it
aSel.GetStart().GetIndex() += 1;
@@ -2824,7 +2824,7 @@ const TextSelection& CodeCompleteWindow::GetTextSelection() const
return aTextSelection;
}
-void CodeCompleteWindow::ResizeListBox()
+void CodeCompleteWindow::ResizeAndPositionListBox()
{
if( pListBox->GetEntryCount() >= 1 )
{// if there is at least one element inside
@@ -2862,9 +2862,9 @@ void CodeCompleteWindow::ResizeListBox()
aPos.Y() -= aSize.getHeight() + nParentFontHeight + nCursorPad;
}
- if( aVisArea.BottomLeft().getX() + aPos.getX() + aSize.getWidth() > aBottomPoint.getX() )
+ if( aVisArea.TopLeft().getX() + aPos.getX() + aSize.getWidth() > aBottomPoint.getX() )
{//clipped at the right side, move it a bit left
- aPos.X() -= aSize.getWidth();
+ aPos.X() -= aSize.getWidth() + aVisArea.TopLeft().getX();
}
//set the position
SetPosPixel( aPos );