Bug 697336 - Clean up nsDataObj::SetText on Windows. r=jimm
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Tue, 01 Nov 2011 13:36:56 +0900
changeset 79497 470ed3885e3c65bf6a35ddc7e4f89e16cd6462eb
parent 79496 f3babd4e975f7cecf9e80a2e160d878ee8037ce7
child 79498 b72b2c0f996f88d37996e6f53fc24c895fafca25
push id21408
push userkhuey@mozilla.com
push dateTue, 01 Nov 2011 14:32:20 +0000
treeherdermozilla-central@cd9add22f090 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimm
bugs697336
milestone10.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 697336 - Clean up nsDataObj::SetText on Windows. r=jimm
widget/src/windows/nsDataObj.cpp
--- a/widget/src/windows/nsDataObj.cpp
+++ b/widget/src/windows/nsDataObj.cpp
@@ -1674,30 +1674,16 @@ HRESULT nsDataObj::SetBitmap(FORMATETC&,
 HRESULT nsDataObj::SetDib(FORMATETC&, STGMEDIUM&)
 {
 	return E_FAIL;
 }
 
 //-----------------------------------------------------
 HRESULT nsDataObj::SetText  (FORMATETC& aFE, STGMEDIUM& aSTG)
 {
-  if (aFE.cfFormat == CF_TEXT && aFE.tymed ==  TYMED_HGLOBAL) {
-		HGLOBAL hString = (HGLOBAL)aSTG.hGlobal;
-		if(hString == NULL)
-			return(FALSE);
-
-		// get a pointer to the actual bytes
-		char *  pString = (char *) GlobalLock(hString);    
-		if(!pString)
-			return(FALSE);
-
-		GlobalUnlock(hString);
-    nsAutoString str; str.AssignWithConversion(pString);
-
-  }
 	return E_FAIL;
 }
 
 //-----------------------------------------------------
 HRESULT nsDataObj::SetMetafilePict(FORMATETC&, STGMEDIUM&)
 {
 	return E_FAIL;
 }