diff options
Diffstat (limited to 'vcl/source/control/combobox.cxx')
-rw-r--r-- | vcl/source/control/combobox.cxx | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index ecaca6598f0c..a5d619fc0af5 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -188,7 +188,7 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle ) if ( mpFloatWin ) mpFloatWin->SetImplListBox( mpImplLB ); else - mpImplLB->GetMainWindow()->AllowGrabFocus( true ); + mpImplLB->GetMainWindow().AllowGrabFocus( true ); ImplCalcEditHeight(); @@ -249,7 +249,7 @@ IMPL_LINK_NOARG(ComboBox, ImplClickBtnHdl) ImplClearLayoutData(); if( mpImplLB ) - mpImplLB->GetMainWindow()->ImplClearLayoutData(); + mpImplLB->GetMainWindow().ImplClearLayoutData(); return 0; } @@ -270,7 +270,7 @@ IMPL_LINK_NOARG(ComboBox, ImplPopupModeEndHdl) ImplClearLayoutData(); if( mpImplLB ) - mpImplLB->GetMainWindow()->ImplClearLayoutData(); + mpImplLB->GetMainWindow().ImplClearLayoutData(); mpBtn->SetPressed( false ); ImplCallEventListeners( VCLEVENT_DROPDOWN_CLOSE ); @@ -578,20 +578,20 @@ void ComboBox::FillLayoutData() const mpControlData->mpLayoutData = new vcl::ControlLayoutData(); AppendLayoutData( *mpSubEdit ); mpSubEdit->SetLayoutDataParent( this ); - Control* pMainWindow = mpImplLB->GetMainWindow(); + Control& rMainWindow = mpImplLB->GetMainWindow(); if( mpFloatWin ) { // dropdown mode if( mpFloatWin->IsReallyVisible() ) { - AppendLayoutData( *pMainWindow ); - pMainWindow->SetLayoutDataParent( this ); + AppendLayoutData( rMainWindow ); + rMainWindow.SetLayoutDataParent( this ); } } else { - AppendLayoutData( *pMainWindow ); - pMainWindow->SetLayoutDataParent( this ); + AppendLayoutData( rMainWindow ); + rMainWindow.SetLayoutDataParent( this ); } } @@ -644,7 +644,7 @@ void ComboBox::StateChanged( StateChangedType nType ) else if ( nType == STATE_CHANGE_STYLE ) { SetStyle( ImplInitStyle( GetStyle() ) ); - mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? true : false ); + mpImplLB->GetMainWindow().EnableSort( ( GetStyle() & WB_SORT ) ? true : false ); } else if( nType == STATE_CHANGE_MIRRORING ) { @@ -762,7 +762,7 @@ bool ComboBox::Notify( NotifyEvent& rNEvt ) nDone = false; // don't eat this event, let the default handling happen (i.e. scroll the context) } } - else if( ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) && ( rNEvt.GetWindow() == mpImplLB->GetMainWindow() ) ) + else if( ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) && ( rNEvt.GetWindow() == &mpImplLB->GetMainWindow() ) ) { mpSubEdit->GrabFocus(); } @@ -1107,7 +1107,7 @@ void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines long nCharWidth = GetTextWidth(OUString(static_cast<sal_Unicode>('x'))); if ( !IsDropDownBox() ) { - Size aOutSz = mpImplLB->GetMainWindow()->GetOutputSizePixel(); + Size aOutSz = mpImplLB->GetMainWindow().GetOutputSizePixel(); rnCols = (sal_uInt16)(aOutSz.Width()/nCharWidth); rnLines = (sal_uInt16)(aOutSz.Height()/mpImplLB->GetEntryHeight()); } @@ -1121,11 +1121,11 @@ void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { - mpImplLB->GetMainWindow()->ImplInitSettings( true, true, true ); + mpImplLB->GetMainWindow().ImplInitSettings( true, true, true ); Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - Font aFont = mpImplLB->GetMainWindow()->GetDrawPixelFont( pDev ); + Font aFont = mpImplLB->GetMainWindow().GetDrawPixelFont( pDev ); OutDevType eOutDevType = pDev->GetOutDevType(); pDev->Push(); @@ -1235,18 +1235,18 @@ void ComboBox::UserDraw( const UserDrawEvent& ) void ComboBox::SetUserItemSize( const Size& rSz ) { - mpImplLB->GetMainWindow()->SetUserItemSize( rSz ); + mpImplLB->GetMainWindow().SetUserItemSize( rSz ); } void ComboBox::EnableUserDraw( bool bUserDraw ) { - mpImplLB->GetMainWindow()->EnableUserDraw( bUserDraw ); + mpImplLB->GetMainWindow().EnableUserDraw( bUserDraw ); } void ComboBox::DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos ) { - DBG_ASSERT( rEvt.GetDevice() == mpImplLB->GetMainWindow(), "DrawEntry?!" ); - mpImplLB->GetMainWindow()->DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos ); + DBG_ASSERT( rEvt.GetDevice() == &mpImplLB->GetMainWindow(), "DrawEntry?!" ); + mpImplLB->GetMainWindow().DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos ); } void ComboBox::SetSeparatorPos( sal_Int32 n ) @@ -1357,8 +1357,8 @@ void ComboBox::SetNoSelection() Rectangle ComboBox::GetBoundingRectangle( sal_Int32 nItem ) const { - Rectangle aRect = mpImplLB->GetMainWindow()->GetBoundingRectangle( nItem ); - Rectangle aOffset = mpImplLB->GetMainWindow()->GetWindowExtentsRelative( (Window*)this ); + Rectangle aRect = mpImplLB->GetMainWindow().GetBoundingRectangle( nItem ); + Rectangle aOffset = mpImplLB->GetMainWindow().GetWindowExtentsRelative( (Window*)this ); aRect.Move( aOffset.TopLeft().X(), aOffset.TopLeft().Y() ); return aRect; } @@ -1384,16 +1384,16 @@ long ComboBox::GetIndexForPoint( const Point& rPoint, sal_Int32& rPos ) const { // point must be either in main list window // or in impl window (dropdown case) - ImplListBoxWindow* pMain = mpImplLB->GetMainWindow(); + ImplListBoxWindow& rMain = mpImplLB->GetMainWindow(); // convert coordinates to ImplListBoxWindow pixel coordinate space Point aConvPoint = LogicToPixel( rPoint ); aConvPoint = OutputToAbsoluteScreenPixel( aConvPoint ); - aConvPoint = pMain->AbsoluteScreenToOutputPixel( aConvPoint ); - aConvPoint = pMain->PixelToLogic( aConvPoint ); + aConvPoint = rMain.AbsoluteScreenToOutputPixel( aConvPoint ); + aConvPoint = rMain.PixelToLogic( aConvPoint ); // try to find entry - sal_Int32 nEntry = pMain->GetEntryPosForPoint( aConvPoint ); + sal_Int32 nEntry = rMain.GetEntryPosForPoint( aConvPoint ); if( nEntry == LISTBOX_ENTRY_NOTFOUND ) nIndex = -1; else |