diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-16 22:09:41 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-16 22:09:41 +0100 |
commit | a461467a3edc1452835447ff075fda7420aaf153 (patch) | |
tree | d56f03c08335a554b8b8573a89f7535ffda6633b /forms | |
parent | 5252a1d81eb69d3de443d2988367359c9174e36d (diff) |
drawinglayer, editeng, forms, fpicker: convert new to ::Create.
Change-Id: I5144ac74a09a3ac5679abca89e7d87386f2484fd
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/richtext/richtextcontrol.cxx | 2 | ||||
-rw-r--r-- | forms/source/richtext/richtextimplcontrol.cxx | 8 | ||||
-rw-r--r-- | forms/source/solar/component/navbarcontrol.cxx | 2 | ||||
-rw-r--r-- | forms/source/solar/control/navtoolbar.cxx | 8 |
4 files changed, 10 insertions, 10 deletions
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 66b27de3a346..03d708752ae5 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -290,7 +290,7 @@ namespace frm pPeer->acquire(); // by definition, the returned object is acquired once // the VCL control for the peer - RichTextControl* pRichTextControl = new RichTextControl( pEngine, _pParentWindow, _nStyle, NULL, pPeer ); + VclPtrInstance<RichTextControl> pRichTextControl( pEngine, _pParentWindow, _nStyle, nullptr, pPeer ); // some knittings pRichTextControl->SetComponentInterface( pPeer ); diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index b292f642dfe0..d47ff3467022 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -56,7 +56,7 @@ namespace frm OSL_ENSURE( m_pAntiImpl, "RichTextControlImpl::RichTextControlImpl: invalid window!" ); OSL_ENSURE( m_pEngine, "RichTextControlImpl::RichTextControlImpl: invalid edit engine! This will *definitely* crash!" ); - m_pViewport = new RichTextViewPort( m_pAntiImpl ); + m_pViewport = VclPtr<RichTextViewPort>::Create( m_pAntiImpl ); m_pViewport->setAttributeInvalidationHandler( LINK( this, RichTextControlImpl, OnInvalidateAllAttributes ) ); m_pViewport->Show(); @@ -348,7 +348,7 @@ namespace frm } else { - m_pVScroll = new ScrollBar( m_pAntiImpl, WB_VSCROLL | WB_DRAG | WB_REPEAT ); + m_pVScroll = VclPtr<ScrollBar>::Create( m_pAntiImpl, WB_VSCROLL | WB_DRAG | WB_REPEAT ); m_pVScroll->SetScrollHdl ( LINK( this, RichTextControlImpl, OnVScroll ) ); m_pVScroll->Show(); } @@ -359,7 +359,7 @@ namespace frm } else { - m_pHScroll = new ScrollBar( m_pAntiImpl, WB_HSCROLL | WB_DRAG | WB_REPEAT ); + m_pHScroll = VclPtr<ScrollBar>::Create( m_pAntiImpl, WB_HSCROLL | WB_DRAG | WB_REPEAT ); m_pHScroll->SetScrollHdl ( LINK( this, RichTextControlImpl, OnHScroll ) ); m_pHScroll->Show(); } @@ -367,7 +367,7 @@ namespace frm if ( m_pHScroll && m_pVScroll ) { m_pScrollCorner.disposeAndClear(); - m_pScrollCorner = new ScrollBarBox( m_pAntiImpl ); + m_pScrollCorner = VclPtr<ScrollBarBox>::Create( m_pAntiImpl ); m_pScrollCorner->Show(); } else diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index 695aadcd3bb2..6d335d9bf3de 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -223,7 +223,7 @@ namespace frm // the VCL control for the peer Reference< XModel > xContextDocument( getXModel( _rxModel ) ); - NavigationToolBar* pNavBar = new NavigationToolBar( + VclPtrInstance<NavigationToolBar> pNavBar( _pParentWindow, lcl_getWinBits_nothrow( _rxModel ), createDocumentCommandImageProvider( _rxORB, xContextDocument ), diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index 88b854bf9155..19bcd6937d5f 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -236,7 +236,7 @@ namespace frm void NavigationToolBar::implInit( ) { - m_pToolbar = new ImplNavToolBar( this ); + m_pToolbar = VclPtr<ImplNavToolBar>::Create( this ); m_pToolbar->SetOutStyle( TOOLBOX_STYLE_FLAT ); m_pToolbar->Show(); @@ -301,17 +301,17 @@ namespace frm vcl::Window* pItemWindow = NULL; if ( FormFeature::MoveAbsolute == pSupportedFeatures->nId ) { - pItemWindow = new RecordPositionInput( m_pToolbar ); + pItemWindow = VclPtr<RecordPositionInput>::Create( m_pToolbar ); static_cast< RecordPositionInput* >( pItemWindow )->setDispatcher( m_pDispatcher ); } else if ( LID_RECORD_FILLER == pSupportedFeatures->nId ) { - pItemWindow = new FixedText( m_pToolbar, WB_CENTER | WB_VCENTER ); + pItemWindow = VclPtr<FixedText>::Create( m_pToolbar, WB_CENTER | WB_VCENTER ); pItemWindow->SetBackground(Wallpaper(Color(COL_TRANSPARENT))); } else { - pItemWindow = new FixedText( m_pToolbar, WB_VCENTER ); + pItemWindow = VclPtr<FixedText>::Create( m_pToolbar, WB_VCENTER ); pItemWindow->SetBackground(); pItemWindow->SetPaintTransparent(true); } |