summaryrefslogtreecommitdiff
path: root/vcl/source/control
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-20 15:35:54 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-20 15:35:54 +0100
commit4fed8865be56ac431fb91e2432c6e93ce3f781c7 (patch)
tree67b0982f8910bc8bfbc92cb6245520a26f6366dc /vcl/source/control
parentf12488405cdfd8555078d15807aafc5ffd1b037b (diff)
vcl: convert new to ::Create
Change-Id: Ifd52953086ea923fa1770892d13f32c2263aec54
Diffstat (limited to 'vcl/source/control')
-rw-r--r--vcl/source/control/combobox.cxx8
-rw-r--r--vcl/source/control/ilstbox.cxx8
-rw-r--r--vcl/source/control/spinfld.cxx4
-rw-r--r--vcl/source/control/tabctrl.cxx2
4 files changed, 11 insertions, 11 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 2c785078841b..94b8f3cfaa36 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -147,11 +147,11 @@ void ComboBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
WinBits nListStyle = nStyle;
if( nStyle & WB_DROPDOWN )
{
- mpFloatWin = new ImplListBoxFloatingWindow( this );
+ mpFloatWin = VclPtr<ImplListBoxFloatingWindow>::Create( this );
mpFloatWin->SetAutoWidth( true );
mpFloatWin->SetPopupModeEndHdl( LINK( this, ComboBox, ImplPopupModeEndHdl ) );
- mpBtn = new ImplBtn( this, WB_NOLIGHTBORDER | WB_RECTSTYLE );
+ mpBtn = VclPtr<ImplBtn>::Create( this, WB_NOLIGHTBORDER | WB_RECTSTYLE );
ImplInitDropDownButton( mpBtn );
mpBtn->buttonDownSignal.connect( boost::bind( &ComboBox::ImplClickButtonHandler, this, _1 ));
mpBtn->Show();
@@ -170,7 +170,7 @@ void ComboBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
}
- mpSubEdit.set( new Edit( this, nEditStyle ) );
+ mpSubEdit.set( VclPtr<Edit>::Create( this, nEditStyle ) );
mpSubEdit->EnableRTL( false );
SetSubEdit( mpSubEdit );
mpSubEdit->SetPosPixel( Point() );
@@ -180,7 +180,7 @@ void ComboBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
vcl::Window* pLBParent = this;
if ( mpFloatWin )
pLBParent = mpFloatWin;
- mpImplLB = new ImplListBox( pLBParent, nListStyle|WB_SIMPLEMODE|WB_AUTOHSCROLL );
+ mpImplLB = VclPtr<ImplListBox>::Create( pLBParent, nListStyle|WB_SIMPLEMODE|WB_AUTOHSCROLL );
mpImplLB->SetPosPixel( Point() );
mpImplLB->SetSelectHdl( LINK( this, ComboBox, ImplSelectHdl ) );
mpImplLB->SetCancelHdl( LINK( this, ComboBox, ImplCancelHdl ) );
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index dc09182ffd5c..83d76a3c8b7f 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2141,16 +2141,16 @@ sal_uInt16 ImplListBoxWindow::ImplGetTextStyle() const
ImplListBox::ImplListBox( vcl::Window* pParent, WinBits nWinStyle ) :
Control( pParent, nWinStyle ),
- maLBWindow(new ImplListBoxWindow( this, nWinStyle&(~WB_BORDER) ))
+ maLBWindow(VclPtr<ImplListBoxWindow>::Create( this, nWinStyle&(~WB_BORDER) ))
{
maLBWindow->userDrawSignal.connect( userDrawSignal );
// for native widget rendering we must be able to detect this window type
SetType( WINDOW_LISTBOXWINDOW );
- mpVScrollBar = new ScrollBar( this, WB_VSCROLL | WB_DRAG );
- mpHScrollBar = new ScrollBar( this, WB_HSCROLL | WB_DRAG );
- mpScrollBarBox = new ScrollBarBox( this );
+ mpVScrollBar = VclPtr<ScrollBar>::Create( this, WB_VSCROLL | WB_DRAG );
+ mpHScrollBar = VclPtr<ScrollBar>::Create( this, WB_HSCROLL | WB_DRAG );
+ mpScrollBarBox = VclPtr<ScrollBarBox>::Create( this );
Link aLink( LINK( this, ImplListBox, ScrollBarHdl ) );
mpVScrollBar->SetScrollHdl( aLink );
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index 03af006bcc89..f26845d0205c 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -311,11 +311,11 @@ void SpinField::ImplInit( vcl::Window* pParent, WinBits nWinStyle )
if ( (nWinStyle & WB_SPIN) && ImplUseNativeBorder( nWinStyle ) )
{
SetBackground();
- mpEdit.set( new Edit( this, WB_NOBORDER ) );
+ mpEdit.set( VclPtr<Edit>::Create( this, WB_NOBORDER ) );
mpEdit->SetBackground();
}
else
- mpEdit.set( new Edit( this, WB_NOBORDER ) );
+ mpEdit.set( VclPtr<Edit>::Create( this, WB_NOBORDER ) );
mpEdit->EnableRTL( false );
mpEdit->SetPosPixel( Point() );
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index 90184ecd7ec4..d03446f2cf69 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -112,7 +112,7 @@ void TabControl::ImplInit( vcl::Window* pParent, WinBits nStyle )
if( (nStyle & WB_DROPDOWN) )
{
- mpTabCtrlData->mpListBox = new ListBox( this, WB_DROPDOWN );
+ mpTabCtrlData->mpListBox = VclPtr<ListBox>::Create( this, WB_DROPDOWN );
mpTabCtrlData->mpListBox->SetPosSizePixel( Point( 0, 0 ), Size( 200, 20 ) );
mpTabCtrlData->mpListBox->SetSelectHdl( LINK( this, TabControl, ImplListBoxSelectHdl ) );
mpTabCtrlData->mpListBox->Show();