summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2000-12-18 07:19:03 +0000
committerMathias Bauer <mba@openoffice.org>2000-12-18 07:19:03 +0000
commitf9718302723e037e6e4d74e1eb2545c08d0ab959 (patch)
treeb60e843a3e5288ba1b00799316a13a523d846191 /unotools
parentbafb51232a90049fab908c20740be866cbdec9fc (diff)
#81582#: new PRODUCTVERSION also for Portal
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/configmgr.hxx7
-rw-r--r--unotools/source/config/configmgr.cxx18
2 files changed, 19 insertions, 6 deletions
diff --git a/unotools/inc/unotools/configmgr.hxx b/unotools/inc/unotools/configmgr.hxx
index 3f38286abf24..527e6c0a96c3 100644
--- a/unotools/inc/unotools/configmgr.hxx
+++ b/unotools/inc/unotools/configmgr.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configmgr.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: os $ $Date: 2000-12-13 08:01:11 $
+ * last change: $Author: mba $ $Date: 2000-12-18 08:18:32 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -123,7 +123,8 @@ namespace utl
OFFICEINSTALL,
USERINSTALLURL,
OFFICEINSTALLURL,
- PRODUCTNAME
+ PRODUCTNAME,
+ PRODUCTVERSION
};
//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 5c81e88b3168..13e4da0929c8 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configmgr.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: sb $ $Date: 2000-12-14 08:07:50 $
+ * last change: $Author: mba $ $Date: 2000-12-18 08:19:03 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -105,6 +105,7 @@ const char* cConfigBaseURL = "/org.openoffice.";
const char* cAccessSrvc = "com.sun.star.configuration.ConfigurationUpdateAccess";
static ::rtl::OUString aBrandName;
+static ::rtl::OUString aProductVersion;
//-----------------------------------------------------------------------------
struct ConfigItemListEntry_Impl
@@ -370,6 +371,12 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
return aRet;
}
+ if ( eProp == PRODUCTVERSION && aProductVersion.getLength() )
+ {
+ aRet <<= aProductVersion;
+ return aRet;
+ }
+
OUString sPath = C2U(cConfigBaseURL);
switch(eProp)
{
@@ -377,7 +384,8 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
case USERINSTALLURL:
sPath += C2U("UserProfile/Office"); break;
case LOCALE: sPath += C2U("UserProfile/International"); break;
- case PRODUCTNAME: sPath += C2U("Setup/Product"); break;
+ case PRODUCTNAME:
+ case PRODUCTVERSION: sPath += C2U("Setup/Product"); break;
case OFFICEINSTALL:
case OFFICEINSTALLURL:
sPath += C2U("Office.Common/Path/Current"); break;
@@ -405,6 +413,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty 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;
@@ -421,6 +430,9 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
if ( eProp == PRODUCTNAME )
aRet >>= aBrandName;
+ if ( eProp == PRODUCTVERSION )
+ aRet >>= aProductVersion;
+
return aRet;
}
/* -----------------------------12.12.00 17:22--------------------------------