summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-03-31 20:57:16 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-04-10 13:27:16 +0100
commit5d133eb62187ae910772ff5dfeb8f2c3276e8481 (patch)
treede10fa41a70071dfb3e36ed061e19328e883d206 /desktop
parent28a863756b5891e6074a2ce432f97a1ff0271aed (diff)
first half of non-scriptable, Instance constructor conversion.
Change-Id: If73bb41bfa805e22609748f25971724b4778edb3
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/lockfile2.cxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx17
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx4
3 files changed, 12 insertions, 13 deletions
diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx
index 679258c88dd3..7636431048a6 100644
--- a/desktop/source/app/lockfile2.cxx
+++ b/desktop/source/app/lockfile2.cxx
@@ -38,8 +38,8 @@ bool Lockfile_execWarning( Lockfile * that )
OString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY );
// display warning and return response
- ScopedVclPtr<MessageDialog> aBox(new MessageDialog(NULL, DesktopResId(STR_QUERY_USERDATALOCKED),
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
+ ScopedVclPtrInstance<MessageDialog> aBox(nullptr, DesktopResId(STR_QUERY_USERDATALOCKED),
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
// set box title
OUString aTitle = OUString( DesktopResId( STR_TITLE_USERDATALOCKED ));
aBox->SetText( aTitle );
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index fdfcf89dd133..b41fb3a56c8b 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -595,9 +595,8 @@ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment::
if ( !bHadWarning && IsSharedPkgMgr( xPackage ) )
{
const SolarMutexGuard guard;
- ScopedVclPtr<MessageDialog> aInfoBox(new MessageDialog(pParent, getResId(nResID),
- VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL));
-
+ ScopedVclPtrInstance<MessageDialog> aInfoBox(pParent, getResId(nResID),
+ VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
bHadWarning = true;
if ( RET_OK == aInfoBox->Execute() )
@@ -636,8 +635,8 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle
bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const
{
const SolarMutexGuard guard;
- ScopedVclPtr<MessageDialog> aInfo(new MessageDialog(m_pVCLWindow, getResId(RID_STR_WARNING_INSTALL_EXTENSION),
- VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL));
+ ScopedVclPtrInstance<MessageDialog> aInfo(m_pVCLWindow, getResId(RID_STR_WARNING_INSTALL_EXTENSION),
+ VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
OUString sText(aInfo->get_primary_text());
sText = sText.replaceAll("%NAME", rExtensionName);
@@ -649,8 +648,8 @@ bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const
bool DialogHelper::installForAllUsers( bool &bInstallForAll ) const
{
const SolarMutexGuard guard;
- ScopedVclPtr<MessageDialog> aQuery(new MessageDialog(m_pVCLWindow, "InstallForAllDialog",
- "desktop/ui/installforalldialog.ui"));
+ ScopedVclPtrInstance<MessageDialog> aQuery(m_pVCLWindow, "InstallForAllDialog",
+ "desktop/ui/installforalldialog.ui");
short nRet = aQuery->Execute();
if (nRet == RET_CANCEL)
@@ -794,8 +793,8 @@ void ExtMgrDialog::checkEntries()
bool ExtMgrDialog::removeExtensionWarn( const OUString &rExtensionName ) const
{
const SolarMutexGuard guard;
- ScopedVclPtr<MessageDialog> aInfo(new MessageDialog(const_cast<ExtMgrDialog*>(this), getResId(RID_STR_WARNING_REMOVE_EXTENSION),
- VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL));
+ ScopedVclPtrInstance<MessageDialog> aInfo(const_cast<ExtMgrDialog*>(this), getResId(RID_STR_WARNING_REMOVE_EXTENSION),
+ VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
OUString sText(aInfo->get_primary_text());
sText = sText.replaceAll("%NAME", rExtensionName);
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 64480b14fc04..57005409442f 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -451,8 +451,8 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
verExc.Deployed->getDisplayName());
{
SolarMutexGuard guard;
- ScopedVclPtr<MessageDialog> box(new MessageDialog(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL,
- ResId(id, *DeploymentGuiResMgr::get()), VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL));
+ ScopedVclPtrInstance<MessageDialog> box(m_pDialogHelper? m_pDialogHelper->getWindow() : NULL,
+ ResId(id, *DeploymentGuiResMgr::get()), VCL_MESSAGE_WARNING, VCL_BUTTONS_OK_CANCEL);
OUString s;
if (bEqualNames)
{