Kaydet (Commit) 0785b13d authored tarafından Rüdiger Timm's avatar Rüdiger Timm

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
üst 871d8134
......@@ -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 ;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment