summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-22 17:20:25 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-22 17:20:25 +0100
commit3f32e149d9f6f94473983bf294e73d6e5e3f6fe5 (patch)
treed477164d94c6041c90a16f06a5aa00a0ad2c0508 /extensions
parent8387e5bd93d1181d1da39b3075ab09b421e26ab4 (diff)
extensions: convert new to ::Create.
Change-Id: I8c438d62ae0fc2c1954c965966a39d4f98e6b871
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/bibliography/bibbeam.cxx4
-rw-r--r--extensions/source/bibliography/bibcont.cxx4
-rw-r--r--extensions/source/bibliography/bibload.cxx2
-rw-r--r--extensions/source/bibliography/bibview.cxx2
-rw-r--r--extensions/source/bibliography/toolbar.cxx8
-rw-r--r--extensions/source/plugin/base/plctrl.cxx2
-rw-r--r--extensions/source/propctrlr/browserline.cxx4
-rw-r--r--extensions/source/propctrlr/browserlistbox.cxx6
-rw-r--r--extensions/source/propctrlr/browserpage.cxx2
-rw-r--r--extensions/source/propctrlr/browserview.cxx2
-rw-r--r--extensions/source/propctrlr/formlinkdialog.cxx8
-rw-r--r--extensions/source/propctrlr/inspectorhelpwindow.cxx4
-rw-r--r--extensions/source/propctrlr/propcontroller.cxx2
-rw-r--r--extensions/source/propctrlr/propertyeditor.cxx4
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx8
-rw-r--r--extensions/source/scanner/sanedlg.cxx3
-rw-r--r--extensions/workben/testframecontrol.cxx2
17 files changed, 33 insertions, 34 deletions
diff --git a/extensions/source/bibliography/bibbeam.cxx b/extensions/source/bibliography/bibbeam.cxx
index d823da527e38..9e6235055801 100644
--- a/extensions/source/bibliography/bibbeam.cxx
+++ b/extensions/source/bibliography/bibbeam.cxx
@@ -224,7 +224,7 @@ namespace bib
void BibBeamer::createToolBar()
{
- pToolBar= new BibToolBar(this, LINK( this, BibBeamer, RecalcLayout_Impl ));
+ pToolBar= VclPtr<BibToolBar>::Create(this, LINK( this, BibBeamer, RecalcLayout_Impl ));
::Size aSize=pToolBar->GetSizePixel();
InsertItem(ID_TOOLBAR, pToolBar, aSize.Height(), 0, 0, SWIB_FIXED );
if ( m_xController.is() )
@@ -233,7 +233,7 @@ namespace bib
void BibBeamer::createGridWin()
{
- pGridWin = new BibGridwin(this,0);
+ pGridWin = VclPtr<BibGridwin>::Create(this,0);
InsertItem(ID_GRIDWIN, pGridWin, 40, 1, 0, SWIB_RELATIVESIZE );
diff --git a/extensions/source/bibliography/bibcont.cxx b/extensions/source/bibliography/bibcont.cxx
index 3699f31c68b5..5eba4bac1bbc 100644
--- a/extensions/source/bibliography/bibcont.cxx
+++ b/extensions/source/bibliography/bibcont.cxx
@@ -183,7 +183,7 @@ void BibBookContainer::createTopFrame( BibShortCutHandler* pWin )
RemoveItem(TOP_WINDOW);
pTopWin.disposeAndClear();
}
- pTopWin=new BibWindowContainer(this,pWin);
+ pTopWin=VclPtr<BibWindowContainer>::Create(this,pWin);
pTopWin->Show();
BibConfig* pConfig = BibModul::GetConfig();
long nSize = pConfig->getBeamerSize();
@@ -201,7 +201,7 @@ void BibBookContainer::createBottomFrame( BibShortCutHandler* pWin )
pBottomWin.disposeAndClear();
}
- pBottomWin=new BibWindowContainer(this,pWin);
+ pBottomWin=VclPtr<BibWindowContainer>::Create(this,pWin);
BibConfig* pConfig = BibModul::GetConfig();
long nSize = pConfig->getViewSize();
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 98016ca29009..b481f050d2d4 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -273,7 +273,7 @@ void BibliographyLoader::loadView(const Reference< XFrame > & rFrame, const OUSt
vcl::Window* pParent = VCLUnoHelper::GetWindow( aWindow );
- BibBookContainer *pMyWindow = new BibBookContainer( pParent );
+ VclPtrInstance<BibBookContainer> pMyWindow( pParent );
pMyWindow->Show();
::bib::BibView* pView = new ::bib::BibView( pMyWindow, m_pDatMan, WB_VSCROLL | WB_HSCROLL | WB_3DLOOK );
diff --git a/extensions/source/bibliography/bibview.cxx b/extensions/source/bibliography/bibview.cxx
index 243161fb2c9e..dd13a1e2453d 100644
--- a/extensions/source/bibliography/bibview.cxx
+++ b/extensions/source/bibliography/bibview.cxx
@@ -119,7 +119,7 @@ namespace bib
m_xGeneralPage = 0;
}
- m_pGeneralPage = new BibGeneralPage( this, m_pDatMan );
+ m_pGeneralPage = VclPtr<BibGeneralPage>::Create( this, m_pDatMan );
m_xGeneralPage = &m_pGeneralPage->GetFocusListener();
m_pGeneralPage->Show();
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index 4dbc001fb6f0..f6db18010275 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -180,10 +180,10 @@ BibToolBar::BibToolBar(vcl::Window* pParent, Link aLink, WinBits nStyle):
ToolBox(pParent,BibResId(RID_BIB_TOOLBAR)),
aImgLst(BibResId( RID_TOOLBAR_IMGLIST )),
aBigImgLst(BibResId( RID_TOOLBAR_BIGIMGLIST )),
- aFtSource(new FixedText(this,WB_VCENTER)),
- aLBSource(new ListBox(this,WB_DROPDOWN)),
- aFtQuery(new FixedText(this,WB_VCENTER)),
- aEdQuery(new Edit(this)),
+ aFtSource(VclPtr<FixedText>::Create(this,WB_VCENTER)),
+ aLBSource(VclPtr<ListBox>::Create(this,WB_DROPDOWN)),
+ aFtQuery(VclPtr<FixedText>::Create(this,WB_VCENTER)),
+ aEdQuery(VclPtr<Edit>::Create(this)),
nMenuId(0),
nSelMenuItem(0),
aLayoutManager( aLink ),
diff --git a/extensions/source/plugin/base/plctrl.cxx b/extensions/source/plugin/base/plctrl.cxx
index b8973e0ec8f0..626af3f0e7ad 100644
--- a/extensions/source/plugin/base/plctrl.cxx
+++ b/extensions/source/plugin/base/plctrl.cxx
@@ -169,7 +169,7 @@ void PluginControl_Impl::createPeer( const Reference< ::com::sun::star::awt::XTo
vcl::Window* pImpl = VCLUnoHelper::GetWindow( xParentPeer );
if (pImpl)
{
- _pSysChild = new SystemChildWindow( pImpl, WB_CLIPCHILDREN );
+ _pSysChild = VclPtr<SystemChildWindow>::Create( pImpl, WB_CLIPCHILDREN );
if (pImpl->HasFocus())
_pSysChild->GrabFocus();
diff --git a/extensions/source/propctrlr/browserline.cxx b/extensions/source/propctrlr/browserline.cxx
index c32207506997..174c01eef667 100644
--- a/extensions/source/propctrlr/browserline.cxx
+++ b/extensions/source/propctrlr/browserline.cxx
@@ -55,7 +55,7 @@ namespace pcr
OBrowserLine::OBrowserLine( const OUString& _rEntryName, vcl::Window* pParent )
:m_sEntryName( _rEntryName )
- ,m_aFtTitle(new FixedText(pParent))
+ ,m_aFtTitle(VclPtr<FixedText>::Create(pParent))
,m_pControlWindow( NULL )
,m_pBrowseButton(NULL)
,m_pAdditionalBrowseButton( NULL )
@@ -380,7 +380,7 @@ namespace pcr
if ( !rpButton )
{
- rpButton = new PushButton( m_pTheParent, WB_NOPOINTERFOCUS );
+ rpButton = VclPtr<PushButton>::Create( m_pTheParent, WB_NOPOINTERFOCUS );
rpButton->SetGetFocusHdl( LINK( this, OBrowserLine, OnButtonFocus ) );
rpButton->SetClickHdl( LINK( this, OBrowserLine, OnButtonClicked ) );
rpButton->SetText(OUString("..."));
diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx
index f343e7503293..899a82d2c368 100644
--- a/extensions/source/propctrlr/browserlistbox.cxx
+++ b/extensions/source/propctrlr/browserlistbox.cxx
@@ -345,9 +345,9 @@ namespace pcr
OBrowserListBox::OBrowserListBox( vcl::Window* pParent, WinBits nWinStyle)
:Control(pParent, nWinStyle| WB_CLIPCHILDREN)
- ,m_aLinesPlayground(new vcl::Window(this,WB_DIALOGCONTROL | WB_CLIPCHILDREN))
- ,m_aVScroll(new ScrollBar(this,WB_VSCROLL|WB_REPEAT|WB_DRAG))
- ,m_pHelpWindow( new InspectorHelpWindow( this ) )
+ ,m_aLinesPlayground(VclPtr<vcl::Window>::Create(this,WB_DIALOGCONTROL | WB_CLIPCHILDREN))
+ ,m_aVScroll(VclPtr<ScrollBar>::Create(this,WB_VSCROLL|WB_REPEAT|WB_DRAG))
+ ,m_pHelpWindow( VclPtr<InspectorHelpWindow>::Create( this ) )
,m_pLineListener(NULL)
,m_pControlObserver( NULL )
,m_nYOffset(0)
diff --git a/extensions/source/propctrlr/browserpage.cxx b/extensions/source/propctrlr/browserpage.cxx
index f143b6048302..dfb0236317fd 100644
--- a/extensions/source/propctrlr/browserpage.cxx
+++ b/extensions/source/propctrlr/browserpage.cxx
@@ -35,7 +35,7 @@ namespace pcr
OBrowserPage::OBrowserPage(vcl::Window* pParent,WinBits nWinStyle)
:TabPage(pParent,nWinStyle)
- ,m_aListBox(new OBrowserListBox(this))
+ ,m_aListBox(VclPtr<OBrowserListBox>::Create(this))
{
m_aListBox->SetBackground(GetBackground());
m_aListBox->SetPaintTransparent( true );
diff --git a/extensions/source/propctrlr/browserview.cxx b/extensions/source/propctrlr/browserview.cxx
index 097ce695db0d..ab512b46eccc 100644
--- a/extensions/source/propctrlr/browserview.cxx
+++ b/extensions/source/propctrlr/browserview.cxx
@@ -35,7 +35,7 @@ namespace pcr
:Window(_pParent, nBits | WB_3DLOOK)
,m_nActivePage(0)
{
- m_pPropBox = new OPropertyEditor( this );
+ m_pPropBox = VclPtr<OPropertyEditor>::Create( this );
m_pPropBox->SetHelpId(HID_FM_PROPDLG_TABCTR);
m_pPropBox->setPageActivationHandler(LINK(this, OPropertyBrowserView, OnPageActivation));
diff --git a/extensions/source/propctrlr/formlinkdialog.cxx b/extensions/source/propctrlr/formlinkdialog.cxx
index fc7b2293906e..1b1a5fd3e817 100644
--- a/extensions/source/propctrlr/formlinkdialog.cxx
+++ b/extensions/source/propctrlr/formlinkdialog.cxx
@@ -168,10 +168,10 @@ namespace pcr
const OUString& _sDetailLabel,
const OUString& _sMasterLabel)
:ModalDialog( _pParent, "FormLinks", "modules/spropctrlr/ui/formlinksdialog.ui" )
- ,m_aRow1 ( new FieldLinkRow( get<VclVBox>("box") ) )
- ,m_aRow2 ( new FieldLinkRow( get<VclVBox>("box") ) )
- ,m_aRow3 ( new FieldLinkRow( get<VclVBox>("box") ) )
- ,m_aRow4 ( new FieldLinkRow( get<VclVBox>("box") ) )
+ ,m_aRow1 ( VclPtr<FieldLinkRow>::Create( get<VclVBox>("box") ) )
+ ,m_aRow2 ( VclPtr<FieldLinkRow>::Create( get<VclVBox>("box") ) )
+ ,m_aRow3 ( VclPtr<FieldLinkRow>::Create( get<VclVBox>("box") ) )
+ ,m_aRow4 ( VclPtr<FieldLinkRow>::Create( get<VclVBox>("box") ) )
,m_xContext ( _rxContext )
,m_xDetailForm( _rxDetailForm )
,m_xMasterForm( _rxMasterForm )
diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx
index 98324dfe714e..b174b69bd6c2 100644
--- a/extensions/source/propctrlr/inspectorhelpwindow.cxx
+++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx
@@ -29,8 +29,8 @@ namespace pcr
InspectorHelpWindow::InspectorHelpWindow( vcl::Window* _pParent )
:Window( _pParent, WB_DIALOGCONTROL )
- ,m_aSeparator( new FixedLine(this) )
- ,m_aHelpText( new MultiLineEdit(this, WB_LEFT | WB_READONLY | WB_AUTOVSCROLL) )
+ ,m_aSeparator( VclPtr<FixedLine>::Create(this) )
+ ,m_aHelpText( VclPtr<MultiLineEdit>::Create(this, WB_LEFT | WB_READONLY | WB_AUTOVSCROLL) )
,m_nMinLines( 3 )
,m_nMaxLines( 8 )
{
diff --git a/extensions/source/propctrlr/propcontroller.cxx b/extensions/source/propctrlr/propcontroller.cxx
index 66cea9ec4684..dc85415a63fa 100644
--- a/extensions/source/propctrlr/propcontroller.cxx
+++ b/extensions/source/propctrlr/propcontroller.cxx
@@ -703,7 +703,7 @@ namespace pcr
DBG_ASSERT(!haveView(), "OPropertyBrowserController::Construct: already have a view!");
DBG_ASSERT(_pParentWin, "OPropertyBrowserController::Construct: invalid parent window!");
- m_pView = new OPropertyBrowserView(_pParentWin);
+ m_pView = VclPtr<OPropertyBrowserView>::Create(_pParentWin);
m_pView->setPageActivationHandler(LINK(this, OPropertyBrowserController, OnPageActivation));
// add as dispose listener for our view. The view is disposed by the frame we're plugged into,
diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx
index 7e7bee0f06f1..3f8675c1b5b4 100644
--- a/extensions/source/propctrlr/propertyeditor.cxx
+++ b/extensions/source/propctrlr/propertyeditor.cxx
@@ -43,7 +43,7 @@ namespace pcr
OPropertyEditor::OPropertyEditor( vcl::Window* pParent, WinBits nWinStyle)
:Control(pParent, nWinStyle)
- ,m_aTabControl( new TabControl(this) )
+ ,m_aTabControl( VclPtr<TabControl>::Create(this) )
,m_pListener(NULL)
,m_pObserver(NULL)
,m_nNextId(1)
@@ -221,7 +221,7 @@ namespace pcr
m_aTabControl->InsertPage(nId, _rText);
// create a new page
- OBrowserPage* pPage = new OBrowserPage(m_aTabControl.get());
+ VclPtrInstance<OBrowserPage> pPage(m_aTabControl.get());
pPage->SetText( _rText );
// some knittings
pPage->SetSizePixel(m_aTabControl->GetTabPageSizePixel());
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index f3cc6a23d493..fe0313dd87ea 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -977,7 +977,7 @@ namespace pcr
OMultilineFloatingEdit::OMultilineFloatingEdit(vcl::Window* _pParent)
:FloatingWindow(_pParent, WB_BORDER)
- ,m_aImplEdit(new MultiLineEdit(this, WB_VSCROLL|WB_IGNORETAB|WB_NOBORDER))
+ ,m_aImplEdit(VclPtr<MultiLineEdit>::Create(this, WB_VSCROLL|WB_IGNORETAB|WB_NOBORDER))
{
m_aImplEdit->Show();
}
@@ -1041,19 +1041,19 @@ namespace pcr
{
SetCompoundControl( true );
- m_pImplEdit = new MultiLineEdit( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) );
+ m_pImplEdit = VclPtr<MultiLineEdit>::Create( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) );
SetSubEdit( m_pImplEdit );
m_pImplEdit->Show();
if ( _nStyle & WB_DROPDOWN )
{
- m_pDropdownButton = new PushButton( this, WB_NOLIGHTBORDER | WB_RECTSTYLE | WB_NOTABSTOP);
+ m_pDropdownButton = VclPtr<PushButton>::Create( this, WB_NOLIGHTBORDER | WB_RECTSTYLE | WB_NOTABSTOP);
m_pDropdownButton->SetSymbol(SymbolType::SPIN_DOWN);
m_pDropdownButton->SetClickHdl( LINK( this, DropDownEditControl, DropDownHdl ) );
m_pDropdownButton->Show();
}
- m_pFloatingEdit = new OMultilineFloatingEdit(this); //FloatingWindow
+ m_pFloatingEdit = VclPtr<OMultilineFloatingEdit>::Create(this);
m_pFloatingEdit->SetPopupModeEndHdl( LINK( this, DropDownEditControl, ReturnHdl ) );
m_pFloatingEdit->getEdit().SetReadOnly( ( _nStyle & WB_READONLY ) != 0 );
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index b6edcb05face..9034f0080e4c 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -157,8 +157,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeScanPreview(vcl::Windo
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
- ScanPreview *pWindow = new ScanPreview(pParent, nWinStyle);
- return pWindow;
+ return new ScanPreview(pParent, nWinStyle);
}
SaneDlg::SaneDlg( vcl::Window* pParent, Sane& rSane, bool bScanEnabled ) :
diff --git a/extensions/workben/testframecontrol.cxx b/extensions/workben/testframecontrol.cxx
index bb22d173db05..5cfa08c2c2a5 100644
--- a/extensions/workben/testframecontrol.cxx
+++ b/extensions/workben/testframecontrol.cxx
@@ -239,7 +239,7 @@ void FrameControlApplication::init()
XInterfaceRef xInst = xMgr->createInstance( L"stardiv.one.frame.FrameControl" );
if (xInst->queryInterface( XControl::getSmartUik(), _xControl ))
{
- _pWorkWin = new WorkWindow( NULL, WB_APP | WB_STDWORK );
+ _pWorkWin = VclPtr<WorkWindow>::Create( nullptr, WB_APP | WB_STDWORK );
_pWorkWin->Show();
XWindowPeerRef xParent( _pWorkWin->GetComponentInterface() );