Repository.mk | 1 postprocess/Rdb_services.mk | 1 svtools/Library_hatchwindowfactory.mk | 51 --------- svtools/Library_svt.mk | 4 svtools/Module_svtools.mk | 1 svtools/source/hatchwindow/documentcloser.hxx | 82 ---------------- svtools/source/hatchwindow/hatchwindow.hxx | 72 -------------- svtools/source/hatchwindow/hatchwindowfactory.component | 29 ----- svtools/source/hatchwindow/hatchwindowfactory.cxx | 44 -------- svtools/source/hatchwindow/hatchwindowfactory.hxx | 65 ------------ svtools/source/inc/documentcloser.hxx | 82 ++++++++++++++++ svtools/source/inc/hatchwindow.hxx | 72 ++++++++++++++ svtools/source/inc/hatchwindowfactory.hxx | 65 ++++++++++++ svtools/source/uno/miscservices.cxx | 32 ++++-- svtools/util/svt.component | 7 + 15 files changed, 252 insertions(+), 356 deletions(-)
New commits: commit 35c1d6f7617087c18b94e03ec9281c995e6d9e55 Author: Marcos Paulo de Souza <marcos.souza....@gmail.com> Date: Tue Nov 26 00:03:50 2013 -0200 fdo#60698: Merge hatchwindowfactory into svt They are used at same conditions, and hatchwindowfactory just have four files, so we don'y have any reason to keep them separated. Change-Id: Iae3bb26ab1e95a309bf0d83c4ef17a0bf0261179 Reviewed-on: https://gerrit.libreoffice.org/6811 Tested-by: LibreOffice gerrit bot <ger...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/Repository.mk b/Repository.mk index 60a0c76..02bfe0c 100644 --- a/Repository.mk +++ b/Repository.mk @@ -273,7 +273,6 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \ $(if $(filter DESKTOP,$(BUILD_TYPE)),helplinker) \ i18npool \ i18nsearch \ - hatchwindowfactory \ hyphen \ icd \ icg \ diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk index e07017d..fc7c671 100755 --- a/postprocess/Rdb_services.mk +++ b/postprocess/Rdb_services.mk @@ -80,7 +80,6 @@ $(eval $(call gb_Rdb_add_components,services,\ svl/source/fsstor/fsstorage \ svl/source/passwordcontainer/passwordcontainer \ svl/util/svl \ - svtools/source/hatchwindow/hatchwindowfactory \ svtools/util/svt \ svgio/svgio \ svx/util/svx \ diff --git a/svtools/Library_hatchwindowfactory.mk b/svtools/Library_hatchwindowfactory.mk deleted file mode 100644 index 7511ece..0000000 --- a/svtools/Library_hatchwindowfactory.mk +++ /dev/null @@ -1,51 +0,0 @@ -# -*- 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/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# - -$(eval $(call gb_Library_Library,hatchwindowfactory)) - -$(eval $(call gb_Library_set_componentfile,hatchwindowfactory,svtools/source/hatchwindow/hatchwindowfactory)) - -$(eval $(call gb_Library_set_include,hatchwindowfactory,\ - $$(INCLUDE) \ - -I$(SRCDIR)/svtools/inc \ -)) - -$(eval $(call gb_Library_use_external,hatchwindowfactory,boost_headers)) - -$(eval $(call gb_Library_use_sdk_api,hatchwindowfactory)) - -$(eval $(call gb_Library_use_libraries,hatchwindowfactory,\ - comphelper \ - cppu \ - cppuhelper \ - sal \ - tk \ - tl \ - vcl \ - $(gb_UWINAPI) \ -)) - -$(eval $(call gb_Library_add_exception_objects,hatchwindowfactory,\ - svtools/source/hatchwindow/documentcloser \ - svtools/source/hatchwindow/hatchwindow \ - svtools/source/hatchwindow/hatchwindowfactory \ - svtools/source/hatchwindow/ipwin \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/svtools/Library_svt.mk b/svtools/Library_svt.mk index eb1ba8c..915c5b8 100644 --- a/svtools/Library_svt.mk +++ b/svtools/Library_svt.mk @@ -161,6 +161,10 @@ $(eval $(call gb_Library_add_exception_objects,svt,\ svtools/source/graphic/provider \ svtools/source/graphic/renderer \ svtools/source/graphic/transformer \ + svtools/source/hatchwindow/documentcloser \ + svtools/source/hatchwindow/hatchwindow \ + svtools/source/hatchwindow/hatchwindowfactory \ + svtools/source/hatchwindow/ipwin \ $(if $(ENABLE_JAVA), \ svtools/source/java/javacontext \ svtools/source/java/javainteractionhandler) \ diff --git a/svtools/Module_svtools.mk b/svtools/Module_svtools.mk index e2a3512..edef7d5 100644 --- a/svtools/Module_svtools.mk +++ b/svtools/Module_svtools.mk @@ -20,7 +20,6 @@ $(eval $(call gb_Module_Module,svtools)) $(eval $(call gb_Module_add_targets,svtools,\ - Library_hatchwindowfactory \ Library_svt \ UIConfig_svt \ )) diff --git a/svtools/source/hatchwindow/hatchwindowfactory.component b/svtools/source/hatchwindow/hatchwindowfactory.component deleted file mode 100644 index 193ae42..0000000 --- a/svtools/source/hatchwindow/hatchwindowfactory.component +++ /dev/null @@ -1,29 +0,0 @@ -<?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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - --> - -<component loader="com.sun.star.loader.SharedLibrary" prefix="hatchwindowfactory" - xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="com.sun.star.comp.embed.DocumentCloser"> - <service name="com.sun.star.embed.DocumentCloser"/> - </implementation> - <implementation name="com.sun.star.comp.embed.HatchWindowFactory"> - <service name="com.sun.star.comp.embed.HatchWindowFactory"/> - <service name="com.sun.star.embed.HatchWindowFactory"/> - </implementation> -</component> diff --git a/svtools/source/hatchwindow/hatchwindowfactory.cxx b/svtools/source/hatchwindow/hatchwindowfactory.cxx index b0f6fd0..f728add 100644 --- a/svtools/source/hatchwindow/hatchwindowfactory.cxx +++ b/svtools/source/hatchwindow/hatchwindowfactory.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "hatchwindowfactory.hxx" #include "hatchwindow.hxx" #include "cppuhelper/factory.hxx" @@ -28,7 +27,6 @@ using namespace ::com::sun::star; -//------------------------------------------------------------------------- uno::Sequence< OUString > SAL_CALL OHatchWindowFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< OUString > aRet(2); @@ -37,21 +35,17 @@ uno::Sequence< OUString > SAL_CALL OHatchWindowFactory::impl_staticGetSupportedS return aRet; } -//------------------------------------------------------------------------- OUString SAL_CALL OHatchWindowFactory::impl_staticGetImplementationName() { return OUString( "com.sun.star.comp.embed.HatchWindowFactory" ); } -//------------------------------------------------------------------------- uno::Reference< uno::XInterface > SAL_CALL OHatchWindowFactory::impl_staticCreateSelfInstance( const uno::Reference< lang::XMultiServiceFactory >& xServiceManager ) { return uno::Reference< uno::XInterface >( *new OHatchWindowFactory( xServiceManager ) ); } - -//------------------------------------------------------------------------- uno::Reference< embed::XHatchWindow > SAL_CALL OHatchWindowFactory::createHatchWindowInstance( const uno::Reference< awt::XWindowPeer >& xParent, const awt::Rectangle& aBounds, @@ -85,42 +79,4 @@ uno::Sequence< OUString > SAL_CALL OHatchWindowFactory::getSupportedServiceNames return impl_staticGetSupportedServiceNames(); } -extern "C" -{ - -SAL_DLLPUBLIC_EXPORT void * SAL_CALL hatchwindowfactory_component_getFactory ( - const sal_Char * pImplementationName, void * pServiceManager, void * /* pRegistryKey */) -{ - void * pResult = 0; - if (pServiceManager) - { - uno::Reference< lang::XSingleServiceFactory > xFactory; - if (OHatchWindowFactory::impl_staticGetImplementationName().equalsAscii(pImplementationName )) - { - xFactory = cppu::createOneInstanceFactory( - reinterpret_cast< lang::XMultiServiceFactory* >(pServiceManager), - OHatchWindowFactory::impl_staticGetImplementationName(), - OHatchWindowFactory::impl_staticCreateSelfInstance, - OHatchWindowFactory::impl_staticGetSupportedServiceNames()); - } - else if (ODocumentCloser::impl_staticGetImplementationName().equalsAscii(pImplementationName )) - { - xFactory = cppu::createSingleFactory( - reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ), - ODocumentCloser::impl_staticGetImplementationName(), - ODocumentCloser::impl_staticCreateSelfInstance, - ODocumentCloser::impl_staticGetSupportedServiceNames() ); - } - - if (xFactory.is()) - { - xFactory->acquire(); - pResult = xFactory.get(); - } - } - return pResult; -} - -} // extern "C" - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/hatchwindow/documentcloser.hxx b/svtools/source/inc/documentcloser.hxx similarity index 100% rename from svtools/source/hatchwindow/documentcloser.hxx rename to svtools/source/inc/documentcloser.hxx diff --git a/svtools/source/hatchwindow/hatchwindow.hxx b/svtools/source/inc/hatchwindow.hxx similarity index 100% rename from svtools/source/hatchwindow/hatchwindow.hxx rename to svtools/source/inc/hatchwindow.hxx diff --git a/svtools/source/hatchwindow/hatchwindowfactory.hxx b/svtools/source/inc/hatchwindowfactory.hxx similarity index 100% rename from svtools/source/hatchwindow/hatchwindowfactory.hxx rename to svtools/source/inc/hatchwindowfactory.hxx diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx index afd04f4..38f2900 100644 --- a/svtools/source/uno/miscservices.cxx +++ b/svtools/source/uno/miscservices.cxx @@ -26,6 +26,9 @@ #include <com/sun/star/registry/XRegistryKey.hpp> #include <osl/diagnose.h> #include <uno/mapping.hxx> +#include "documentcloser.hxx" +#include "hatchwindowfactory.hxx" +#include "hatchwindow.hxx" #include "fpicker.hxx" #include "provider.hxx" #include "renderer.hxx" @@ -48,8 +51,6 @@ namespace unographic { extern sdecl::ServiceDecl const serviceDecl; } -// ------------------------------------------------------------------------------------- - // for CreateInstance functions implemented elsewhere #define DECLARE_CREATEINSTANCE( ImplName ) \ Reference< XInterface > SAL_CALL ImplName##_CreateInstance( const Reference< XMultiServiceFactory >& ); @@ -86,14 +87,11 @@ namespace }; } -// ------------------------------------------------------------------------------------- - DECLARE_CREATEINSTANCE_NAMESPACE( svt, OAddressBookSourceDialogUno ) DECLARE_CREATEINSTANCE( SvFilterOptionsDialog ) DECLARE_CREATEINSTANCE_NAMESPACE( unographic, GraphicProvider ) DECLARE_CREATEINSTANCE_NAMESPACE( unographic, GraphicRendererVCL ) -// ------------------------------------------------------------------------------------- extern "C" { @@ -144,18 +142,32 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svt_component_getFactory ( GraphicRendererVCL_CreateInstance, GraphicRendererVCL::getSupportedServiceNames_Static() ); } + else if (rtl_str_compare (pImplementationName, "com.sun.star.comp.embed.DocumentCloser") == 0) + { + xFactory = ::cppu::createOneInstanceFactory(xSMgr, + ODocumentCloser::impl_staticGetImplementationName(), + ODocumentCloser::impl_staticCreateSelfInstance, + ODocumentCloser::impl_staticGetSupportedServiceNames()); + } + else if (rtl_str_compare (pImplementationName, "com.sun.star.comp.embed.HatchWindowFactory") == 0) + { + xFactory = ::cppu::createOneInstanceFactory(xSMgr, + OHatchWindowFactory::impl_staticGetImplementationName(), + OHatchWindowFactory::impl_staticCreateSelfInstance, + OHatchWindowFactory::impl_staticGetSupportedServiceNames()); + } else { pResult = comphelper::service_decl::component_getFactoryHelper( pImplementationName, - static_cast<css::lang::XMultiServiceFactory *>( - _pServiceManager), + static_cast<css::lang::XMultiServiceFactory *>(_pServiceManager), static_cast<css::registry::XRegistryKey *>(pRegistryKey), serviceDecl ); if ( !pResult ) - pResult = cppu::component_getFactoryHelper( - pImplementationName, _pServiceManager, pRegistryKey, - s_aServiceEntries ); + pResult = cppu::component_getFactoryHelper(pImplementationName, + _pServiceManager, + pRegistryKey, + s_aServiceEntries); } if ( xFactory.is() ) diff --git a/svtools/util/svt.component b/svtools/util/svt.component index 249448b..efc97f9 100644 --- a/svtools/util/svt.component +++ b/svtools/util/svt.component @@ -43,4 +43,11 @@ <implementation name="com.sun.star.comp.svt.FolderPicker"> <service name="com.sun.star.ui.dialogs.FolderPicker"/> </implementation> + <implementation name="com.sun.star.comp.embed.DocumentCloser"> + <service name="com.sun.star.embed.DocumentCloser"/> + </implementation> + <implementation name="com.sun.star.comp.embed.HatchWindowFactory"> + <service name="com.sun.star.comp.embed.HatchWindowFactory"/> + <service name="com.sun.star.embed.HatchWindowFactory"/> + </implementation> </component>
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits