summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-04-17 11:22:09 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-17 11:22:09 +0100
commit0703fc22519b391cece54f9d67012cffd9867765 (patch)
tree01b5807a371e0f33546e99e2d9a38c69f9872a44 /desktop
parente0686cb7564eb2eeab62ac35a2a36da8f83ed90a (diff)
desktop: convert new to ::Create.
Change-Id: I114ab23302970ce0abe551ffd693e92b0f4ae8c5
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx6
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx8
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_service.cxx5
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_updatedialog.cxx2
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx3
-rw-r--r--desktop/source/splash/splash.cxx2
8 files changed, 16 insertions, 18 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 1313475dc638..63d09869b211 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -166,9 +166,9 @@ void ExtBoxWithBtns_Impl::InitFromDialog(ExtMgrDialog *pParentDialog)
m_pParent = pParentDialog;
- m_pOptionsBtn = new PushButton( this, WB_TABSTOP );
- m_pEnableBtn = new PushButton( this, WB_TABSTOP );
- m_pRemoveBtn = new PushButton( this, WB_TABSTOP );
+ m_pOptionsBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
+ m_pEnableBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
+ m_pRemoveBtn = VclPtr<PushButton>::Create( this, WB_TABSTOP );
SetHelpId( HID_EXTENSION_MANAGER_LISTBOX );
m_pOptionsBtn->SetHelpId( HID_EXTENSION_MANAGER_LISTBOX_OPTIONS );
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 1b2136d3ec01..29d3c9036cde 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -814,7 +814,7 @@ void ExtensionCmdQueue::Thread::execute()
const SolarMutexGuard guard;
ScopedVclPtr<MessageDialog> box(
- new MessageDialog(currentCmdEnv->activeDialog(), msg));
+ VclPtr<MessageDialog>::Create(currentCmdEnv->activeDialog(), msg));
if ( m_pDialogHelper )
box->SetText( m_pDialogHelper->getWindow()->GetText() );
box->Execute();
@@ -923,12 +923,10 @@ void ExtensionCmdQueue::Thread::_removeExtension( ::rtl::Reference< ProgressCmdE
void ExtensionCmdQueue::Thread::_checkForUpdates(
const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList )
{
- ScopedVclPtr<UpdateDialog> pUpdateDialog;
- std::vector< UpdateData > vData;
-
const SolarMutexGuard guard;
- pUpdateDialog = new UpdateDialog( m_xContext, m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, vExtensionList, &vData );
+ std::vector< UpdateData > vData;
+ ScopedVclPtrInstance<UpdateDialog> pUpdateDialog( m_xContext, m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, vExtensionList, &vData );
pUpdateDialog->notifyMenubar( true, false ); // prepare the checking, if there updates to be notified via menu bar icon
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 6eef818cdece..50d51569994d 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -201,7 +201,7 @@ void ExtensionBox_Impl::Init()
{
SetHelpId( HID_EXTENSION_MANAGER_LISTBOX );
- m_pScrollBar = new ScrollBar( this, WB_VERT );
+ m_pScrollBar = VclPtr<ScrollBar>::Create( this, WB_VERT );
m_pScrollBar->SetScrollHdl( LINK( this, ExtensionBox_Impl, ScrollHdl ) );
m_pScrollBar->EnableDrag();
@@ -544,7 +544,7 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl& rEnt
// Init publisher link here
if ( !rEntry->m_pPublisher && !rEntry->m_sPublisher.isEmpty() )
{
- rEntry->m_pPublisher = new FixedHyperlink( this );
+ rEntry->m_pPublisher = VclPtr<FixedHyperlink>::Create( this );
rEntry->m_pPublisher->SetBackground();
rEntry->m_pPublisher->SetPaintTransparent( true );
rEntry->m_pPublisher->SetURL( rEntry->m_sPublisherURL );
diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index badb58fb02f8..f07042d44a23 100644
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -223,9 +223,8 @@ void ServiceImpl::startExecuteModal(
catch (const Exception & exc) {
if (bAppUp) {
const SolarMutexGuard guard;
- VclPtr<MessageDialog> box(
- new MessageDialog(Application::GetActiveTopWindow(),
- exc.Message));
+ ScopedVclPtrInstance<MessageDialog> box(
+ Application::GetActiveTopWindow(), exc.Message);
box->Execute();
}
throw;
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 53b5380f9cc8..3980a2396b81 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -112,7 +112,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
{
if ( !m_pUpdReqDialog )
{
- m_pUpdReqDialog = new UpdateRequiredDialog( NULL, this );
+ m_pUpdReqDialog = VclPtr<UpdateRequiredDialog>::Create( nullptr, this );
delete m_pExecuteCmdQueue;
m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pUpdReqDialog, this, m_xContext );
createPackageList();
@@ -120,7 +120,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
}
else if ( !m_pExtMgrDialog )
{
- m_pExtMgrDialog = new ExtMgrDialog( m_pParent, this );
+ m_pExtMgrDialog = VclPtr<ExtMgrDialog>::Create( m_pParent, this );
delete m_pExecuteCmdQueue;
m_pExecuteCmdQueue = new ExtensionCmdQueue( (DialogHelper*) m_pExtMgrDialog, this, m_xContext );
m_pExtMgrDialog->setGetExtensionsURL( m_sGetExtensionsURL );
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index a7372e268be6..8e75bd04b42a 100644
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -520,7 +520,7 @@ UpdateDialog::UpdateDialog(
get(m_pthrobber, "THROBBER");
get(m_pUpdate, "UPDATE_LABEL");
get(m_pContainer, "UPDATES_CONTAINER");
- m_pUpdates = new UpdateDialog::CheckListBox(m_pContainer, *this);
+ m_pUpdates = VclPtr<UpdateDialog::CheckListBox>::Create(m_pContainer, *this);
Size aSize(LogicToPixel(Size(240, 51), MAP_APPFONT));
m_pUpdates->set_width_request(aSize.Width());
m_pUpdates->set_height_request(aSize.Height());
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index 2054b4435465..710052f3180f 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -330,7 +330,8 @@ sal_Int16 LicenseDialog::execute() throw (RuntimeException, std::exception)
sal_Int16 LicenseDialog::solar_execute()
{
VclPtr<LicenseDialogImpl> dlg(
- new LicenseDialogImpl(
+ VclPtr<LicenseDialogImpl>::Create(
+
VCLUnoHelper::GetWindow(m_parent),
m_xComponentContext, m_sExtensionName, m_sLicenseText));
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index ae80ddc2f991..1e858cabd01b 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -131,7 +131,7 @@ public:
SplashScreenWindow::SplashScreenWindow(SplashScreen *pSplash)
: IntroWindow()
, pSpl( pSplash )
- , _vdev(new VirtualDevice(*this))
+ , _vdev(VclPtr<VirtualDevice>::Create(*this))
{
_vdev->EnableRTL(IsRTLEnabled());
}