diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-17 21:55:53 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-17 21:55:53 +0100 |
commit | 62532bf14eb9185f32ea8831c38d8896c6ae29ad (patch) | |
tree | 5115e306ef2545ebf49b944ed5274f2f312bfa10 /framework/source/uielement | |
parent | reportdesign: convert new to ::Create. (diff) | |
download | core-62532bf14eb9185f32ea8831c38d8896c6ae29ad.tar.gz core-62532bf14eb9185f32ea8831c38d8896c6ae29ad.zip |
framework: convert new to ::Create.
Change-Id: I436ae2e58b3f79e7a0418d25532f275f5c16154f
Diffstat (limited to 'framework/source/uielement')
8 files changed, 8 insertions, 8 deletions
diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx index 77987fa3c279..35506a24e86c 100644 --- a/framework/source/uielement/addonstoolbarwrapper.cxx +++ b/framework/source/uielement/addonstoolbarwrapper.cxx @@ -114,7 +114,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument { sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; - pToolBar = new ToolBox( pWindow, nStyles ); + pToolBar = VclPtr<ToolBox>::Create( pWindow, nStyles ); pToolBarManager = new AddonsToolBarManager( m_xContext, xFrame, m_aResourceURL, pToolBar ); m_xToolBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pToolBarManager ), UNO_QUERY ); } diff --git a/framework/source/uielement/comboboxtoolbarcontroller.cxx b/framework/source/uielement/comboboxtoolbarcontroller.cxx index adb08e36e809..15fb15cfd3a9 100644 --- a/framework/source/uielement/comboboxtoolbarcontroller.cxx +++ b/framework/source/uielement/comboboxtoolbarcontroller.cxx @@ -149,7 +149,7 @@ ComboboxToolbarController::ComboboxToolbarController( ComplexToolbarController( rxContext, rFrame, pToolbar, nID, aCommand ) , m_pComboBox( 0 ) { - m_pComboBox = new ComboBoxControl( m_pToolbar, WB_DROPDOWN, this ); + m_pComboBox = VclPtr<ComboBoxControl>::Create( m_pToolbar, WB_DROPDOWN, this ); if ( nWidth == 0 ) nWidth = 100; diff --git a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx index a8e5ba6fff8c..7d00fbcd70d9 100644 --- a/framework/source/uielement/dropdownboxtoolbarcontroller.cxx +++ b/framework/source/uielement/dropdownboxtoolbarcontroller.cxx @@ -132,7 +132,7 @@ DropdownToolbarController::DropdownToolbarController( ComplexToolbarController( rxContext, rFrame, pToolbar, nID, aCommand ) , m_pListBoxControl( 0 ) { - m_pListBoxControl = new ListBoxControl( m_pToolbar, WB_DROPDOWN|WB_AUTOHSCROLL|WB_BORDER, this ); + m_pListBoxControl = VclPtr<ListBoxControl>::Create( m_pToolbar, WB_DROPDOWN|WB_AUTOHSCROLL|WB_BORDER, this ); if ( nWidth == 0 ) nWidth = 100; diff --git a/framework/source/uielement/edittoolbarcontroller.cxx b/framework/source/uielement/edittoolbarcontroller.cxx index a586e9f3ad82..41403fd9f7e7 100644 --- a/framework/source/uielement/edittoolbarcontroller.cxx +++ b/framework/source/uielement/edittoolbarcontroller.cxx @@ -131,7 +131,7 @@ EditToolbarController::EditToolbarController( ComplexToolbarController( rxContext, rFrame, pToolbar, nID, aCommand ) , m_pEditControl( 0 ) { - m_pEditControl = new EditControl( m_pToolbar, WB_BORDER, this ); + m_pEditControl = VclPtr<EditControl>::Create( m_pToolbar, WB_BORDER, this ); if ( nWidth == 0 ) nWidth = 100; diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index 1c0af1456857..7ad43146d4cc 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -144,7 +144,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r aPrinterName = retrievePrinterName( m_xFrame ); if ( !aPrinterName.isEmpty() ) { - pInfoPrinter.reset(new Printer( aPrinterName )); + pInfoPrinter.reset(VclPtr<Printer>::Create( aPrinterName )); if ( pInfoPrinter && pInfoPrinter->GetDevFontCount() > 0 ) pFontList.reset(new FontList( pInfoPrinter.get() )); } diff --git a/framework/source/uielement/spinfieldtoolbarcontroller.cxx b/framework/source/uielement/spinfieldtoolbarcontroller.cxx index f3eb2c089c82..3d60f613e000 100644 --- a/framework/source/uielement/spinfieldtoolbarcontroller.cxx +++ b/framework/source/uielement/spinfieldtoolbarcontroller.cxx @@ -192,7 +192,7 @@ SpinfieldToolbarController::SpinfieldToolbarController( , m_nStep( 0.0 ) , m_pSpinfieldControl( 0 ) { - m_pSpinfieldControl = new SpinfieldControl( m_pToolbar, WB_SPIN|WB_BORDER, this ); + m_pSpinfieldControl = VclPtr<SpinfieldControl>::Create( m_pToolbar, WB_SPIN|WB_BORDER, this ); if ( nWidth == 0 ) nWidth = 100; diff --git a/framework/source/uielement/statusbarwrapper.cxx b/framework/source/uielement/statusbarwrapper.cxx index 7d5322f12e8a..2f1f74028a0c 100644 --- a/framework/source/uielement/statusbarwrapper.cxx +++ b/framework/source/uielement/statusbarwrapper.cxx @@ -110,7 +110,7 @@ void SAL_CALL StatusBarWrapper::initialize( const Sequence< Any >& aArguments ) { sal_uLong nStyles = WinBits( WB_LEFT | WB_3DLOOK ); - pStatusBar = new FrameworkStatusBar( pWindow, nStyles ); + pStatusBar = VclPtr<FrameworkStatusBar>::Create( pWindow, nStyles ); pStatusBarManager = new StatusBarManager( m_xContext, xFrame, m_aResourceURL, pStatusBar ); static_cast<FrameworkStatusBar*>(pStatusBar)->SetStatusBarManager( pStatusBarManager ); m_xStatusBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pStatusBarManager ), UNO_QUERY ); diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index ad609a20cca8..36f9909a250b 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -150,7 +150,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th { sal_uLong nStyles = WB_LINESPACING | WB_BORDER | WB_SCROLL | WB_MOVEABLE | WB_3DLOOK | WB_DOCKABLE | WB_SIZEABLE | WB_CLOSEABLE; - pToolBar = new ToolBox( pWindow, nStyles ); + pToolBar = VclPtr<ToolBox>::Create( pWindow, nStyles ); pToolBarManager = new ToolBarManager( m_xContext, xFrame, m_aResourceURL, pToolBar ); m_xToolBarManager = Reference< XComponent >( static_cast< OWeakObject *>( pToolBarManager ), UNO_QUERY ); pToolBar->WillUsePopupMode( bPopupMode ); |