summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-17 09:11:51 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-17 09:15:06 +0100
commit5cc560f6c27dc60764f644d6b5fb5ccb1b8072be (patch)
tree7ecc9dbe064ece9599e5b99891bc00f5efaef07b /basctl
parent5d5f447e738f159297b3d7bf10220c3cdfe7e2fa (diff)
basctl, basic: convert new to ::Create.
Change-Id: I1fc2c69640ed625425a679380d6f25178bc5aeb1
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx6
-rw-r--r--basctl/source/basicide/baside2b.cxx22
-rw-r--r--basctl/source/basicide/baside3.cxx2
-rw-r--r--basctl/source/basicide/basides2.cxx4
-rw-r--r--basctl/source/basicide/basides3.cxx4
-rw-r--r--basctl/source/basicide/basidesh.cxx10
-rw-r--r--basctl/source/basicide/layout.cxx4
-rw-r--r--basctl/source/basicide/moduldl2.cxx2
-rw-r--r--basctl/source/basicide/moduldlg.cxx14
-rw-r--r--basctl/source/basicide/objdlg.cxx4
10 files changed, 36 insertions, 36 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index df27e30983a8..48f9eabc07d7 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -192,7 +192,7 @@ ModulWindow::ModulWindow (
BaseWindow(pParent, rDocument, aLibName, aName),
rLayout(*pParent),
nValid(ValidWindow),
- aXEditorWindow(new ComplexEditorWindow(this)),
+ aXEditorWindow(VclPtr<ComplexEditorWindow>::Create(this)),
m_aModule(aModule)
{
aXEditorWindow->Show();
@@ -1470,8 +1470,8 @@ void ModulWindow::UpdateModule ()
ModulWindowLayout::ModulWindowLayout (vcl::Window* pParent, ObjectCatalog& rObjectCatalog_) :
Layout(pParent),
pChild(0),
- aWatchWindow(new WatchWindow(this)),
- aStackWindow(new StackWindow(this)),
+ aWatchWindow(VclPtr<WatchWindow>::Create(this)),
+ aStackWindow(VclPtr<StackWindow>::Create(this)),
rObjectCatalog(rObjectCatalog_)
{ }
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 076aa3e08506..f44fb4e28aac 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -227,7 +227,7 @@ EditorWindow::EditorWindow (vcl::Window* pParent, ModulWindow* pModulWindow) :
bHighlightning(false),
bDoSyntaxHighlight(true),
bDelayHighlight(true),
- pCodeCompleteWnd(new CodeCompleteWindow(this))
+ pCodeCompleteWnd(VclPtr<CodeCompleteWindow>::Create(this))
{
SetBackground(Wallpaper(GetSettings().GetStyleSettings().GetFieldColor()));
SetPointer( Pointer( POINTER_TEXT ) );
@@ -1599,11 +1599,11 @@ namespace
WatchWindow::WatchWindow (Layout* pParent) :
DockingWindow(pParent),
aWatchStr( IDEResId( RID_STR_REMOVEWATCH ) ),
- aXEdit( new ExtendedEdit(this, IDEResId( RID_EDT_WATCHEDIT )) ),
- aRemoveWatchButton( new ImageButton(this, IDEResId( RID_IMGBTN_REMOVEWATCH )) ),
- aTreeListBox( new WatchTreeListBox(this, WB_BORDER | WB_3DLOOK | WB_HASBUTTONS | WB_HASLINES | WB_HSCROLL | WB_TABSTOP
+ aXEdit( VclPtr<ExtendedEdit>::Create(this, IDEResId( RID_EDT_WATCHEDIT )) ),
+ aRemoveWatchButton( VclPtr<ImageButton>::Create(this, IDEResId( RID_IMGBTN_REMOVEWATCH )) ),
+ aTreeListBox( VclPtr<WatchTreeListBox>::Create(this, WB_BORDER | WB_3DLOOK | WB_HASBUTTONS | WB_HASLINES | WB_HSCROLL | WB_TABSTOP
| WB_HASLINESATROOT | WB_HASBUTTONSATROOT) ),
- aHeaderBar( new HeaderBar( this, WB_BUTTONSTYLE | WB_BORDER ) )
+ aHeaderBar( VclPtr<HeaderBar>::Create( this, WB_BUTTONSTYLE | WB_BORDER ) )
{
aXEdit->SetAccessibleName(IDEResId(RID_STR_WATCHNAME).toString());
aTreeListBox->SetAccessibleName(IDEResId(RID_STR_WATCHNAME).toString());
@@ -1902,7 +1902,7 @@ void WatchWindow::UpdateWatches( bool bBasicStopped )
StackWindow::StackWindow (Layout* pParent) :
DockingWindow(pParent),
- aTreeListBox( new SvTreeListBox(this, WB_BORDER | WB_3DLOOK | WB_HSCROLL | WB_TABSTOP) ),
+ aTreeListBox( VclPtr<SvTreeListBox>::Create(this, WB_BORDER | WB_3DLOOK | WB_HSCROLL | WB_TABSTOP) ),
aStackStr( IDEResId( RID_STR_STACK ) )
{
aTreeListBox->SetHelpId(HID_BASICIDE_STACKWINDOW_LIST);
@@ -2044,10 +2044,10 @@ void StackWindow::UpdateCalls()
ComplexEditorWindow::ComplexEditorWindow( ModulWindow* pParent ) :
Window( pParent, WB_3DLOOK | WB_CLIPCHILDREN ),
- aBrkWindow(new BreakPointWindow(this, pParent)),
- aLineNumberWindow(new LineNumberWindow(this, pParent)),
- aEdtWindow(new EditorWindow(this, pParent)),
- aEWVScrollBar( new ScrollBar(this, WB_VSCROLL | WB_DRAG) )
+ aBrkWindow(VclPtr<BreakPointWindow>::Create(this, pParent)),
+ aLineNumberWindow(VclPtr<LineNumberWindow>::Create(this, pParent)),
+ aEdtWindow(VclPtr<EditorWindow>::Create(this, pParent)),
+ aEWVScrollBar( VclPtr<ScrollBar>::Create(this, WB_VSCROLL | WB_DRAG) )
{
aEdtWindow->Show();
aBrkWindow->Show();
@@ -2862,7 +2862,7 @@ void CodeCompleteListBox::HideAndRestoreFocus()
CodeCompleteWindow::CodeCompleteWindow( EditorWindow* pPar )
: Window( pPar ),
pParent( pPar ),
-pListBox( new CodeCompleteListBox(this) )
+pListBox( VclPtr<CodeCompleteListBox>::Create(this) )
{
SetSizePixel( Size(151,151) ); //default, later it changes
InitListBox();
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index fb497e153318..fd82a982f55e 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -1427,7 +1427,7 @@ void DialogWindowLayout::ShowPropertyBrowser ()
if (!pPropertyBrowser)
{
// creating
- pPropertyBrowser = new PropBrw(*this);
+ pPropertyBrowser = VclPtr<PropBrw>::Create(*this);
pPropertyBrowser->Show();
// after OnFirstSize():
if (HasSize())
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 3e88d55a9e98..43d57abeea7a 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -166,8 +166,8 @@ ModulWindow* Shell::CreateBasWin( const ScriptDocument& rDocument, const OUStrin
{
// new module window
if (!pModulLayout)
- pModulLayout.reset(new ModulWindowLayout(&GetViewFrame()->GetWindow(), *aObjectCatalog.get()));
- pWin = new ModulWindow(pModulLayout.get(), rDocument, aLibName, aModName, aModule);
+ pModulLayout.reset(VclPtr<ModulWindowLayout>::Create(&GetViewFrame()->GetWindow(), *aObjectCatalog.get()));
+ pWin = VclPtr<ModulWindow>::Create(pModulLayout.get(), rDocument, aLibName, aModName, aModule);
nKey = InsertWindowInTable( pWin );
}
else // we've gotten called recursively ( via listener from createModule above ), get outta here
diff --git a/basctl/source/basicide/basides3.cxx b/basctl/source/basicide/basides3.cxx
index 5b2f93d3beca..8479fd8a39a2 100644
--- a/basctl/source/basicide/basides3.cxx
+++ b/basctl/source/basicide/basides3.cxx
@@ -77,8 +77,8 @@ DialogWindow* Shell::CreateDlgWin( const ScriptDocument& rDocument, const OUStri
// new dialog window
if (!pDialogLayout)
- pDialogLayout.reset(new DialogWindowLayout(&GetViewFrame()->GetWindow(), *aObjectCatalog.get()));
- pWin = new DialogWindow(pDialogLayout.get(), rDocument, aLibName, aDlgName, xDialogModel);
+ pDialogLayout.reset(VclPtr<DialogWindowLayout>::Create(&GetViewFrame()->GetWindow(), *aObjectCatalog.get()));
+ pWin = VclPtr<DialogWindow>::Create(pDialogLayout.get(), rDocument, aLibName, aDlgName, xDialogModel);
nKey = InsertWindowInTable( pWin );
}
}
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 7715de063057..1a72774c5bbc 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -155,11 +155,11 @@ unsigned Shell::nShellCount = 0;
Shell::Shell( SfxViewFrame* pFrame_, SfxViewShell* /* pOldShell */ ) :
SfxViewShell( pFrame_, ShellFlags ),
m_aCurDocument( ScriptDocument::getApplicationScriptDocument() ),
- aHScrollBar( new ScrollBar(&GetViewFrame()->GetWindow(), WinBits( WB_HSCROLL | WB_DRAG )) ),
- aVScrollBar( new ScrollBar(&GetViewFrame()->GetWindow(), WinBits( WB_VSCROLL | WB_DRAG )) ),
- aScrollBarBox( new ScrollBarBox(&GetViewFrame()->GetWindow(), WinBits( WB_SIZEABLE )) ),
+ aHScrollBar( VclPtr<ScrollBar>::Create(&GetViewFrame()->GetWindow(), WinBits( WB_HSCROLL | WB_DRAG )) ),
+ aVScrollBar( VclPtr<ScrollBar>::Create(&GetViewFrame()->GetWindow(), WinBits( WB_VSCROLL | WB_DRAG )) ),
+ aScrollBarBox( VclPtr<ScrollBarBox>::Create(&GetViewFrame()->GetWindow(), WinBits( WB_SIZEABLE )) ),
pLayout(0),
- aObjectCatalog(new ObjectCatalog(&GetViewFrame()->GetWindow())),
+ aObjectCatalog(VclPtr<ObjectCatalog>::Create(&GetViewFrame()->GetWindow())),
m_bAppBasicModified( false ),
m_aNotifier( *this )
{
@@ -195,7 +195,7 @@ void Shell::Init()
m_aCurDocument = ScriptDocument::getApplicationScriptDocument();
bCreatingWindow = false;
- pTabBar.reset(new TabBar(&GetViewFrame()->GetWindow()));
+ pTabBar.reset(VclPtr<TabBar>::Create(&GetViewFrame()->GetWindow()));
pTabBar->SetSplitHdl( LINK( this, Shell, TabBarSplitHdl ) );
bTabBarSplitted = false;
diff --git a/basctl/source/basicide/layout.cxx b/basctl/source/basicide/layout.cxx
index 0c7a40dda941..2bca3ce4349b 100644
--- a/basctl/source/basicide/layout.cxx
+++ b/basctl/source/basicide/layout.cxx
@@ -173,7 +173,7 @@ Layout::SplittedSide::SplittedSide (Layout* pParent, Side eSide) :
bVertical(eSide == Left || eSide == Right),
bLower(eSide == Left || eSide == Top),
nSize(0),
- aSplitter(new Splitter(pParent, bVertical ? WB_HSCROLL : WB_VSCROLL))
+ aSplitter(VclPtr<Splitter>::Create(pParent, bVertical ? WB_HSCROLL : WB_VSCROLL))
{
InitSplitter(*aSplitter.get());
}
@@ -195,7 +195,7 @@ void Layout::SplittedSide::Add (DockingWindow* pWin, Size const& rSize)
// splitter
if (!vItems.empty())
{
- aItem.pSplit = new Splitter(&rLayout, bVertical ? WB_VSCROLL : WB_HSCROLL);
+ aItem.pSplit = VclPtr<Splitter>::Create(&rLayout, bVertical ? WB_VSCROLL : WB_HSCROLL);
aItem.pSplit->SetSplitPosPixel(aItem.nStartPos - nSplitThickness);
InitSplitter(*aItem.pSplit);
}
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index a4abe70644af..00baa2e0c0e1 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -838,7 +838,7 @@ void LibPage::InsertLib()
// library import dialog
if ( !pLibDlg )
{
- pLibDlg.reset(new LibDialog( this ));
+ pLibDlg.reset(VclPtr<LibDialog>::Create( this ));
pLibDlg->SetStorageName( aURLObj.getName() );
pLibDlg->GetLibBox().SetMode(ObjectMode::Library);
}
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 2e633512832c..44b8c02120df 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -518,25 +518,25 @@ IMPL_LINK( OrganizeDialog, ActivatePageHdl, TabControl *, pTabCtrl )
if ( !pTabCtrl->GetTabPage( nId ) )
{
OString sPageName(pTabCtrl->GetPageName(nId));
- TabPage* pNewTabPage = 0;
+ VclPtr<TabPage> pNewTabPage;
if (sPageName == "modules")
{
- ObjectPage* pObjectPage = new ObjectPage(pTabCtrl, "ModulePage", BROWSEMODE_MODULES);
- pNewTabPage = pObjectPage;
+ VclPtrInstance<ObjectPage> pObjectPage(pTabCtrl, "ModulePage", BROWSEMODE_MODULES);
+ pNewTabPage.reset(pObjectPage);
pObjectPage->SetTabDlg(this);
pObjectPage->SetCurrentEntry(m_aCurEntry);
}
else if (sPageName == "dialogs")
{
- ObjectPage* pObjectPage = new ObjectPage( pTabCtrl, "DialogPage", BROWSEMODE_DIALOGS );
- pNewTabPage = pObjectPage;
+ VclPtrInstance<ObjectPage> pObjectPage( pTabCtrl, "DialogPage", BROWSEMODE_DIALOGS );
+ pNewTabPage.reset(pObjectPage);
pObjectPage->SetTabDlg(this);
pObjectPage->SetCurrentEntry(m_aCurEntry);
}
else if (sPageName == "libraries")
{
- LibPage* pLibPage = new LibPage( pTabCtrl );
- pNewTabPage = pLibPage;
+ VclPtrInstance<LibPage> pLibPage( pTabCtrl );
+ pNewTabPage.reset(pLibPage);
pLibPage->SetTabDlg( this );
}
else
diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx
index e0dc7059d02f..d8b9538aff3d 100644
--- a/basctl/source/basicide/objdlg.cxx
+++ b/basctl/source/basicide/objdlg.cxx
@@ -30,8 +30,8 @@ namespace basctl
ObjectCatalog::ObjectCatalog (vcl::Window* pParent) :
DockingWindow(pParent),
- aTitle(new FixedText(this)),
- aTree(new TreeListBox(this, IDEResId(RID_TLB_MACROS)))
+ aTitle(VclPtr<FixedText>::Create(this)),
+ aTree(VclPtr<TreeListBox>::Create(this, IDEResId(RID_TLB_MACROS)))
{
SetHelpId("basctl:FloatingWindow:RID_BASICIDE_OBJCAT");
SetText(IDEResId(RID_BASICIDE_OBJCAT).toString());