harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r591092 - /harmony/enhanced/classlib/trunk/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp
Date Thu, 01 Nov 2007 17:20:36 GMT
Author: tellison
Date: Thu Nov  1 10:20:35 2007
New Revision: 591092

URL: http://svn.apache.org/viewvc?rev=591092&view=rev
Log:
Convert a CAtlArray usage to a CSimpleArray to keep MS Express Edition users happy.

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp?rev=591092&r1=591091&r2=591092&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.cpp
Thu Nov  1 10:20:35 2007
@@ -797,7 +797,7 @@
     enum { maskText = 1, maskFileList = 2, maskUrl = 4, maskHtml = 8, maskImage = 16 };
     DWORD formatsMask = 0;
     
-    CAtlArray<jstring> formatList;
+    CSimpleArray<jstring> formatList;
 
     FORMATETC format;
     DWORD count = 0;
@@ -812,7 +812,7 @@
         if ((format.tymed & TYMED_ENHMF) != 0 
                 && format.cfFormat == CF_ENHMETAFILE) {
             jstring jstr = env->NewStringUTF(FORMAT_IMAGE);
-            formatList.SetAtGrow(formatList.GetCount(), jstr);
+            formatList.Add(jstr);
             continue;
         }
         if ((format.tymed & TYMED_HGLOBAL) == 0) {
@@ -820,38 +820,38 @@
         }
         if (format.cfFormat == CF_UNICODETEXT || format.cfFormat == CF_TEXT) {
             jstring jstr = env->NewStringUTF(FORMAT_TEXT);
-            formatList.SetAtGrow(formatList.GetCount(), jstr);
+            formatList.Add(jstr);
             continue;
         }
         if (format.cfFormat == CF_HDROP) {
             jstring jstr = env->NewStringUTF(FORMAT_FILE_LIST);
-            formatList.SetAtGrow(formatList.GetCount(), jstr);
+            formatList.Add(jstr);
             continue;
         }
         if (format.cfFormat == CF_DIB) {
             jstring jstr = env->NewStringUTF(FORMAT_IMAGE);
-            formatList.SetAtGrow(formatList.GetCount(), jstr);
+            formatList.Add(jstr);
             continue;
         }
         if (format.cfFormat == cfShellUrlA || format.cfFormat == cfShellUrlW) {
             jstring jstr = env->NewStringUTF(FORMAT_URL);
-            formatList.SetAtGrow(formatList.GetCount(), jstr);
+            formatList.Add(jstr);
             continue;
         }
         if (format.cfFormat == cfHTML) {
             jstring jstr = env->NewStringUTF(FORMAT_HTML);
-            formatList.SetAtGrow(formatList.GetCount(), jstr);
+            formatList.Add(jstr);
             continue;
         }
         jstring jstr = getSerializedFormatName(env, format.cfFormat);
         if (jstr != NULL) {
-            formatList.SetAtGrow(formatList.GetCount(), jstr);
+            formatList.Add(jstr);
         }
     }
     enumFormats.Release();
 
-    jobjectArray result = env->NewObjectArray((jsize)formatList.GetCount(), classString,
NULL);
-    for (jsize i = 0; i < (jsize)formatList.GetCount(); i++) {
+    jobjectArray result = env->NewObjectArray((jsize)formatList.GetSize(), classString,
NULL);
+    for (jsize i = 0; i < (jsize)formatList.GetSize(); i++) {
         env->SetObjectArrayElement(result, i, formatList[i]);
     }
     return result;



Mime
View raw message