diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-17 16:55:41 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-17 17:05:46 +0200 |
commit | cb516fafbb2a6217d9c41030217cb024ff18272e (patch) | |
tree | aba24db02557760d36d748a5352b13efd85655ae /svx/source/dialog | |
parent | 5df70781f3001d2f5be0343fc9daf04ab5c56719 (diff) |
svx: convert new to ::Create.
Change-Id: Idbcc64e883b79081c7a6399e1aed8a6b20035f69
Diffstat (limited to 'svx/source/dialog')
-rw-r--r-- | svx/source/dialog/_bmpmask.cxx | 12 | ||||
-rw-r--r-- | svx/source/dialog/_contdlg.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/charmap.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/compressgraphicdialog.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/ctredlin.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/dialcontrol.cxx | 6 | ||||
-rw-r--r-- | svx/source/dialog/dlgctl3d.cxx | 8 | ||||
-rw-r--r-- | svx/source/dialog/dlgctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/frmsel.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/hdft.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/imapdlg.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/optgrid.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/rubydialog.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/svxbmpnumvalueset.cxx | 2 |
15 files changed, 31 insertions, 31 deletions
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index fce58061722b..52b9cd191d1f 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -363,7 +363,7 @@ SvxBmpMaskChildWindow::SvxBmpMaskChildWindow(vcl::Window* pParent_, sal_uInt16 n SfxChildWinInfo* pInfo) : SfxChildWindow(pParent_, nId) { - SvxBmpMask* pDlg = new SvxBmpMask(pBindings, this, pParent_); + VclPtr<SvxBmpMask> pDlg = VclPtr<SvxBmpMask>::Create(pBindings, this, pParent_); pWindow = pDlg; @@ -383,35 +383,35 @@ SvxBmpMask::SvxBmpMask(SfxBindings *pBindinx, SfxChildWindow *pCW, vcl::Window* m_pTbxPipette->SetItemBits(m_pTbxPipette->GetItemId(0), ToolBoxItemBits::AUTOCHECK); get(m_pBtnExec, "replace"); - m_pCtlPipette = new ColorWindow(get<Window>("toolgrid")); + m_pCtlPipette = VclPtr<ColorWindow>::Create(get<Window>("toolgrid")); m_pCtlPipette->Show(); m_pCtlPipette->set_grid_left_attach(1); m_pCtlPipette->set_grid_top_attach(0); m_pCtlPipette->set_hexpand(true); get(m_pCbx1, "cbx1"); Window *pGrid = get<Window>("colorgrid"); - m_pQSet1 = new MaskSet(this, pGrid); + m_pQSet1 = VclPtr<MaskSet>::Create(this, pGrid); m_pQSet1->set_grid_left_attach(1); m_pQSet1->set_grid_top_attach(1); m_pQSet1->Show(); get(m_pSp1, "tol1"); get(m_pLbColor1, "color1"); get(m_pCbx2, "cbx2"); - m_pQSet2 = new MaskSet(this, pGrid); + m_pQSet2 = VclPtr<MaskSet>::Create(this, pGrid); m_pQSet2->set_grid_left_attach(1); m_pQSet2->set_grid_top_attach(2); m_pQSet2->Show(); get(m_pSp2, "tol2"); get(m_pLbColor2, "color2"); get(m_pCbx3, "cbx3"); - m_pQSet3 = new MaskSet(this, pGrid); + m_pQSet3 = VclPtr<MaskSet>::Create(this, pGrid); m_pQSet3->set_grid_left_attach(1); m_pQSet3->set_grid_top_attach(3); m_pQSet3->Show(); get(m_pSp3, "tol3"); get(m_pLbColor3, "color3"); get(m_pCbx4, "cbx4"); - m_pQSet4 = new MaskSet(this, pGrid); + m_pQSet4 = VclPtr<MaskSet>::Create(this, pGrid); m_pQSet4->set_grid_left_attach(1); m_pQSet4->set_grid_top_attach(4); m_pQSet4->Show(); diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index ce3e70bb1aae..bc295383b0fc 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -67,7 +67,7 @@ SvxContourDlgChildWindow::SvxContourDlgChildWindow( vcl::Window* _pParent, sal_u SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) { - SvxSuperContourDlg* pDlg = new SvxSuperContourDlg(pBindings, this, _pParent); + VclPtr<SvxSuperContourDlg> pDlg = VclPtr<SvxSuperContourDlg>::Create(pBindings, this, _pParent); pWindow = pDlg; if ( pInfo->nFlags & SfxChildWindowFlags::ZOOMIN ) @@ -223,7 +223,7 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow * { get(m_pTbx1, "toolbar"); get(m_pMtfTolerance, "spinbutton"); - m_pContourWnd = new ContourWindow(get<vcl::Window>("container"), WB_BORDER); + m_pContourWnd = VclPtr<ContourWindow>::Create(get<vcl::Window>("container"), WB_BORDER); m_pContourWnd->set_hexpand(true); m_pContourWnd->set_vexpand(true); m_pContourWnd->Show(); diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index e3c60fe43226..60cfe9d7ce16 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -56,7 +56,7 @@ sal_uInt32& SvxShowCharSet::getSelectedChar() SvxShowCharSet::SvxShowCharSet(vcl::Window* pParent) : Control(pParent, WB_TABSTOP | WB_BORDER) , m_pAccessible(NULL) - , aVscrollSB( new ScrollBar(this, WB_VERT) ) + , aVscrollSB( VclPtr<ScrollBar>::Create(this, WB_VERT) ) { init(); InitSettings( true, true ); diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index 2b553223463a..3b35c5a29a45 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -173,7 +173,7 @@ void CompressGraphicsDialog::Update() const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); sal_Unicode cSeparator = rLocaleWrapper.getNumDecimalSep()[0]; - VirtualDevice* pDummyVDev = new VirtualDevice(); + VclPtr<VirtualDevice> pDummyVDev = VclPtr<VirtualDevice>::Create(); pDummyVDev->EnableOutput( false ); pDummyVDev->SetMapMode( m_aGraphic.GetPrefMapMode() ); diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index ddb685271b89..14a00184fab7 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -385,7 +385,7 @@ SvxTPView::SvxTPView(vcl::Window *pParent, VclBuilderContainer *pTopLevel) aControlSize = LogicToPixel(aControlSize, MAP_APPFONT); pTable->set_width_request(aControlSize.Width()); pTable->set_height_request(aControlSize.Height()); - m_pViewData = new SvxRedlinTable(*pTable, 0); + m_pViewData = VclPtr<SvxRedlinTable>::Create(*pTable, 0); Link aLink=LINK( this, SvxTPView, PbClickHdl); @@ -1096,8 +1096,8 @@ SvxAcceptChgCtr::SvxAcceptChgCtr(vcl::Window* pParent, VclBuilderContainer* pTop { m_pUIBuilder = new VclBuilder(this, getUIRootDir(), "svx/ui/redlinecontrol.ui", "RedlineControl"); - pTPFilter = new SvxTPFilter(this); - pTPView = new SvxTPView(this, pTopLevel); + pTPFilter = VclPtr<SvxTPFilter>::Create(this); + pTPView = VclPtr<SvxTPView>::Create(this, pTopLevel); m_nViewPageId = GetPageId("view"); m_nFilterPageId = GetPageId("filter"); diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index 514dd1568b8e..0735098c3cae 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -220,9 +220,9 @@ void DialControlBmp::DrawBackground() DialControl::DialControl_Impl::DialControl_Impl ( vcl::Window& rParent ) : - mxBmpEnabled(new DialControlBmp(rParent)), - mxBmpDisabled(new DialControlBmp(rParent)), - mxBmpBuffered(new DialControlBmp(rParent)), + mxBmpEnabled(VclPtr<DialControlBmp>::Create(rParent)), + mxBmpDisabled(VclPtr<DialControlBmp>::Create(rParent)), + mxBmpBuffered(VclPtr<DialControlBmp>::Create(rParent)), mpLinkField( 0 ), mnLinkedFieldValueMultiplyer( 0 ), mnAngle( 0 ), diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 519dfc058802..fb4923ebd747 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -948,10 +948,10 @@ basegfx::B3DVector Svx3DLightControl::GetLightDirection(sal_uInt32 nNum) const SvxLightCtl3D::SvxLightCtl3D( vcl::Window* pParent) : Control(pParent, WB_BORDER | WB_TABSTOP), - maLightControl(new Svx3DLightControl(this, 0)), - maHorScroller(new ScrollBar(this, WB_HORZ | WB_DRAG)), - maVerScroller(new ScrollBar(this, WB_VERT | WB_DRAG)), - maSwitcher(new PushButton(this, 0)) + maLightControl(VclPtr<Svx3DLightControl>::Create(this, 0)), + maHorScroller(VclPtr<ScrollBar>::Create(this, WB_HORZ | WB_DRAG)), + maVerScroller(VclPtr<ScrollBar>::Create(this, WB_VERT | WB_DRAG)), + maSwitcher(VclPtr<PushButton>::Create(this, 0)) { // init members Init(); diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 88baa47cb942..92d1cdbcd732 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1824,7 +1824,7 @@ void SvxPreviewBase::InitSettings(bool bForeground, bool bBackground) SvxPreviewBase::SvxPreviewBase(vcl::Window* pParent) : Control(pParent, WB_BORDER) , mpModel(new SdrModel()) - , mpBufferDevice(new VirtualDevice(*this)) + , mpBufferDevice(VclPtr<VirtualDevice>::Create(*this)) { // Draw the control's border as a flat thin black line. SetBorderStyle(WindowBorderStyle::MONO); diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index 5f9d022f620f..b7b32b35f6cf 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -553,7 +553,7 @@ void PluginProgressWindow::dispose() PluginProgress::PluginProgress( vcl::Window* pParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) { - m_pPlugProgressWindow = new PluginProgressWindow(pParent, static_cast< css::lang::XComponent* >(this)); + m_pPlugProgressWindow = VclPtr<PluginProgressWindow>::Create(pParent, static_cast< css::lang::XComponent* >(this)); css::uno::Reference< css::awt::XWindow > xProgressWindow = VCLUnoHelper::GetInterface(m_pPlugProgressWindow); m_xProgressFactory = css::task::StatusIndicatorFactory::createWithWindow(xContext, xProgressWindow, sal_False/*DisableReschedule*/, sal_True/*AllowParentShow*/); m_xProgress = m_xProgressFactory->createStatusIndicator(); @@ -884,7 +884,7 @@ RecoveryDialog::RecoveryDialog(vcl::Window* pParent, RecoveryCore* pCore) Size aSize(LogicToPixel(Size(RECOV_CONTROLWIDTH, RECOV_FILELISTHEIGHT), MAP_APPFONT)); pFileListLBContainer->set_width_request(aSize.Width()); pFileListLBContainer->set_height_request(aSize.Height()); - m_pFileListLB = new RecovDocList(*pFileListLBContainer, DIALOG_MGR()); + m_pFileListLB = VclPtr<RecovDocList>::Create(*pFileListLBContainer, DIALOG_MGR()); static long nTabs[] = { 2, 0, 40*RECOV_CONTROLWIDTH/100 }; m_pFileListLB->SetTabs( &nTabs[0] ); diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 3a8969de7d08..8e937fca5906 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -209,7 +209,7 @@ FrameBorderType FrameBorder::GetKeyboardNeighbor( sal_uInt16 nKeyCode ) const FrameSelectorImpl::FrameSelectorImpl( FrameSelector& rFrameSel ) : Resource( SVX_RES( RID_SVXSTR_BORDER_CONTROL ) ), mrFrameSel( rFrameSel ), - mpVirDev( new VirtualDevice() ), + mpVirDev( VclPtr<VirtualDevice>::Create() ), maILArrows( 16 ), maLeft( FRAMEBORDER_LEFT ), maRight( FRAMEBORDER_RIGHT ), diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 704c0dcc2ba2..f30b4497d80c 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -117,14 +117,14 @@ namespace svx { SfxTabPage* SvxHeaderPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return new SvxHeaderPage( pParent, *rSet ); + return VclPtr<SvxHeaderPage>::Create( pParent, *rSet ); } SfxTabPage* SvxFooterPage::Create( vcl::Window* pParent, const SfxItemSet* rSet ) { - return new SvxFooterPage( pParent, *rSet ); + return VclPtr<SvxFooterPage>::Create( pParent, *rSet ); } diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index d99bb6818c8d..eed946a4d865 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -95,7 +95,7 @@ SvxIMapDlgChildWindow::SvxIMapDlgChildWindow( vcl::Window* _pParent, sal_uInt16 SfxChildWinInfo* pInfo ) : SfxChildWindow( _pParent, nId ) { - pWindow = new SvxIMapDlg( pBindings, this, _pParent ); + pWindow = VclPtr<SvxIMapDlg>::Create( pBindings, this, _pParent ); SvxIMapDlg* pDlg = static_cast<SvxIMapDlg*>(pWindow.get()); if ( pInfo->nFlags & SfxChildWindowFlags::ZOOMIN ) @@ -168,7 +168,7 @@ SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, vcl::Window get(m_pStbStatus, "statusbar"); VclVBox* _pContainer = get<VclVBox>("container"); - pIMapWnd = new IMapWindow( _pContainer, WB_BORDER, _pBindings->GetActiveFrame() ); + pIMapWnd = VclPtr<IMapWindow>::Create( _pContainer, WB_BORDER, _pBindings->GetActiveFrame() ); pIMapWnd->set_hexpand(true); pIMapWnd->set_vexpand(true); pIMapWnd->Show(); diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index 48317dd5b455..df773299a0a8 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -202,7 +202,7 @@ void SvxGridTabPage::dispose() SfxTabPage* SvxGridTabPage::Create( vcl::Window* pParent, const SfxItemSet& rAttrSet ) { - return new SvxGridTabPage( pParent, rAttrSet ); + return VclPtr<SvxGridTabPage>::Create( pParent, rAttrSet ); } diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 43e0c8b9ffbf..301959fb8e4e 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -64,7 +64,7 @@ SvxRubyChildWindow::SvxRubyChildWindow( vcl::Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo) : SfxChildWindow(_pParent, nId) { - SvxRubyDialog* pDlg = new SvxRubyDialog(pBindings, this, _pParent); + VclPtr<SvxRubyDialog> pDlg = VclPtr<SvxRubyDialog>::Create(pBindings, this, _pParent); pWindow = pDlg; if ( pInfo->nFlags & SfxChildWindowFlags::ZOOMIN ) diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index 32fbdd0a81d6..65d12c962e88 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -179,7 +179,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt ) { // The lines are only one time in the virtual device, only the outline // page is currently done - pVDev = new VirtualDevice(*pDev); + pVDev = VclPtr<VirtualDevice>::Create(*pDev); pVDev->SetMapMode(pDev->GetMapMode()); pVDev->EnableRTL( IsRTLEnabled() ); pVDev->SetOutputSize( aRectSize ); |