summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-04-02 15:40:10 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-04-02 18:30:40 +0200
commit8863cc9e03a6f30ff6655ec8dc951b6292108c58 (patch)
tree0178dc73bde21da2a32e39b0e6fb8bbe337ebe15
parent67ae25dcfafaff5eb7ffa6c8d08637fd91d02b55 (diff)
KDE3 file picker moved from fpicker to vcl
-rw-r--r--fpicker/Library_fps_kde.mk58
-rw-r--r--fpicker/Module_fpicker.mk11
-rw-r--r--fpicker/source/unx/kde_unx/UnxFPentry.cxx110
-rw-r--r--fpicker/source/unx/kde_unx/fps-kde-ucd.txt6
-rw-r--r--fpicker/source/unx/kde_unx/fps_kde.xml51
-rw-r--r--vcl/Executable_kdefilepicker.mk (renamed from fpicker/Executable_kdefilepicker.mk)12
-rw-r--r--vcl/Library_vclplug_kde.mk3
-rw-r--r--vcl/Package_kde_moc.mk (renamed from fpicker/Package_kde_moc.mk)8
-rw-r--r--vcl/inc/unx/kde/kdedata.hxx6
-rw-r--r--vcl/unx/kde/FPServiceInfo.hxx (renamed from fpicker/source/unx/kde_unx/FPServiceInfo.hxx)0
-rw-r--r--vcl/unx/kde/UnxCommandThread.cxx (renamed from fpicker/source/unx/kde_unx/UnxCommandThread.cxx)0
-rw-r--r--vcl/unx/kde/UnxCommandThread.hxx (renamed from fpicker/source/unx/kde_unx/UnxCommandThread.hxx)0
-rw-r--r--vcl/unx/kde/UnxFilePicker.cxx (renamed from fpicker/source/unx/kde_unx/UnxFilePicker.cxx)18
-rw-r--r--vcl/unx/kde/UnxFilePicker.hxx (renamed from fpicker/source/unx/kde_unx/UnxFilePicker.hxx)15
-rw-r--r--vcl/unx/kde/UnxNotifyThread.cxx (renamed from fpicker/source/unx/kde_unx/UnxNotifyThread.cxx)0
-rw-r--r--vcl/unx/kde/UnxNotifyThread.hxx (renamed from fpicker/source/unx/kde_unx/UnxNotifyThread.hxx)0
-rw-r--r--vcl/unx/kde/fpicker/Makefile (renamed from fpicker/source/unx/kde/Makefile)4
-rw-r--r--vcl/unx/kde/fpicker/kdecommandthread.cxx (renamed from fpicker/source/unx/kde/kdecommandthread.cxx)0
-rw-r--r--vcl/unx/kde/fpicker/kdecommandthread.hxx (renamed from fpicker/source/unx/kde/kdecommandthread.hxx)0
-rw-r--r--vcl/unx/kde/fpicker/kdefilepicker.cxx (renamed from fpicker/source/unx/kde/kdefilepicker.cxx)0
-rw-r--r--vcl/unx/kde/fpicker/kdefilepicker.hxx (renamed from fpicker/source/unx/kde/kdefilepicker.hxx)0
-rw-r--r--vcl/unx/kde/fpicker/kdefpmain.cxx (renamed from fpicker/source/unx/kde/kdefpmain.cxx)0
-rw-r--r--vcl/unx/kde/fpicker/kdemodalityfilter.cxx (renamed from fpicker/source/unx/kde/kdemodalityfilter.cxx)0
-rw-r--r--vcl/unx/kde/fpicker/kdemodalityfilter.hxx (renamed from fpicker/source/unx/kde/kdemodalityfilter.hxx)0
-rw-r--r--vcl/unx/kde/salnativewidgets-kde.cxx10
25 files changed, 53 insertions, 259 deletions
diff --git a/fpicker/Library_fps_kde.mk b/fpicker/Library_fps_kde.mk
deleted file mode 100644
index d7878ef040bd..000000000000
--- a/fpicker/Library_fps_kde.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-# -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
-#
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# Copyright (C) 2011 Matúš Kukan <matus.kukan@gmail.com> (initial developer)
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Library_Library,fps_kde))
-
-$(eval $(call gb_Library_add_api,fps_kde,\
- offapi \
- udkapi \
-))
-
-$(eval $(call gb_Library_add_linked_libs,fps_kde,\
- cppu \
- cppuhelper \
- sal \
- tl \
- vcl \
- $(gb_STDLIBS) \
-))
-
-$(eval $(call gb_Library_add_exception_objects,fps_kde,\
- fpicker/source/unx/kde_unx/UnxCommandThread \
- fpicker/source/unx/kde_unx/UnxFilePicker \
- fpicker/source/unx/kde_unx/UnxFPentry \
- fpicker/source/unx/kde_unx/UnxNotifyThread \
-))
-
-# KDE/Qt consider -Wshadow more trouble than benefit
-$(eval $(call gb_Library_add_cxxflags,fps_kde,\
- -Wno-shadow \
-))
-
-$(eval $(call gb_Library_set_warnings_not_errors,fps_kde))
-
-# vim: set noet sw=4 ts=4:
diff --git a/fpicker/Module_fpicker.mk b/fpicker/Module_fpicker.mk
index 3111955d895a..1edc7c9d17ef 100644
--- a/fpicker/Module_fpicker.mk
+++ b/fpicker/Module_fpicker.mk
@@ -50,17 +50,6 @@ $(eval $(call gb_Module_add_targets,fpicker,\
))
endif
-ifeq ($(GUIBASE),unx)
-ifeq ($(ENABLE_KDE),TRUE)
-$(eval $(call gb_Module_add_targets,fpicker,\
- Executable_kdefilepicker \
- Library_fps_kde \
- Package_kde_moc \
-))
-endif
-
-endif
-
endif
# vim: set noet sw=4 ts=4:
diff --git a/fpicker/source/unx/kde_unx/UnxFPentry.cxx b/fpicker/source/unx/kde_unx/UnxFPentry.cxx
deleted file mode 100644
index 0937742e66e5..000000000000
--- a/fpicker/source/unx/kde_unx/UnxFPentry.cxx
+++ /dev/null
@@ -1,110 +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 <com/sun/star/container/XSet.hpp>
-
-#include <cppuhelper/factory.hxx>
-#include <osl/diagnose.h>
-
-#include "UnxFilePicker.hxx"
-#include "FPServiceInfo.hxx"
-
-using namespace ::rtl;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::container;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::registry;
-using namespace ::cppu;
-using ::com::sun::star::ui::dialogs::XFilePicker;
-
-//////////////////////////////////////////////////////////////////////////
-//
-//////////////////////////////////////////////////////////////////////////
-
-static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager )
-{
- return Reference< XInterface >(
- static_cast< XFilePicker* >( new UnxFilePicker( rServiceManager ) ) );
-}
-
-extern "C"
-{
-
-sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
-{
- sal_Bool bRetVal = sal_True;
-
- if ( pRegistryKey )
- {
- try
- {
- Reference< XRegistryKey > pXNewKey( static_cast< XRegistryKey* >( pRegistryKey ) );
- pXNewKey->createKey( OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_REGKEY_NAME ) ));
- }
- catch( const InvalidRegistryException& )
- {
- OSL_FAIL( "InvalidRegistryException caught" );
- bRetVal = sal_False;
- }
- }
-
- return bRetVal;
-}
-
-//////////////////////////////////////////////////////////////////////////
-//
-//////////////////////////////////////////////////////////////////////////
-
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ )
-{
- void* pRet = 0;
-
- if ( pSrvManager && ( 0 == rtl_str_compare( pImplName, FILE_PICKER_IMPL_NAME ) ) )
- {
- Sequence< OUString > aSNS( 1 );
- aSNS.getArray( )[0] = OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_SERVICE_NAME ));
-
- Reference< XSingleServiceFactory > xFactory ( createSingleFactory(
- reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ),
- OUString::createFromAscii( pImplName ),
- createInstance,
- aSNS ) );
- if ( xFactory.is() )
- {
- xFactory->acquire();
- pRet = xFactory.get();
- }
- }
-
- return pRet;
-}
-
-} // extern "C"
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/unx/kde_unx/fps-kde-ucd.txt b/fpicker/source/unx/kde_unx/fps-kde-ucd.txt
deleted file mode 100644
index 28aa49d97bea..000000000000
--- a/fpicker/source/unx/kde_unx/fps-kde-ucd.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-[ComponentDescriptor]
-ImplementationName=com.sun.star.ui.dialogs.UnxFilePicker
-ComponentName=fps_kde.uno.so
-LoaderName=com.sun.star.loader.SharedLibrary
-[SupportedServices]
-com.sun.star.ui.dialogs.KDEFilePicker
diff --git a/fpicker/source/unx/kde_unx/fps_kde.xml b/fpicker/source/unx/kde_unx/fps_kde.xml
deleted file mode 100644
index 99683bfecacf..000000000000
--- a/fpicker/source/unx/kde_unx/fps_kde.xml
+++ /dev/null
@@ -1,51 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE module-description PUBLIC "-//StarOffice//DTD ComponentDescription 1.0//EN" "module-description.dtd">
-<module-description xmlns:xlink="http://www.w3.org/1999/xlink">
- <module-name>fps_kde</module-name>
- <component-description>
- <author> Jan Holesovsky </author>
- <name> com.sun.star.comp.ui.dialogs.FilePicker </name>
- <description>
- The KDE implementation of the FilePicker service.
- </description>
- <loader-name>com.sun.star.loader.SharedLibrary</loader-name>
- <language> c++ </language>
- <status value="beta"/>
- <supported-service> com.sun.star.ui.dialogs.FilePicker </supported-service>
- <service-dependency>...</service-dependency>
- <type> com.sun.star.ui.dialogs.XExecutableDialog </type>
- <type> com.sun.star.ui.dialogs.XFilePicker </type>
- <type> com.sun.star.ui.dialogs.XFilterManager </type>
- <type> com.sun.star.ui.dialogs.XFilterGroupManager </type>
- <type> com.sun.star.ui.dialogs.XFilePickerListener </type>
- <type> com.sun.star.ui.dialogs.ExecutableDialogException </type>
- <type> com.sun.star.ui.dialogs.XFilePickerNotifier </type>
- <type> com.sun.star.ui.dialogs.XFilePickerControlAccess </type>
- <type> com.sun.star.ui.dialogs.XFilePreview </type>
- <type> com.sun.star.ui.dialogs.ExtendedFilePickerElementIds </type>
- <type> com.sun.star.ui.dialogs.ExecutableDialogResults </type>
- <type> com.sun.star.ui.dialogs.FilePickerEvent </type>
- <type> com.sun.star.ui.dialogs.CommonFilePickerElementIds </type>
- <type> com.sun.star.ui.dialogs.ListboxControlActions </type>
- <type> com.sun.star.ui.dialogs.TemplateDescription </type>
- <type> com.sun.star.ui.dialogs.FilePreviewImageFormats </type>
- <type> com.sun.star.util.XCancellable </type>
- <type> com.sun.star.lang.XComponent </type>
- <type> com.sun.star.lang.XMultiServiceFactory </type>
- <type> com.sun.star.lang.XSingleServiceFactory </type>
- <type> com.sun.star.lang.XServiceInfo </type>
- <type> com.sun.star.lang.XTypeProvider </type>
- <type> com.sun.star.lang.IllegalArgumentException </type>
- <type> com.sun.star.uno.TypeClass </type>
- <type> com.sun.star.uno.XWeak </type>
- <type> com.sun.star.uno.XAggregation </type>
- <type> com.sun.star.registry.XRegistryKey </type>
- <type> com.sun.star.container.XSet </type>
- </component-description>
- <project-build-dependency> cppuhelper </project-build-dependency>
- <project-build-dependency> cppu </project-build-dependency>
- <project-build-dependency> sal </project-build-dependency>
- <runtime-module-dependency> cppuhelper </runtime-module-dependency>
- <runtime-module-dependency> cppu2 </runtime-module-dependency>
- <runtime-module-dependency> sal2 </runtime-module-dependency>
-</module-description>
diff --git a/fpicker/Executable_kdefilepicker.mk b/vcl/Executable_kdefilepicker.mk
index a5c95fb092f9..7820efc0fd37 100644
--- a/fpicker/Executable_kdefilepicker.mk
+++ b/vcl/Executable_kdefilepicker.mk
@@ -28,7 +28,7 @@
$(eval $(call gb_Executable_Executable,kdefilepicker))
$(eval $(call gb_Executable_add_package_headers,kdefilepicker,\
- fpicker_kde_moc \
+ vcl_kde_moc \
))
$(eval $(call gb_Executable_add_defs,kdefilepicker,\
@@ -46,14 +46,14 @@ $(eval $(call gb_Executable_add_libs,kdefilepicker,\
))
$(eval $(call gb_Executable_add_exception_objects,kdefilepicker,\
- fpicker/source/unx/kde/kdecommandthread \
- fpicker/source/unx/kde/kdefilepicker \
- fpicker/source/unx/kde/kdefpmain \
- fpicker/source/unx/kde/kdemodalityfilter \
+ vcl/unx/kde/fpicker/kdecommandthread \
+ vcl/unx/kde/fpicker/kdefilepicker \
+ vcl/unx/kde/fpicker/kdefpmain \
+ vcl/unx/kde/fpicker/kdemodalityfilter \
))
$(eval $(call gb_Executable_add_generated_cxxobjects,kdefilepicker,\
- CustomTarget/fpicker/source/unx/kde/kdefilepicker.moc \
+ CustomTarget/vcl/unx/kde/fpicker/kdefilepicker.moc \
))
$(eval $(call gb_Executable_set_warnings_not_errors,kdefilepicker))
diff --git a/vcl/Library_vclplug_kde.mk b/vcl/Library_vclplug_kde.mk
index 3735c5c1cbdb..5cc8df63c125 100644
--- a/vcl/Library_vclplug_kde.mk
+++ b/vcl/Library_vclplug_kde.mk
@@ -82,6 +82,9 @@ $(eval $(call gb_Library_use_externals,vclplug_kde,\
$(eval $(call gb_Library_add_exception_objects,vclplug_kde,\
vcl/unx/kde/kdedata \
vcl/unx/kde/salnativewidgets-kde \
+ vcl/unx/kde/UnxCommandThread \
+ vcl/unx/kde/UnxFilePicker \
+ vcl/unx/kde/UnxNotifyThread \
))
# KDE/Qt consider -Wshadow more trouble than benefit
diff --git a/fpicker/Package_kde_moc.mk b/vcl/Package_kde_moc.mk
index 1350937959b2..3e6b7ec47651 100644
--- a/fpicker/Package_kde_moc.mk
+++ b/vcl/Package_kde_moc.mk
@@ -25,12 +25,12 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
-$(eval $(call gb_Package_Package,fpicker_kde_moc,$(WORKDIR)/CustomTarget/fpicker/source/unx/kde))
+$(eval $(call gb_Package_Package,vcl_kde_moc,$(WORKDIR)/CustomTarget/vcl/unx/kde/fpicker))
-$(eval $(call gb_Package_add_customtarget,fpicker_kde_moc,fpicker/source/unx/kde))
+$(eval $(call gb_Package_add_customtarget,vcl_kde_moc,vcl/unx/kde/fpicker))
-$(eval $(call gb_CustomTarget_add_dependencies,fpicker/source/unx/kde,\
- fpicker/source/unx/kde/kdefilepicker.hxx \
+$(eval $(call gb_CustomTarget_add_dependencies,vcl/unx/kde/fpicker,\
+ vcl/unx/kde/fpicker/kdefilepicker.hxx \
))
# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/vcl/inc/unx/kde/kdedata.hxx b/vcl/inc/unx/kde/kdedata.hxx
index 6112b47c5a7d..83d4cf3d18cf 100644
--- a/vcl/inc/unx/kde/kdedata.hxx
+++ b/vcl/inc/unx/kde/kdedata.hxx
@@ -85,6 +85,12 @@ public:
: X11SalInstance( pMutex ) {}
virtual ~KDESalInstance() {}
virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
+
+ virtual bool hasNativeFileSelection() const { return true; }
+
+ virtual com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFilePicker2 >
+ createFilePicker( const com::sun::star::uno::Reference<
+ com::sun::star::uno::XComponentContext >& );
};
class KDEXLib : public SalXLib
diff --git a/fpicker/source/unx/kde_unx/FPServiceInfo.hxx b/vcl/unx/kde/FPServiceInfo.hxx
index 9e4cbf1ac44d..9e4cbf1ac44d 100644
--- a/fpicker/source/unx/kde_unx/FPServiceInfo.hxx
+++ b/vcl/unx/kde/FPServiceInfo.hxx
diff --git a/fpicker/source/unx/kde_unx/UnxCommandThread.cxx b/vcl/unx/kde/UnxCommandThread.cxx
index 8f7ee3d0c21c..8f7ee3d0c21c 100644
--- a/fpicker/source/unx/kde_unx/UnxCommandThread.cxx
+++ b/vcl/unx/kde/UnxCommandThread.cxx
diff --git a/fpicker/source/unx/kde_unx/UnxCommandThread.hxx b/vcl/unx/kde/UnxCommandThread.hxx
index b8c6aaaaf97c..b8c6aaaaf97c 100644
--- a/fpicker/source/unx/kde_unx/UnxCommandThread.hxx
+++ b/vcl/unx/kde/UnxCommandThread.hxx
diff --git a/fpicker/source/unx/kde_unx/UnxFilePicker.cxx b/vcl/unx/kde/UnxFilePicker.cxx
index 74dbd8d2ece5..1a30913d1797 100644
--- a/fpicker/source/unx/kde_unx/UnxFilePicker.cxx
+++ b/vcl/unx/kde/UnxFilePicker.cxx
@@ -90,18 +90,18 @@ namespace
// UnxFilePicker
//////////////////////////////////////////////////////////////////////////
-UnxFilePicker::UnxFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr )
- : cppu::WeakComponentImplHelper8<
+UnxFilePicker::UnxFilePicker( const uno::Reference<uno::XComponentContext>& )
+ : cppu::WeakComponentImplHelper9<
XFilterManager,
XFilterGroupManager,
XFilePickerControlAccess,
XFilePickerNotifier,
// TODO XFilePreview,
+ XFilePicker2,
lang::XInitialization,
util::XCancellable,
lang::XEventListener,
lang::XServiceInfo>( m_rbHelperMtx ),
- m_xServiceMgr( xServiceMgr ),
m_nFilePickerPid( -1 ),
m_nFilePickerWrite( -1 ),
m_nFilePickerRead( -1 ),
@@ -546,14 +546,14 @@ void SAL_CALL UnxFilePicker::initialize( const uno::Sequence<uno::Any> &rArgumen
if ( 0 == rArguments.getLength( ) )
throw lang::IllegalArgumentException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "no arguments" )),
- static_cast< XFilePicker* >( this ), 1 );
+ static_cast< XFilePicker2* >( this ), 1 );
aAny = rArguments[0];
if ( ( aAny.getValueType() != ::getCppuType( (sal_Int16*)0 ) ) && ( aAny.getValueType() != ::getCppuType( (sal_Int8*)0 ) ) )
throw lang::IllegalArgumentException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "invalid argument type" )),
- static_cast< XFilePicker* >( this ), 1 );
+ static_cast< XFilePicker2* >( this ), 1 );
sal_Int16 templateId = -1;
aAny >>= templateId;
@@ -637,7 +637,7 @@ void SAL_CALL UnxFilePicker::initialize( const uno::Sequence<uno::Any> &rArgumen
default:
throw lang::IllegalArgumentException(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Unknown template" )),
- static_cast< XFilePicker* >( this ),
+ static_cast< XFilePicker2* >( this ),
1 );
}
}
@@ -934,4 +934,10 @@ void UnxFilePicker::sendAppendControlCommand( sal_Int16 nControlId )
}
}
+uno::Sequence< ::rtl::OUString > SAL_CALL UnxFilePicker::getSelectedFiles()
+ throw( uno::RuntimeException )
+{
+ return getFiles();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/unx/kde_unx/UnxFilePicker.hxx b/vcl/unx/kde/UnxFilePicker.hxx
index d2a065486d17..2dc50a8ec739 100644
--- a/fpicker/source/unx/kde_unx/UnxFilePicker.hxx
+++ b/vcl/unx/kde/UnxFilePicker.hxx
@@ -30,7 +30,7 @@
#ifndef _UNXFILEPICKER_HXX_
#define _UNXFILEPICKER_HXX_
-#include <cppuhelper/compbase8.hxx>
+#include <cppuhelper/compbase9.hxx>
#include <osl/conditn.hxx>
#include <osl/mutex.hxx>
#include <rtl/ustrbuf.hxx>
@@ -42,6 +42,8 @@
#include <com/sun/star/ui/dialogs/XFilterGroupManager.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/XFilePreview.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/util/XCancellable.hpp>
#include <list>
@@ -59,11 +61,12 @@ protected:
class UnxFilePicker :
public UnxFilePickerDummy,
- public cppu::WeakComponentImplHelper8<
+ public cppu::WeakComponentImplHelper9<
::com::sun::star::ui::dialogs::XFilterManager,
::com::sun::star::ui::dialogs::XFilterGroupManager,
::com::sun::star::ui::dialogs::XFilePickerControlAccess,
::com::sun::star::ui::dialogs::XFilePickerNotifier,
+ ::com::sun::star::ui::dialogs::XFilePicker2,
// TODO ::com::sun::star::ui::dialogs::XFilePreview,
::com::sun::star::lang::XInitialization,
::com::sun::star::util::XCancellable,
@@ -71,7 +74,6 @@ class UnxFilePicker :
::com::sun::star::lang::XServiceInfo >
{
protected:
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr; // to instanciate own services
pid_t m_nFilePickerPid;
int m_nFilePickerWrite; // (kde|...)filepicker gets it as stdin
@@ -83,7 +85,7 @@ protected:
ResMgr *m_pResMgr;
public:
- UnxFilePicker( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceMgr );
+ UnxFilePicker( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& );
virtual ~UnxFilePicker();
// XComponent
@@ -137,6 +139,11 @@ public:
virtual sal_Bool SAL_CALL getShowState( ) throw (::com::sun::star::uno::RuntimeException);
*/
+ // XFilePicker2
+
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSelectedFiles()
+ throw (::com::sun::star::uno::RuntimeException);
+
// XInitialization
virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > &rArguments ) throw( ::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException );
diff --git a/fpicker/source/unx/kde_unx/UnxNotifyThread.cxx b/vcl/unx/kde/UnxNotifyThread.cxx
index a97fdfc24fae..a97fdfc24fae 100644
--- a/fpicker/source/unx/kde_unx/UnxNotifyThread.cxx
+++ b/vcl/unx/kde/UnxNotifyThread.cxx
diff --git a/fpicker/source/unx/kde_unx/UnxNotifyThread.hxx b/vcl/unx/kde/UnxNotifyThread.hxx
index b60d7b475871..b60d7b475871 100644
--- a/fpicker/source/unx/kde_unx/UnxNotifyThread.hxx
+++ b/vcl/unx/kde/UnxNotifyThread.hxx
diff --git a/fpicker/source/unx/kde/Makefile b/vcl/unx/kde/fpicker/Makefile
index 445c4467b2d4..b7ba64946ba8 100644
--- a/fpicker/source/unx/kde/Makefile
+++ b/vcl/unx/kde/fpicker/Makefile
@@ -25,8 +25,8 @@
# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
# instead of those above.
-kdefilepicker.moc.cxx :
- $(MOC) -o $@ $(SRCDIR)/fpicker/source/unx/kde/kdefilepicker.hxx
+kdefilepicker.moc.cxx : $(SRCDIR)/fpicker/source/unx/kde/kdefilepicker.hxx
+ $(MOC) -o $@ $<
.DEFAULT_GOAL := all
.PHONY : all
diff --git a/fpicker/source/unx/kde/kdecommandthread.cxx b/vcl/unx/kde/fpicker/kdecommandthread.cxx
index b68ddb0030c4..b68ddb0030c4 100644
--- a/fpicker/source/unx/kde/kdecommandthread.cxx
+++ b/vcl/unx/kde/fpicker/kdecommandthread.cxx
diff --git a/fpicker/source/unx/kde/kdecommandthread.hxx b/vcl/unx/kde/fpicker/kdecommandthread.hxx
index 7486bf9192f6..7486bf9192f6 100644
--- a/fpicker/source/unx/kde/kdecommandthread.hxx
+++ b/vcl/unx/kde/fpicker/kdecommandthread.hxx
diff --git a/fpicker/source/unx/kde/kdefilepicker.cxx b/vcl/unx/kde/fpicker/kdefilepicker.cxx
index 779a34d894d0..779a34d894d0 100644
--- a/fpicker/source/unx/kde/kdefilepicker.cxx
+++ b/vcl/unx/kde/fpicker/kdefilepicker.cxx
diff --git a/fpicker/source/unx/kde/kdefilepicker.hxx b/vcl/unx/kde/fpicker/kdefilepicker.hxx
index 4d545ebc76ca..4d545ebc76ca 100644
--- a/fpicker/source/unx/kde/kdefilepicker.hxx
+++ b/vcl/unx/kde/fpicker/kdefilepicker.hxx
diff --git a/fpicker/source/unx/kde/kdefpmain.cxx b/vcl/unx/kde/fpicker/kdefpmain.cxx
index be4022664014..be4022664014 100644
--- a/fpicker/source/unx/kde/kdefpmain.cxx
+++ b/vcl/unx/kde/fpicker/kdefpmain.cxx
diff --git a/fpicker/source/unx/kde/kdemodalityfilter.cxx b/vcl/unx/kde/fpicker/kdemodalityfilter.cxx
index 5aeddb0a80a6..5aeddb0a80a6 100644
--- a/fpicker/source/unx/kde/kdemodalityfilter.cxx
+++ b/vcl/unx/kde/fpicker/kdemodalityfilter.cxx
diff --git a/fpicker/source/unx/kde/kdemodalityfilter.hxx b/vcl/unx/kde/fpicker/kdemodalityfilter.hxx
index 8635694a39e1..8635694a39e1 100644
--- a/fpicker/source/unx/kde/kdemodalityfilter.hxx
+++ b/vcl/unx/kde/fpicker/kdemodalityfilter.hxx
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index adee91e73a32..0376e94a8ab4 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -29,6 +29,7 @@
#define _SV_SALNATIVEWIDGETS_KDE_CXX
#include <unx/kde/kde_headers.h>
+#include "UnxFilePicker.hxx"
#include <unx/salunx.h>
#include <unx/saldata.hxx>
@@ -41,7 +42,7 @@
#include <vcl/vclenum.hxx>
#include <rtl/ustrbuf.hxx>
-
+using namespace ::com::sun::star;
using namespace ::rtl;
/** Cached native widgets.
@@ -2055,6 +2056,13 @@ KDESalInstance::CreateFrame( SalFrame *pParent, sal_uLong nStyle )
return new KDESalFrame( pParent, nStyle );
}
+uno::Reference< ui::dialogs::XFilePicker2 > KDESalInstance::createFilePicker(
+ const uno::Reference< uno::XComponentContext >& xMSF )
+{
+ return uno::Reference< ui::dialogs::XFilePicker2 >(
+ new UnxFilePicker( xMSF ) );
+}
+
// -----------------------------------------------------------------------
// KDESalData pieces
// -----------------------------------------------------------------------