diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-04-01 21:06:41 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-04-01 21:21:06 +0100 |
commit | 0e88410a03cc4d141c912ef451de15399c7c9e23 (patch) | |
tree | 82cc225fddf18da427ee73121c2d500866bd3448 /desktop/source/app/appinit.cxx | |
parent | 8f6c69259dfc2ffe2fc9dfd0c421dd58f6e13f36 (diff) |
Use our rtl::Static pattern here
avoid memleak, and remove excessive pointer/new foo, and ensure
thread-safety on some compilers while leaving the door open
to skip it with gcc, and help out helgrind
Diffstat (limited to 'desktop/source/app/appinit.cxx')
-rw-r--r-- | desktop/source/app/appinit.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 38d425ed703c..be1d1502f683 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -232,16 +232,16 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr ) sal_Bool bHeadlessMode = sal_False; // interpret command line arguments - CommandLineArgs* pCmdLine = GetCommandLineArgs(); + CommandLineArgs& rCmdLine = GetCommandLineArgs(); // read accept string from configuration conDcp = SvtStartOptions().GetConnectionURL(); - if ( pCmdLine->GetAcceptString( aTmpString )) + if ( rCmdLine.GetAcceptString( aTmpString )) conDcp = aTmpString; // Headless mode for FAT Office - bHeadlessMode = pCmdLine->IsHeadless(); + bHeadlessMode = rCmdLine.IsHeadless(); if ( bHeadlessMode ) Application::EnableHeadlessMode(); @@ -254,7 +254,7 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr ) // improves parallel processing on Sun ONE Webtop // servicemanager up -> copy user installation - if ( pCmdLine->IsServer() ) + if ( rCmdLine.IsServer() ) { // Check some mandatory environment states if "-server" is possible. Otherwise ignore // this parameter. @@ -266,15 +266,15 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr ) if ( !rEnum.is() ) { // Reset server parameter so it is ignored in the furthermore startup process - pCmdLine->SetBoolParam( CommandLineArgs::CMD_BOOLPARAM_SERVER, sal_False ); + rCmdLine.SetBoolParam( CommandLineArgs::CMD_BOOLPARAM_SERVER, sal_False ); } } } ::rtl::OUString aPortalConnect; - bool bServer = (bool)pCmdLine->IsServer(); + bool bServer = (bool)rCmdLine.IsServer(); - pCmdLine->GetPortalConnectString( aPortalConnect ); + rCmdLine.GetPortalConnectString( aPortalConnect ); if ( !configureUcb( bServer, aPortalConnect ) ) { OSL_FAIL( "Can't configure UCB" ); |