summaryrefslogtreecommitdiff
path: root/fpicker
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-03-12 06:31:09 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-03-12 06:31:09 +0000
commitdd0a38f5a9bc9f4fc9ee42633e0841d845433af7 (patch)
treefff779519950e08a8d89873c22676ecae1287919 /fpicker
parent1f01a1a6473bb8c8768d0834d3a2341203060848 (diff)
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
Diffstat (limited to 'fpicker')
-rw-r--r--fpicker/source/win32/filepicker/FPentry.cxx31
1 files 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 <stdio.h>
+
//-----------------------------------------------
// 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;
}
//------------------------------------------------