basctl/source/basicide/baside2.hxx | 2 +- basctl/source/basicide/baside2b.cxx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
New commits: commit ea87494f8ec7f7995dc9050a3147529b096f8f56 Author: Gergo Mocsi <gmocs...@gmail.com> Date: Thu Aug 29 12:04:06 2013 +0200 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 diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 447d77d..9bafa51 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 1bf8be1..5d713ec 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 ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits