#101955# configmgr2 unoapi tests

This commit is contained in:
sb 2009-09-10 11:35:38 +02:00
parent 3342c0cd12
commit 0fdd5ada8b
3 changed files with 95 additions and 4 deletions

View file

@ -0,0 +1,40 @@
#*************************************************************************
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2009 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# $RCSfile: makefile,v $
#
# $Revision: 1.4 $
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#***********************************************************************/
PRJ = ..$/..
PRJNAME = configmgr
TARGET = unoapi
.INCLUDE: settings.mk
.INCLUDE: target.mk
ALLTAR: TEST
TEST .PHONY:
$(SOLARENV)$/bin$/checkapi -sce module.sce

View file

@ -0,0 +1,31 @@
#*************************************************************************
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2009 by Sun Microsystems, Inc.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# $RCSfile: makefile,v $
#
# $Revision: 1.4 $
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#***********************************************************************/
-o configmgr.ConfigurationProvider
-o configmgr.DefaultProvider

View file

@ -35,6 +35,7 @@
#include "boost/noncopyable.hpp"
#include "com/sun/star/beans/NamedValue.hpp"
#include "com/sun/star/beans/PropertyValue.hpp"
#include "com/sun/star/lang/EventObject.hpp"
#include "com/sun/star/lang/Locale.hpp"
#include "com/sun/star/lang/XLocalizable.hpp"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
@ -57,6 +58,7 @@
#include "cppuhelper/compbase5.hxx"
#include "cppuhelper/factory.hxx"
#include "cppuhelper/implbase1.hxx"
#include "cppuhelper/interfacecontainer.hxx"
#include "cppuhelper/weak.hxx"
#include "osl/mutex.hxx"
#include "sal/types.h"
@ -136,8 +138,7 @@ private:
virtual css::uno::Sequence< rtl::OUString > SAL_CALL
getAvailableServiceNames() throw (css::uno::RuntimeException);
virtual void SAL_CALL refresh() throw (css::uno::RuntimeException)
{ /*TODO*/ }
virtual void SAL_CALL refresh() throw (css::uno::RuntimeException);
virtual void SAL_CALL addRefreshListener(
css::uno::Reference< css::util::XRefreshListener > const & l)
@ -147,8 +148,7 @@ private:
css::uno::Reference< css::util::XRefreshListener > const & l)
throw (css::uno::RuntimeException);
virtual void SAL_CALL flush() throw (css::uno::RuntimeException)
{ /*TODO*/ }
virtual void SAL_CALL flush() throw (css::uno::RuntimeException);
virtual void SAL_CALL addFlushListener(
css::uno::Reference< css::util::XFlushListener > const & l)
@ -294,6 +294,16 @@ css::uno::Sequence< rtl::OUString > Service::getAvailableServiceNames()
return names;
}
void Service::refresh() throw (css::uno::RuntimeException) {
//TODO
cppu::OInterfaceContainerHelper * cont = rBHelper.getContainer(
cppu::UnoType< css::util::XRefreshListener >::get());
if (cont != 0) {
css::lang::EventObject ev(static_cast< cppu::OWeakObject * >(this));
cont->notifyEach(&css::util::XRefreshListener::refreshed, ev);
}
}
void Service::addRefreshListener(
css::uno::Reference< css::util::XRefreshListener > const & l)
throw (css::uno::RuntimeException)
@ -310,6 +320,16 @@ void Service::removeRefreshListener(
cppu::UnoType< css::util::XRefreshListener >::get(), l);
}
void Service::flush() throw (css::uno::RuntimeException) {
//TODO
cppu::OInterfaceContainerHelper * cont = rBHelper.getContainer(
cppu::UnoType< css::util::XFlushListener >::get());
if (cont != 0) {
css::lang::EventObject ev(static_cast< cppu::OWeakObject * >(this));
cont->notifyEach(&css::util::XFlushListener::flushed, ev);
}
}
void Service::addFlushListener(
css::uno::Reference< css::util::XFlushListener > const & l)
throw (css::uno::RuntimeException)