diff --git a/configmgr2/qa/unoapi/makefile.mk b/configmgr2/qa/unoapi/makefile.mk new file mode 100644 index 000000000000..45325955bf2c --- /dev/null +++ b/configmgr2/qa/unoapi/makefile.mk @@ -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 +# +# 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 diff --git a/configmgr2/qa/unoapi/module.sce b/configmgr2/qa/unoapi/module.sce new file mode 100644 index 000000000000..80421e8eaa7f --- /dev/null +++ b/configmgr2/qa/unoapi/module.sce @@ -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 +# +# for a copy of the LGPLv3 License. +#***********************************************************************/ + +-o configmgr.ConfigurationProvider +-o configmgr.DefaultProvider diff --git a/configmgr2/source/configurationprovider.cxx b/configmgr2/source/configurationprovider.cxx index 142c29ccca0b..3a9a5ca45857 100644 --- a/configmgr2/source/configurationprovider.cxx +++ b/configmgr2/source/configurationprovider.cxx @@ -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)