[MSCTF] Sync with Wine Staging 1.9.16. CORE-11866
authorAmine Khaldi <amine.khaldi@reactos.org>
Thu, 18 Aug 2016 10:19:15 +0000 (10:19 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Thu, 18 Aug 2016 10:19:15 +0000 (10:19 +0000)
svn path=/trunk/; revision=72290

reactos/dll/win32/msctf/context.c
reactos/dll/win32/msctf/inputprocessor.c
reactos/dll/win32/msctf/msctf.c
reactos/dll/win32/msctf/threadmgr.c
reactos/media/doc/README.WINE

index 44f20bc..9af5389 100644 (file)
@@ -98,10 +98,7 @@ static void Context_Destructor(Context *This)
     TRACE("destroying %p\n", This);
 
     if (This->pITextStoreACP)
-    {
-        ITextStoreACP_UnadviseSink(This->pITextStoreACP, (IUnknown*)&This->ITextStoreACPSink_iface);
         ITextStoreACP_Release(This->pITextStoreACP);
-    }
 
     if (This->pITfContextOwnerCompositionSink)
         ITfContextOwnerCompositionSink_Release(This->pITfContextOwnerCompositionSink);
index 2cd911a..f744d63 100644 (file)
@@ -72,7 +72,7 @@ typedef struct {
 } EnumTfInputProcessorProfiles;
 
 static HRESULT ProfilesEnumGuid_Constructor(IEnumGUID **ppOut);
-static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, IEnumTfLanguageProfiles **ppOut);
+static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, EnumTfLanguageProfiles **out);
 
 static inline EnumTfInputProcessorProfiles *impl_from_IEnumTfInputProcessorProfiles(IEnumTfInputProcessorProfiles *iface)
 {
@@ -595,8 +595,17 @@ static HRESULT WINAPI InputProcessorProfiles_EnumLanguageProfiles(
         IEnumTfLanguageProfiles **ppEnum)
 {
     InputProcessorProfiles *This = impl_from_ITfInputProcessorProfiles(iface);
+    EnumTfLanguageProfiles *profenum;
+    HRESULT hr;
+
     TRACE("(%p) %x %p\n",This,langid,ppEnum);
-    return EnumTfLanguageProfiles_Constructor(langid, ppEnum);
+
+    if (!ppEnum)
+        return E_INVALIDARG;
+    hr = EnumTfLanguageProfiles_Constructor(langid, &profenum);
+    *ppEnum = &profenum->IEnumTfLanguageProfiles_iface;
+
+    return hr;
 }
 
 static HRESULT WINAPI InputProcessorProfiles_EnableLanguageProfile(
@@ -1267,16 +1276,16 @@ static HRESULT WINAPI EnumTfLanguageProfiles_Clone( IEnumTfLanguageProfiles *ifa
     IEnumTfLanguageProfiles **ppenum)
 {
     EnumTfLanguageProfiles *This = impl_from_IEnumTfLanguageProfiles(iface);
+    EnumTfLanguageProfiles *new_This;
     HRESULT res;
 
     TRACE("(%p)\n",This);
 
     if (ppenum == NULL) return E_POINTER;
 
-    res = EnumTfLanguageProfiles_Constructor(This->langid, ppenum);
+    res = EnumTfLanguageProfiles_Constructor(This->langid, &new_This);
     if (SUCCEEDED(res))
     {
-        EnumTfLanguageProfiles *new_This = (EnumTfLanguageProfiles *)*ppenum;
         new_This->tip_index = This->tip_index;
         lstrcpynW(new_This->szwCurrentClsid,This->szwCurrentClsid,39);
 
@@ -1289,6 +1298,7 @@ static HRESULT WINAPI EnumTfLanguageProfiles_Clone( IEnumTfLanguageProfiles *ifa
             res = RegOpenKeyExW(new_This->tipkey, fullkey, 0, KEY_READ | KEY_WRITE, &This->langkey);
             new_This->lang_index = This->lang_index;
         }
+        *ppenum = &new_This->IEnumTfLanguageProfiles_iface;
     }
     return res;
 }
@@ -1304,7 +1314,7 @@ static const IEnumTfLanguageProfilesVtbl EnumTfLanguageProfilesVtbl =
     EnumTfLanguageProfiles_Skip
 };
 
-static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, IEnumTfLanguageProfiles **ppOut)
+static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, EnumTfLanguageProfiles **out)
 {
     HRESULT hr;
     EnumTfLanguageProfiles *This;
@@ -1331,7 +1341,7 @@ static HRESULT EnumTfLanguageProfiles_Constructor(LANGID langid, IEnumTfLanguage
         return E_FAIL;
     }
 
-    *ppOut = &This->IEnumTfLanguageProfiles_iface;
-    TRACE("returning %p\n", *ppOut);
+    *out = This;
+    TRACE("returning %p\n", *out);
     return S_OK;
 }
index e5e06cd..66c4a33 100644 (file)
@@ -370,7 +370,7 @@ static void deactivate_remove_conflicting_ts(REFCLSID catid)
             list_remove(&ats->entry);
             HeapFree(GetProcessHeap(),0,ats->ats);
             HeapFree(GetProcessHeap(),0,ats);
-            /* we are guarenteeing there is only 1 */
+            /* we are guaranteeing there is only 1 */
             break;
         }
     }
index 89dfa5e..96dd38b 100644 (file)
@@ -1467,8 +1467,8 @@ static HRESULT EnumTfDocumentMgr_Constructor(struct list* head, IEnumTfDocumentM
     This->head = head;
     This->index = list_head(This->head);
 
-    TRACE("returning %p\n", This);
-    *ppOut = (IEnumTfDocumentMgrs*)This;
+    TRACE("returning %p\n", &This->IEnumTfDocumentMgrs_iface);
+    *ppOut = &This->IEnumTfDocumentMgrs_iface;
     return S_OK;
 }
 
index 36c44c7..b343ed1 100644 (file)
@@ -108,7 +108,7 @@ reactos/dll/win32/msadp32.acm         # Synced to WineStaging-1.9.11
 reactos/dll/win32/mscat32             # Synced to WineStaging-1.9.11
 reactos/dll/win32/mscms               # Synced to WineStaging-1.9.11
 reactos/dll/win32/mscoree             # Synced to Wine-1.5.4
-reactos/dll/win32/msctf               # Synced to WineStaging-1.9.11
+reactos/dll/win32/msctf               # Synced to WineStaging-1.9.16
 reactos/dll/win32/msftedit            # Synced to WineStaging-1.9.11
 reactos/dll/win32/msg711.acm          # Synced to WineStaging-1.9.11
 reactos/dll/win32/msgsm32.acm         # Synced to WineStaging-1.9.11