From dd0a38f5a9bc9f4fc9ee42633e0841d845433af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Timm?= Date: Wed, 12 Mar 2008 06:31:09 +0000 Subject: [PATCH] INTEGRATION: CWS hro34 (1.5.42); FILE MERGED 2008/03/07 10:38:14 hro 1.5.42.1: #i78851# #i72556# Implemented Vista style File Dialog --- fpicker/source/win32/filepicker/FPentry.cxx | 31 +++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx index b2ea931591c1..8cbca7b2ad84 100644 --- a/fpicker/source/win32/filepicker/FPentry.cxx +++ b/fpicker/source/win32/filepicker/FPentry.cxx @@ -4,9 +4,9 @@ * * $RCSfile: FPentry.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: ihi $ $Date: 2007-11-19 16:25:55 $ + * last change: $Author: rt $ $Date: 2008-03-12 07:31:09 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -60,6 +60,11 @@ #include "FPServiceInfo.hxx" #endif +#pragma warning (disable:4917) +#include "VistaFilePicker.hxx" +#include "..\misc\WinImplHelper.hxx" +#include + //----------------------------------------------- // namespace directives //----------------------------------------------- @@ -80,9 +85,25 @@ using ::com::sun::star::ui::dialogs::XFilePicker2; static Reference< XInterface > SAL_CALL createInstance( const Reference< XMultiServiceFactory >& rServiceManager ) { - return Reference< XInterface >( - static_cast< XFilePicker2* >( - new CFilePicker( rServiceManager ) ) ); + Reference< XInterface > xDlg; + bool bVista = IsWindowsVista(); + + if (bVista) + { + fprintf(stdout, "use special (vista) system file picker ...\n"); + xDlg.set( + static_cast< XFilePicker2* >( + new ::fpicker::win32::vista::VistaFilePicker( rServiceManager ) ) ); + } + else + { + fprintf(stdout, "use normal system file picker ...\n"); + xDlg.set( + static_cast< XFilePicker2* >( + new CFilePicker( rServiceManager ) ) ); + } + + return xDlg; } //------------------------------------------------