summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGergo Mocsi <gmocsi91@gmail.com>2013-08-29 12:04:06 +0200
committerGergo Mocsi <gmocsi91@gmail.com>2013-08-29 12:04:06 +0200
commitea87494f8ec7f7995dc9050a3147529b096f8f56 (patch)
tree5b940a0b96f7bd691e3ad50c6b4e3c59be934e9c
parent1ce55a2f53a8bffc76903e3966dd2920fd9a76a4 (diff)
GSOC work, renaming+listbox right side fix
Fixed the small bug in positioning the listbox to the right side. Function ResizeListBox was renamed to ResizeAndPositionListBox. Change-Id: I3cea54ad5658ee1628935b4975f52fe78c1ff5c3
-rw-r--r--basctl/source/basicide/baside2.hxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 447d77d5b372..9bafa517d7fd 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -529,7 +529,7 @@ public:
void ClearListBox();
void SetTextSelection( const TextSelection& aSel );
const TextSelection& GetTextSelection() const;
- void ResizeListBox();
+ void ResizeAndPositionListBox();
void SelectFirstEntry(); //selects first entry in ListBox
void ClearAndHide();
/*
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 1bf8be1512e0..5d713ec625f5 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -874,7 +874,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;
@@ -2818,7 +2818,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
@@ -2856,9 +2856,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 );