Kaydet (Commit) 668d6ada authored tarafından Marcos Paulo de Souza's avatar Marcos Paulo de Souza Kaydeden (comit) Jan Holesovsky

fdo#60698: Unify spl and spl_unx

Change-Id: Ifd328ff3ce12364e95d05405759df6588b3a86bc
Reviewed-on: https://gerrit.libreoffice.org/6503Tested-by: 's avatarLibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst a50a2111
...@@ -429,14 +429,6 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \ ...@@ -429,14 +429,6 @@ $(eval $(call gb_Helper_register_libraries,OOOLIBS, \
endif endif
ifeq ($(filter MACOSX WNT,$(OS)),)
$(eval $(call gb_Helper_register_libraries,OOOLIBS, \
spl_unx \
))
endif
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
getuid \ getuid \
smoketest \ smoketest \
......
...@@ -35,6 +35,7 @@ $(eval $(call gb_Library_set_componentfile,spl,desktop/source/splash/spl)) ...@@ -35,6 +35,7 @@ $(eval $(call gb_Library_set_componentfile,spl,desktop/source/splash/spl))
$(eval $(call gb_Library_add_exception_objects,spl,\ $(eval $(call gb_Library_add_exception_objects,spl,\
desktop/source/splash/services_spl \ desktop/source/splash/services_spl \
desktop/source/splash/splash \ desktop/source/splash/splash \
desktop/source/splash/unxsplash \
)) ))
# vim: set ts=4 sw=4 et: # vim: set ts=4 sw=4 et:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_Library_Library,spl_unx))
$(eval $(call gb_Library_use_sdk_api,spl_unx))
$(eval $(call gb_Library_use_libraries,spl_unx,\
cppu \
cppuhelper \
sal \
))
$(eval $(call gb_Library_set_componentfile,spl_unx,desktop/unx/splash/splash))
$(eval $(call gb_Library_add_exception_objects,spl_unx,\
desktop/unx/splash/unxsplash \
))
# vim: set ts=4 sw=4 et:
...@@ -104,7 +104,6 @@ else ...@@ -104,7 +104,6 @@ else
$(eval $(call gb_Module_add_targets,desktop,\ $(eval $(call gb_Module_add_targets,desktop,\
Executable_oosplash \ Executable_oosplash \
Library_spl_unx \
)) ))
endif endif
......
...@@ -24,13 +24,23 @@ ...@@ -24,13 +24,23 @@
#include "sal/types.h" #include "sal/types.h"
#include "splash.hxx" #include "splash.hxx"
#include "unxsplash.hxx"
namespace { namespace {
static cppu::ImplementationEntry const services[] = { static cppu::ImplementationEntry const services[] = {
{ &desktop::splash::create, &desktop::splash::getImplementationName, {
&desktop::splash::create,
&desktop::splash::getImplementationName,
&desktop::splash::getSupportedServiceNames, &desktop::splash::getSupportedServiceNames,
&cppu::createSingleComponentFactory, 0, 0 }, &cppu::createSingleComponentFactory, 0, 0
},
{
UnxSplash_createInstance,
UnxSplash_getImplementationName,
UnxSplash_getSupportedServiceNames,
::cppu::createSingleComponentFactory, 0, 0
},
{ 0, 0, 0, 0, 0, 0 } { 0, 0, 0, 0, 0, 0 }
}; };
......
...@@ -25,4 +25,7 @@ ...@@ -25,4 +25,7 @@
<implementation name="com.sun.star.office.comp.SplashScreen"> <implementation name="com.sun.star.office.comp.SplashScreen">
<service name="com.sun.star.office.SplashScreen"/> <service name="com.sun.star.office.SplashScreen"/>
</implementation> </implementation>
<implementation name="com.sun.star.office.comp.PipeSplashScreen">
<service name="com.sun.star.office.PipeSplashScreen"/>
</implementation>
</component> </component>
...@@ -20,18 +20,13 @@ ...@@ -20,18 +20,13 @@
#include "unxsplash.hxx" #include "unxsplash.hxx"
#include <stdio.h> #include <stdio.h>
#include <osl/process.h> #include <osl/process.h>
#include <com/sun/star/registry/XRegistryKey.hpp> //#include <com/sun/star/registry/XRegistryKey.hpp>
#include <cppuhelper/implementationentry.hxx> #include <cppuhelper/implementationentry.hxx>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx> #include <rtl/math.hxx>
#define PIPE_ARG "--splash-pipe=" #define PIPE_ARG "--splash-pipe="
using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::uno;
namespace desktop namespace desktop
{ {
UnxSplashScreen::UnxSplashScreen( const Reference< uno::XComponentContext >& xCtx ) UnxSplashScreen::UnxSplashScreen( const Reference< uno::XComponentContext >& xCtx )
...@@ -130,7 +125,7 @@ using namespace desktop; ...@@ -130,7 +125,7 @@ using namespace desktop;
// get service instance... // get service instance...
static uno::Reference< uno::XInterface > m_xINSTANCE; static uno::Reference< uno::XInterface > m_xINSTANCE;
uno::Reference< uno::XInterface > SAL_CALL UnxSplash_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception ) uno::Reference< uno::XInterface > UnxSplash_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{ {
static osl::Mutex m_aMutex; static osl::Mutex m_aMutex;
if ( !m_xINSTANCE.is() ) if ( !m_xINSTANCE.is() )
...@@ -148,34 +143,11 @@ OUString UnxSplash_getImplementationName() ...@@ -148,34 +143,11 @@ OUString UnxSplash_getImplementationName()
return OUString( "com.sun.star.office.comp.PipeSplashScreen" ); return OUString( "com.sun.star.office.comp.PipeSplashScreen" );
} }
uno::Sequence< OUString > SAL_CALL UnxSplash_getSupportedServiceNames() throw() uno::Sequence< OUString > UnxSplash_getSupportedServiceNames() throw()
{ {
const OUString aServiceName( "com.sun.star.office.PipeSplashScreen" ); const OUString aServiceName( "com.sun.star.office.PipeSplashScreen" );
const uno::Sequence< OUString > aSeq( &aServiceName, 1 ); const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
return aSeq; return aSeq;
} }
::cppu::ImplementationEntry aEntries[] =
{
{
UnxSplash_createInstance, UnxSplash_getImplementationName,
UnxSplash_getSupportedServiceNames,
::cppu::createSingleComponentFactory,
0, 0
},
{ 0, 0, 0, 0, 0, 0 }
};
extern "C"
{
SAL_DLLPUBLIC_EXPORT void* SAL_CALL splash_component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey )
{
return ::cppu::component_getFactoryHelper( pImplName, pServiceManager,
pRegistryKey, aEntries );
}
} // extern "C"
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Reference.h>
#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp> #include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XInitialization.hpp>
#include <cppuhelper/implbase2.hxx> #include <cppuhelper/implbase2.hxx>
...@@ -21,6 +22,11 @@ ...@@ -21,6 +22,11 @@
#include <osl/mutex.hxx> #include <osl/mutex.hxx>
#include <rtl/bootstrap.hxx> #include <rtl/bootstrap.hxx>
using namespace ::rtl;
using namespace ::com::sun::star;
using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::uno;
namespace desktop { namespace desktop {
class UnxSplashScreen : public ::cppu::WeakImplHelper2< css::task::XStatusIndicator, css::lang::XInitialization > class UnxSplashScreen : public ::cppu::WeakImplHelper2< css::task::XStatusIndicator, css::lang::XInitialization >
...@@ -56,4 +62,8 @@ public: ...@@ -56,4 +62,8 @@ public:
} }
uno::Reference< uno::XInterface > SAL_CALL UnxSplash_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception );
OUString UnxSplash_getImplementationName();
com::sun::star::uno::Sequence< OUString > SAL_CALL UnxSplash_getSupportedServiceNames() throw ();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
<?xml version="1.0" encoding="UTF-8"?>
<!--
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
-->
<component loader="com.sun.star.loader.SharedLibrary" prefix="splash"
xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.office.comp.PipeSplashScreen">
<service name="com.sun.star.office.PipeSplashScreen"/>
</implementation>
</component>
...@@ -333,7 +333,6 @@ $(eval $(call gb_Rdb_add_components,services,\ ...@@ -333,7 +333,6 @@ $(eval $(call gb_Rdb_add_components,services,\
shell/source/unix/exec/syssh \ shell/source/unix/exec/syssh \
) \ ) \
$(if $(filter-out MACOSX WNT,$(OS)), \ $(if $(filter-out MACOSX WNT,$(OS)), \
desktop/unx/splash/splash \
$(if $(ENABLE_HEADLESS),, \ $(if $(ENABLE_HEADLESS),, \
shell/source/backends/desktopbe/desktopbe1 \ shell/source/backends/desktopbe/desktopbe1 \
vcl/vcl.unx \ vcl/vcl.unx \
......
...@@ -287,10 +287,6 @@ End ...@@ -287,10 +287,6 @@ End
#endif #endif
#if defined UNX && !defined MACOSX && !defined LIBO_HEADLESS
STD_LIB_FILE( gid_File_Lib_Spl_Unx, spl_unx)
#endif
#if ! defined UNX #if ! defined UNX
File gid_File_Lib_Sysdtrans File gid_File_Lib_Sysdtrans
PACKED_LIB_FILE_BODY; PACKED_LIB_FILE_BODY;
......
...@@ -85,7 +85,6 @@ gb_EXTRAMERGEDLIBS := \ ...@@ -85,7 +85,6 @@ gb_EXTRAMERGEDLIBS := \
$(call gb_Helper_optional,DBCONNECTIVITY,sdbc2) \ $(call gb_Helper_optional,DBCONNECTIVITY,sdbc2) \
$(if $(filter unx,$(GUIBASE)),spa) \ $(if $(filter unx,$(GUIBASE)),spa) \
spell \ spell \
$(if $(filter-out WNT MACOSX ANDROID IOS,$(OS)),spl_unx) \
svgfilter \ svgfilter \
swd \ swd \
t602filter \ t602filter \
......
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