diff options
author | Rüdiger Timm <rt@openoffice.org> | 2005-01-31 12:12:49 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2005-01-31 12:12:49 +0000 |
commit | 0785b13d2f76f4be8f1ae183c6c39a36f12d5e04 (patch) | |
tree | 09afef433d5ac1e0aa857f0bc457f611565190ef /shell/source/backends | |
parent | 871d81349fc5edcba5267e34e1c82c6798ecc329 (diff) |
INTEGRATION: CWS vcl35 (1.4.14); FILE MERGED
2005/01/21 08:32:12 obr 1.4.14.2: #i40639# moved the accessibility detected code into the gconf backend
2005/01/21 07:01:54 obr 1.4.14.1: #i40639# returning the value or some hash value to avoid regenerating the binary cache on each office launch
Diffstat (limited to 'shell/source/backends')
-rw-r--r-- | shell/source/backends/gconfbe/gconfbackend.cxx | 51 |
1 files changed, 29 insertions, 22 deletions
diff --git a/shell/source/backends/gconfbe/gconfbackend.cxx b/shell/source/backends/gconfbe/gconfbackend.cxx index a9db4c41411a..586b545e817b 100644 --- a/shell/source/backends/gconfbe/gconfbackend.cxx +++ b/shell/source/backends/gconfbe/gconfbackend.cxx @@ -2,9 +2,9 @@ * * $RCSfile: gconfbackend.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: rt $ $Date: 2004-12-07 10:57:09 $ + * last change: $Author: rt $ $Date: 2005-01-31 13:12:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,8 +61,16 @@ #include "gconfbackend.hxx" -#ifndef GCONFLAYER_HXX_ -#include "gconflayer.hxx" +#ifndef GCONFCOMMONLAYER_HXX_ +#include "gconfcommonlayer.hxx" +#endif + +#ifndef GCONFINETLAYER_HXX_ +#include "gconfinetlayer.hxx" +#endif + +#ifndef GCONFVCLLAYER_HXX_ +#include "gconfvcllayer.hxx" #endif #ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_COMPONENTCHANGEEVENT_HPP_ @@ -89,8 +97,6 @@ #include <rtl/byteseq.h> #endif -// #include<glib.h> - #include <stdio.h> //============================================================================== @@ -183,23 +189,22 @@ uno::Reference<backend::XLayer> SAL_CALL GconfBackend::getLayer( const rtl::OUString& aComponent, const rtl::OUString& aTimestamp) throw (backend::BackendAccessException, lang::IllegalArgumentException) { - // timestamps need to be updated when notifications are recieved from gconf - TimeValue aTimeValue = {0,0}; - osl_getSystemTime(&aTimeValue); - - oslDateTime aLayerTS; - rtl::OUString aTimeStamp; - - if (osl_getDateTimeFromTimeValue(&aTimeValue, &aLayerTS)) { - sal_Char asciiStamp [20] ; + uno::Reference<backend::XLayer> xLayer; - snprintf(asciiStamp, sizeof(asciiStamp), "%04d%02d%02d%02d%02d%02dZ", - aLayerTS.Year, aLayerTS.Month, aLayerTS.Day, - aLayerTS.Hours, aLayerTS.Minutes, aLayerTS.Seconds) ; - aTimeStamp = rtl::OUString::createFromAscii(asciiStamp) ; + if( aComponent.equalsAscii("org.openoffice.Office.Common" ) ) + { + xLayer = new GconfCommonLayer(m_xContext); + } + else if( aComponent.equalsAscii("org.openoffice.Inet" ) ) + { + xLayer = new GconfInetLayer(m_xContext); + } + else if( aComponent.equalsAscii("org.openoffice.VCL" ) ) + { + xLayer = new GconfVCLLayer(m_xContext); } - return new GconfLayer(aComponent, aTimeStamp, m_xContext); + return xLayer; } //------------------------------------------------------------------------------ @@ -455,10 +460,12 @@ uno::Sequence<rtl::OUString> SAL_CALL GconfBackend::getBackendServiceNames(void) uno::Sequence<rtl::OUString> SAL_CALL GconfBackend::getSupportedComponents(void) { - uno::Sequence<rtl::OUString> aSupportedComponentsList(2) ; + uno::Sequence<rtl::OUString> aSupportedComponentsList(3) ; aSupportedComponentsList[0] = rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Inet")) ; + RTL_CONSTASCII_USTRINGPARAM("org.openoffice.VCL")) ; aSupportedComponentsList[1] = rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Inet")) ; + aSupportedComponentsList[2] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common")) ; return aSupportedComponentsList ; |