summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/control/combobox.cxx12
-rw-r--r--vcl/source/control/ilstbox.cxx3
-rw-r--r--vcl/source/control/lstbox.cxx10
-rw-r--r--vcl/source/control/morebtn.cxx2
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx2
-rw-r--r--vcl/source/window/openglwin.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx2
7 files changed, 17 insertions, 16 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index c5ef3eb50b9f..441b3b5d65ee 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -582,19 +582,19 @@ void ComboBox::FillLayoutData() const
mpControlData->mpLayoutData = new vcl::ControlLayoutData();
AppendLayoutData( *mpSubEdit );
mpSubEdit->SetLayoutDataParent( this );
- ImplListBoxWindowPtr rMainWindow = mpImplLB->GetMainWindow();
+ ImplListBoxWindow* rMainWindow = mpImplLB->GetMainWindow();
if( mpFloatWin )
{
// dropdown mode
if( mpFloatWin->IsReallyVisible() )
{
- AppendLayoutData( *(rMainWindow.get()) );
+ AppendLayoutData( *rMainWindow );
rMainWindow->SetLayoutDataParent( this );
}
}
else
{
- AppendLayoutData( *(rMainWindow.get()) );
+ AppendLayoutData( *rMainWindow );
rMainWindow->SetLayoutDataParent( this );
}
}
@@ -766,7 +766,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() == MouseNotifyEvent::MOUSEBUTTONDOWN ) && ( rNEvt.GetWindow() == mpImplLB->GetMainWindow().get() ) )
+ else if( ( rNEvt.GetType() == MouseNotifyEvent::MOUSEBUTTONDOWN ) && ( rNEvt.GetWindow() == mpImplLB->GetMainWindow() ) )
{
mpSubEdit->GrabFocus();
}
@@ -1244,7 +1244,7 @@ void ComboBox::EnableUserDraw( bool bUserDraw )
void ComboBox::DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos )
{
- DBG_ASSERT( rEvt.GetDevice() == mpImplLB->GetMainWindow().get(), "DrawEntry?!" );
+ DBG_ASSERT( rEvt.GetDevice() == mpImplLB->GetMainWindow(), "DrawEntry?!" );
mpImplLB->GetMainWindow()->DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos );
}
@@ -1383,7 +1383,7 @@ long ComboBox::GetIndexForPoint( const Point& rPoint, sal_Int32& rPos ) const
{
// point must be either in main list window
// or in impl window (dropdown case)
- ImplListBoxWindowPtr rMain = mpImplLB->GetMainWindow();
+ ImplListBoxWindow* rMain = mpImplLB->GetMainWindow();
// convert coordinates to ImplListBoxWindow pixel coordinate space
Point aConvPoint = LogicToPixel( rPoint );
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index d6fde49a34f5..e05746e1bab6 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2178,6 +2178,7 @@ void ImplListBox::dispose()
mpVScrollBar.clear();
mpScrollBarBox.clear();
maLBWindow.clear();
+ maLBWindow.disposeAndClear();
Control::dispose();
}
@@ -2984,7 +2985,7 @@ void ImplListBoxFloatingWindow::setPosSizePixel( long nX, long nY, long nWidth,
// this the presence of the vertical Scrollbar has to be known.
mpImplLB->SetSizePixel( GetOutputSizePixel() );
((vcl::Window*)mpImplLB)->Resize();
- ((vcl::Window*)mpImplLB->GetMainWindow().get())->Resize();
+ ((vcl::Window*)mpImplLB->GetMainWindow())->Resize();
}
}
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 00eba39e52d6..01ac56430a6d 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -693,7 +693,7 @@ void ListBox::Resize()
void ListBox::FillLayoutData() const
{
mpControlData->mpLayoutData = new vcl::ControlLayoutData();
- const ImplListBoxWindowPtr rMainWin = mpImplLB->GetMainWindow();
+ const ImplListBoxWindow* rMainWin = mpImplLB->GetMainWindow();
if( mpFloatWin )
{
// Dropdown mode
@@ -701,13 +701,13 @@ void ListBox::FillLayoutData() const
mpImplWin->SetLayoutDataParent( this );
if( mpFloatWin->IsReallyVisible() )
{
- AppendLayoutData( *(rMainWin.get()) );
+ AppendLayoutData( *rMainWin );
rMainWin->SetLayoutDataParent( this );
}
}
else
{
- AppendLayoutData( *(rMainWin.get()) );
+ AppendLayoutData( *rMainWin );
rMainWin->SetLayoutDataParent( this );
}
}
@@ -723,7 +723,7 @@ long ListBox::GetIndexForPoint( const Point& rPoint, sal_Int32& rPos ) const
{
// Point must be either in main list window
// or in impl window (dropdown case)
- ImplListBoxWindowPtr rMain = mpImplLB->GetMainWindow();
+ ImplListBoxWindow* rMain = mpImplLB->GetMainWindow();
// Convert coordinates to ImplListBoxWindow pixel coordinate space
Point aConvPoint = LogicToPixel( rPoint );
@@ -1373,7 +1373,7 @@ void ListBox::UserDraw( const UserDrawEvent& )
void ListBox::DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos )
{
- if ( rEvt.GetDevice() == mpImplLB->GetMainWindow().get() )
+ if ( rEvt.GetDevice() == mpImplLB->GetMainWindow() )
mpImplLB->GetMainWindow()->DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos );
else if ( rEvt.GetDevice() == mpImplWin )
mpImplWin->DrawEntry( bDrawImage, bDrawText, bDrawTextAtImagePos );
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index aa542ca932d9..999c3c308d73 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -22,7 +22,7 @@
#include <tools/rc.h>
#include <vector>
-typedef ::std::vector< vcl::Window* > ImplMoreWindowList;
+typedef ::std::vector< VclPtr<vcl::Window> > ImplMoreWindowList;
struct ImplMoreButtonData
{
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index be14c2261359..9a15a45f9e8b 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -1142,7 +1142,7 @@ bool OpenGLContext::initWindow()
{
if( !m_pChildWindow )
{
- m_pChildWindow = new SystemChildWindow(mpWindow, 0, &winData, false);
+ m_pChildWindow = VclPtrInstance<SystemChildWindow>(mpWindow, 0, &winData, false);
m_xChildWindowGC.reset(m_pChildWindow);
}
pChildSysData = m_pChildWindow->GetSystemData();
diff --git a/vcl/source/window/openglwin.cxx b/vcl/source/window/openglwin.cxx
index 13cf52e7d000..bb7ef2723cdb 100644
--- a/vcl/source/window/openglwin.cxx
+++ b/vcl/source/window/openglwin.cxx
@@ -19,7 +19,7 @@ public:
OpenGLContext& getContext() { return maContext;}
private:
OpenGLContext maContext;
- std::unique_ptr<SystemChildWindow> mxChildWindow;
+ VclPtr<SystemChildWindow> mxChildWindow;
};
OpenGLWindowImpl::OpenGLWindowImpl(vcl::Window* pWindow)
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index 83d61cba80b6..3c3256a9590e 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -84,7 +84,7 @@
static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bEnabled, bool bIsWindow );
-typedef ::std::vector< ToolBox* > ImplTBList;
+typedef ::std::vector< VclPtr<ToolBox> > ImplTBList;
class ImplTBDragMgr
{