summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-01 12:16:28 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-01 15:21:18 +0100
commit511e0e173887815c4efc4d41db3ad10ec38ad003 (patch)
treeb1b39cdb042b1f76a7bde131ba46bbc3f9b2668c /desktop
parented132e5b9dfaa226395534462eff956df9a7412f (diff)
tweak these a bit to allow better template
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_shared.hxx2
-rw-r--r--desktop/source/deployment/inc/dp_dependencies.hxx2
-rwxr-xr-xdesktop/source/deployment/inc/dp_resource.h2
-rwxr-xr-xdesktop/source/deployment/inc/dp_ucb.h2
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx4
-rw-r--r--desktop/source/deployment/misc/dp_platform.cxx6
-rw-r--r--desktop/source/deployment/misc/dp_resource.cxx2
-rw-r--r--desktop/source/migration/services/basicmigration.cxx32
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx4
-rwxr-xr-xdesktop/source/pkgchk/unopkg/unopkg_shared.h2
12 files changed, 21 insertions, 41 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index e564fade8e5e..01e7f92aac6b 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -100,7 +100,7 @@ namespace dp_gui {
#define PROGRESS_HEIGHT 14
//------------------------------------------------------------------------------
-struct StrAllFiles : public rtl::StaticWithInit< const OUString, StrAllFiles >
+struct StrAllFiles : public rtl::StaticWithInit< OUString, StrAllFiles >
{
const OUString operator () () {
const SolarMutexGuard guard;
diff --git a/desktop/source/deployment/gui/dp_gui_shared.hxx b/desktop/source/deployment/gui/dp_gui_shared.hxx
index e056e81fa395..3e2db45bfdd7 100644
--- a/desktop/source/deployment/gui/dp_gui_shared.hxx
+++ b/desktop/source/deployment/gui/dp_gui_shared.hxx
@@ -45,7 +45,7 @@ struct DeploymentGuiResMgr :
}
};
-struct BrandName : public ::rtl::StaticWithInit<const ::rtl::OUString, BrandName> {
+struct BrandName : public ::rtl::StaticWithInit< ::rtl::OUString, BrandName > {
const ::rtl::OUString operator () () {
return ::utl::ConfigManager::GetDirectConfigProperty(
::utl::ConfigManager::PRODUCTNAME ).get< ::rtl::OUString >();
diff --git a/desktop/source/deployment/inc/dp_dependencies.hxx b/desktop/source/deployment/inc/dp_dependencies.hxx
index e39c70c99a91..246d176bc4ec 100644
--- a/desktop/source/deployment/inc/dp_dependencies.hxx
+++ b/desktop/source/deployment/inc/dp_dependencies.hxx
@@ -45,7 +45,7 @@ namespace rtl { class OUString; }
namespace dp_misc {
-struct BrandName : public ::rtl::StaticWithInit<const ::rtl::OUString, BrandName> {
+struct BrandName : public ::rtl::StaticWithInit< ::rtl::OUString, BrandName > {
const ::rtl::OUString operator () () {
return ::utl::ConfigManager::GetDirectConfigProperty(
::utl::ConfigManager::PRODUCTNAME ).get< ::rtl::OUString >();
diff --git a/desktop/source/deployment/inc/dp_resource.h b/desktop/source/deployment/inc/dp_resource.h
index d23b187c2275..d7c16bb69b52 100755
--- a/desktop/source/deployment/inc/dp_resource.h
+++ b/desktop/source/deployment/inc/dp_resource.h
@@ -47,7 +47,7 @@ DESKTOP_DEPLOYMENTMISC_DLLPUBLIC String getResourceString( sal_uInt16 id );
template <typename Unique, sal_uInt16 id>
struct StaticResourceString :
- public ::rtl::StaticWithInit<const ::rtl::OUString, Unique> {
+ public ::rtl::StaticWithInit< ::rtl::OUString, Unique > {
const ::rtl::OUString operator () () { return getResourceString(id); }
};
diff --git a/desktop/source/deployment/inc/dp_ucb.h b/desktop/source/deployment/inc/dp_ucb.h
index 22d54de5885a..52ac31369ac0 100755
--- a/desktop/source/deployment/inc/dp_ucb.h
+++ b/desktop/source/deployment/inc/dp_ucb.h
@@ -45,7 +45,7 @@ namespace css = ::com::sun::star;
namespace dp_misc {
struct DESKTOP_DEPLOYMENTMISC_DLLPUBLIC StrTitle :
- public rtl::StaticWithInit<const rtl::OUString, StrTitle>
+ public rtl::StaticWithInit<rtl::OUString, StrTitle>
{
const rtl::OUString operator () ();
};
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 367985ffd577..54ee2cb0c4bd 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -79,7 +79,7 @@ namespace dp_misc {
namespace {
struct UnoRc : public rtl::StaticWithInit<
- const boost::shared_ptr<rtl::Bootstrap>, UnoRc> {
+ boost::shared_ptr<rtl::Bootstrap>, UnoRc> {
const boost::shared_ptr<rtl::Bootstrap> operator () () {
OUString unorc( RTL_CONSTASCII_USTRINGPARAM(
"$OOO_BASE_DIR/program/" SAL_CONFIGFILE("uno")) );
@@ -91,7 +91,7 @@ struct UnoRc : public rtl::StaticWithInit<
}
};
-struct OfficePipeId : public rtl::StaticWithInit<const OUString, OfficePipeId> {
+struct OfficePipeId : public rtl::StaticWithInit<OUString, OfficePipeId> {
const OUString operator () ();
};
diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index e38d5f250dcf..3caf1196df95 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -91,7 +91,7 @@ namespace dp_misc
namespace
{
struct StrOperatingSystem :
- public rtl::StaticWithInit<const OUString, StrOperatingSystem> {
+ public rtl::StaticWithInit<OUString, StrOperatingSystem> {
const OUString operator () () {
OUString os( RTL_CONSTASCII_USTRINGPARAM("$_OS") );
::rtl::Bootstrap::expandMacros( os );
@@ -100,7 +100,7 @@ namespace
};
struct StrCPU :
- public rtl::StaticWithInit<const OUString, StrCPU> {
+ public rtl::StaticWithInit<OUString, StrCPU> {
const OUString operator () () {
OUString arch( RTL_CONSTASCII_USTRINGPARAM("$_ARCH") );
::rtl::Bootstrap::expandMacros( arch );
@@ -110,7 +110,7 @@ namespace
struct StrPlatform : public rtl::StaticWithInit<
- const OUString, StrPlatform> {
+ OUString, StrPlatform> {
const OUString operator () () {
::rtl::OUStringBuffer buf;
buf.append( StrOperatingSystem::get() );
diff --git a/desktop/source/deployment/misc/dp_resource.cxx b/desktop/source/deployment/misc/dp_resource.cxx
index 82c5847811e5..a20f1b3c56d8 100644
--- a/desktop/source/deployment/misc/dp_resource.cxx
+++ b/desktop/source/deployment/misc/dp_resource.cxx
@@ -46,7 +46,7 @@ namespace dp_misc {
namespace {
struct OfficeLocale :
- public rtl::StaticWithInit<const OUString, OfficeLocale> {
+ public rtl::StaticWithInit<OUString, OfficeLocale> {
const OUString operator () () {
OUString slang;
if (! (::utl::ConfigManager::GetDirectConfigProperty(
diff --git a/desktop/source/migration/services/basicmigration.cxx b/desktop/source/migration/services/basicmigration.cxx
index f4adfa27ed9d..40474a23d25e 100644
--- a/desktop/source/migration/services/basicmigration.cxx
+++ b/desktop/source/migration/services/basicmigration.cxx
@@ -43,9 +43,8 @@ namespace migration
//.........................................................................
- static ::rtl::OUString sSourceUserBasic = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/basic" ) );
- static ::rtl::OUString sTargetUserBasic = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/__basic_80" ) );
-
+ #define sSourceUserBasic ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/user/basic"))
+ #define sTargetUserBasic ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/user/__basic_80"))
// =============================================================================
// component operations
@@ -53,35 +52,16 @@ namespace migration
::rtl::OUString BasicMigration_getImplementationName()
{
- static ::rtl::OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.desktop.migration.Basic" ) );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.desktop.migration.Basic"));
}
// -----------------------------------------------------------------------------
Sequence< ::rtl::OUString > BasicMigration_getSupportedServiceNames()
{
- static Sequence< ::rtl::OUString >* pNames = 0;
- if ( !pNames )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pNames )
- {
- static Sequence< ::rtl::OUString > aNames(1);
- aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.migration.Basic" ) );
- pNames = &aNames;
- }
- }
- return *pNames;
+ Sequence< ::rtl::OUString > aNames(1);
+ aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.migration.Basic" ) );
+ return aNames;
}
// =============================================================================
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index f39364ae4dd9..1732b3fb5f88 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -67,7 +67,7 @@ namespace {
//==============================================================================
struct OfficeLocale :
- public rtl::StaticWithInit<const lang::Locale, OfficeLocale> {
+ public rtl::StaticWithInit<lang::Locale, OfficeLocale> {
const lang::Locale operator () () {
OUString slang;
if (! (::utl::ConfigManager::GetDirectConfigProperty(
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index d8f30ed26ae3..a2c9baf4986e 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -180,7 +180,7 @@ bool readArgument(
namespace {
struct ExecutableDir : public rtl::StaticWithInit<
- const OUString, ExecutableDir> {
+ OUString, ExecutableDir> {
const OUString operator () () {
OUString path;
if (osl_getExecutableFile( &path.pData ) != osl_Process_E_None) {
@@ -191,7 +191,7 @@ struct ExecutableDir : public rtl::StaticWithInit<
}
};
struct ProcessWorkingDir : public rtl::StaticWithInit<
- const OUString, ProcessWorkingDir> {
+ OUString, ProcessWorkingDir> {
const OUString operator () () {
OUString workingDir;
tools::getProcessWorkingDir(workingDir);
diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h
index eddb5b3e0f09..feffd892a27e 100755
--- a/desktop/source/pkgchk/unopkg/unopkg_shared.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h
@@ -56,7 +56,7 @@ namespace unopkg {
struct OfficeLocale :
- public rtl::StaticWithInit<const css::lang::Locale, OfficeLocale> {
+ public rtl::StaticWithInit<css::lang::Locale, OfficeLocale> {
const css::lang::Locale operator () () {
::rtl::OUString slang;
if (! (::utl::ConfigManager::GetDirectConfigProperty(