[Libreoffice-commits] .: 4 commits - fpicker/source
Tor Lillqvist
tml at kemper.freedesktop.org
Wed Jul 20 12:04:23 PDT 2011
fpicker/source/win32/filepicker/FPServiceInfo.hxx | 9
fpicker/source/win32/filepicker/FPentry.cxx | 4
fpicker/source/win32/filepicker/FileOpenDlg.cxx | 14
fpicker/source/win32/filepicker/FilePicker.cxx | 46 --
fpicker/source/win32/filepicker/Fps.rc | 211 ----------
fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx | 2
fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx | 2
fpicker/source/win32/filepicker/WinFileOpenImpl.cxx | 7
fpicker/source/win32/filepicker/makefile.mk | 2
fpicker/source/win32/filepicker/platform_vista.h | 2
fpicker/source/win32/filepicker/previewadapter.cxx | 145 ------
fpicker/source/win32/misc/WinImplHelper.cxx | 94 ----
fpicker/source/win32/misc/WinImplHelper.hxx | 12
13 files changed, 38 insertions(+), 512 deletions(-)
New commits:
commit 80c1e27eefa936cb5af501201904270b924982b9
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Wed Jul 20 22:02:56 2011 +0300
Fix some MinGW warnings and errors
diff --git a/fpicker/source/win32/filepicker/FPentry.cxx b/fpicker/source/win32/filepicker/FPentry.cxx
index 848296f..1fd04a8 100644
--- a/fpicker/source/win32/filepicker/FPentry.cxx
+++ b/fpicker/source/win32/filepicker/FPentry.cxx
@@ -38,9 +38,11 @@
#include "FilePicker.hxx"
#include "FPServiceInfo.hxx"
+#ifdef _MSC_VER
#pragma warning (disable:4917)
+#endif
#include "VistaFilePicker.hxx"
-#include "..\misc\WinImplHelper.hxx"
+#include "../misc/WinImplHelper.hxx"
#include <stdio.h>
//-----------------------------------------------
diff --git a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
index d466104..de2021f 100644
--- a/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
+++ b/fpicker/source/win32/filepicker/IVistaFilePickerInternalNotify.hxx
@@ -75,6 +75,6 @@ class IVistaFilePickerInternalNotify
#undef css
-#endif FPICKER_WIN32_VISTA_FILEPICKER_INTERNALNOTIFY_HXX
+#endif // FPICKER_WIN32_VISTA_FILEPICKER_INTERNALNOTIFY_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
index 04669a2..6cb0b9e 100644
--- a/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
+++ b/fpicker/source/win32/filepicker/VistaFilePickerImpl.hxx
@@ -44,7 +44,7 @@
#include "FilterContainer.hxx"
#include "VistaFilePickerEventHandler.hxx"
#include "IVistaFilePickerInternalNotify.hxx"
-#include "..\misc\resourceprovider.hxx"
+#include "../misc/resourceprovider.hxx"
#include <com/sun/star/uno/Sequence.hxx>
diff --git a/fpicker/source/win32/filepicker/platform_vista.h b/fpicker/source/win32/filepicker/platform_vista.h
index 5a3d268..a8f21ef 100644
--- a/fpicker/source/win32/filepicker/platform_vista.h
+++ b/fpicker/source/win32/filepicker/platform_vista.h
@@ -48,6 +48,7 @@
#pragma warning(pop)
#endif
+#ifdef _MSC_VER
#if defined _M_IX86
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
@@ -57,6 +58,7 @@
#else
#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
+#endif
#endif
commit 6bbadfff1099031ee02195a387fd6fa7edf564a9
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Wed Jul 20 22:02:25 2011 +0300
The file is Fps.rc, not fps.rc
diff --git a/fpicker/source/win32/filepicker/makefile.mk b/fpicker/source/win32/filepicker/makefile.mk
index bfe5bee..32ecc86 100644
--- a/fpicker/source/win32/filepicker/makefile.mk
+++ b/fpicker/source/win32/filepicker/makefile.mk
@@ -45,7 +45,7 @@ CDEFS+=-U_WIN32_WINNT -D_WIN32_WINNT=0x0600
# --- Resources ----------------------------------------------------
.IF "$(GUI)" == "WNT"
-RCFILES=fps.rc
+RCFILES=Fps.rc
.ENDIF
# --- Files --------------------------------------------------------
commit 53053e6d5c366ebe611ee0af3ac14d9a6540be42
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Wed Jul 20 22:01:50 2011 +0300
Drop Win9x dialogs and make compatible with windres
diff --git a/fpicker/source/win32/filepicker/Fps.rc b/fpicker/source/win32/filepicker/Fps.rc
index ad08ad0..8dde22e 100644
--- a/fpicker/source/win32/filepicker/Fps.rc
+++ b/fpicker/source/win32/filepicker/Fps.rc
@@ -52,66 +52,30 @@ END
// Dialog
//
-1000 DIALOG DISCARDABLE 0, 0, 200, 37
-STYLE DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
-FONT 8, "Andale Sans UI"
-BEGIN
- CONTROL "Mit Schreibschutz öffnen",103,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
- 52,24,148,10
- COMBOBOX 107,52,8,148,52,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "Version:",207,0,10,52,11
- LTEXT "",1119,0,0,200,8
-END
-
1001 DIALOG DISCARDABLE 0, 0, 338, 67
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg"
BEGIN
- CONTROL "Mit Schreibschutz öffnen",103,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
+ CONTROL "Mit Schreibschutz \366ffnen",103,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
130,51,161,14
COMBOBOX 107,130,35,164,52,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
LTEXT "Version:",207,68,37,56,11
LTEXT "",1119,0,0,336,35
END
-2000 DIALOG DISCARDABLE 0, 0, 210, 53
-STYLE DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
-FONT 8, "Andale Sans UI"
-BEGIN
- CONTROL "Vorschau",105,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
- 52,40,157,10
- CONTROL "Als Link einfügen",104,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
- 52,28,157,10
- COMBOBOX 109,52,12,156,54,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "Bildvorlage:",209,4,14,48,10
- LTEXT "",1119,0,0,210,12
-END
-
2001 DIALOG DISCARDABLE 0, 0, 280, 72
STYLE DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "Vorschau",105,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
130,58,144,16
- CONTROL "Als Link einfügen",104,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
+ CONTROL "Als Link einf\374gen",104,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,
130,45,144,14
COMBOBOX 109,130,28,164,62,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP
LTEXT "Bildvorlage:",209,67,30,47,11
LTEXT "",1119,0,0,281,28
END
-3000 DIALOG DISCARDABLE 0, 0, 208, 49
-STYLE DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
-FONT 8, "Andale Sans UI"
-BEGIN
- CONTROL "Automatische Dateinamenserweiterung",100,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,52,36,156,10
- COMBOBOX 108,52,20,156,52,CBS_DROPDOWNLIST | WS_VSCROLL |
- WS_TABSTOP
- LTEXT "Vorlagen:",208,4,22,47,11
- LTEXT "",1119,0,0,208,20
-END
-
3001 DIALOG DISCARDABLE 0, 0, 296, 72
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg"
@@ -124,17 +88,6 @@ BEGIN
LTEXT "",1119,0,0,293,41
END
-4000 DIALOG DISCARDABLE 0, 0, 196, 41
-STYLE DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
-FONT 8, "Andale Sans UI"
-BEGIN
- CONTROL "Mit Kennwort speichern",101,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,52,28,141,10
- CONTROL "Automatische Dateinamenserweiterung",100,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,52,16,141,10
- LTEXT "",1119,0,0,195,16
-END
-
4001 DIALOG DISCARDABLE 0, 0, 278, 67
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg"
@@ -146,19 +99,6 @@ BEGIN
LTEXT "",1119,0,0,277,38
END
-5000 DIALOG DISCARDABLE 0, 0, 192, 57
-STYLE DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
-FONT 8, "Andale Sans UI"
-BEGIN
- CONTROL "Filtereinstellungen bearbeiten",102,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,52,44,140,10
- CONTROL "Mit Kennwort speichern",101,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,52,32,140,10
- CONTROL "Automatische Dateinamenserweiterung",100,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,52,20,140,10
- LTEXT "",1119,0,0,192,20
-END
-
5001 DIALOG DISCARDABLE 0, 0, 278, 79
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg"
@@ -172,14 +112,6 @@ BEGIN
LTEXT "",1119,0,0,277,38
END
-6000 DIALOG DISCARDABLE 0, 0, 212, 25
-STYLE DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
-FONT 8, "Andale Sans UI"
-BEGIN
- LTEXT "",1119,0,0,212,8,NOT WS_VISIBLE
- PUSHBUTTON "Abspielen",106,156,8,50,15
-END
-
6001 DIALOG DISCARDABLE 0, 0, 366, 40
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg"
@@ -188,17 +120,6 @@ BEGIN
PUSHBUTTON "Abspielen",106,316,18,50,14
END
-7000 DIALOG DISCARDABLE 0, 0, 196, 45
-STYLE DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
-FONT 8, "Andale Sans UI"
-BEGIN
- CONTROL "Selektion",110,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,52,
- 32,143,10
- CONTROL "Automatische Dateinamenserweiterung",100,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,52,20,143,10
- LTEXT "",1119,0,0,195,20
-END
-
7001 DIALOG DISCARDABLE 0, 0, 278, 65
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg"
@@ -210,37 +131,17 @@ BEGIN
LTEXT "",1119,0,0,277,38
END
-8000 DIALOG DISCARDABLE 0, 0, 152, 41
-STYLE DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
-FONT 8, "Andale Sans UI"
-BEGIN
- CONTROL "Vorschau",105,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,0,
- 28,150,10
- CONTROL "Als Link einfügen",104,"Button",BS_AUTOCHECKBOX |
- WS_TABSTOP,0,16,152,10
- LTEXT "",1119,0,0,149,16
-END
-
8001 DIALOG DISCARDABLE 0, 0, 278, 65
STYLE DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg"
BEGIN
CONTROL "Vorschau",105,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,130,
51,144,16
- CONTROL "Als Link einfügen",104,"Button",BS_AUTOCHECKBOX |
+ CONTROL "Als Link einf\374gen",104,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,130,38,144,14
LTEXT "",1119,0,0,277,38
END
-9000 DIALOG DISCARDABLE 0, 0, 196, 29
-STYLE DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
-FONT 8, "Andale Sans UI"
-BEGIN
- CONTROL "Automatische Dateinamenserweiterung",100,"Button",
- BS_AUTOCHECKBOX | WS_TABSTOP,0,16,196,10
- LTEXT "",1119,0,0,196,16
-END
-
9001 DIALOG DISCARDABLE 0, 0, 278, 54
STYLE DS_3DLOOK | DS_CONTROL | WS_CHILD | WS_CLIPSIBLINGS
FONT 8, "MS Shell Dlg"
@@ -259,13 +160,6 @@ END
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
- 1000, DIALOG
- BEGIN
- VERTGUIDE, 5
- VERTGUIDE, 54
- BOTTOMMARGIN, 34
- END
-
1001, DIALOG
BEGIN
RIGHTMARGIN, 336
@@ -274,20 +168,6 @@ BEGIN
HORZGUIDE, 37
END
- 2000, DIALOG
- BEGIN
- RIGHTMARGIN, 209
- VERTGUIDE, 61
- HORZGUIDE, 25
- END
-
- 3000, DIALOG
- BEGIN
- VERTGUIDE, 51
- BOTTOMMARGIN, 48
- HORZGUIDE, 38
- END
-
3001, DIALOG
BEGIN
RIGHTMARGIN, 294
@@ -295,14 +175,6 @@ BEGIN
HORZGUIDE, 41
END
- 4000, DIALOG
- BEGIN
- RIGHTMARGIN, 194
- VERTGUIDE, 54
- BOTTOMMARGIN, 37
- HORZGUIDE, 34
- END
-
4001, DIALOG
BEGIN
RIGHTMARGIN, 277
@@ -310,13 +182,6 @@ BEGIN
HORZGUIDE, 52
END
- 5000, DIALOG
- BEGIN
- VERTGUIDE, 61
- BOTTOMMARGIN, 56
- HORZGUIDE, 25
- END
-
5001, DIALOG
BEGIN
RIGHTMARGIN, 277
@@ -324,12 +189,6 @@ BEGIN
HORZGUIDE, 52
END
- 6000, DIALOG
- BEGIN
- RIGHTMARGIN, 59
- BOTTOMMARGIN, 20
- END
-
6001, DIALOG
BEGIN
RIGHTMARGIN, 361
@@ -337,12 +196,6 @@ BEGIN
HORZGUIDE, 20
END
- 7000, DIALOG
- BEGIN
- VERTGUIDE, 54
- HORZGUIDE, 34
- END
-
7001, DIALOG
BEGIN
RIGHTMARGIN, 277
@@ -350,18 +203,6 @@ BEGIN
HORZGUIDE, 52
END
- 8000, DIALOG
- BEGIN
- RIGHTMARGIN, 151
- VERTGUIDE, 61
- BOTTOMMARGIN, 37
- END
-
- 9000, DIALOG
- BEGIN
- BOTTOMMARGIN, 25
- END
-
9001, DIALOG
BEGIN
RIGHTMARGIN, 277
@@ -377,47 +218,25 @@ END
// Dialog Info
//
-1000 DLGINIT
-BEGIN
- 107, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3520, 0x322e, "\000"
- 107, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3420, 0x302e, "\000"
- 107, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3320, 0x302e, "\000"
- 0
-END
-
1001 DLGINIT
BEGIN
- 107, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3520, 0x322e, "\000"
- 107, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3420, 0x302e, "\000"
- 107, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3320, 0x302e, "\000"
- 0
-END
-
-3000 DLGINIT
-BEGIN
- 108, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3520, 0x322e, "\000"
- 108, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3420, 0x302e, "\000"
- 108, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3320, 0x302e, "\000"
+ 107, 0x403, 15, 0,
+0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3520, 0x322e, "\000",
+ 107, 0x403, 15, 0,
+0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3420, 0x302e, "\000",
+ 107, 0x403, 15, 0,
+0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3320, 0x302e, "\000",
0
END
3001 DLGINIT
BEGIN
- 108, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3520, 0x322e, "\000"
- 108, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3420, 0x302e, "\000"
- 108, 0x403, 15, 0
-0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3320, 0x302e, "\000"
+ 108, 0x403, 15, 0,
+0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3520, 0x322e, "\000",
+ 108, 0x403, 15, 0,
+0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3420, 0x302e, "\000",
+ 108, 0x403, 15, 0,
+0x7453, 0x7261, 0x7257, 0x7469, 0x7265, 0x3320, 0x302e, "\000",
0
END
commit 0266f687a88e13bba41f3dc8cf81283d9a375f37
Author: Tor Lillqvist <tlillqvist at novell.com>
Date: Wed Jul 20 21:51:04 2011 +0300
Drop Win9x stuff
diff --git a/fpicker/source/win32/filepicker/FPServiceInfo.hxx b/fpicker/source/win32/filepicker/FPServiceInfo.hxx
index 528add7..0a9408f 100644
--- a/fpicker/source/win32/filepicker/FPServiceInfo.hxx
+++ b/fpicker/source/win32/filepicker/FPServiceInfo.hxx
@@ -37,31 +37,22 @@
// the service name is a description of a set of
// interfaces (is the same as component categories in COM)
-#define TMPL95_FILEOPEN_READONLY_VERSION_BOX_ID 1000
#define TMPL2000_FILEOPEN_READONLY_VERSION_BOX_ID 1001
-#define TMPL95_FILEOPEN_LINK_PREVIEW_BOX_ID 2000
#define TMPL2000_FILEOPEN_LINK_PREVIEW_BOX_ID 2001
-#define TMPL95_FILEOPEN_AUTOEXT_TEMPLATE_BOX_ID 3000
#define TMPL2000_FILEOPEN_AUTOEXT_TEMPLATE_BOX_ID 3001
-#define TMPL95_FILESAVE_AUTOEXT_PASSWORD_BOX_ID 4000
#define TMPL2000_FILESAVE_AUTOEXT_PASSWORD_BOX_ID 4001
-#define TMPL95_AUTOEXT_PASSWORD_FILTEROPTION_BOX 5000
#define TMPL2000_AUTOEXT_PASSWORD_FILTEROPTION_BOX 5001
-#define TMPL95_PLAY_PUSHBUTTON 6000
#define TMPL2000_PLAY_PUSHBUTTON 6001
-#define TMPL95_AUTOEXT_SELECTION_BOX 7000
#define TMPL2000_AUTOEXT_SELECTION_BOX 7001
-#define TMPL95_FILEOPEN_LINK_PREVIEW_BOX_SIMPLE_ID 8000
#define TMPL2000_FILEOPEN_LINK_PREVIEW_BOX_SIMPLE_ID 8001
-#define TMPL95_FILESAVE_AUTOEXT 9000
#define TMPL2000_FILESAVE_AUTOEXT 9001
// the service names
diff --git a/fpicker/source/win32/filepicker/FileOpenDlg.cxx b/fpicker/source/win32/filepicker/FileOpenDlg.cxx
index ffd9fa3..0e95b1d 100644
--- a/fpicker/source/win32/filepicker/FileOpenDlg.cxx
+++ b/fpicker/source/win32/filepicker/FileOpenDlg.cxx
@@ -102,18 +102,8 @@ CFileOpenDialog::CFileOpenDialog(
m_pfnBaseDlgProc(0)
{
// initialize the OPENFILENAME struct
- if (IsWindows2000Platform() || IsWindowsME())
- {
- ZeroMemory(&m_ofn, sizeof(m_ofn));
- m_ofn.lStructSize = sizeof(m_ofn);
- }
- else // OSVER < Win2000
- {
- // the size of the OPENFILENAME structure is different
- // under windows < win2000
- ZeroMemory(&m_ofn, _OPENFILENAME_SIZE_VERSION_400);
- m_ofn.lStructSize = _OPENFILENAME_SIZE_VERSION_400;
- }
+ ZeroMemory(&m_ofn, sizeof(m_ofn));
+ m_ofn.lStructSize = sizeof(m_ofn);
// 0x02000000 for #97681, sfx will make the entry into
// the recent document list
diff --git a/fpicker/source/win32/filepicker/FilePicker.cxx b/fpicker/source/win32/filepicker/FilePicker.cxx
index f0782d3..c0cbb21 100644
--- a/fpicker/source/win32/filepicker/FilePicker.cxx
+++ b/fpicker/source/win32/filepicker/FilePicker.cxx
@@ -646,7 +646,6 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
sal_Bool bFileOpenDialog = sal_True;
sal_uInt32 winResTemplateId = 0;
- sal_Bool bIsWin2000 = IsWindows2000Platform();
switch ( templateId )
{
@@ -660,70 +659,43 @@ void SAL_CALL CFilePicker::initialize(const uno::Sequence<uno::Any>& aArguments)
case FILESAVE_AUTOEXTENSION_PASSWORD:
bFileOpenDialog = sal_False;
- if ( bIsWin2000 )
- winResTemplateId = TMPL2000_FILESAVE_AUTOEXT_PASSWORD_BOX_ID;
- else
- winResTemplateId = TMPL95_FILESAVE_AUTOEXT_PASSWORD_BOX_ID;
+ winResTemplateId = TMPL2000_FILESAVE_AUTOEXT_PASSWORD_BOX_ID;
break;
case FILESAVE_AUTOEXTENSION_PASSWORD_FILTEROPTIONS:
bFileOpenDialog = sal_False;
- if ( bIsWin2000 )
- winResTemplateId = TMPL2000_AUTOEXT_PASSWORD_FILTEROPTION_BOX;
- else
- winResTemplateId = TMPL95_AUTOEXT_PASSWORD_FILTEROPTION_BOX;
+ winResTemplateId = TMPL2000_AUTOEXT_PASSWORD_FILTEROPTION_BOX;
break;
case FILESAVE_AUTOEXTENSION_SELECTION:
bFileOpenDialog = sal_False;
- if ( bIsWin2000 )
- winResTemplateId = TMPL2000_AUTOEXT_SELECTION_BOX;
- else
- winResTemplateId = TMPL95_AUTOEXT_SELECTION_BOX;
+ winResTemplateId = TMPL2000_AUTOEXT_SELECTION_BOX;
break;
case FILESAVE_AUTOEXTENSION_TEMPLATE:
bFileOpenDialog = sal_False;
- if ( bIsWin2000 )
- winResTemplateId = TMPL2000_FILEOPEN_AUTOEXT_TEMPLATE_BOX_ID;
- else
- winResTemplateId = TMPL95_FILEOPEN_AUTOEXT_TEMPLATE_BOX_ID;
+ winResTemplateId = TMPL2000_FILEOPEN_AUTOEXT_TEMPLATE_BOX_ID;
break;
case FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE:
- if ( bIsWin2000 )
- winResTemplateId = TMPL2000_FILEOPEN_LINK_PREVIEW_BOX_ID;
- else
- winResTemplateId = TMPL95_FILEOPEN_LINK_PREVIEW_BOX_ID;
+ winResTemplateId = TMPL2000_FILEOPEN_LINK_PREVIEW_BOX_ID;
break;
case FILEOPEN_PLAY:
- if ( bIsWin2000 )
- winResTemplateId = TMPL2000_PLAY_PUSHBUTTON;
- else
- winResTemplateId = TMPL95_PLAY_PUSHBUTTON;
+ winResTemplateId = TMPL2000_PLAY_PUSHBUTTON;
break;
case FILEOPEN_READONLY_VERSION:
- if ( bIsWin2000 )
- winResTemplateId = TMPL2000_FILEOPEN_READONLY_VERSION_BOX_ID;
- else
- winResTemplateId = TMPL95_FILEOPEN_READONLY_VERSION_BOX_ID;
+ winResTemplateId = TMPL2000_FILEOPEN_READONLY_VERSION_BOX_ID;
break;
case FILEOPEN_LINK_PREVIEW:
- if ( bIsWin2000 )
- winResTemplateId = TMPL2000_FILEOPEN_LINK_PREVIEW_BOX_SIMPLE_ID;
- else
- winResTemplateId = TMPL95_FILEOPEN_LINK_PREVIEW_BOX_SIMPLE_ID;
+ winResTemplateId = TMPL2000_FILEOPEN_LINK_PREVIEW_BOX_SIMPLE_ID;
break;
case FILESAVE_AUTOEXTENSION:
bFileOpenDialog = sal_False;
- if ( bIsWin2000 )
- winResTemplateId = TMPL2000_FILESAVE_AUTOEXT;
- else
- winResTemplateId = TMPL95_FILESAVE_AUTOEXT;
+ winResTemplateId = TMPL2000_FILESAVE_AUTOEXT;
break;
default:
diff --git a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
index e38493b..87d9b09 100644
--- a/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
+++ b/fpicker/source/win32/filepicker/WinFileOpenImpl.cxx
@@ -715,8 +715,8 @@ void CWinFileOpenImpl::EnlargeStdControlLabels() const
RECT rcOkButton;
GetWindowRect(hOkButton, &rcOkButton);
- const int MAX_GAP = IsWindows98() ? 5 : 10;
- const int OFFSET = IsWindows98() ? 10 : 0;
+ const int MAX_GAP = 10;
+ const int OFFSET = 0;
RECT rcFileNameBox;
GetWindowRect(hFileNameBox, &rcFileNameBox);
@@ -1007,8 +1007,7 @@ void SAL_CALL CWinFileOpenImpl::InitialSetDefaultName()
// of an edit field for the file name edit field
// the control id of this box is cmb13 and not
// edt1 as before so we must use this id
- if (IsWindows2000Platform())
- edt1Id = cmb13;
+ edt1Id = cmb13;
HWND hwndEdt1 = GetDlgItem(m_hwndFileOpenDlg, edt1Id);
SetWindowText(hwndEdt1, reinterpret_cast<LPCTSTR>(m_defaultName.getStr()));
diff --git a/fpicker/source/win32/filepicker/previewadapter.cxx b/fpicker/source/win32/filepicker/previewadapter.cxx
index 55a0af9..b6d2334 100644
--- a/fpicker/source/win32/filepicker/previewadapter.cxx
+++ b/fpicker/source/win32/filepicker/previewadapter.cxx
@@ -403,146 +403,6 @@ HWND SAL_CALL CPreviewAdapterImpl::findFileListbox() const
//##############################################################
-//-----------------------------------------
-// Special implementation for Win98
-// because:
-//
-//-----------------------------------------
-
-class CWin98PreviewAdapterImpl : public CPreviewAdapterImpl
-{
-public:
- CWin98PreviewAdapterImpl(HINSTANCE instance);
-
- virtual void SAL_CALL notifyParentWindowPosChanged();
-
-protected:
- virtual void SAL_CALL rearrangeLayout();
-
- bool isValidToolbarDimension() const;
-
-private:
- sal_Bool m_PreviewActive;
- int m_ToolbarPosX;
- int m_ToolbarPosY;
- int m_ToolbarWidth;
- int m_ToolbarHeight;
-};
-
-//--------------------------------------------
-//
-//--------------------------------------------
-
-CWin98PreviewAdapterImpl::CWin98PreviewAdapterImpl(HINSTANCE instance) :
- CPreviewAdapterImpl(instance),
- m_PreviewActive(sal_False),
- m_ToolbarPosX(0),
- m_ToolbarPosY(0),
- m_ToolbarWidth(0),
- m_ToolbarHeight(0)
-{
-}
-
-//--------------------------------------------
-//
-//--------------------------------------------
-
-void SAL_CALL CWin98PreviewAdapterImpl::notifyParentWindowPosChanged()
-{
- try
- {
- // the reason for this condition is
- // Windows 98
- // Under Windows 98 the message WM_SHOWWINDOW
- // will be sent only the first time the
- // GetOpenFileName function is called within
- // the same process
- // so we must use another message to initialize
- // the preview window
- if (IsWindow(m_FileDialog) && !m_PreviewActive)
- {
- initializeActivePreview();
- m_PreviewActive = sal_True;
- rearrangeLayout();
- }
-
- if (IsWindow(m_FileDialog) && !isValidToolbarDimension())
- {
- RECT rcStc1;
- GetWindowRect(GetDlgItem(m_FileDialog,stc1),&rcStc1);
-
- RECT rcCmb2;
- GetWindowRect(GetDlgItem(m_FileDialog,cmb2),&rcCmb2);
-
- // Assumption:
- // the toolbar position is only valid
- // if the left edge is greater or equal
- // than the right edge of the drives listbox
- // the stc1 static text is invisible at runtime
- // but will be used as reference for the position
- // and dimension of the toolbar
- if (rcStc1.left >= rcCmb2.right)
- {
- // important: save the upper left corner in
- // client coordinates
- POINT pt = {rcStc1.left,rcStc1.top};
- ScreenToClient(m_FileDialog,&pt);
-
- m_ToolbarPosX = pt.x;
- m_ToolbarPosY = pt.y;
- m_ToolbarWidth = rcStc1.right - rcStc1.left;
- m_ToolbarHeight = rcStc1.bottom - rcStc1.top;
- }
- }
- }
- catch(std::runtime_error&)
- {
- }
-}
-
-//--------------------------------------------
-//
-//--------------------------------------------
-
-void SAL_CALL CWin98PreviewAdapterImpl::rearrangeLayout()
-{
- CPreviewAdapterImpl::rearrangeLayout();
-
- // fix the position of the upper toolbar
- // because the FileDialog moves all windows
- // that are to the right of the FileListbox
- // so if we have changed the size of the
- // FileListbox we would run into trouble else
- if (isValidToolbarDimension())
- {
- HWND hwndTlb = FindWindowEx(
- m_FileDialog,NULL,TEXT("ToolbarWindow32"),NULL);
-
- SetWindowPos(hwndTlb,
- HWND_TOP,
- m_ToolbarPosX,
- m_ToolbarPosY,
- m_ToolbarWidth,
- m_ToolbarHeight,
- SWP_NOACTIVATE);
- }
-}
-
-//--------------------------------------------
-//
-//--------------------------------------------
-
-bool CWin98PreviewAdapterImpl::isValidToolbarDimension() const
-{
- return (m_ToolbarPosX > 0 &&
- m_ToolbarPosY > 0 &&
- m_ToolbarWidth > 0 &&
- m_ToolbarHeight > 0);
-}
-
-//##############################################################
-
-
//--------------------------------------------
// Implementation for Windows 95/NT/ME/2000/XP
// because:
@@ -595,10 +455,7 @@ void SAL_CALL CWin95NTPreviewAdapterImpl::notifyParentShow(sal_Bool bShow)
CPreviewAdapter::CPreviewAdapter(HINSTANCE instance)
{
- if (!IsWindows98())
- m_pImpl.reset(new CWin95NTPreviewAdapterImpl(instance));
- else
- m_pImpl.reset(new CWin98PreviewAdapterImpl(instance));
+ m_pImpl.reset(new CWin95NTPreviewAdapterImpl(instance));
}
//-------------------------------
diff --git a/fpicker/source/win32/misc/WinImplHelper.cxx b/fpicker/source/win32/misc/WinImplHelper.cxx
index cdcd45d..36d502c 100644
--- a/fpicker/source/win32/misc/WinImplHelper.cxx
+++ b/fpicker/source/win32/misc/WinImplHelper.cxx
@@ -73,25 +73,6 @@ const sal_Unicode AMPERSAND_SIGN = L'&';
// Windows ME VER_PLATFORM_WIN32_WINDOWS 4 90
//------------------------------------------------------------
-bool SAL_CALL IsWindowsVersion(unsigned int PlatformId, unsigned int MajorVersion, int MinorVersion = -1)
-{
- OSVERSIONINFO osvi;
- osvi.dwOSVersionInfoSize = sizeof(osvi);
-
- if(!GetVersionEx(&osvi))
- return false;
-
- bool bRet = (PlatformId == osvi.dwPlatformId) &&
- (MajorVersion == osvi.dwMajorVersion);
-
- if (MinorVersion > -1)
- bRet = bRet &&
- (sal::static_int_cast< unsigned int >(MinorVersion) ==
- osvi.dwMinorVersion);
-
- return bRet;
-}
-
//------------------------------------------------------------
// determine if we are running under Vista or newer OS
//------------------------------------------------------------
@@ -115,81 +96,6 @@ bool SAL_CALL IsWindowsVistaOrNewer()
}
//------------------------------------------------------------
-// determine if we are running under Windows 7
-//------------------------------------------------------------
-
-bool SAL_CALL IsWindows7()
-{
- return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 6, 1);
-}
-
-//------------------------------------------------------------
-// determine if we are running under Windows Vista
-//------------------------------------------------------------
-
-bool SAL_CALL IsWindowsVista()
-{
- return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 6, 0);
-}
-
-//------------------------------------------------------------
-// determine if we are running under Windows XP
-//------------------------------------------------------------
-
-bool SAL_CALL IsWindowsXP()
-{
- return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 5, 1);
-}
-
-//------------------------------------------------------------
-// determine if we are running under Windows 2000
-//------------------------------------------------------------
-
-bool SAL_CALL IsWindows2000()
-{
- return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 5, 0);
-}
-
-//------------------------------------------------------------
-//
-//------------------------------------------------------------
-
-bool SAL_CALL IsWindows98()
-{
- return IsWindowsVersion(VER_PLATFORM_WIN32_WINDOWS, 4, 10);
-}
-
-//------------------------------------------------------------
-//
-//------------------------------------------------------------
-
-bool SAL_CALL IsWindowsME()
-{
- return IsWindowsVersion(VER_PLATFORM_WIN32_WINDOWS, 4, 90);
-}
-
-//------------------------------------------------------------
-//
-//------------------------------------------------------------
-
-bool SAL_CALL IsWindows2000Platform()
-{
- // POST: return true if we are at least on Windows 2000
-
- // WRONG!: return IsWindowsVersion(VER_PLATFORM_WIN32_NT, 5);
-
- OSVERSIONINFO osvi;
- ZeroMemory(&osvi, sizeof(osvi));
- osvi.dwOSVersionInfoSize = sizeof(osvi);
- GetVersionEx(&osvi);
- if ( osvi.dwMajorVersion >= 5 )
- {
- return true;
- }
- return false;
-}
-
-//------------------------------------------------------------
//
//------------------------------------------------------------
diff --git a/fpicker/source/win32/misc/WinImplHelper.hxx b/fpicker/source/win32/misc/WinImplHelper.hxx
index c6e6c93..a9cf245 100644
--- a/fpicker/source/win32/misc/WinImplHelper.hxx
+++ b/fpicker/source/win32/misc/WinImplHelper.hxx
@@ -52,18 +52,6 @@
//------------------------------------------------------------------------
bool SAL_CALL IsWindowsVistaOrNewer();
-bool SAL_CALL IsWindows7();
-bool SAL_CALL IsWindowsVista();
-bool SAL_CALL IsWindows2000();
-bool SAL_CALL IsWindowsXP();
-bool SAL_CALL IsWindows98();
-bool SAL_CALL IsWindowsME();
-
-// returns true if the platform is
-// Windows 2000 or above
-bool SAL_CALL IsWindows2000Platform();
-
-#define IsWin2000 IsWindows2000
// set actions
void SAL_CALL ListboxAddItem(
More information about the Libreoffice-commits
mailing list