summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorPeter Burow <pb@openoffice.org>2002-11-07 07:30:05 +0000
committerPeter Burow <pb@openoffice.org>2002-11-07 07:30:05 +0000
commitfb4ac86f5ab8df5351cefb939ee9cf9c1bb948e7 (patch)
tree7ae91a52d5e3c905e2cd9a420edc3f3bb13d4bc0 /unotools
parent69907e2d16219ed64a3f3faf5dbffb97f584a2fa (diff)
fix: #103936# new key PRODUCTXMLFILEFORMATVERSION
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/configmgr.hxx7
-rw-r--r--unotools/source/config/configmgr.cxx48
2 files changed, 36 insertions, 19 deletions
diff --git a/unotools/inc/unotools/configmgr.hxx b/unotools/inc/unotools/configmgr.hxx
index fdab06e0c948..5ed81f12c023 100644
--- a/unotools/inc/unotools/configmgr.hxx
+++ b/unotools/inc/unotools/configmgr.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configmgr.hxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: fs $ $Date: 2001-08-22 10:01:07 $
+ * last change: $Author: pb $ $Date: 2002-11-07 08:28:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -131,7 +131,8 @@ namespace utl
PRODUCTNAME,
PRODUCTVERSION,
PRODUCTEXTENSION,
- DEFAULTCURRENCY
+ DEFAULTCURRENCY,
+ PRODUCTXMLFILEFORMATVERSION
};
//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 53ba3586bfc4..cec550f706f4 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: configmgr.cxx,v $
*
- * $Revision: 1.32 $
+ * $Revision: 1.33 $
*
- * last change: $Author: os $ $Date: 2002-10-07 14:11:16 $
+ * last change: $Author: pb $ $Date: 2002-11-07 08:30:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -110,6 +110,7 @@ const char* cAccessSrvc = "com.sun.star.configuration.ConfigurationUpdateAccess"
static ::rtl::OUString aBrandName;
static ::rtl::OUString aProductVersion;
static ::rtl::OUString aProductExtension;
+static ::rtl::OUString aXMLFileFormatVersion;
//-----------------------------------------------------------------------------
struct ConfigItemListEntry_Impl
@@ -404,18 +405,29 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
return aRet;
}
+ if ( eProp == PRODUCTXMLFILEFORMATVERSION && aXMLFileFormatVersion.getLength() )
+ {
+ aRet <<= aXMLFileFormatVersion;
+ return aRet;
+ }
+
OUString sPath = C2U(cConfigBaseURL);
switch(eProp)
{
case INSTALLPATH:
- case USERINSTALLURL: sPath += C2U("Setup/Office"); break;
- case LOCALE: sPath += C2U("Setup/L10N"); break;
+ case USERINSTALLURL: sPath += C2U("Setup/Office"); break;
+
+ case LOCALE: sPath += C2U("Setup/L10N"); break;
+
case PRODUCTNAME:
case PRODUCTVERSION:
- case PRODUCTEXTENSION: sPath += C2U("Setup/Product"); break;
+ case PRODUCTEXTENSION:
+ case PRODUCTXMLFILEFORMATVERSION: sPath += C2U("Setup/Product"); break;
+
case OFFICEINSTALL:
- case OFFICEINSTALLURL: sPath += C2U("Office.Common/Path/Current"); break;
- case DEFAULTCURRENCY: sPath += C2U("Setup/L10N"); break;
+ case OFFICEINSTALLURL: sPath += C2U("Office.Common/Path/Current"); break;
+
+ case DEFAULTCURRENCY: sPath += C2U("Setup/L10N"); break;
}
Sequence< Any > aArgs(1);
aArgs[0] <<= sPath;
@@ -437,15 +449,16 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
OUString sProperty;
switch(eProp)
{
- case USERINSTALLURL: sProperty = C2U("ooSetupInstallURL"); break;
- case INSTALLPATH: sProperty = C2U("ooSetupInstallPath"); break;
- case LOCALE: sProperty = C2U("ooLocale"); break;
- case PRODUCTNAME: sProperty = C2U("ooName"); break;
- case PRODUCTVERSION: sProperty = C2U("ooSetupVersion"); break;
- case PRODUCTEXTENSION: sProperty = C2U("ooSetupExtension"); break;
- case OFFICEINSTALL: sProperty = C2U("OfficeInstall"); break;
- case OFFICEINSTALLURL: sProperty = C2U("OfficeInstallURL"); break;
- case DEFAULTCURRENCY: sProperty += C2U("ooSetupCurrency"); break;
+ case USERINSTALLURL: sProperty = C2U("ooSetupInstallURL"); break;
+ case INSTALLPATH: sProperty = C2U("ooSetupInstallPath"); break;
+ case LOCALE: sProperty = C2U("ooLocale"); break;
+ case PRODUCTNAME: sProperty = C2U("ooName"); break;
+ case PRODUCTVERSION: sProperty = C2U("ooSetupVersion"); break;
+ case PRODUCTEXTENSION: sProperty = C2U("ooSetupExtension"); break;
+ case PRODUCTXMLFILEFORMATVERSION: sProperty = C2U("ooXMLFileFormatVersion"); break;
+ case OFFICEINSTALL: sProperty = C2U("OfficeInstall"); break;
+ case OFFICEINSTALLURL: sProperty = C2U("OfficeInstallURL"); break;
+ case DEFAULTCURRENCY: sProperty = C2U("ooSetupCurrency"); break;
}
try
{
@@ -467,6 +480,9 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
if ( eProp == PRODUCTNAME )
aRet >>= aBrandName;
+ if ( eProp == PRODUCTXMLFILEFORMATVERSION )
+ aRet >>= aXMLFileFormatVersion;
+
if ( eProp == PRODUCTVERSION )
aRet >>= aProductVersion;