fwk: Use constructor feature for ImageManager.
Change-Id: I3f231980b1908495b1f5ec17f95c39c464d40ff8
This commit is contained in:
@@ -21,19 +21,10 @@
|
||||
#define INCLUDED_FRAMEWORK_INC_UICONFIGURATION_IMAGEMANAGER_HXX
|
||||
|
||||
|
||||
/** Attention: stl headers must(!) be included at first. Otherwise it can make trouble
|
||||
with solaris headers ...
|
||||
*/
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <memory>
|
||||
|
||||
#include <threadhelp/threadhelpbase.hxx>
|
||||
#include <macros/generic.hxx>
|
||||
#include <macros/xinterface.hxx>
|
||||
#include <macros/xtypeprovider.hxx>
|
||||
#include <macros/xserviceinfo.hxx>
|
||||
#include <stdtypes.h>
|
||||
#include <uiconfiguration/imagetype.hxx>
|
||||
|
||||
@@ -47,9 +38,11 @@
|
||||
#include <com/sun/star/lang/XInitialization.hpp>
|
||||
#include <com/sun/star/ui/ConfigurationEvent.hpp>
|
||||
#include <com/sun/star/embed/XTransactedObject.hpp>
|
||||
#include <com/sun/star/uno/XComponentContext.hpp>
|
||||
|
||||
#include <cppuhelper/implbase2.hxx>
|
||||
#include <cppuhelper/interfacecontainer.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
#include <rtl/ustring.hxx>
|
||||
|
||||
#include <vcl/image.hxx>
|
||||
@@ -62,12 +55,29 @@ namespace framework
|
||||
public ::cppu::WeakImplHelper2< ::com::sun::star::ui::XImageManager, css::lang::XServiceInfo>
|
||||
{
|
||||
public:
|
||||
// XInterface, XTypeProvider, XServiceInfo
|
||||
DECLARE_XSERVICEINFO
|
||||
|
||||
ImageManager( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
|
||||
virtual ~ImageManager();
|
||||
|
||||
virtual OUString SAL_CALL getImplementationName()
|
||||
throw (css::uno::RuntimeException)
|
||||
{
|
||||
return OUString("com.sun.star.comp.framework.ImageManager");
|
||||
}
|
||||
|
||||
virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName)
|
||||
throw (css::uno::RuntimeException)
|
||||
{
|
||||
return cppu::supportsService(this, ServiceName);
|
||||
}
|
||||
|
||||
virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
|
||||
throw (css::uno::RuntimeException)
|
||||
{
|
||||
css::uno::Sequence< OUString > aSeq(1);
|
||||
aSeq[0] = OUString("com.sun.star.ui.ImageManager");
|
||||
return aSeq;
|
||||
}
|
||||
|
||||
// XComponent
|
||||
virtual void SAL_CALL dispose() throw (::com::sun::star::uno::RuntimeException);
|
||||
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
|
||||
|
@@ -55,7 +55,6 @@
|
||||
#include <services/sessionlistener.hxx>
|
||||
#include <services/taskcreatorsrv.hxx>
|
||||
|
||||
#include <uiconfiguration/imagemanager.hxx>
|
||||
#include <uifactory/windowcontentfactorymanager.hxx>
|
||||
#include <services/substitutepathvars.hxx>
|
||||
#include <services/pathsettings.hxx>
|
||||
@@ -86,7 +85,6 @@ COMPONENTGETFACTORY ( fwk,
|
||||
IFFACTORY( ::framework::StatusbarControllerFactory ) else
|
||||
IFFACTORY( ::framework::SessionListener ) else
|
||||
IFFACTORY( ::framework::TaskCreatorService ) else
|
||||
IFFACTORY( ::framework::ImageManager ) else
|
||||
IFFACTORY( ::framework::WindowContentFactoryManager ) else
|
||||
IFFACTORY( ::framework::SubstitutePathVariables ) else
|
||||
IFFACTORY( ::framework::PathSettings ) else
|
||||
|
@@ -22,7 +22,6 @@
|
||||
#include <threadhelp/resetableguard.hxx>
|
||||
#include <xml/imagesconfiguration.hxx>
|
||||
#include <uiconfiguration/graphicnameaccess.hxx>
|
||||
#include <services.h>
|
||||
#include "imagemanagerimpl.hxx"
|
||||
|
||||
#include "properties.h"
|
||||
@@ -34,6 +33,7 @@
|
||||
#include <com/sun/star/io/XStream.hpp>
|
||||
|
||||
#include <vcl/svapp.hxx>
|
||||
#include <rtl/ref.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <osl/mutex.hxx>
|
||||
#include <comphelper/sequence.hxx>
|
||||
@@ -41,10 +41,6 @@
|
||||
#include <vcl/pngread.hxx>
|
||||
#include <vcl/pngwrite.hxx>
|
||||
|
||||
//_________________________________________________________________________________________________________________
|
||||
// namespaces
|
||||
//_________________________________________________________________________________________________________________
|
||||
|
||||
using ::com::sun::star::uno::Sequence;
|
||||
using ::com::sun::star::uno::XInterface;
|
||||
using ::com::sun::star::uno::Exception;
|
||||
@@ -63,17 +59,6 @@ using namespace ::com::sun::star::beans;
|
||||
namespace framework
|
||||
{
|
||||
|
||||
//*****************************************************************************************************************
|
||||
// XInterface, XTypeProvider, XServiceInfo
|
||||
//*****************************************************************************************************************
|
||||
DEFINE_XSERVICEINFO_MULTISERVICE_2 ( ImageManager ,
|
||||
::cppu::OWeakObject ,
|
||||
"com.sun.star.ui.ImageManager" ,
|
||||
OUString("com.sun.star.comp.framework.ImageManager")
|
||||
)
|
||||
|
||||
DEFINE_INIT_SERVICE ( ImageManager, {} )
|
||||
|
||||
ImageManager::ImageManager( const uno::Reference< uno::XComponentContext >& rxContext ) :
|
||||
ThreadHelpBase( &Application::GetSolarMutex() )
|
||||
, m_pImpl( new ImageManagerImpl(rxContext, this, false) )
|
||||
@@ -222,4 +207,14 @@ sal_Bool SAL_CALL ImageManager::isReadOnly() throw (::com::sun::star::uno::Runti
|
||||
|
||||
} // namespace framework
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
|
||||
com_sun_star_comp_framework_ImageManager_get_implementation(
|
||||
css::uno::XComponentContext *context,
|
||||
css::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
rtl::Reference<framework::ImageManager> x(new framework::ImageManager(context));
|
||||
x->acquire();
|
||||
return static_cast<cppu::OWeakObject *>(x.get());
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -47,7 +47,8 @@
|
||||
<implementation name="com.sun.star.comp.framework.GlobalAcceleratorConfiguration">
|
||||
<service name="com.sun.star.ui.GlobalAcceleratorConfiguration"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.framework.ImageManager">
|
||||
<implementation name="com.sun.star.comp.framework.ImageManager"
|
||||
constructor="com_sun_star_comp_framework_ImageManager_get_implementation">
|
||||
<service name="com.sun.star.ui.ImageManager"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.framework.JobExecutor">
|
||||
|
Reference in New Issue
Block a user