diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-11-04 14:40:18 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-11-07 14:19:33 +0000 |
commit | 17084c750df84e0da377d716a4088f72bd25f972 (patch) | |
tree | 148077dac89e352f9b6c35a83f2950b66e6cb40d /vcl/inc | |
parent | 7a47e0ead3471f8f6e737a79704ad8ad2978418a (diff) |
gtk: move the file-picker into vcl/ and add Application:: factory hooks
drop un-necessary uno service related fluff, and component instantiation.
nominal move to XMultiComponentFactory from XMultiServiceFactory
Include fpicker in compilation for gtk3, but more work required here
Simplify setting up transient parents for picker dialogs
Diffstat (limited to 'vcl/inc')
-rw-r--r-- | vcl/inc/salinst.hxx | 12 | ||||
-rw-r--r-- | vcl/inc/unx/gtk/gtkframe.hxx | 5 | ||||
-rw-r--r-- | vcl/inc/unx/gtk/gtkinst.hxx | 7 | ||||
-rw-r--r-- | vcl/inc/vcl/svapp.hxx | 24 | ||||
-rw-r--r-- | vcl/inc/vcl/window.hxx | 2 |
5 files changed, 45 insertions, 5 deletions
diff --git a/vcl/inc/salinst.hxx b/vcl/inc/salinst.hxx index 878aa6dd2d4d..e503fb4ea871 100644 --- a/vcl/inc/salinst.hxx +++ b/vcl/inc/salinst.hxx @@ -30,6 +30,9 @@ #define _SV_SALINST_HXX #include "com/sun/star/uno/Reference.hxx" +#include "com/sun/star/uno/XComponentContext.hpp" +#include "com/sun/star/ui/dialogs/XFilePicker2.hpp" +#include "com/sun/star/ui/dialogs/XFolderPicker.hpp" #include "vcl/sv.h" #include "vcl/displayconnectiondispatch.hxx" @@ -167,6 +170,15 @@ public: virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget(); virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType) = 0; + virtual com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFilePicker2 > + createFilePicker( const com::sun::star::uno::Reference< + com::sun::star::uno::XComponentContext >& ) + { return com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFilePicker2 >(); } + virtual com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFolderPicker > + createFolderPicker( const com::sun::star::uno::Reference< + com::sun::star::uno::XComponentContext >& ) + { return com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFolderPicker >(); } + // callbacks for printer updates virtual void updatePrinterUpdate() {} virtual void jobStartedPrinterUpdate() {} diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index 696e08e76ced..f5ee92a036a8 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -47,6 +47,7 @@ #include <basebmp/bitmapdevice.hxx> #include <basebmp/scanlineformats.hxx> +#include <com/sun/star/awt/XTopWindow.hpp> #include <list> #include <vector> @@ -358,7 +359,7 @@ public: virtual void GetWorkArea( Rectangle& rRect ); virtual SalFrame* GetParent() const; virtual void SetWindowState( const SalFrameState* pState ); - virtual sal_Bool GetWindowState( SalFrameState* pState ); + virtual sal_Bool GetWindowState( SalFrameState* pState ); virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ); // Enable/Disable ScreenSaver, SystemAgents, ... virtual void StartPresentation( sal_Bool bStart ); @@ -430,7 +431,7 @@ public: // done setting up the clipregion virtual void EndSetClipRegion(); - static GtkSalFrame *getFromWindow( GtkWindow *pWindow ); + static GtkSalFrame *getFromWindow( GtkWindow *pWindow ); virtual void damaged (const basegfx::B2IBox& rDamageRect); }; diff --git a/vcl/inc/unx/gtk/gtkinst.hxx b/vcl/inc/unx/gtk/gtkinst.hxx index 98a162ab93d2..55a187908566 100644 --- a/vcl/inc/unx/gtk/gtkinst.hxx +++ b/vcl/inc/unx/gtk/gtkinst.hxx @@ -109,6 +109,13 @@ public: virtual GenPspGraphics *CreatePrintGraphics(); + virtual com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFilePicker2 > + createFilePicker( const com::sun::star::uno::Reference< + com::sun::star::uno::XComponentContext >& ); + virtual com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFolderPicker > + createFolderPicker( const com::sun::star::uno::Reference< + com::sun::star::uno::XComponentContext >& ); + void RemoveTimer (SalTimer *pTimer); // for managing a mirror of the in-flight un-dispatched gdk event queue diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx index 5fea0317b746..951f817b7aa3 100644 --- a/vcl/inc/vcl/svapp.hxx +++ b/vcl/inc/vcl/svapp.hxx @@ -62,8 +62,14 @@ class MouseEvent; namespace com { namespace sun { namespace star { -namespace lang { - class XMultiServiceFactory; +namespace uno { + class XComponentContext; +} +namespace ui { + namespace dialogs { + class XFilePicker2; + class XFolderPicker; + } } namespace awt { class XToolkit; @@ -367,6 +373,20 @@ public: */ static void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType); + /** Create a platform specific file picker, if one is available, + otherwise return an empty reference + */ + static com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFilePicker2 > + createFilePicker( const com::sun::star::uno::Reference< + com::sun::star::uno::XComponentContext >& rServiceManager ); + + /** Create a platform specific folder picker, if one is available, + otherwise return an empty reference + */ + static com::sun::star::uno::Reference< com::sun::star::ui::dialogs::XFolderPicker > + createFolderPicker( const com::sun::star::uno::Reference< + com::sun::star::uno::XComponentContext >& rServiceManager ); + private: DECL_STATIC_LINK( Application, PostEventHandler, void* ); diff --git a/vcl/inc/vcl/window.hxx b/vcl/inc/vcl/window.hxx index ba52258f9103..68946e267105 100644 --- a/vcl/inc/vcl/window.hxx +++ b/vcl/inc/vcl/window.hxx @@ -395,7 +395,7 @@ public: SAL_DLLPRIVATE void ImplRemoveWindow( sal_Bool bRemoveFrameData ); SAL_DLLPRIVATE Window* ImplGetWindow(); SAL_DLLPRIVATE ImplFrameData* ImplGetFrameData(); - SAL_DLLPRIVATE SalFrame* ImplGetFrame() const; + SalFrame* ImplGetFrame() const; SAL_DLLPRIVATE ImplWinData* ImplGetWinData() const; SAL_DLLPRIVATE SalGraphics* ImplGetFrameGraphics() const; SAL_DLLPRIVATE void ImplCallFocusChangeActivate( Window* pNewOverlapWindow, Window* pOldOverlapWindow ); |