diff options
author | Peter Burow <pb@openoffice.org> | 2002-11-07 07:30:05 +0000 |
---|---|---|
committer | Peter Burow <pb@openoffice.org> | 2002-11-07 07:30:05 +0000 |
commit | fb4ac86f5ab8df5351cefb939ee9cf9c1bb948e7 (patch) | |
tree | 7ae91a52d5e3c905e2cd9a420edc3f3bb13d4bc0 /unotools/source/config | |
parent | 69907e2d16219ed64a3f3faf5dbffb97f584a2fa (diff) |
fix: #103936# new key PRODUCTXMLFILEFORMATVERSION
Diffstat (limited to 'unotools/source/config')
-rw-r--r-- | unotools/source/config/configmgr.cxx | 48 |
1 files changed, 32 insertions, 16 deletions
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; |