[Libreoffice-commits] .: 2 commits - fpicker/Library_fps_odma.mk fpicker/source postprocess/packcomponents
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 29 01:03:10 PST 2012
fpicker/Library_fps_odma.mk | 3
fpicker/source/generic/fpicker.cxx | 5
fpicker/source/odma/ODMAFilePicker.cxx | 17 --
fpicker/source/odma/ODMAFolderPicker.cxx | 178 -------------------------------
fpicker/source/odma/ODMAFolderPicker.hxx | 103 -----------------
fpicker/source/odma/exports.map | 24 ----
fpicker/source/odma/fps_odma.component | 16 ++
fpicker/source/odma/fps_odma.cxx | 20 ---
postprocess/packcomponents/makefile.mk | 1
9 files changed, 23 insertions(+), 344 deletions(-)
New commits:
commit 4fbefd7fea8c78a48a4f74527c33445e9130e625
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Nov 27 16:51:50 2012 +0100
Make ODMA file picker UNO component passive
Change-Id: I0f036781914b8aeec15dbfc8c99acefae935d1b7
diff --git a/fpicker/Library_fps_odma.mk b/fpicker/Library_fps_odma.mk
index 3ca62c5..17c0ff1 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 291f3f2..f94daee 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 1d40dc7..0000000
--- 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 0000000..62e1577
--- /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 49d0751..c8dce67 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: */
diff --git a/postprocess/packcomponents/makefile.mk b/postprocess/packcomponents/makefile.mk
index d3e2f09..a195b66 100644
--- a/postprocess/packcomponents/makefile.mk
+++ b/postprocess/packcomponents/makefile.mk
@@ -336,6 +336,7 @@ my_components += \
component/dtrans/util/dnd \
component/dtrans/util/ftransl \
component/dtrans/util/sysdtrans \
+ component/fpicker/source/odma/fps_odma \
component/fpicker/source/win32/fps \
component/shell/source/backends/wininetbe/wininetbe1 \
component/shell/source/win32/simplemail/smplmail \
commit 4a223b6ae7f84844035f56c037599d0c348d2d99
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Nov 27 16:15:49 2012 +0100
Remove useless ODMAFolderPicker
...that effectively is just a wrapper around a SystemFolderPicker service
implementation, as its m_bUseDMS is always false.
Change-Id: I95eb4a36fde0b98020b5fbe57e242cd2ae47ab8b
diff --git a/fpicker/Library_fps_odma.mk b/fpicker/Library_fps_odma.mk
index 63e9834..3ca62c5 100644
--- a/fpicker/Library_fps_odma.mk
+++ b/fpicker/Library_fps_odma.mk
@@ -53,7 +53,6 @@ endif
$(eval $(call gb_Library_add_exception_objects,fps_odma,\
fpicker/source/odma/fps_odma \
fpicker/source/odma/ODMAFilePicker \
- fpicker/source/odma/ODMAFolderPicker \
))
# vim: set noet sw=4 ts=4:
diff --git a/fpicker/source/generic/fpicker.cxx b/fpicker/source/generic/fpicker.cxx
index 4c4dd9a..cf1ec47 100644
--- a/fpicker/source/generic/fpicker.cxx
+++ b/fpicker/source/generic/fpicker.cxx
@@ -138,11 +138,6 @@ static OUString FolderPicker_getSystemPickerServiceName()
else if (aDesktopEnvironment.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("macosx")))
return OUString (RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.ui.dialogs.AquaFolderPicker"));
#endif
-#ifdef WNT
- if (SvtMiscOptions().TryODMADialog() && ::odma::DMSsAvailable()) {
- return OUString (RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.ui.dialogs.ODMAFolderPicker"));
- }
-#endif
return OUString (RTL_CONSTASCII_USTRINGPARAM ("com.sun.star.ui.dialogs.SystemFolderPicker"));
}
diff --git a/fpicker/source/odma/ODMAFolderPicker.cxx b/fpicker/source/odma/ODMAFolderPicker.cxx
deleted file mode 100644
index 05d4277..0000000
--- a/fpicker/source/odma/ODMAFolderPicker.cxx
+++ /dev/null
@@ -1,178 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * Copyright 2010 Novell, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "ODMAFolderPicker.hxx"
-
-#include <com/sun/star/container/XContentEnumerationAccess.hpp>
-#include <com/sun/star/container/XSet.hpp>
-#include <com/sun/star/uno/Any.hxx>
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/beans/XPropertySet.hpp>
-#include <unotools/pathoptions.hxx>
-
-#ifndef ODMA_LIB_HXX
-#include <windows.h>
-#include <odma_lib.hxx>
-#endif
-
-// using ----------------------------------------------------------------
-
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::uno;
-
-//------------------------------------------------------------------------------------
-// class ODMAFolderPicker
-//------------------------------------------------------------------------------------
-
-//------------------------------------------------------------------------------------
-ODMAFolderPicker::ODMAFolderPicker( const Reference < XMultiServiceFactory >& xFactory ) :
- cppu::WeakComponentImplHelper2<
- XFolderPicker,
- XServiceInfo>( m_rbHelperMtx ),
- m_bUseDMS( sal_False )
-{
- m_xInterface = xFactory->createInstance(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFolderPicker" ) ));
-}
-
-// XExecutableDialog functions
-
-void SAL_CALL ODMAFolderPicker::setTitle( const ::rtl::OUString& _rTitle ) throw (RuntimeException)
-{
- if (m_bUseDMS)
- return;
-
- Reference< XExecutableDialog > xExecutableDialog( m_xInterface, UNO_QUERY );
- xExecutableDialog->setTitle( _rTitle);
-}
-
-sal_Int16 SAL_CALL ODMAFolderPicker::execute( )
- throw (RuntimeException)
-{
- if (m_bUseDMS)
- throw new RuntimeException( );
-
- Reference< XExecutableDialog > xExecutableDialog( m_xInterface, UNO_QUERY );
- return xExecutableDialog->execute();
-}
-
-// XFolderPicker functions
-
-void SAL_CALL ODMAFolderPicker::setDisplayDirectory( const ::rtl::OUString& aDirectory )
- throw( IllegalArgumentException, RuntimeException )
-{
- if (m_bUseDMS)
- return;
-
- Reference< XFolderPicker > xFolderPicker( m_xInterface, UNO_QUERY );
- xFolderPicker->setDisplayDirectory( aDirectory );
-}
-
-::rtl::OUString SAL_CALL ODMAFolderPicker::getDisplayDirectory( )
- throw( RuntimeException )
-{
- if (m_bUseDMS)
- return rtl::OUString();
-
- Reference< XFolderPicker > xFolderPicker( m_xInterface, UNO_QUERY );
- return xFolderPicker->getDisplayDirectory();
-}
-
-::rtl::OUString SAL_CALL ODMAFolderPicker::getDirectory( )
- throw( RuntimeException )
-{
- if (m_bUseDMS)
- return rtl::OUString();
-
- Reference< XFolderPicker > xFolderPicker( m_xInterface, UNO_QUERY );
- return xFolderPicker->getDirectory();
-}
-
-void SAL_CALL ODMAFolderPicker::setDescription( const ::rtl::OUString& aDescription )
- throw( RuntimeException )
-{
- if (m_bUseDMS)
- return;
-
- Reference< XFolderPicker > xFolderPicker( m_xInterface, UNO_QUERY );
- xFolderPicker->setDescription( aDescription );
-}
-
-// XServiceInfo
-
-::rtl::OUString SAL_CALL ODMAFolderPicker::getImplementationName( )
- throw( RuntimeException )
-{
- return impl_getStaticImplementationName();
-}
-
-sal_Bool SAL_CALL ODMAFolderPicker::supportsService( const ::rtl::OUString& sServiceName )
- throw( RuntimeException )
-{
- Sequence< ::rtl::OUString > seqServiceNames = getSupportedServiceNames();
- const ::rtl::OUString* pArray = seqServiceNames.getConstArray();
- for ( sal_Int32 i = 0; i < seqServiceNames.getLength(); i++ )
- {
- if ( sServiceName == pArray[i] )
- {
- return sal_True ;
- }
- }
- return sal_False ;
-}
-
-Sequence< ::rtl::OUString > SAL_CALL ODMAFolderPicker::getSupportedServiceNames()
- throw( RuntimeException )
-{
- return impl_getStaticSupportedServiceNames();
-}
-
-Sequence< ::rtl::OUString > ODMAFolderPicker::impl_getStaticSupportedServiceNames( )
-{
- Sequence< ::rtl::OUString > seqServiceNames( 1 );
- ::rtl::OUString* pArray = seqServiceNames.getArray();
- pArray[0] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.ODMAFolderPicker" ));
- return seqServiceNames ;
-}
-
-::rtl::OUString ODMAFolderPicker::impl_getStaticImplementationName( )
-{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.svtools.ODMAFolderPicker" ));
-}
-
-Reference< XInterface > SAL_CALL ODMAFolderPicker::impl_createInstance( const Reference< XComponentContext >& rxContext )
- throw( Exception )
-{
- Reference< XMultiServiceFactory > xServiceManager (rxContext->getServiceManager(), UNO_QUERY_THROW);
- return Reference< XInterface >( *new ODMAFolderPicker( xServiceManager ) );
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/odma/ODMAFolderPicker.hxx b/fpicker/source/odma/ODMAFolderPicker.hxx
deleted file mode 100644
index 880d5a5..0000000
--- a/fpicker/source/odma/ODMAFolderPicker.hxx
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- * Copyright 2010 Novell, Inc.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_ODMA_FOLDERPICKER_HXX
-#define INCLUDED_ODMA_FOLDERPICKER_HXX
-
-#include <cppuhelper/compbase2.hxx>
-
-#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <com/sun/star/lang/DisposedException.hpp>
-#include <com/sun/star/uno/XComponentContext.hpp>
-
-// class ODMAFolderPicker ---------------------------------------------------
-
-class ODMAFolderPicker :
- public cppu::WeakComponentImplHelper2<
- ::com::sun::star::ui::dialogs::XFolderPicker,
- ::com::sun::star::lang::XServiceInfo >
-{
-private:
- sal_Bool m_bUseDMS;
-
-protected:
- ::osl::Mutex m_rbHelperMtx;
-
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xInterface;
-
-public:
- ODMAFolderPicker( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
-
- // XFolderPicker functions
-
- virtual void SAL_CALL setDisplayDirectory( const ::rtl::OUString& aDirectory )
- throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
-
- virtual ::rtl::OUString SAL_CALL getDisplayDirectory( )
- throw( ::com::sun::star::uno::RuntimeException );
-
- virtual ::rtl::OUString SAL_CALL getDirectory( )
- throw( ::com::sun::star::uno::RuntimeException );
-
- virtual void SAL_CALL setDescription( const ::rtl::OUString& aDescription )
- throw ( ::com::sun::star::uno::RuntimeException );
-
- // XExecutableDialog functions
-
- virtual void SAL_CALL setTitle( const ::rtl::OUString& _rTitle )
- throw (::com::sun::star::uno::RuntimeException);
-
- virtual sal_Int16 SAL_CALL execute( )
- throw (::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo functions
-
- virtual ::rtl::OUString SAL_CALL getImplementationName( )
- throw( ::com::sun::star::uno::RuntimeException );
-
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName )
- throw( ::com::sun::star::uno::RuntimeException );
-
- virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( )
- throw( ::com::sun::star::uno::RuntimeException );
-
- /* Helper for XServiceInfo */
- static com::sun::star::uno::Sequence< ::rtl::OUString > impl_getStaticSupportedServiceNames( );
- static ::rtl::OUString impl_getStaticImplementationName( );
-
- /* Helper for registry */
- static ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL impl_createInstance ( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext )
- throw( com::sun::star::uno::Exception );
-};
-
-#endif // INCLUDED_ODMA_FOLDERPICKER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/odma/fps_odma.cxx b/fpicker/source/odma/fps_odma.cxx
index 950e553..49d0751 100644
--- a/fpicker/source/odma/fps_odma.cxx
+++ b/fpicker/source/odma/fps_odma.cxx
@@ -22,7 +22,6 @@
#include "cppuhelper/implementationentry.hxx"
#include "ODMAFilePicker.hxx"
-#include "ODMAFolderPicker.hxx"
static cppu::ImplementationEntry g_entries[] =
{
@@ -32,12 +31,6 @@ static cppu::ImplementationEntry g_entries[] =
ODMAFilePicker::impl_getStaticSupportedServiceNames,
cppu::createSingleComponentFactory, 0, 0
},
- {
- ODMAFolderPicker::impl_createInstance,
- ODMAFolderPicker::impl_getStaticImplementationName,
- ODMAFolderPicker::impl_getStaticSupportedServiceNames,
- cppu::createSingleComponentFactory, 0, 0
- },
{ 0, 0, 0, 0, 0, 0 }
};
More information about the Libreoffice-commits
mailing list