oleview: Fix enumeration display in the TreeView.

Misha Koshelev mk144210 at bcm.tmc.edu
Sun Feb 25 12:42:14 CST 2007


My enumeration support patch made the enumeration suppot good in
the .tld part but I messed up the display in the treeview, this fixes
it. You can just commit this patch together with the original
enumeration patch as one if you'd like.

Changelog:

	* oleview: Fix enumeration display in the TreeView.
-------------- next part --------------
From be014ae257e03ddcedcead45deaf4c1ffbbfe2ba Mon Sep 17 00:00:00 2001
From: Misha Koshelev <mk144210 at bcm.tmc.edu>
Date: Sun, 25 Feb 2007 12:39:45 -0600
Subject: oleview: Fix enumeration display in the TreeView.
---
 programs/oleview/typelib.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/programs/oleview/typelib.c b/programs/oleview/typelib.c
index e24dec6..4336cf1 100644
--- a/programs/oleview/typelib.c
+++ b/programs/oleview/typelib.c
@@ -460,7 +460,9 @@ int EnumEnums(ITypeInfo *pTypeInfo, int 
 
         tld = InitializeTLData();
         U(tvis).item.lParam = (LPARAM) tld;
-        AddToTLDataStrW(tld, bstrName);
+
+        memset(wszText, 0, sizeof(wszText));
+        AddToStrW(wszText, bstrName);
 
         if (pVarDesc->varkind == VAR_CONST)
         {
@@ -468,13 +470,14 @@ int EnumEnums(ITypeInfo *pTypeInfo, int 
             VariantInit(&var);
             if (VariantChangeType(&var, pVarDesc->lpvarValue, 0, VT_BSTR) == S_OK)
             {
-                AddToTLDataStrW(tld, wszSpace);
-                AddToTLDataStrW(tld, wszEquals);
-                AddToTLDataStrW(tld, wszSpace);
-                AddToTLDataStrW(tld, V_BSTR(&var));
+                AddToStrW(wszText, wszSpace);
+                AddToStrW(wszText, wszEquals);
+                AddToStrW(wszText, wszSpace);
+                AddToStrW(wszText, V_BSTR(&var));
             }
         }
 
+	AddToTLDataStrW(tld, wszText);
 	if (i<cVars-1)
             AddToTLDataStrW(tld, wszComa);
         AddToTLDataStrW(tld, wszNewLine);
-- 
1.4.1



More information about the wine-patches mailing list