summaryrefslogtreecommitdiff
path: root/vcl/source/control/ilstbox.cxx
diff options
context:
space:
mode:
authorAndre Fischer <andre.f.fischer <Andre Fischer<andre.f.fischer@oracle.com>2010-11-05 10:17:51 +0100
committerAndre Fischer <andre.f.fischer <Andre Fischer<andre.f.fischer@oracle.com>2010-11-05 10:17:51 +0100
commit34c72d32a6fe0960291ebe61820defcda5cacd8e (patch)
treefc6367c37c653d019e3250153896c57257184a63 /vcl/source/control/ilstbox.cxx
parenta7b3942c0f04f24455ab85ec0c0a8c2a0014da0f (diff)
parent95f71183414a50d12cd4bbacf47d711672e63268 (diff)
impress195: merge with DEV300_m92
Diffstat (limited to 'vcl/source/control/ilstbox.cxx')
-rw-r--r--vcl/source/control/ilstbox.cxx21
1 files changed, 16 insertions, 5 deletions
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index ebccfdc1e6bb..b4b7e3f80357 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2356,7 +2356,11 @@ IMPL_LINK( ImplListBox, MRUChanged, void*, EMPTYARG )
IMPL_LINK( ImplListBox, LBWindowScrolled, void*, EMPTYARG )
{
+ long nSet = GetTopEntry();
+ if( nSet > mpVScrollBar->GetRangeMax() )
+ mpVScrollBar->SetRangeMax( GetEntryList()->GetEntryCount() );
mpVScrollBar->SetThumbPos( GetTopEntry() );
+
mpHScrollBar->SetThumbPos( GetLeftIndent() );
maScrollHdl.Call( this );
@@ -2395,7 +2399,11 @@ void ImplListBox::ImplCheckScrollBars()
mbVScroll = TRUE;
// Ueberpruefung des rausgescrollten Bereichs
- SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
+ if( GetEntryList()->GetSelectEntryCount() == 1 &&
+ GetEntryList()->GetSelectEntryPos( 0 ) != LISTBOX_ENTRY_NOTFOUND )
+ ShowProminentEntry( GetEntryList()->GetSelectEntryPos( 0 ) );
+ else
+ SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
}
else
{
@@ -2428,7 +2436,11 @@ void ImplListBox::ImplCheckScrollBars()
mbVScroll = TRUE;
// Ueberpruefung des rausgescrollten Bereichs
- SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
+ if( GetEntryList()->GetSelectEntryCount() == 1 &&
+ GetEntryList()->GetSelectEntryPos( 0 ) != LISTBOX_ENTRY_NOTFOUND )
+ ShowProminentEntry( GetEntryList()->GetSelectEntryPos( 0 ) );
+ else
+ SetTopEntry( GetTopEntry() ); // MaxTop wird geprueft...
}
}
@@ -2819,7 +2831,7 @@ void ImplWin::ImplDraw( bool bLayout )
sal_Int32 nLeft, nTop, nRight, nBottom;
pWin->GetBorder( nLeft, nTop, nRight, nBottom );
Point aPoint( -nLeft, -nTop );
- Region aCtrlRegion( Rectangle( aPoint - GetPosPixel(), pWin->GetSizePixel() ) );
+ Rectangle aCtrlRegion( aPoint - GetPosPixel(), pWin->GetSizePixel() );
BOOL bMouseOver = FALSE;
if( GetParent() )
@@ -2838,8 +2850,7 @@ void ImplWin::ImplDraw( bool bLayout )
if( ! (nParentStyle & WB_BORDER) || (nParentStyle & WB_NOBORDER) )
{
Rectangle aParentRect( Point( 0, 0 ), pWin->GetSizePixel() );
- Region aParentReg( aParentRect );
- pWin->DrawNativeControl( CTRL_LISTBOX, PART_ENTIRE_CONTROL, aParentReg,
+ pWin->DrawNativeControl( CTRL_LISTBOX, PART_ENTIRE_CONTROL, aParentRect,
nState, aControlValue, rtl::OUString() );
}