diff options
author | Tor Lillqvist <tlillqvist@novell.com> | 2011-07-20 22:26:55 +0300 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@novell.com> | 2011-07-20 22:27:00 +0300 |
commit | 104587b4ee67fca94123650022d1cbab9b298002 (patch) | |
tree | dfc9ca8a5efadae97736832a9f1e07c10310a9ae /fpicker | |
parent | 5e89ebcafdca40d8766dcd8b2768476aa3e4f15f (diff) |
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.
Diffstat (limited to 'fpicker')
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 <cppuhelper/interfacecontainer.h> #include <osl/diagnose.h> -#include "filepicker.hxx" +#include "FilePicker.hxx" #include "WinFileOpenImpl.hxx" #include "FPServiceInfo.hxx" -#include "..\misc\WinImplHelper.hxx" +#include "../misc/WinImplHelper.hxx" #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #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 <shobjidl.h> + +// 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 <com/sun/star/lang/DisposedException.hpp> @@ -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 <shobjidl.h> + +// 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 <shobjidl.h> + +// 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 <cppuhelper/interfacecontainer.h> #include <osl/interlck.h> -#include <shobjidl.h> - //----------------------------------------------------------------------------- // 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 <shobjidl.h> + +// Without IFileDialog we can't do much +#ifdef __IFileDialog_INTERFACE_DEFINED__ + #include "VistaFilePickerImpl.hxx" #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> @@ -42,9 +47,9 @@ #ifdef __MINGW32__ #include <limits.h> #endif -#include "..\misc\WinImplHelper.hxx" +#include "../misc/WinImplHelper.hxx" -#include <Shlguid.h> +#include <shlguid.h> 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 <shobjidl.h> +#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 <osl/conditn.hxx> #include <rtl/ustring.hxx> -#if defined _MSC_VER -#pragma warning(push, 1) -#endif -#include <shobjidl.h> -#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 <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/FilePreviewImageFormats.hpp> -#include <com/sun/star/ui/dialogs/ListBoxControlActions.hpp> -#include "..\misc\WinImplHelper.hxx" +#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp> +#include "../misc/WinImplHelper.hxx" -#include "filepicker.hxx" +#include "FilePicker.hxx" #include "controlaccess.hxx" #include <rtl/ustrbuf.hxx> #include <rtl/string.hxx> 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 <utility> #include <memory> 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 <sal/macros.h> #include <osl/diagnose.h> #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 <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> -#include <com/sun/star/ui/dialogs/ListBoxControlActions.hpp> +#include <com/sun/star/ui/dialogs/ListboxControlActions.hpp> #include <com/sun/star/ui/dialogs/ControlActions.hpp> #include "controlcommandrequest.hxx" #include "controlcommandresult.hxx" @@ -47,7 +47,7 @@ #include "FileOpenDlg.hxx" #include <memory> -#include "..\misc\WinImplHelper.hxx" +#include "../misc/WinImplHelper.hxx" //--------------------------------------------- // //--------------------------------------------- |