From ffd9907a95f5c11374c420b8c2ba96e7f857293d Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Thu, 26 Sep 2013 14:02:31 +0000 Subject: [PATCH] [OLEDLG] * Sync with Wine 1.7.1. CORE-7469 svn path=/trunk/; revision=60358 --- reactos/dll/win32/oledlg/CMakeLists.txt | 8 ++------ reactos/dll/win32/oledlg/insobjdlg.c | 7 +++---- reactos/dll/win32/oledlg/oledlg_main.c | 4 ---- reactos/dll/win32/oledlg/oledlg_private.h | 22 +++++++++++----------- reactos/dll/win32/oledlg/pastespl.c | 15 ++++++++------- reactos/media/doc/README.WINE | 2 +- 6 files changed, 25 insertions(+), 33 deletions(-) diff --git a/reactos/dll/win32/oledlg/CMakeLists.txt b/reactos/dll/win32/oledlg/CMakeLists.txt index 7f49ae67514..38cbd228931 100644 --- a/reactos/dll/win32/oledlg/CMakeLists.txt +++ b/reactos/dll/win32/oledlg/CMakeLists.txt @@ -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) diff --git a/reactos/dll/win32/oledlg/insobjdlg.c b/reactos/dll/win32/oledlg/insobjdlg.c index 43337a8dc45..2fa4ec3f2ae 100644 --- a/reactos/dll/win32/oledlg/insobjdlg.c +++ b/reactos/dll/win32/oledlg/insobjdlg.c @@ -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); diff --git a/reactos/dll/win32/oledlg/oledlg_main.c b/reactos/dll/win32/oledlg/oledlg_main.c index c368e0692c7..8864cd01f93 100644 --- a/reactos/dll/win32/oledlg/oledlg_main.c +++ b/reactos/dll/win32/oledlg/oledlg_main.c @@ -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; } diff --git a/reactos/dll/win32/oledlg/oledlg_private.h b/reactos/dll/win32/oledlg/oledlg_private.h index 4ff3bb6f9f8..8be1d6b3cb6 100644 --- a/reactos/dll/win32/oledlg/oledlg_private.h +++ b/reactos/dll/win32/oledlg/oledlg_private.h @@ -21,18 +21,18 @@ #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__ */ diff --git a/reactos/dll/win32/oledlg/pastespl.c b/reactos/dll/win32/oledlg/pastespl.c index 50e9cede873..81133b9320e 100644 --- a/reactos/dll/win32/oledlg/pastespl.c +++ b/reactos/dll/win32/oledlg/pastespl.c @@ -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) diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 07bdb3f6fad..255fa6b9846 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -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