summaryrefslogtreecommitdiff
path: root/desktop/source/app/lockfile2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-11 14:42:23 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 22:17:00 +0100
commit00f2787a4a68633206635743298926bf2e65a8fa (patch)
treeefc3a4f02b3d8acd69d25071499be5a475cb0338 /desktop/source/app/lockfile2.cxx
parentb3dcb2996b70caabda1939c9e85545c97d78404a (diff)
vclwidgets: wrap all vcl::Window subclasses allocated on stack in VclPtr
Change-Id: Ia8b0d84bbf69f9d8f85505d019acdded14e25133 Conflicts: sw/qa/tiledrendering/tiledrendering.cxx
Diffstat (limited to 'desktop/source/app/lockfile2.cxx')
-rw-r--r--desktop/source/app/lockfile2.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx
index c590ab7cf799..7b9a2590b1fd 100644
--- a/desktop/source/app/lockfile2.cxx
+++ b/desktop/source/app/lockfile2.cxx
@@ -38,22 +38,22 @@ bool Lockfile_execWarning( Lockfile * that )
OString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY );
// display warning and return response
- MessageDialog aBox(NULL, DesktopResId(STR_QUERY_USERDATALOCKED),
- VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO);
+ VclPtr<MessageDialog> aBox(new MessageDialog(NULL, DesktopResId(STR_QUERY_USERDATALOCKED),
+ VCL_MESSAGE_QUESTION, VCL_BUTTONS_YES_NO));
// set box title
OUString aTitle = OUString( DesktopResId( STR_TITLE_USERDATALOCKED ));
- aBox.SetText( aTitle );
+ aBox->SetText( aTitle );
// insert values...
- OUString aMsgText = aBox.get_primary_text();
+ OUString aMsgText = aBox->get_primary_text();
aMsgText = aMsgText.replaceFirst(
"$u", OStringToOUString( aUser, RTL_TEXTENCODING_ASCII_US) );
aMsgText = aMsgText.replaceFirst(
"$h", OStringToOUString( aHost, RTL_TEXTENCODING_ASCII_US) );
aMsgText = aMsgText.replaceFirst(
"$t", OStringToOUString( aTime, RTL_TEXTENCODING_ASCII_US) );
- aBox.set_primary_text(aMsgText);
+ aBox->set_primary_text(aMsgText);
// do it
- return aBox.Execute( ) == RET_YES;
+ return aBox->Execute( ) == RET_YES;
}
}