From 4fbefd7fea8c78a48a4f74527c33445e9130e625 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 27 Nov 2012 16:51:50 +0100 Subject: Make ODMA file picker UNO component passive Change-Id: I0f036781914b8aeec15dbfc8c99acefae935d1b7 --- fpicker/Library_fps_odma.mk | 2 ++ fpicker/source/odma/ODMAFilePicker.cxx | 17 +++-------------- fpicker/source/odma/exports.map | 24 ------------------------ fpicker/source/odma/fps_odma.component | 16 ++++++++++++++++ fpicker/source/odma/fps_odma.cxx | 13 +------------ 5 files changed, 22 insertions(+), 50 deletions(-) delete mode 100644 fpicker/source/odma/exports.map create mode 100644 fpicker/source/odma/fps_odma.component (limited to 'fpicker') diff --git a/fpicker/Library_fps_odma.mk b/fpicker/Library_fps_odma.mk index 3ca62c56619a..17c0ff13935a 100644 --- a/fpicker/Library_fps_odma.mk +++ b/fpicker/Library_fps_odma.mk @@ -27,6 +27,8 @@ $(eval $(call gb_Library_Library,fps_odma)) +$(eval $(call gb_Library_set_componentfile,fps_odma,fpicker/source/odma/fps_odma)) + $(eval $(call gb_Library_use_sdk_api,fps_odma)) $(eval $(call gb_Library_use_libraries,fps_odma,\ diff --git a/fpicker/source/odma/ODMAFilePicker.cxx b/fpicker/source/odma/ODMAFilePicker.cxx index 291f3f2c1ac3..f94daee727ee 100644 --- a/fpicker/source/odma/ODMAFilePicker.cxx +++ b/fpicker/source/odma/ODMAFilePicker.cxx @@ -514,20 +514,9 @@ Sequence< rtl::OUString > SAL_CALL ODMAFilePicker::getSupportedServiceNames( ) Sequence< rtl::OUString > ODMAFilePicker::impl_getStaticSupportedServiceNames( ) { - Sequence< rtl::OUString > seqServiceNames( 2 ); - rtl::OUString* pArray = seqServiceNames.getArray(); - pArray[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.ODMAFilePicker" )); - - // Super-ugly, but check the function sal_Bool - // lcl_isSystemFilePicker( const Reference< XFilePicker >& ) in - // sfx2/source/dialog/filedlghelper.cxx - - // Lovely undocumented coupling right across abstraction layers, - // isn't it? If we don't claim to implement this "service" (which - // is not defined in any IDL file, btw), we get hangs. - - pArray[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFilePicker" )); - return seqServiceNames ; + Sequence< OUString > s(1); + s[0] = "com.sun.star.ui.dialogs.SystemFilePicker"; + return s; } rtl::OUString ODMAFilePicker::impl_getStaticImplementationName( ) diff --git a/fpicker/source/odma/exports.map b/fpicker/source/odma/exports.map deleted file mode 100644 index 1d40dc720b86..000000000000 --- a/fpicker/source/odma/exports.map +++ /dev/null @@ -1,24 +0,0 @@ -# -# 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 . -# -UDK_3_0_0 { - global: - component_writeInfo; - component_getFactory; - local: - *; -}; diff --git a/fpicker/source/odma/fps_odma.component b/fpicker/source/odma/fps_odma.component new file mode 100644 index 000000000000..62e15776a124 --- /dev/null +++ b/fpicker/source/odma/fps_odma.component @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/fpicker/source/odma/fps_odma.cxx b/fpicker/source/odma/fps_odma.cxx index 49d0751f058e..c8dce67d4c50 100644 --- a/fpicker/source/odma/fps_odma.cxx +++ b/fpicker/source/odma/fps_odma.cxx @@ -34,22 +34,11 @@ static cppu::ImplementationEntry g_entries[] = { 0, 0, 0, 0, 0, 0 } }; -extern "C" -{ -SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo ( - void * pServiceManager, void * pRegistryKey) -{ - return cppu::component_writeInfoHelper ( - pServiceManager, pRegistryKey, g_entries); -} - -SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL fps_odma_component_getFactory ( const sal_Char * pImplementationName, void * pServiceManager, void * pRegistryKey) { return cppu::component_getFactoryHelper ( pImplementationName, pServiceManager, pRegistryKey, g_entries); } -} // extern "C" - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit