summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/lboxctrl.cxx
diff options
context:
space:
mode:
authorThomas Lange <tl@openoffice.org>2001-09-24 10:45:50 +0000
committerThomas Lange <tl@openoffice.org>2001-09-24 10:45:50 +0000
commit528e255309abba5de52be764a61677b47c19a3c2 (patch)
tree0379ebba12d183c236ab13f1900928e7ba2216d4 /svx/source/tbxctrls/lboxctrl.cxx
parent1f604e142dfae8abf058ebb437aee74935c14301 (diff)
#92323# fixed positioning of popup-windows.
Diffstat (limited to 'svx/source/tbxctrls/lboxctrl.cxx')
-rw-r--r--svx/source/tbxctrls/lboxctrl.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx
index b0498226ae8e..a6ef659b147a 100644
--- a/svx/source/tbxctrls/lboxctrl.cxx
+++ b/svx/source/tbxctrls/lboxctrl.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: lboxctrl.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: jp $ $Date: 2001-08-30 08:59:09 $
+ * last change: $Author: tl $ $Date: 2001-09-24 11:45:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -340,17 +340,15 @@ SfxPopupWindow* SvxUndoControl::CreatePopupWindow()
for( long nI = 0, nEnd = pLst->Count(); nI < nEnd; ++nI )
rListBox.InsertEntry( *((String*)pLst->GetObject( nI )) );
rListBox.SelectEntryPos( 0 );
- Impl_SetInfo( 1 );
+ Impl_SetInfo( rListBox.GetSelectEntryCount() );
- //Point aPt( rBox.OutputToScreenPixel( rBox.GetPointerPosPixel() ) );
+ // position window at the bottom-left of the toolbox icon
Rectangle aItemRect( rBox.GetItemRect( nItemId ) );
+ aItemRect.Bottom() += aItemRect.GetHeight() - 2;
- ULONG nFlags = FLOATWIN_POPUPMODE_DOWN;
rBox.SetItemDown( nItemId, TRUE );
- pPopupWin->StartPopupMode( aItemRect, nFlags );
- pPopupWin->SetPosPixel( aItemRect.BottomLeft() );
+ pPopupWin->StartPopupMode( aItemRect );
pPopupWin->StartSelection();
- pPopupWin->Show();
}
return pPopupWin;
}
@@ -413,17 +411,15 @@ SfxPopupWindow* SvxRedoControl::CreatePopupWindow()
for( long nI = 0, nEnd = pLst->Count(); nI < nEnd; ++nI )
rListBox.InsertEntry( *((String*)pLst->GetObject( nI )) );
rListBox.SelectEntryPos( 0 );
- Impl_SetInfo( 1 );
+ Impl_SetInfo( rListBox.GetSelectEntryCount() );
- //Point aPt( rBox.OutputToScreenPixel( rBox.GetPointerPosPixel() ) );
+ // position window at the bottom-left of the toolbox icon
Rectangle aItemRect( rBox.GetItemRect( nItemId ) );
- Point aPt( rBox.OutputToScreenPixel( aItemRect.BottomLeft() ) );
- aItemRect.TopLeft() = rBox.ScreenToOutputPixel( aPt );
+ aItemRect.Bottom() += aItemRect.GetHeight() - 2;
rBox.SetItemDown( nItemId, TRUE );
pPopupWin->StartPopupMode( aItemRect );
pPopupWin->StartSelection();
- pPopupWin->Show();
}
return pPopupWin;
}