summaryrefslogtreecommitdiff
path: root/desktop/source
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
commit11611f3cef10a58d90c22d17c11a79a1820fb7bc (patch)
tree4c73385891e8cdcf05bdc98be77796cfe3cda91c /desktop/source
parentda4a1dc5a2a29b8b3bd30042c5d806575d7f7668 (diff)
tweak these a bit to allow better template
Diffstat (limited to 'desktop/source')
-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 7aa8decb6f..020ef14b9e 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 dcee2863cd..a70686a388 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 f31d5f3084..b0df05f40e 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 bd3a4fac82..212ed5aec1 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 c2fcdcd7e0..2835f15b32 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 78696a4b3d..b626141e49 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 6217be2678..515b848f4e 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 c8c57ac01d..ad7a9e0d7c 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 d58aa58088..dfadba451d 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 f3d68a0079..c8007cf061 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 1a87c92ea4..7db2372131 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 cc25e934d6..ddad731889 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(