diff options
Diffstat (limited to 'sw/source/uibase/uiview/viewmdi.cxx')
-rw-r--r-- | sw/source/uibase/uiview/viewmdi.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index 8d63bcb4580a..11c4a574b96e 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -290,25 +290,25 @@ IMPL_LINK( SwView, WindowChildEventListener, VclSimpleEvent*, pEvent ) int SwView::_CreateScrollbar( bool bHori ) { vcl::Window *pMDI = &GetViewFrame()->GetWindow(); - SwScrollbar** ppScrollbar = bHori ? &m_pHScrollbar : &m_pVScrollbar; + VclPtr<SwScrollbar>& ppScrollbar = bHori ? m_pHScrollbar : m_pVScrollbar; - assert(!*ppScrollbar); //check beforehand! + assert(!ppScrollbar.get()); //check beforehand! - *ppScrollbar = new SwScrollbar( pMDI, bHori ); + ppScrollbar = new SwScrollbar( pMDI, bHori ); UpdateScrollbars(); if(bHori) - (*ppScrollbar)->SetScrollHdl( LINK( this, SwView, EndScrollHdl )); + ppScrollbar->SetScrollHdl( LINK( this, SwView, EndScrollHdl )); else - (*ppScrollbar)->SetScrollHdl( LINK( this, SwView, ScrollHdl )); - (*ppScrollbar)->SetEndScrollHdl( LINK( this, SwView, EndScrollHdl )); + ppScrollbar->SetScrollHdl( LINK( this, SwView, ScrollHdl )); + ppScrollbar->SetEndScrollHdl( LINK( this, SwView, EndScrollHdl )); - (*ppScrollbar)->EnableDrag( true ); + ppScrollbar->EnableDrag( true ); if(GetWindow()) InvalidateBorder(); if (!m_bShowAtResize) - (*ppScrollbar)->ExtendedShow(); + ppScrollbar->ExtendedShow(); return 1; } |