diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-17 21:49:00 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-17 21:49:00 +0100 |
commit | 40313fc3a21c9c2f6c62070ddc8d1512cc58b3c2 (patch) | |
tree | ed3e9a4e0efffb64418eecad08fb24b6897b15e5 /reportdesign/source/ui/report | |
parent | a92cea7e6c07f4f122addd324f6f25616443f3ed (diff) |
reportdesign: convert new to ::Create.
Change-Id: Iee14abd27f9f51ef5e054015a2b033f48cadc54b
Diffstat (limited to 'reportdesign/source/ui/report')
-rw-r--r-- | reportdesign/source/ui/report/DesignView.cxx | 12 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportController.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportWindow.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ScrollHelper.cxx | 8 | ||||
-rw-r--r-- | reportdesign/source/ui/report/SectionWindow.cxx | 8 | ||||
-rw-r--r-- | reportdesign/source/ui/report/StartMarker.cxx | 6 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ViewsWindow.cxx | 2 |
7 files changed, 22 insertions, 22 deletions
diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 1cc4d1bccfac..698b065796f6 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -86,9 +86,9 @@ ODesignView::ODesignView( vcl::Window* pParent, const Reference< XComponentContext >& _rxOrb, OReportController& _rController) : ODataView( pParent, _rController, _rxOrb, WB_DIALOGCONTROL ) - ,m_aSplitWin(new SplitWindow(this)) + ,m_aSplitWin(VclPtr<SplitWindow>::Create(this)) ,m_rReportController( _rController ) - ,m_aScrollWindow(new rptui::OScrollWindowHelper(this)) + ,m_aScrollWindow(VclPtr<rptui::OScrollWindowHelper>::Create(this)) ,m_pPropWin(NULL) ,m_pAddField(NULL) ,m_pCurrentView(NULL) @@ -109,7 +109,7 @@ ODesignView::ODesignView( vcl::Window* pParent, SetMapMode( MapMode( MAP_100TH_MM ) ); // now create the task pane on the right side :-) - m_pTaskPane = new OTaskWindow(this); + m_pTaskPane = VclPtr<OTaskWindow>::Create(this); m_aSplitWin->InsertItem( COLSET_ID,100,SPLITWINDOW_APPEND, 0, SWIB_PERCENTSIZE | SWIB_COLSET ); m_aSplitWin->InsertItem( REPORT_ID, m_aScrollWindow.get(), 100, SPLITWINDOW_APPEND, COLSET_ID, SWIB_PERCENTSIZE); @@ -440,7 +440,7 @@ void ODesignView::togglePropertyBrowser(bool _bToogleOn) { if ( !m_pPropWin && _bToogleOn ) { - m_pPropWin = new PropBrw(getController().getORB(), m_pTaskPane,this); + m_pPropWin = VclPtr<PropBrw>::Create(getController().getORB(), m_pTaskPane,this); m_pPropWin->Invalidate(); static_cast<OTaskWindow*>(m_pTaskPane.get())->setPropertyBrowser(m_pPropWin); notifySystemWindow(this,m_pPropWin,::comphelper::mem_fun(&TaskPaneList::AddWindow)); @@ -487,7 +487,7 @@ void ODesignView::toggleReportExplorer() if ( !m_pReportExplorer ) { OReportController& rReportController = getController(); - m_pReportExplorer = new ONavigator(this,rReportController); + m_pReportExplorer = VclPtr<ONavigator>::Create(this,rReportController); SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pReportExplorer->GetHelpId(), RTL_TEXTENCODING_UTF8)); if ( aDlgOpt.Exists() ) m_pReportExplorer->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); @@ -523,7 +523,7 @@ void ODesignView::toggleAddField() xReport = xSection->getReportDefinition(); } uno::Reference < beans::XPropertySet > xSet(rReportController.getRowSet(),uno::UNO_QUERY); - m_pAddField = new OAddFieldWindow(this,xSet); + m_pAddField = VclPtr<OAddFieldWindow>::Create(this,xSet); m_pAddField->SetCreateHdl(LINK( &rReportController, OReportController, OnCreateHdl ) ); SvtViewOptions aDlgOpt( E_WINDOW, OUString( UID_RPT_RPT_APP_VIEW ) ); if ( aDlgOpt.Exists() ) diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 10a51a06c22f..b6fbbb2489d6 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -1782,7 +1782,7 @@ void OReportController::doOpenHelpAgent() bool OReportController::Construct(vcl::Window* pParent) { - ODesignView* pMyOwnView = new ODesignView( pParent, m_xContext, *this ); + VclPtrInstance<ODesignView> pMyOwnView( pParent, m_xContext, *this ); StartListening( *pMyOwnView ); setView( *pMyOwnView ); @@ -2578,7 +2578,7 @@ void OReportController::openSortingAndGroupingDialog() return; if ( !m_pGroupsFloater ) { - m_pGroupsFloater = new OGroupsSortingDialog(getView(),!isEditable(),this); + m_pGroupsFloater = VclPtr<OGroupsSortingDialog>::Create(getView(),!isEditable(),this); SvtViewOptions aDlgOpt(E_WINDOW, OStringToOUString(m_pGroupsFloater->GetHelpId(), RTL_TEXTENCODING_UTF8)); if ( aDlgOpt.Exists() ) m_pGroupsFloater->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US)); diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index 7d06b7795ba0..d43d5584fe8e 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -58,10 +58,10 @@ using namespace ::comphelper; OReportWindow::OReportWindow(OScrollWindowHelper* _pParent,ODesignView* _pView) : Window(_pParent,WB_DIALOGCONTROL) , ::comphelper::OPropertyChangeListener(m_aMutex) -,m_aHRuler(new Ruler(this)) +,m_aHRuler(VclPtr<Ruler>::Create(this)) ,m_pView(_pView) ,m_pParent(_pParent) -,m_aViewsWindow(new rptui::OViewsWindow(this)) +,m_aViewsWindow(VclPtr<rptui::OViewsWindow>::Create(this)) ,m_pObjFac( new DlgEdFactory() ) { SetHelpId(UID_RPT_REPORTWINDOW); diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index b05541eca9fe..ba789bc9f774 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -46,11 +46,11 @@ void lcl_setScrollBar(sal_Int32 _nNewValue,const Point& _aPos,const Size& _aSize OScrollWindowHelper::OScrollWindowHelper( ODesignView* _pDesignView) : OScrollWindowHelper_BASE( _pDesignView,WB_DIALOGCONTROL) ,OPropertyChangeListener(m_aMutex) - ,m_aHScroll( new ScrollBar(this, WB_HSCROLL|WB_REPEAT|WB_DRAG) ) - ,m_aVScroll( new ScrollBar(this, WB_VSCROLL|WB_REPEAT|WB_DRAG) ) - ,m_aCornerWin( new ScrollBarBox(this) ) + ,m_aHScroll( VclPtr<ScrollBar>::Create(this, WB_HSCROLL|WB_REPEAT|WB_DRAG) ) + ,m_aVScroll( VclPtr<ScrollBar>::Create(this, WB_VSCROLL|WB_REPEAT|WB_DRAG) ) + ,m_aCornerWin( VclPtr<ScrollBarBox>::Create(this) ) ,m_pParent(_pDesignView) - ,m_aReportWindow(new rptui::OReportWindow(this,m_pParent)) + ,m_aReportWindow(VclPtr<rptui::OReportWindow>::Create(this,m_pParent)) ,m_pReportDefintionMultiPlexer(NULL) { SetMapMode( MapMode( MAP_100TH_MM ) ); diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 37a22873d296..bb37ceb4cdd4 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -48,10 +48,10 @@ OSectionWindow::OSectionWindow( OViewsWindow* _pParent,const uno::Reference< rep : Window( _pParent,WB_DIALOGCONTROL) ,OPropertyChangeListener(m_aMutex) ,m_pParent(_pParent) -,m_aStartMarker( new rptui::OStartMarker(this,_sColorEntry)) -,m_aReportSection( new rptui::OReportSection(this,_xSection)) -,m_aSplitter(new Splitter(this)) -,m_aEndMarker( new rptui::OEndMarker(this,_sColorEntry)) +,m_aStartMarker( VclPtr<rptui::OStartMarker>::Create(this,_sColorEntry)) +,m_aReportSection( VclPtr<rptui::OReportSection>::Create(this,_xSection)) +,m_aSplitter(VclPtr<Splitter>::Create(this)) +,m_aEndMarker( VclPtr<rptui::OEndMarker>::Create(this,_sColorEntry)) { SetUniqueId(UID_RPT_SECTIONSWINDOW); const MapMode& rMapMode = _pParent->GetMapMode(); diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 06ae171a2baf..a435b02a38ed 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -48,9 +48,9 @@ oslInterlockedCount OStartMarker::s_nImageRefCount = 0; OStartMarker::OStartMarker(OSectionWindow* _pParent,const OUString& _sColorEntry) : OColorListener(_pParent,_sColorEntry) -,m_aVRuler(new Ruler(this,WB_VERT)) -,m_aText(new FixedText(this,WB_HYPHENATION)) -,m_aImage(new FixedImage(this,WB_LEFT|WB_TOP|WB_SCALE)) +,m_aVRuler(VclPtr<Ruler>::Create(this,WB_VERT)) +,m_aText(VclPtr<FixedText>::Create(this,WB_HYPHENATION)) +,m_aImage(VclPtr<FixedImage>::Create(this,WB_LEFT|WB_TOP|WB_SCALE)) ,m_pParent(_pParent) ,m_bShowRuler(true) { diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 543a61254bcc..c1510eefd8e8 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -299,7 +299,7 @@ void OViewsWindow::DataChanged( const DataChangedEvent& rDCEvt ) void OViewsWindow::addSection(const uno::Reference< report::XSection >& _xSection,const OUString& _sColorEntry,sal_uInt16 _nPosition) { - OSectionWindow* pSectionWindow( new OSectionWindow(this,_xSection,_sColorEntry) ); + VclPtrInstance<OSectionWindow> pSectionWindow(this,_xSection,_sColorEntry); m_aSections.insert(getIteratorAtPos(_nPosition) , TSectionsMap::value_type(pSectionWindow)); m_pParent->setMarked(&pSectionWindow->getReportSection().getSectionView(),m_aSections.size() == 1); Resize(); |