From 104587b4ee67fca94123650022d1cbab9b298002 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 20 Jul 2011 22:26:55 +0300 Subject: MinGW fixes Unfortunately IFileDialog is missing from both mingw-w64 and Wine headers, so we can't build the specialized file picker for Vista or newer with MinGW. That sucks. Also fix some file name case and backslash botches in #include statements. --- fpicker/source/win32/filepicker/FPentry.cxx | 3 +++ fpicker/source/win32/filepicker/FilePicker.cxx | 4 ++-- fpicker/source/win32/filepicker/VistaFilePicker.cxx | 9 ++++++++- .../filepicker/VistaFilePickerEventHandler.cxx | 7 +++++++ .../filepicker/VistaFilePickerEventHandler.hxx | 9 +++++++-- .../source/win32/filepicker/VistaFilePickerImpl.cxx | 11 +++++++++-- .../source/win32/filepicker/VistaFilePickerImpl.hxx | 21 +++++++++++++-------- fpicker/source/win32/filepicker/WinFileOpenImpl.cxx | 6 +++--- fpicker/source/win32/filepicker/WinFileOpenImpl.hxx | 2 +- fpicker/source/win32/filepicker/controlaccess.cxx | 2 +- fpicker/source/win32/filepicker/filepickerstate.cxx | 4 ++-- 11 files changed, 56 insertions(+), 22 deletions(-) diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx index fcc6996429c3..79509b3cb54c 100644 --- a/fpicker/source/win32/filepicker/FPentry.cxx +++ b/fpicker/source/win32/filepicker/FPentry.cxx @@ -66,6 +66,8 @@ static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager ) { Reference< XInterface > xDlg; + +#ifdef __IFileDialog_INTERFACE_DEFINED__ bool bVistaOrNewer = IsWindowsVistaOrNewer(); if (bVistaOrNewer) @@ -76,6 +78,7 @@ static Reference< XInterface > SAL_CALL createInstance( new ::fpicker::win32::vista::VistaFilePicker( rServiceManager ) ) ); } else +#endif { OSL_TRACE("use normal system file picker ..."); xDlg.set( diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx index c149d7b24f60..179bd53dc83a 100644 --- a/fpicker/source/win32/filepicker/FilePicker.cxx +++ b/fpicker/source/win32/filepicker/FilePicker.cxx @@ -38,11 +38,11 @@ #include #include -#include "filepicker.hxx" +#include "FilePicker.hxx" #include "WinFileOpenImpl.hxx" #include "FPServiceInfo.hxx" -#include "..\misc\WinImplHelper.hxx" +#include "../misc/WinImplHelper.hxx" #include #include "filepickereventnotification.hxx" diff --git a/fpicker/source/win32/filepicker/VistaFilePicker.cxx b/fpicker/source/win32/filepicker/VistaFilePicker.cxx index edb40f2e099b..06cfb5e35194 100644 --- a/fpicker/source/win32/filepicker/VistaFilePicker.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePicker.cxx @@ -33,13 +33,18 @@ // includes //------------------------------------------------------------------------ +#include + +// Without IFileDialog we can't do much +#ifdef __IFileDialog_INTERFACE_DEFINED__ + #ifdef _MSC_VER #pragma warning (disable:4917) #endif #include "VistaFilePicker.hxx" #include "WinFileOpenImpl.hxx" -#include "..\misc\WinImplHelper.hxx" +#include "../misc/WinImplHelper.hxx" #include "shared.hxx" #include @@ -715,4 +720,6 @@ css::uno::Sequence< ::rtl::OUString > SAL_CALL VistaFilePicker::getSupportedServ } // namespace win32 } // namespace fpicker +#endif // __IFileDialog_INTERFACE_DEFINED__ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx index a0aa8ad0b8cf..b12c2f1204d2 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.cxx @@ -29,6 +29,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_fpicker.hxx" +#include + +// Without IFileDialog we can't do much +#ifdef __IFileDialog_INTERFACE_DEFINED__ + #include "VistaFilePickerEventHandler.hxx" #include "asyncrequests.hxx" @@ -461,4 +466,6 @@ void VistaFilePickerEventHandler::impl_sendEvent( EEventType eEventType, } // namespace win32 } // namespace fpicker +#endif // __IFileDialog_INTERFACE_DEFINED__ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx index 85eed3ca39e0..d86755fa5a9a 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerEventHandler.hxx @@ -37,6 +37,11 @@ #pragma warning( disable : 4917 ) #endif +#include + +// Without IFileDialog we can't do this +#ifdef __IFileDialog_INTERFACE_DEFINED__ + #include "comptr.hxx" #include "vistatypes.h" #include "IVistaFilePickerInternalNotify.hxx" @@ -48,8 +53,6 @@ #include #include -#include - //----------------------------------------------------------------------------- // namespace //----------------------------------------------------------------------------- @@ -223,6 +226,8 @@ class VistaFilePickerEventHandler : public ::cppu::BaseMutex #undef css +#endif // __IFileDialog_INTERFACE_DEFINED__ + #endif // FPICKER_WIN32_VISTA_FILEPICKER_EVENTHANDLER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx index 8538282a44b0..4795e379fda6 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.cxx @@ -30,6 +30,11 @@ // includes //----------------------------------------------------------------------------- +#include + +// Without IFileDialog we can't do much +#ifdef __IFileDialog_INTERFACE_DEFINED__ + #include "VistaFilePickerImpl.hxx" #include @@ -42,9 +47,9 @@ #ifdef __MINGW32__ #include #endif -#include "..\misc\WinImplHelper.hxx" +#include "../misc/WinImplHelper.hxx" -#include +#include inline bool is_current_process_window(HWND hwnd) { @@ -1266,4 +1271,6 @@ bool VistaFilePickerImpl::onFileTypeChanged( UINT /*nTypeIndex*/ ) } // namespace win32 } // namespace fpicker +#endif // __IFileDialog_INTERFACE_DEFINED__ + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx index f6d6b1b420fc..ad54c25fd7e6 100644 --- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx +++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx @@ -37,6 +37,17 @@ #pragma warning( disable : 4917 ) #endif +#if defined _MSC_VER +#pragma warning(push, 1) +#endif +#include +#if defined _MSC_VER +#pragma warning(pop) +#endif + +// Without IFileDialog we can't do this +#ifdef __IFileDialog_INTERFACE_DEFINED__ + #include "platform_vista.h" #include "asyncrequests.hxx" #include "comptr.hxx" @@ -55,14 +66,6 @@ #include #include -#if defined _MSC_VER -#pragma warning(push, 1) -#endif -#include -#if defined _MSC_VER -#pragma warning(pop) -#endif - //----------------------------------------------------------------------------- // namespace //----------------------------------------------------------------------------- @@ -361,6 +364,8 @@ class VistaFilePickerImpl : private ::cppu::BaseMutex #undef css +#endif // __IFileDialog_INTERFACE_DEFINED__ + #endif // FPICKER_WIN32_VISTA_FILEPICKERIMPL_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx index 7b26dcba8743..0bbfb4d851e7 100644 --- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx +++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx @@ -42,10 +42,10 @@ #include #include #include -#include -#include "..\misc\WinImplHelper.hxx" +#include +#include "../misc/WinImplHelper.hxx" -#include "filepicker.hxx" +#include "FilePicker.hxx" #include "controlaccess.hxx" #include #include diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx index 0c58f88c0a74..c5501fbd5e94 100644 --- a/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx +++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.hxx @@ -43,7 +43,7 @@ #include "helppopupwindow.hxx" #include "customcontrol.hxx" #include "customcontrolfactory.hxx" -#include "..\misc\resourceprovider.hxx" +#include "../misc/resourceprovider.hxx" #include #include diff --git a/fpicker/source/win32/filepicker/controlaccess.cxx b/fpicker/source/win32/filepicker/controlaccess.cxx index d41eacd60145..5a5b36acf8a2 100644 --- a/fpicker/source/win32/filepicker/controlaccess.cxx +++ b/fpicker/source/win32/filepicker/controlaccess.cxx @@ -37,7 +37,7 @@ #include #include #include "controlaccess.hxx" -#include "..\misc\WinImplHelper.hxx" +#include "../misc/WinImplHelper.hxx" //------------------------------------------------------------ // we are using a table based algorithm to dispatch control diff --git a/fpicker/source/win32/filepicker/filepickerstate.cxx b/fpicker/source/win32/filepicker/filepickerstate.cxx index ce8d26ac655d..aec50c531894 100644 --- a/fpicker/source/win32/filepicker/filepickerstate.cxx +++ b/fpicker/source/win32/filepicker/filepickerstate.cxx @@ -37,7 +37,7 @@ #include "controlaccess.hxx" #include #include -#include +#include #include #include "controlcommandrequest.hxx" #include "controlcommandresult.hxx" @@ -47,7 +47,7 @@ #include "FileOpenDlg.hxx" #include -#include "..\misc\WinImplHelper.hxx" +#include "../misc/WinImplHelper.hxx" //--------------------------------------------- // //--------------------------------------------- -- cgit