summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorPeter Burow <pb@openoffice.org>2001-01-23 10:56:12 +0000
committerPeter Burow <pb@openoffice.org>2001-01-23 10:56:12 +0000
commit7cde93c4c445a30c1899d2bb0d4d1273302c8f75 (patch)
treea6d02b09f9a4318f8aab8532b91e412fde3cc323 /unotools
parentbc51eeb8b2a95169bb302b99ef4dba7971fe4352 (diff)
fix: #82184# added
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/configmgr.hxx7
-rw-r--r--unotools/source/config/configmgr.cxx38
2 files changed, 28 insertions, 17 deletions
diff --git a/unotools/inc/unotools/configmgr.hxx b/unotools/inc/unotools/configmgr.hxx
index 527e6c0a96c3..46268eb774af 100644
--- a/unotools/inc/unotools/configmgr.hxx
+++ b/unotools/inc/unotools/configmgr.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configmgr.hxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: mba $ $Date: 2000-12-18 08:18:32 $
+ * last change: $Author: pb $ $Date: 2001-01-23 11:51:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -124,7 +124,8 @@ namespace utl
USERINSTALLURL,
OFFICEINSTALLURL,
PRODUCTNAME,
- PRODUCTVERSION
+ PRODUCTVERSION,
+ PRODUCTEXTENSION
};
//direct readonly access to some special configuration elements
static com::sun::star::uno::Any GetDirectConfigProperty(ConfigProperty eProp);
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 13e4da0929c8..854e6c0cd31b 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configmgr.cxx,v $
*
- * $Revision: 1.14 $
+ * $Revision: 1.15 $
*
- * last change: $Author: mba $ $Date: 2000-12-18 08:19:03 $
+ * last change: $Author: pb $ $Date: 2001-01-23 11:53:34 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -106,6 +106,7 @@ const char* cAccessSrvc = "com.sun.star.configuration.ConfigurationUpdateAccess"
static ::rtl::OUString aBrandName;
static ::rtl::OUString aProductVersion;
+static ::rtl::OUString aProductExtension;
//-----------------------------------------------------------------------------
struct ConfigItemListEntry_Impl
@@ -377,18 +378,23 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
return aRet;
}
+ if ( eProp == PRODUCTEXTENSION && aProductExtension.getLength() )
+ {
+ aRet <<= aProductExtension;
+ return aRet;
+ }
+
OUString sPath = C2U(cConfigBaseURL);
switch(eProp)
{
case INSTALLPATH:
- case USERINSTALLURL:
- sPath += C2U("UserProfile/Office"); break;
+ case USERINSTALLURL: sPath += C2U("UserProfile/Office"); break;
case LOCALE: sPath += C2U("UserProfile/International"); break;
case PRODUCTNAME:
- case PRODUCTVERSION: sPath += C2U("Setup/Product"); break;
+ case PRODUCTVERSION:
+ case PRODUCTEXTENSION: sPath += C2U("Setup/Product"); break;
case OFFICEINSTALL:
- case OFFICEINSTALLURL:
- sPath += C2U("Office.Common/Path/Current"); break;
+ case OFFICEINSTALLURL: sPath += C2U("Office.Common/Path/Current"); break;
}
Sequence< Any > aArgs(1);
aArgs[0] <<= sPath;
@@ -410,13 +416,14 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
OUString sProperty;
switch(eProp)
{
- case INSTALLPATH: sProperty = C2U("InstallPath"); break;
- case LOCALE: sProperty = C2U("Locale"); break;
- case PRODUCTNAME: sProperty = C2U("Name"); break;
- case PRODUCTVERSION: sProperty = C2U("Version"); break;
- case OFFICEINSTALL: sProperty = C2U("OfficeInstall"); break;
- case USERINSTALLURL: sProperty = C2U("InstallURL"); break;
- case OFFICEINSTALLURL: sProperty = C2U("OfficeInstallURL"); break;
+ case INSTALLPATH: sProperty = C2U("InstallPath"); break;
+ case LOCALE: sProperty = C2U("Locale"); break;
+ case PRODUCTNAME: sProperty = C2U("Name"); break;
+ case PRODUCTVERSION: sProperty = C2U("Version"); break;
+ case PRODUCTEXTENSION: sProperty = C2U("Extension"); break;
+ case OFFICEINSTALL: sProperty = C2U("OfficeInstall"); break;
+ case USERINSTALLURL: sProperty = C2U("InstallURL"); break;
+ case OFFICEINSTALLURL: sProperty = C2U("OfficeInstallURL"); break;
}
try
{
@@ -433,6 +440,9 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
if ( eProp == PRODUCTVERSION )
aRet >>= aProductVersion;
+ if ( eProp == PRODUCTEXTENSION )
+ aRet >>= aProductExtension;
+
return aRet;
}
/* -----------------------------12.12.00 17:22--------------------------------