summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-31 23:04:14 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 13:40:25 +0100
commit8a65284fe31e6c0a927cb88b75df7845cd248572 (patch)
tree0427685579288f412d1890619e8bc224339bb228 /desktop/source
parentd46e0d9656670dcd7dcca2f32062606400ff6246 (diff)
Automated conversion of VclPtr construction to use Instance template.
Change-Id: I8be9141b9653e73ebd23a5a3d810f240c376f97e
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/app/app.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx4
-rw-r--r--desktop/source/lib/init.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx2
5 files changed, 8 insertions, 8 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index db6dbd6b497b..669d0dd4ec3b 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -708,7 +708,7 @@ void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStat
OUString const aMessage(aDiagnosticMessage + "\n");
- ScopedVclPtr<MessageDialog> aBootstrapFailedBox(new MessageDialog(NULL, aMessage));
+ ScopedVclPtrInstance< MessageDialog > aBootstrapFailedBox(nullptr, aMessage);
aBootstrapFailedBox->SetText( aProductKey );
aBootstrapFailedBox->Execute();
}
@@ -2354,7 +2354,7 @@ void Desktop::OpenClients()
ResMgr* pDtResMgr = GetDesktopResManager();
if( pDtResMgr )
{
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(NULL, ResId(STR_ERR_PRINTDISABLED, *pDtResMgr)));
+ ScopedVclPtrInstance< MessageDialog > aBox(nullptr, ResId(STR_ERR_PRINTDISABLED, *pDtResMgr));
aBox->Execute();
}
}
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index b41fb3a56c8b..1313475dc638 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -408,7 +408,7 @@ void ExtBoxWithBtns_Impl::MouseButtonDown( const MouseEvent& rMEvt )
break;
case CMD_SHOW_LICENSE:
{
- ScopedVclPtr<ShowLicenseDialog> aLicenseDlg(new ShowLicenseDialog( m_pParent, GetEntryData( nPos )->m_xPackage ));
+ ScopedVclPtrInstance< ShowLicenseDialog > aLicenseDlg( m_pParent, GetEntryData( nPos )->m_xPackage );
aLicenseDlg->Execute();
break;
}
@@ -626,7 +626,7 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle
uno::Any exc( ::cppu::getCaughtException() );
OUString msg( ::comphelper::anyToString( exc ) );
const SolarMutexGuard guard;
- ScopedVclPtr<MessageDialog> aErrorBox(new MessageDialog(NULL, msg));
+ ScopedVclPtrInstance< MessageDialog > aErrorBox(nullptr, msg);
aErrorBox->SetText( sTitle );
aErrorBox->Execute();
}
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 57005409442f..1b2136d3ec01 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -506,7 +506,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
SolarMutexGuard guard;
OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *DeploymentGuiResMgr::get()).toString());
sMsg = sMsg.replaceAll("%Name", platExc.package->getDisplayName());
- ScopedVclPtr<MessageDialog> box(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, sMsg));
+ ScopedVclPtrInstance< MessageDialog > box(m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, sMsg);
box->Execute();
approve = true;
}
@@ -571,7 +571,7 @@ void ProgressCmdEnv::update_( uno::Any const & rStatus )
text = ::comphelper::anyToString( rStatus ); // fallback
const SolarMutexGuard aGuard;
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, text));
+ ScopedVclPtrInstance< MessageDialog > aBox(m_pDialogHelper? m_pDialogHelper->getWindow() : nullptr, text);
aBox->Execute();
}
++m_nCurrentProgress;
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b7587d178209..e5dd36af5983 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -606,7 +606,7 @@ void doc_paintTile (LibreOfficeKitDocument* pThis,
#ifndef IOS
InitSvpForLibreOfficeKit();
- ScopedVclPtr<VirtualDevice> pDevice( new VirtualDevice(0, Size(1, 1), (sal_uInt16)32)) ;
+ ScopedVclPtrInstance< VirtualDevice > pDevice(0, Size(1, 1), (sal_uInt16)32) ;
boost::shared_array< sal_uInt8 > aBuffer( pBuffer, NoDelete< sal_uInt8 >() );
pDevice->SetOutputSizePixelScaleOffsetAndBuffer(
Size(nCanvasWidth, nCanvasHeight), Fraction(1.0), Point(),
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index a7e4789929ac..d86a455238cf 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -472,7 +472,7 @@ Reference<XComponentContext> getUNO(
if ( ! InitVCL() )
throw RuntimeException( "Cannot initialize VCL!" );
{
- ScopedVclPtr<WarningBox> warn(new WarningBox(NULL, WB_OK | WB_DEF_OK, sMsg));
+ ScopedVclPtrInstance< WarningBox > warn(nullptr, WB_OK | WB_DEF_OK, sMsg);
warn->SetText(utl::ConfigManager::getProductName());
warn->SetIcon(0);
warn->Execute();