Fix remaining text file line endings in the tree. (#18)
[reactos.git] / dll / win32 / comdlg32 / comdlg32_ros.diff
index 7a310d0..58b0080 100644 (file)
@@ -1,71 +1,54 @@
-Index: filedlg.c\r
-===================================================================\r
---- filedlg.c  (Revision 56893)\r
-+++ filedlg.c  (Arbeitskopie)\r
-@@ -260,6 +260,8 @@\r
-     HRSRC hRes;
-     HANDLE hDlgTmpl = 0;
-     HRESULT hr;
-+    DWORD dwSize;
-+    LPDLGTEMPLATE hDialogTemplate;
+diff -pudN e:\wine\dlls\comdlg32/cdlg32.c e:\reactos\dll\win32\comdlg32/cdlg32.c
+--- e:\wine\dlls\comdlg32/cdlg32.c     2016-11-16 17:28:42 +0100
++++ e:\reactos\dll\win32\comdlg32/cdlg32.c     2015-08-27 22:02:19 +0100
+@@ -157,6 +157,8 @@ DWORD WINAPI CommDlgExtendedError(void)
+         return 0; /* we never set an error, so there isn't one */
+ }
  
-     /* test for missing functionality */
-     if (fodInfos->ofnInfos->Flags & UNIMPLEMENTED_FLAGS)
-@@ -276,12 +278,17 @@\r
-         return FALSE;
-     }
-     if (!(hDlgTmpl = LoadResource(COMDLG32_hInstance, hRes )) ||
-+        !(dwSize = SizeofResource(COMDLG32_hInstance, hRes )) ||
-+        !(hDialogTemplate = malloc(dwSize)) ||
-         !(template = LockResource( hDlgTmpl )))
-     {
-         COMDLG32_SetCommDlgExtendedError(CDERR_LOADRESFAILURE);
-         return FALSE;
-     }
-+    /* Copy the read only resource */
-+    memcpy(hDialogTemplate, template, dwSize);
++#ifndef __REACTOS__ /* Win 7 */
 +
-     /* msdn: explorer style dialogs permit sizing by default.
-      * The OFN_ENABLESIZING flag is only needed when a hook or
-      * custom tmeplate is provided */
-@@ -291,12 +298,12 @@\r
-     if (fodInfos->ofnInfos->Flags & OFN_ENABLESIZING)
-     {
--        ((LPDLGTEMPLATEW)template)->style |= WS_SIZEBOX;
-+        hDialogTemplate->style |= WS_SIZEBOX;
-         fodInfos->sizedlg.cx = fodInfos->sizedlg.cy = 0;
-         fodInfos->initial_size.x = fodInfos->initial_size.y = 0;
-     }
-     else
--        ((LPDLGTEMPLATEW)template)->style &= ~WS_SIZEBOX;
-+        hDialogTemplate->style &= ~WS_SIZEBOX;
+ /*************************************************************************
+  * Implement the CommDlg32 class factory
+  *
+@@ -266,7 +268,11 @@ HRESULT WINAPI DllGetClassObject(REFCLSI
+  */
+ HRESULT WINAPI DllRegisterServer(void)
+ {
++#ifdef __REACTOS__
++    return E_FAIL; // FIXME: __wine_register_resources(COMDLG32_hInstance);
++#else
+     return __wine_register_resources(COMDLG32_hInstance);
++#endif
+ }
  
-     /* old style hook messages */
-@@ -313,19 +320,21 @@\r
+ /***********************************************************************
+@@ -274,5 +280,11 @@ HRESULT WINAPI DllRegisterServer(void)
+  */
+ HRESULT WINAPI DllUnregisterServer(void)
+ {
++#ifdef __REACTOS__
++    return E_FAIL; // FIXME: __wine_unregister_resources(COMDLG32_hInstance);
++#else
+     return __wine_unregister_resources(COMDLG32_hInstance);
++#endif
+ }
++
++#endif /* Win 7 */
+diff -pudN e:\wine\dlls\comdlg32/itemdlg.c e:\reactos\dll\win32\comdlg32/itemdlg.c
+--- e:\wine\dlls\comdlg32/itemdlg.c    2016-08-14 19:11:13 +0100
++++ e:\reactos\dll\win32\comdlg32/itemdlg.c    2016-08-15 16:16:18 +0100
+@@ -18,6 +18,8 @@
+  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+  */
  
-     if (fodInfos->unicode)
-       lRes = DialogBoxIndirectParamW(COMDLG32_hInstance,
--                                     template,
-+                                     hDialogTemplate,
-                                      fodInfos->ofnInfos->hwndOwner,
-                                      FileOpenDlgProc95,
-                                      (LPARAM) fodInfos);
-     else
-       lRes = DialogBoxIndirectParamA(COMDLG32_hInstance,
--                                     template,
-+                                     hDialogTemplate,
-                                      fodInfos->ofnInfos->hwndOwner,
-                                      FileOpenDlgProc95,
-                                      (LPARAM) fodInfos);
--    if (SUCCEEDED(hr)) 
-+    if (SUCCEEDED(hr))
-         OleUninitialize();
++#ifndef __REACTOS__ /* Win 7 */
++
+ #include <stdarg.h>
  
-+    free(hDialogTemplate);
+ #define COBJMACROS
+@@ -4659,3 +4661,5 @@ HRESULT FileSaveDialog_Constructor(IUnkn
+ {
+     return FileDialog_constructor(pUnkOuter, riid, ppv, ITEMDLG_TYPE_SAVE);
+ }
 +
-     /* Unable to create the dialog */
-     if( lRes == -1)
-         return FALSE;
++#endif /* Win 7 */