diff options
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r-- | vcl/unx/gtk/fpicker/FPServiceInfo.hxx | 53 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/FPentry.cxx | 141 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 120 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx | 42 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx | 83 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFolderPicker.hxx | 41 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkPicker.cxx | 88 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkPicker.hxx | 13 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/fps_gnome.component | 37 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/fps_gnome.xml | 79 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/resourceprovider.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk/window/gtkframe.cxx | 4 |
12 files changed, 125 insertions, 579 deletions
diff --git a/vcl/unx/gtk/fpicker/FPServiceInfo.hxx b/vcl/unx/gtk/fpicker/FPServiceInfo.hxx deleted file mode 100644 index c0352af2b25d..000000000000 --- a/vcl/unx/gtk/fpicker/FPServiceInfo.hxx +++ /dev/null @@ -1,53 +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. - * - * 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 _FPSERVICEINFO_HXX_ -#define _FPSERVICEINFO_HXX_ - -//------------------------------------------------------------------------ -// defines -//------------------------------------------------------------------------ - -// the service names -#define FILE_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.GtkFilePicker" -#define FOLDER_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.GtkFolderPicker" - -// the implementation names -#define FILE_PICKER_IMPL_NAME "com.sun.star.ui.dialogs.SalGtkFilePicker" -#define FOLDER_PICKER_IMPL_NAME "com.sun.star.ui.dialogs.SalGtkFolderPicker" - -// the registry key names -// a key under which this service will be registered, -// Format: -> "/ImplName/UNO/SERVICES/ServiceName" -// <Implementation-Name></UNO/SERVICES/><Service-Name> -#define FILE_PICKER_REGKEY_NAME "/com.sun.star.ui.dialogs.SalGtkFilePicker/UNO/SERVICES/com.sun.star.ui.dialogs.GtkFilePicker" -#define FOLDER_PICKER_REGKEY_NAME "/com.sun.star.ui.dialogs.SalGtkFolderPicker/UNO/SERVICES/com.sun.star.ui.dialogs.GtkFolderPicker" - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/gtk/fpicker/FPentry.cxx b/vcl/unx/gtk/fpicker/FPentry.cxx deleted file mode 100644 index 0ea7fb4bd8c2..000000000000 --- a/vcl/unx/gtk/fpicker/FPentry.cxx +++ /dev/null @@ -1,141 +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. - * - * 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. - * - ************************************************************************/ - -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_fpicker.hxx" - -#ifdef AIX -#define _LINUX_SOURCE_COMPAT -#include <sys/timer.h> -#undef _LINUX_SOURCE_COMPAT -#endif - -//---------------------------------------------- -// includes of other projects -//---------------------------------------------- -#include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> -#include "SalGtkFilePicker.hxx" -#include "SalGtkFolderPicker.hxx" -#include "FPServiceInfo.hxx" - -#include <glib-object.h> - -extern const guint gtk_major_version; -extern const guint gtk_minor_version; - -//----------------------------------------------- -// namespace directives -//----------------------------------------------- - -using namespace ::rtl; -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::registry; -using namespace ::cppu; -using ::com::sun::star::ui::dialogs::XFilePicker2; -using ::com::sun::star::ui::dialogs::XFolderPicker; - -//------------------------------------------------ -// -//------------------------------------------------ - -static Reference< XInterface > SAL_CALL createFileInstance( - const Reference< XMultiServiceFactory >& rServiceManager ) -{ - return Reference< XInterface >( - static_cast< XFilePicker2* >( - new SalGtkFilePicker( rServiceManager ) ) ); -} - -static Reference< XInterface > SAL_CALL createFolderInstance( - const Reference< XMultiServiceFactory >& rServiceManager ) -{ - return Reference< XInterface >( - static_cast< XFolderPicker* >( - new SalGtkFolderPicker( rServiceManager ) ) ); -} - -extern "C" -{ - -SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( - const sal_Char* pImplName, uno_Interface* pSrvManager, uno_Interface* /*pRegistryKey*/ ) -{ - void* pRet = 0; - - if( pSrvManager ) - { - if ( - /* crude gtkplug check */ !g_type_from_name( "GdkDisplay" ) || - /* old version */ !( gtk_major_version >= 2 && gtk_minor_version >= 4 ) - ) - { - return 0; - } - - Reference< XSingleServiceFactory > xFactory; - - if (0 == rtl_str_compare(pImplName, FILE_PICKER_IMPL_NAME)) - { - Sequence< OUString > aSNS( 1 ); - aSNS.getArray( )[0] = - OUString(RTL_CONSTASCII_USTRINGPARAM(FILE_PICKER_SERVICE_NAME)); - - xFactory = createSingleFactory( - reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ), - OUString::createFromAscii( pImplName ), - createFileInstance, - aSNS ); - } - else if (0 == rtl_str_compare(pImplName, FOLDER_PICKER_IMPL_NAME)) - { - Sequence< OUString > aSNS( 1 ); - aSNS.getArray( )[0] = - OUString(RTL_CONSTASCII_USTRINGPARAM(FOLDER_PICKER_SERVICE_NAME)); - - xFactory = createSingleFactory( - reinterpret_cast< XMultiServiceFactory* > ( pSrvManager ), - OUString::createFromAscii( pImplName ), - createFolderInstance, - aSNS ); - } - - if ( xFactory.is() ) - { - xFactory->acquire(); - pRet = xFactory.get(); - } - } - - return pRet; -} - -} // extern "C" - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 1cac9895c6ca..b7caa0ac51c9 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -26,9 +26,6 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_fpicker.hxx" - #ifdef AIX #define _LINUX_SOURCE_COMPAT #include <sys/timer.h> @@ -38,7 +35,7 @@ //------------------------------------------------------------------------ // includes //------------------------------------------------------------------------ -#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> @@ -47,9 +44,8 @@ #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/ui/dialogs/ControlActions.hpp> #include <com/sun/star/uno/Any.hxx> -#include <FPServiceInfo.hxx> #include <osl/mutex.hxx> -#include <SalGtkFilePicker.hxx> +#include "unx/gtk/gtkinst.hxx" #include <vcl/svapp.hxx> @@ -59,7 +55,11 @@ #include <algorithm> #include <set> #include <string.h> -#include "resourceprovider.hxx" + +#include "gtk/fpicker/resourceprovider.hxx" +#include "gtk/fpicker/SalGtkFilePicker.hxx" + +#if !GTK_CHECK_VERSION(3,0,0) //------------------------------------------------------------------------ // namespace directives @@ -74,30 +74,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::uno; -//------------------------------------------------------------------------ -// helper functions -//------------------------------------------------------------------------ - -namespace -{ - // controling event notifications - const bool STARTUP_SUSPENDED = true; - const bool STARTUP_ALIVE = false; - - uno::Sequence<rtl::OUString> SAL_CALL FilePicker_getSupportedServiceNames() - { - uno::Sequence<rtl::OUString> aRet(3); - aRet[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilePicker" )); - aRet[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFilePicker" )); - aRet[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.GtkFilePicker" )); - return aRet; - } -} - -//----------------------------------------------------------------------------------------- -// constructor -//----------------------------------------------------------------------------------------- - static void expandexpanders(GtkContainer *pWidget) { GList *pChildren = gtk_container_get_children(pWidget); @@ -126,20 +102,18 @@ void SalGtkFilePicker::InitialMapping() gtk_widget_set_size_request (m_pPreview, -1, -1); } -SalGtkFilePicker::SalGtkFilePicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr ) : - SalGtkPicker(xServiceMgr), - cppu::WeakComponentImplHelper10< +SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext >& xContext ) : + SalGtkPicker( xContext ), + cppu::WeakComponentImplHelper9< XFilterManager, - XFilterGroupManager, - XFilePickerControlAccess, + XFilterGroupManager, + XFilePickerControlAccess, XFilePickerNotifier, - XFilePreview, - XFilePicker2, + XFilePreview, + XFilePicker2, lang::XInitialization, util::XCancellable, - lang::XEventListener, - lang::XServiceInfo>( m_rbHelperMtx ), - m_xServiceMgr( xServiceMgr ), + lang::XEventListener>( m_rbHelperMtx ), m_pFilterList( NULL ), m_pVBox ( NULL ), mnHID_FolderChange( 0 ), @@ -994,10 +968,12 @@ sal_Int16 SAL_CALL SalGtkFilePicker::execute() throw( uno::RuntimeException ) int btn = GTK_RESPONSE_NO; uno::Reference< awt::XExtendedToolkit > xToolkit( - m_xServiceMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")) ), uno::UNO_QUERY); + createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")) ), + UNO_QUERY_THROW ); uno::Reference< frame::XDesktop > xDesktop( - m_xServiceMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), uno::UNO_QUERY); + createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")) ), + UNO_QUERY_THROW ); RunDialog* pRunDialog = new RunDialog(m_pDialog, xToolkit, xDesktop); uno::Reference < awt::XTopWindowListener > xLifeCycle(pRunDialog); @@ -1788,7 +1764,7 @@ void SAL_CALL SalGtkFilePicker::initialize( const uno::Sequence<uno::Any>& aArgu } } -void SalGtkFilePicker::preview_toggled_cb( GtkObject *cb, SalGtkFilePicker* pobjFP ) +void SalGtkFilePicker::preview_toggled_cb( GObject *cb, SalGtkFilePicker* pobjFP ) { if( pobjFP->mbToggleVisibility[PREVIEW] ) pobjFP->setShowState( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( cb ) ) ); @@ -1807,43 +1783,6 @@ void SAL_CALL SalGtkFilePicker::cancel() throw( uno::RuntimeException ) // TODO m_pImpl->cancel(); } -// ------------------------------------------------- -// XServiceInfo -// ------------------------------------------------- - -rtl::OUString SAL_CALL SalGtkFilePicker::getImplementationName() - throw( uno::RuntimeException ) -{ - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( FILE_PICKER_IMPL_NAME )); -} - -// ------------------------------------------------- -// XServiceInfo -// ------------------------------------------------- - -sal_Bool SAL_CALL SalGtkFilePicker::supportsService( const rtl::OUString& ServiceName ) - throw( uno::RuntimeException ) -{ - uno::Sequence <rtl::OUString> SupportedServicesNames = FilePicker_getSupportedServiceNames(); - - for( sal_Int32 n = SupportedServicesNames.getLength(); n--; ) - if( SupportedServicesNames[n].compareTo( ServiceName ) == 0) - return sal_True; - - return sal_False; -} - -// ------------------------------------------------- -// XServiceInfo -// ------------------------------------------------- - -uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSupportedServiceNames() - throw( uno::RuntimeException ) -{ - return FilePicker_getSupportedServiceNames(); -} - - //-------------------------------------------------- // Misc //------------------------------------------------- @@ -2079,4 +2018,23 @@ SalGtkFilePicker::~SalGtkFilePicker() gtk_widget_destroy( m_pVBox ); } +#endif + +using namespace ::com::sun::star; + +uno::Reference< ui::dialogs::XFilePicker2 > +GtkInstance::createFilePicker( const com::sun::star::uno::Reference< + com::sun::star::uno::XComponentContext > &xMSF ) +{ +#if GTK_CHECK_VERSION(3,0,0) + fprintf( stderr, "Create dummy gtk file picker\n" ); + (void)xMSF; + return uno::Reference< ui::dialogs::XFilePicker2 >(); +#else + fprintf( stderr, "Create gtk file picker\n" ); + return uno::Reference< ui::dialogs::XFilePicker2 >( + new SalGtkFilePicker( xMSF ) ); +#endif +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx index 832e9445c342..aadff65a52cd 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx @@ -33,7 +33,7 @@ // includes of other projects //_______________________________________________________________________________________________________________________ -#include <cppuhelper/compbase10.hxx> +#include <cppuhelper/compbase9.hxx> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/ui/dialogs/XFilePickerNotifier.hpp> #include <com/sun/star/ui/dialogs/XFilterManager.hpp> @@ -42,22 +42,16 @@ #include <com/sun/star/ui/dialogs/XFilePreview.hpp> #include <com/sun/star/beans/StringPair.hpp> -#include "SalGtkPicker.hxx" - +#include <list> #include <memory> - #include <rtl/ustring.hxx> -#include <list> +#include "gtk/fpicker/SalGtkPicker.hxx" //---------------------------------------------------------- // Implementation class for the XFilePicker Interface //---------------------------------------------------------- -//---------------------------------------------------------- -// forward declarations -//---------------------------------------------------------- - using ::rtl::OUString; using ::rtl::OString; struct FilterEntry; @@ -75,22 +69,21 @@ typedef ::com::sun::star::uno::Sequence< UnoFilterEntry > UnoFilterList; // c class SalGtkFilePicker : public SalGtkPicker, - public cppu::WeakComponentImplHelper10< + 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::XFilePreview, ::com::sun::star::ui::dialogs::XFilePicker2, - ::com::sun::star::lang::XInitialization, + ::com::sun::star::lang::XInitialization, ::com::sun::star::util::XCancellable, - ::com::sun::star::lang::XEventListener, - ::com::sun::star::lang::XServiceInfo > + ::com::sun::star::lang::XEventListener > { public: // constructor - SalGtkFilePicker( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceMgr ); + SalGtkFilePicker( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xServiceMgr ); //------------------------------------------------------------------------------------ // XFilePickerNotifier @@ -224,19 +217,6 @@ class SalGtkFilePicker : virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException); - //------------------------------------------------ - // XServiceInfo - //------------------------------------------------ - - virtual ::rtl::OUString SAL_CALL getImplementationName( ) - throw(::com::sun::star::uno::RuntimeException); - - virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) - throw(::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) - throw(::com::sun::star::uno::RuntimeException); - //------------------------------------------------------------------------------------ // FilePicker Event functions //------------------------------------------------------------------------------------ @@ -251,14 +231,10 @@ class SalGtkFilePicker : void ensureFilterList( const ::rtl::OUString& _rInitialCurrentFilter ); - // to instanciate own services - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr; - void impl_fileSelectionChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent ); void impl_directoryChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent ); void impl_controlStateChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent ); - private: ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener > m_xListener; @@ -340,8 +316,8 @@ class SalGtkFilePicker : ::com::sun::star::uno::Any HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nControlAction) const; static void expander_changed_cb( GtkExpander *expander, SalGtkFilePicker *pobjFP ); - static void preview_toggled_cb (GtkObject *cb, SalGtkFilePicker *pobjFP); - static void filter_changed_cb (GtkFileChooser *file_chooser, GParamSpec *pspec, SalGtkFilePicker *pobjFP); + static void preview_toggled_cb( GObject *cb, SalGtkFilePicker *pobjFP ); + static void filter_changed_cb( GtkFileChooser *file_chooser, GParamSpec *pspec, SalGtkFilePicker *pobjFP ); static void type_changed_cb( GtkTreeSelection *selection, SalGtkFilePicker *pobjFP ); static void folder_changed_cb (GtkFileChooser *file_chooser, SalGtkFilePicker *pobjFP); static void selection_changed_cb (GtkFileChooser *file_chooser, SalGtkFilePicker *pobjFP); diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx index 52d9c78ba1e0..923a7fe4a329 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.cxx @@ -26,9 +26,6 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_fpicker.hxx" - #ifdef AIX #define _LINUX_SOURCE_COMPAT #include <sys/timer.h> @@ -38,21 +35,22 @@ //------------------------------------------------------------------------ // includes //------------------------------------------------------------------------ -#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #include <osl/diagnose.h> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/uno/Any.hxx> -#include <FPServiceInfo.hxx> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> -#include "SalGtkFolderPicker.hxx" -#include "resourceprovider.hxx" +#include "unx/gtk/gtkinst.hxx" +#include "gtk/fpicker/resourceprovider.hxx" +#include "gtk/fpicker/SalGtkFolderPicker.hxx" #include <string.h> + //------------------------------------------------------------------------ // namespace directives //------------------------------------------------------------------------ @@ -63,28 +61,13 @@ using namespace ::com::sun::star::ui::dialogs; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; -//------------------------------------------------------------------------ -// helper functions -//------------------------------------------------------------------------ - -namespace -{ - // controling event notifications - uno::Sequence<rtl::OUString> SAL_CALL FolderPicker_getSupportedServiceNames() - { - uno::Sequence<rtl::OUString> aRet(2); - aRet[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.SystemFolderPicker" )); - aRet[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.GtkFolderPicker" )); - return aRet; - } -} +#if !GTK_CHECK_VERSION(3,0,0) //----------------------------------------------------------------------------------------- // constructor //----------------------------------------------------------------------------------------- -SalGtkFolderPicker::SalGtkFolderPicker( const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr ) : - SalGtkPicker(xServiceMgr), - m_xServiceMgr(xServiceMgr) +SalGtkFolderPicker::SalGtkFolderPicker( const uno::Reference< uno::XComponentContext >& xContext ) : + SalGtkPicker( xContext ) { CResourceProvider aResProvider; @@ -177,10 +160,12 @@ sal_Int16 SAL_CALL SalGtkFolderPicker::execute() throw( uno::RuntimeException ) sal_Int16 retVal = 0; uno::Reference< awt::XExtendedToolkit > xToolkit( - m_xServiceMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")) ), uno::UNO_QUERY); + createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit"))), + uno::UNO_QUERY); uno::Reference< frame::XDesktop > xDesktop( - m_xServiceMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), uno::UNO_QUERY); + createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ), + uno::UNO_QUERY); RunDialog* pRunDialog = new RunDialog(m_pDialog, xToolkit, xDesktop); uno::Reference < awt::XTopWindowListener > xLifeCycle(pRunDialog); @@ -201,6 +186,7 @@ sal_Int16 SAL_CALL SalGtkFolderPicker::execute() throw( uno::RuntimeException ) return retVal; } + //------------------------------------------------------------------------------------ // XCancellable //------------------------------------------------------------------------------------ @@ -213,41 +199,18 @@ void SAL_CALL SalGtkFolderPicker::cancel() throw( uno::RuntimeException ) // TODO m_pImpl->cancel(); } +#endif -// ------------------------------------------------- -// XServiceInfo -// ------------------------------------------------- - -rtl::OUString SAL_CALL SalGtkFolderPicker::getImplementationName() - throw( uno::RuntimeException ) -{ - return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_IMPL_NAME )); -} - -// ------------------------------------------------- -// XServiceInfo -// ------------------------------------------------- - -sal_Bool SAL_CALL SalGtkFolderPicker::supportsService( const rtl::OUString& ServiceName ) - throw( uno::RuntimeException ) -{ - uno::Sequence <rtl::OUString> SupportedServicesNames = FolderPicker_getSupportedServiceNames(); - - for( sal_Int32 n = SupportedServicesNames.getLength(); n--; ) - if( SupportedServicesNames[n].compareTo( ServiceName ) == 0) - return sal_True; - - return sal_False; -} - -// ------------------------------------------------- -// XServiceInfo -// ------------------------------------------------- - -uno::Sequence<rtl::OUString> SAL_CALL SalGtkFolderPicker::getSupportedServiceNames() - throw( uno::RuntimeException ) +uno::Reference< ui::dialogs::XFolderPicker > +GtkInstance::createFolderPicker( const uno::Reference< uno::XComponentContext > &xMSF ) { - return FolderPicker_getSupportedServiceNames(); + fprintf( stderr, "Create gtk folder picker\n" ); +#if GTK_CHECK_VERSION(3,0,0) + return uno::Reference< ui::dialogs::XFolderPicker >(); +#else + return uno::Reference< ui::dialogs::XFolderPicker >( + new SalGtkFolderPicker( xMSF ) ); +#endif } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.hxx b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.hxx index 5110ea86a0f6..57cd0e05cabe 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFolderPicker.hxx +++ b/vcl/unx/gtk/fpicker/SalGtkFolderPicker.hxx @@ -29,35 +29,23 @@ #ifndef _SALGTKFOLDERPICKER_HXX_ #define _SALGTKFOLDERPICKER_HXX_ -//_______________________________________________________________________________________________________________________ -// includes of other projects -//_______________________________________________________________________________________________________________________ - -#include <cppuhelper/implbase3.hxx> - -#include "SalGtkPicker.hxx" - +#include <list> #include <memory> - #include <rtl/ustring.hxx> +#include <cppuhelper/implbase3.hxx> -#include <list> - -//---------------------------------------------------------- -// class declaration -//---------------------------------------------------------- +#include "gtk/fpicker/SalGtkPicker.hxx" class SalGtkFolderPicker : public SalGtkPicker, - public cppu::WeakImplHelper3< - ::com::sun::star::ui::dialogs::XFolderPicker, - ::com::sun::star::lang::XServiceInfo, + public cppu::WeakImplHelper2< + ::com::sun::star::ui::dialogs::XFolderPicker, ::com::sun::star::util::XCancellable > { public: // constructor - SalGtkFolderPicker( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xServiceMgr ); + SalGtkFolderPicker( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xServiceMgr ); //------------------------------------------------------------------------------------ // XExecutableDialog functions @@ -85,20 +73,6 @@ class SalGtkFolderPicker : virtual void SAL_CALL setDescription( const rtl::OUString& rDescription ) throw( com::sun::star::uno::RuntimeException ); - - //------------------------------------------------ - // XServiceInfo - //------------------------------------------------ - - virtual ::rtl::OUString SAL_CALL getImplementationName( ) - throw(::com::sun::star::uno::RuntimeException); - - virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) - throw(::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) - throw(::com::sun::star::uno::RuntimeException); - //------------------------------------------------ // XCancellable //------------------------------------------------ @@ -117,9 +91,6 @@ class SalGtkFolderPicker : // prevent copy and assignment SalGtkFolderPicker( const SalGtkFolderPicker& ); SalGtkFolderPicker& operator=( const SalGtkFolderPicker& ); - private: - // to instanciate own services - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceMgr; }; #endif // _SALGTKFOLDERPICKER_HXX_ diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx index d52c2c60e37d..0520f2a823bc 100644 --- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx @@ -26,9 +26,6 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_fpicker.hxx" - #ifdef AIX #define _LINUX_SOURCE_COMPAT #include <sys/timer.h> @@ -39,7 +36,7 @@ // includes //------------------------------------------------------------------------ #include <com/sun/star/lang/DisposedException.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/uri/XExternalUriReferenceTranslator.hpp> #include <com/sun/star/lang/SystemDependent.hpp> #include <com/sun/star/awt/XSystemDependentWindowPeer.hpp> @@ -51,13 +48,15 @@ #include <rtl/process.h> #include <osl/diagnose.h> #include <com/sun/star/uno/Any.hxx> -#include <FPServiceInfo.hxx> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> -#include "SalGtkPicker.hxx" #include <tools/urlobj.hxx> #include <stdio.h> +#include "vcl/window.hxx" +#include "unx/gtk/gtkframe.hxx" +#include "gtk/fpicker/SalGtkPicker.hxx" + //------------------------------------------------------------------------ // namespace directives //------------------------------------------------------------------------ @@ -67,6 +66,8 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; +#if !GTK_CHECK_VERSION(3,0,0) + rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn) { if (!pIn) @@ -91,7 +92,7 @@ rtl::OUString SalGtkPicker::uritounicode(const gchar* pIn) } else { - OUString aNewURL = Reference<uri::XExternalUriReferenceTranslator>(Reference<XMultiServiceFactory>(comphelper::getProcessServiceFactory(), UNO_QUERY_THROW)->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator"))), UNO_QUERY_THROW)->translateToInternal(sURL); + OUString aNewURL = Reference<uri::XExternalUriReferenceTranslator>(Reference<XMultiComponentFactory>(comphelper::getProcessServiceFactory(), UNO_QUERY_THROW)->createInstanceWithContext(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator")), m_xContext), UNO_QUERY_THROW)->translateToInternal(sURL); if( aNewURL.getLength() ) sURL = aNewURL; } @@ -107,7 +108,7 @@ rtl::OString SalGtkPicker::unicodetouri(const rtl::OUString &rURL) INetURLObject aURL(rURL); if (INET_PROT_FILE == aURL.GetProtocol()) { - OUString aNewURL = Reference<uri::XExternalUriReferenceTranslator>(Reference<XMultiServiceFactory>(comphelper::getProcessServiceFactory(), UNO_QUERY_THROW)->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator"))), UNO_QUERY_THROW)->translateToExternal( rURL ); + OUString aNewURL = Reference<uri::XExternalUriReferenceTranslator>(Reference<XMultiComponentFactory>(comphelper::getProcessServiceFactory(), UNO_QUERY_THROW)->createInstanceWithContext(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uri.ExternalUriReferenceTranslator")), m_xContext ), UNO_QUERY_THROW)->translateToExternal( rURL ); if( aNewURL.getLength() ) { @@ -120,9 +121,6 @@ rtl::OString SalGtkPicker::unicodetouri(const rtl::OUString &rURL) extern "C" { - struct Display; - extern GdkDisplay* gdk_x11_lookup_xdisplay (void*xdisplay); - static gboolean canceldialog(RunDialog *pDialog) { GdkThreadLock lock; @@ -134,49 +132,25 @@ extern "C" RunDialog::RunDialog( GtkWidget *pDialog, uno::Reference< awt::XExtendedToolkit >& rToolkit, uno::Reference< frame::XDesktop >& rDesktop ) : cppu::WeakComponentImplHelper2< awt::XTopWindowListener, frame::XTerminateListener >( maLock ), - mpDialog(pDialog), mpCreatedParent(NULL), mxToolkit(rToolkit), mxDesktop(rDesktop) + mpDialog(pDialog), mxToolkit(rToolkit), mxDesktop(rDesktop) { - awt::SystemDependentXWindow aWindowHandle; + GtkWindow *pParent = NULL; - if (mxToolkit.is()) + ::Window * pWindow = ::Application::GetActiveTopWindow(); + if( pWindow ) { - uno::Reference< awt::XTopWindow > xWindow(mxToolkit->getActiveTopWindow()); - if (xWindow.is()) - { - uno::Reference< awt::XSystemDependentWindowPeer > xSystemDepParent(xWindow, uno::UNO_QUERY); - if (xSystemDepParent.is()) - { - - sal_Int8 processID[16]; - - rtl_getGlobalProcessId( (sal_uInt8*)processID ); - uno::Sequence<sal_Int8> processIdSeq(processID, 16); - uno::Any anyHandle = xSystemDepParent->getWindowHandle(processIdSeq, SystemDependent::SYSTEM_XWINDOW); - - anyHandle >>= aWindowHandle; - } - } + GtkSalFrame *pFrame = dynamic_cast<GtkSalFrame *>( pWindow->ImplGetFrame() ); + if( pFrame ) + pParent = GTK_WINDOW( pFrame->getWindow() ); } - - GdkDisplay *pDisplay = aWindowHandle.DisplayPointer ? gdk_x11_lookup_xdisplay(reinterpret_cast<void*>(static_cast<sal_IntPtr>(aWindowHandle.DisplayPointer))) : NULL; - GdkWindow* pParent = pDisplay ? gdk_window_lookup_for_display(pDisplay, aWindowHandle.WindowHandle) : NULL; - if (!pParent && pDisplay) - pParent = mpCreatedParent = gdk_window_foreign_new_for_display( pDisplay, aWindowHandle.WindowHandle); if (pParent) - { - gtk_widget_realize(mpDialog); - gdk_window_set_transient_for(mpDialog->window, pParent); - } + gtk_window_set_transient_for( GTK_WINDOW( mpDialog ), pParent ); } - RunDialog::~RunDialog() { SolarMutexGuard g; - if (mpCreatedParent) - gdk_window_destroy (mpCreatedParent); - g_source_remove_by_user_data (this); } @@ -223,7 +197,9 @@ gint RunDialog::run() return nStatus; } -static void lcl_setGTKLanguage(const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr) +// FIXME: this is pretty nasty ... we try to tell gtk+'s +// gettext the locale it should use via the environment +void SalGtkPicker::setGtkLanguage() { static bool bSet = false; if (bSet) @@ -232,18 +208,16 @@ static void lcl_setGTKLanguage(const uno::Reference<lang::XMultiServiceFactory>& OUString sUILocale; try { - uno::Reference<lang::XMultiServiceFactory> xConfigMgr = - uno::Reference<lang::XMultiServiceFactory>(xServiceMgr->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))), - UNO_QUERY_THROW ); + uno::Reference<lang::XMultiComponentFactory> xConfigMgr( + createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))), + UNO_QUERY_THROW ); Sequence< Any > theArgs(1); theArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Linguistic/General")); uno::Reference< container::XNameAccess > xNameAccess = - uno::Reference< container::XNameAccess >(xConfigMgr->createInstanceWithArguments( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), theArgs ), - UNO_QUERY_THROW ); + uno::Reference< container::XNameAccess >(xConfigMgr->createInstanceWithArgumentsAndContext( + OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess")), theArgs, m_xContext ), UNO_QUERY_THROW ); if (xNameAccess.is()) xNameAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale"))) >>= sUILocale; @@ -258,9 +232,10 @@ static void lcl_setGTKLanguage(const uno::Reference<lang::XMultiServiceFactory>& bSet = true; } -SalGtkPicker::SalGtkPicker(const uno::Reference<lang::XMultiServiceFactory>& xServiceMgr) : m_pDialog(0) +SalGtkPicker::SalGtkPicker( const uno::Reference<uno::XComponentContext>& xContext ) + : m_pDialog( 0 ), m_xContext( xContext ) { - lcl_setGTKLanguage(xServiceMgr); + setGtkLanguage(); } SalGtkPicker::~SalGtkPicker() @@ -310,4 +285,11 @@ void SAL_CALL SalGtkPicker::implsetTitle( const rtl::OUString& aTitle ) throw( u gtk_window_set_title( GTK_WINDOW( m_pDialog ), aWindowTitle.getStr() ); } +uno::Reference< uno::XInterface > SalGtkPicker::createInstance( const rtl::OUString &rName ) +{ + return m_xContext->getServiceManager()->createInstanceWithContext( rName, m_xContext ); +} + +#endif + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.hxx b/vcl/unx/gtk/fpicker/SalGtkPicker.hxx index cd9e6553a925..760021d36b52 100644 --- a/vcl/unx/gtk/fpicker/SalGtkPicker.hxx +++ b/vcl/unx/gtk/fpicker/SalGtkPicker.hxx @@ -56,7 +56,7 @@ class SalGtkPicker { public: - SalGtkPicker(const ::com::sun::star::uno::Reference<com::sun::star::lang::XMultiServiceFactory>& xServiceMgr); + SalGtkPicker( const ::com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext>& xContext ); virtual ~SalGtkPicker(); protected: osl::Mutex m_rbHelperMtx; @@ -70,8 +70,14 @@ class SalGtkPicker virtual rtl::OUString SAL_CALL implgetDisplayDirectory( ) throw( com::sun::star::uno::RuntimeException ); - static rtl::OUString uritounicode(const gchar *pIn); - static rtl::OString unicodetouri(const rtl::OUString &rURL); + rtl::OUString uritounicode(const gchar *pIn); + rtl::OString unicodetouri(const rtl::OUString &rURL); + + // to instanciate own services + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; + ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > createInstance( const rtl::OUString &rName ); + private: + void setGtkLanguage(); }; class GdkThreadLock @@ -94,7 +100,6 @@ class RunDialog : private: osl::Mutex maLock; GtkWidget *mpDialog; - GdkWindow *mpCreatedParent; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XExtendedToolkit> mxToolkit; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDesktop > mxDesktop; public: diff --git a/vcl/unx/gtk/fpicker/fps_gnome.component b/vcl/unx/gtk/fpicker/fps_gnome.component deleted file mode 100644 index 72bca42f8acf..000000000000 --- a/vcl/unx/gtk/fpicker/fps_gnome.component +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!--********************************************************************** -* -* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -* -* Copyright 2000, 2010 Oracle and/or its affiliates. -* -* 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. -* -**********************************************************************--> - -<component loader="com.sun.star.loader.SharedLibrary" - xmlns="http://openoffice.org/2010/uno-components"> - <implementation name="com.sun.star.ui.dialogs.SalGtkFilePicker"> - <service name="com.sun.star.ui.dialogs.GtkFilePicker"/> - </implementation> - <implementation name="com.sun.star.ui.dialogs.SalGtkFolderPicker"> - <service name="com.sun.star.ui.dialogs.GtkFolderPicker"/> - </implementation> -</component> diff --git a/vcl/unx/gtk/fpicker/fps_gnome.xml b/vcl/unx/gtk/fpicker/fps_gnome.xml deleted file mode 100644 index d4dd4f9231d6..000000000000 --- a/vcl/unx/gtk/fpicker/fps_gnome.xml +++ /dev/null @@ -1,79 +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</module-name> - <component-description> - <author> Jan Holesovsky </author> - <name> com.sun.star.comp.ui.dialogs.FilePicker </name> - <description> - The Gnome 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> - <component-description> - <author> Caolan McNamara </author> - <name> com.sun.star.comp.ui.dialogs.FolderPicker </name> - <description> - The Gnome implementation of the FolderPicker service. - </description> - <loader-name>com.sun.star.loader.SharedLibrary</loader-name> - <language> c++ </language> - <status value="beta"/> - <supported-service> com.sun.star.ui.dialogs.FolderPicker </supported-service> - <service-dependency>...</service-dependency> - <type> com.sun.star.ui.dialogs.XExecutableDialog </type> - <type> com.sun.star.ui.dialogs.XFolderPicker </type> - <type> com.sun.star.ui.dialogs.ExecutableDialogException </type> - <type> com.sun.star.ui.dialogs.ExecutableDialogResults </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/vcl/unx/gtk/fpicker/resourceprovider.cxx b/vcl/unx/gtk/fpicker/resourceprovider.cxx index 4a4f49cc089d..70a3e68ecd05 100644 --- a/vcl/unx/gtk/fpicker/resourceprovider.cxx +++ b/vcl/unx/gtk/fpicker/resourceprovider.cxx @@ -26,9 +26,6 @@ * ************************************************************************/ -// MARKER(update_precomp.py): autogen include statement, do not remove -#include "precompiled_fpicker.hxx" - //------------------------------------------------------------------------ // includes //------------------------------------------------------------------------ diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx index f3e7f6ff188f..e8998ca94abc 100644 --- a/vcl/unx/gtk/window/gtkframe.cxx +++ b/vcl/unx/gtk/window/gtkframe.cxx @@ -664,6 +664,9 @@ void GtkSalFrame::InitCommon() m_aSystemData.nDepth = pDisp->GetVisual( m_nScreen ).GetDepth(); m_aSystemData.aColormap = pDisp->GetColormap( m_nScreen ).GetXColormap(); m_aSystemData.aWindow = widget_get_xid(m_pWindow); +#else + static int nWindow = 0; + m_aSystemData.aWindow = nWindow++; #endif m_aSystemData.pSalFrame = this; m_aSystemData.pWidget = m_pWindow; @@ -3284,6 +3287,7 @@ gboolean GtkSalFrame::signalMap( GtkWidget *pWidget, GdkEvent*, gpointer frame ) RevertToParent, CurrentTime ); } #else + (void)pWidget; # warning FIXME no set input focus ... #endif |