harmony-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=591097&view=rev
Log:
Convert another 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
    harmony/enhanced/classlib/trunk/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.h

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=591097&r1=591096&r2=591097&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:32:02 2007
@@ -1011,13 +1011,13 @@
         FORMATETC * list;
         int listLen = getFormatsForName(env, formatName, &list);
         for (int j = 0; j < listLen; j++) {
-            formatArray.SetAtGrow(formatArray.GetCount(), list[j]);
+            formatArray.Add(list[j]);
         }
         if (listLen == 0) {
             UINT serializedFormat = getSerializedFormat(env, formatName);
             if (serializedFormat != 0) {
                 FORMATETC fmt = { serializedFormat, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL
};
-                formatArray.SetAtGrow(formatArray.GetCount(), fmt);
+                formatArray.Add(fmt);
             }
         }
     }
@@ -1089,7 +1089,7 @@
 STDMETHODIMP WinDataObject::EnumFormatEtc(DWORD dwDirection, 
                                           IEnumFORMATETC ** ppEnumFormatEtc) {
     if(dwDirection == DATADIR_GET) {
-        return SHCreateStdEnumFmtEtc((UINT)formatArray.GetCount(), 
+        return SHCreateStdEnumFmtEtc((UINT)formatArray.GetSize(), 
                 formatArray.GetData(), ppEnumFormatEtc);
     }
     return E_NOTIMPL;
@@ -1108,8 +1108,8 @@
 }
 
 int WinDataObject::getFormatIndex(FORMATETC * fmt) {
-    for (size_t i=0; i<formatArray.GetCount(); i++) {
-        const FORMATETC & f = formatArray.GetAt(i);
+    for (int i=0; i<formatArray.GetSize(); i++) {
+        const FORMATETC & f = formatArray[i];
         if (f.cfFormat == fmt->cfFormat
                 && f.ptd == fmt->ptd
                 && f.dwAspect == fmt->dwAspect

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.h?rev=591097&r1=591096&r2=591097&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.h
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/main/native/win32wrapper/windows/WinDataTransfer.h
Thu Nov  1 10:32:02 2007
@@ -122,7 +122,7 @@
     HRESULT getImage(UINT format, STGMEDIUM * pMedium);
     HRESULT getSerializedObject(UINT format, STGMEDIUM * pMedium);
 
-    CAtlArray<FORMATETC> formatArray;
+    CSimpleArray<FORMATETC> formatArray;
     jobject dataSnapshotGlobalRef;
 };
 



Mime
View raw message