summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-11-27 16:51:50 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-11-29 10:02:40 +0100
commit4fbefd7fea8c78a48a4f74527c33445e9130e625 (patch)
tree29e163752f2a32467486c2409dc6247b8aea507f /fpicker
parent4a223b6ae7f84844035f56c037599d0c348d2d99 (diff)
Make ODMA file picker UNO component passive
Change-Id: I0f036781914b8aeec15dbfc8c99acefae935d1b7
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/Library_fps_odma.mk2
-rw-r--r--fpicker/source/odma/ODMAFilePicker.cxx17
-rw-r--r--fpicker/source/odma/exports.map24
-rw-r--r--fpicker/source/odma/fps_odma.component16
-rw-r--r--fpicker/source/odma/fps_odma.cxx13
5 files changed, 22 insertions, 50 deletions
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 @@
+<?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="fps_odma"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.svtools.ODMAFilePicker">
+ <service name="com.sun.star.ui.dialogs.SystemFilePicker"/>
+ </implementation>
+</component>
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: */