[OLEDLG]
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 26 Sep 2013 14:02:31 +0000 (14:02 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 26 Sep 2013 14:02:31 +0000 (14:02 +0000)
* Sync with Wine 1.7.1.
CORE-7469

svn path=/trunk/; revision=60358

reactos/dll/win32/oledlg/CMakeLists.txt
reactos/dll/win32/oledlg/insobjdlg.c
reactos/dll/win32/oledlg/oledlg_main.c
reactos/dll/win32/oledlg/oledlg_private.h
reactos/dll/win32/oledlg/pastespl.c
reactos/media/doc/README.WINE

index 7f49ae6..38cbd22 100644 (file)
@@ -1,20 +1,16 @@
 
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 add_definitions(-D__WINESRC__)
-
+include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 spec2def(oledlg.dll oledlg.spec ADD_IMPORTLIB)
 
 list(APPEND SOURCE
     insobjdlg.c
     oledlg_main.c
     pastespl.c
-    rsrc.rc
     ${CMAKE_CURRENT_BINARY_DIR}/oledlg.def)
 
-add_library(oledlg SHARED ${SOURCE})
-
+add_library(oledlg SHARED ${SOURCE} rsrc.rc)
 set_module_type(oledlg win32dll)
 target_link_libraries(oledlg wine)
 add_importlibs(oledlg ole32 comdlg32 user32 advapi32 msvcrt kernel32 ntdll)
-
 add_cd_file(TARGET oledlg DESTINATION reactos/system32 FOR all)
index 43337a8..2fa4ec3 100644 (file)
@@ -199,13 +199,12 @@ static LRESULT UIINSOBJDLG_OnWMCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
 
     case IDC_ADDCONTROL:
       UIINSERTOBJECTDLG_AddControl(pdlgInfo);
+      break;
 
     case IDC_OBJTYPELIST:
-    {
       if (wNotifyCode == LBN_SELCHANGE)
         UIINSERTOBJECTDLG_SelChange(pdlgInfo);
       break;
-    }
   }
   return 0;
 }
@@ -239,8 +238,8 @@ static void UIINSERTOBJECTDLG_InitDialog(InsertObjectDlgInfo* pdlgInfo)
     IOF_SHOWINSERTCONTROL) ? SW_SHOW : SW_HIDE);
   ShowWindow(pdlgInfo->hwndDisplayIconCB, (pdlgInfo->lpOleUIInsertObject->dwFlags &
     IOF_CHECKDISPLAYASICON) ? SW_SHOW : SW_HIDE);
-  EnableWindow(pdlgInfo->hwndDisplayIconCB, (pdlgInfo->lpOleUIInsertObject->dwFlags &
-    IOF_DISABLEDISPLAYASICON) ? FALSE : TRUE);
+  EnableWindow(pdlgInfo->hwndDisplayIconCB, !(pdlgInfo->lpOleUIInsertObject->dwFlags &
+    IOF_DISABLEDISPLAYASICON));
 
   if (pdlgInfo->lpOleUIInsertObject->dwFlags & IOF_SELECTCREATECONTROL)
     UIINSERTOBJECTDLG_SelectCreateCtrl(pdlgInfo);
index c368e06..8864cd0 100644 (file)
@@ -94,10 +94,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
         register_clipboard_formats();
         register_messages();
         break;
-
-    case DLL_PROCESS_DETACH:
-        OLEDLG_hInstance = 0;
-        break;
     }
     return TRUE;
 }
index 4ff3bb6..8be1d6b 100644 (file)
 #ifndef __OLEDLG_PRIVATE_H__
 #define __OLEDLG_PRIVATE_H__
 
-extern HINSTANCE OLEDLG_hInstance;
+extern HINSTANCE OLEDLG_hInstance DECLSPEC_HIDDEN;
 
-extern UINT cf_embed_source;
-extern UINT cf_embedded_object;
-extern UINT cf_link_source;
-extern UINT cf_object_descriptor;
-extern UINT cf_link_src_descriptor;
-extern UINT cf_ownerlink;
-extern UINT cf_filename;
-extern UINT cf_filenamew;
+extern UINT cf_embed_source DECLSPEC_HIDDEN;
+extern UINT cf_embedded_object DECLSPEC_HIDDEN;
+extern UINT cf_link_source DECLSPEC_HIDDEN;
+extern UINT cf_object_descriptor DECLSPEC_HIDDEN;
+extern UINT cf_link_src_descriptor DECLSPEC_HIDDEN;
+extern UINT cf_ownerlink DECLSPEC_HIDDEN;
+extern UINT cf_filename DECLSPEC_HIDDEN;
+extern UINT cf_filenamew DECLSPEC_HIDDEN;
 
-extern UINT oleui_msg_help;
-extern UINT oleui_msg_enddialog;
+extern UINT oleui_msg_help DECLSPEC_HIDDEN;
+extern UINT oleui_msg_enddialog DECLSPEC_HIDDEN;
 
 #endif /* __OLEDLG_PRIVATE_H__ */
index 50e9ced..81133b9 100644 (file)
@@ -89,7 +89,9 @@ static void dump_ps_flags(DWORD flags)
 
 static void dump_pastespecial(const OLEUIPASTESPECIALW *ps)
 {
-    UINT i;
+    INT i;
+    UINT j;
+
     dump_ps_flags(ps->dwFlags);
     TRACE("hwnd %p caption %s hook %p custdata %lx\n",
           ps->hWndOwner, debugstr_w(ps->lpszCaption), ps->lpfnHook, ps->lCustData);
@@ -114,8 +116,8 @@ static void dump_pastespecial(const OLEUIPASTESPECIALW *ps)
     }
     for(i = 0; i < ps->cLinkTypes; i++)
         TRACE("arrLinkTypes[%d] %08x\n", i, ps->arrLinkTypes[i]);
-    for(i = 0; i < ps->cClsidExclude; i++)
-        TRACE("lpClsidExclude[%d] %s\n", i, debugstr_guid(&ps->lpClsidExclude[i]));
+    for(j = 0; j < ps->cClsidExclude; j++)
+        TRACE("lpClsidExclude[%u] %s\n", j, debugstr_guid(&ps->lpClsidExclude[j]));
 
 }
 
@@ -256,7 +258,7 @@ static DWORD init_pastelist(HWND hdlg, OLEUIPASTESPECIALW *ps)
     }
 
     IEnumFORMATETC_Release(penum);
-    EnableWindow(GetDlgItem(hdlg, IDC_PS_PASTE), items_added ? TRUE : FALSE);
+    EnableWindow(GetDlgItem(hdlg, IDC_PS_PASTE), items_added != 0);
     return items_added;
 }
 
@@ -291,7 +293,7 @@ static DWORD init_linklist(HWND hdlg, OLEUIPASTESPECIALW *ps)
         }
     }
 
-    EnableWindow(GetDlgItem(hdlg, IDC_PS_PASTELINK), items_added ? TRUE : FALSE);
+    EnableWindow(GetDlgItem(hdlg, IDC_PS_PASTELINK), items_added != 0);
     return items_added;
 }
 
@@ -317,7 +319,6 @@ static void update_display_list(HWND hdlg, UINT src_list_id)
         SendMessageW(display_list, LB_INSERTSTRING, i, (LPARAM)txt);
         SendMessageW(display_list, LB_SETITEMDATA, i, item_data);
     }
-    old_pos = max(old_pos, count);
     SendMessageW(display_list, LB_SETCURSEL, 0, 0);
     SendMessageW(display_list, WM_SETREDRAW, 1, 0);
     if(GetForegroundWindow() == hdlg)
@@ -500,7 +501,7 @@ static void update_structure(HWND hdlg, ps_struct_t *ps_struct)
         ps_struct->ps->nSelectedIndex = pent->dwScratchSpace;
     }
     ps_struct->ps->dwFlags = ps_struct->flags;
-    ps_struct->ps->fLink = (ps_struct->flags & PSF_SELECTPASTELINK) ? TRUE : FALSE;
+    ps_struct->ps->fLink = (ps_struct->flags & PSF_SELECTPASTELINK) != 0;
 }
 
 static void free_structure(ps_struct_t *ps_struct)
index 07bdb3f..255fa6b 100644 (file)
@@ -146,7 +146,7 @@ reactos/dll/win32/ole32           # Synced to Wine-1.7.1
 reactos/dll/win32/oleacc          # Autosync
 reactos/dll/win32/oleaut32        # Synced to Wine-1.7.1
 reactos/dll/win32/olecli32        # Synced to Wine-1.5.19
-reactos/dll/win32/oledlg          # Autosync
+reactos/dll/win32/oledlg          # Synced to Wine-1.7.1
 reactos/dll/win32/olepro32        # Autosync
 reactos/dll/win32/olesvr32        # Synced to Wine-1.5.19
 reactos/dll/win32/olethk32        # Synced to Wine-1.5.19