diff org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/mozilla/nsEmbedString.d @ 38:2e09b0e6857a

work on phobosfication
author Frank Benoit <benoit@tionex.de>
date Wed, 25 Mar 2009 11:18:25 +0100
parents 950d84783eac
children 0ecb2b338560
line wrap: on
line diff
--- a/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/mozilla/nsEmbedString.d	Wed Mar 25 08:46:48 2009 +0100
+++ b/org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/internal/mozilla/nsEmbedString.d	Wed Mar 25 11:18:25 2009 +0100
@@ -7,85 +7,85 @@
 import XPCOM = org.eclipse.swt.internal.mozilla.XPCOM;
 
 scope class nsEmbedString
-{    
-	this(wchar[] s)
-	{
-		nsresult result;
-		result = NS_StringContainerInit2(&str, s.ptr, s.length, 0);
-		if (XPCOM.NS_FAILED(result)) 
-			throw new Exception("Init string container fail");
-	}
+{
+    this(wchar[] s)
+    {
+        nsresult result;
+        result = NS_StringContainerInit2(&str, s.ptr, s.length, 0);
+        if (XPCOM.NS_FAILED(result)) 
+            throw new Exception("Init string container fail");
+    }
 
-	this()
-	{
-		nsresult result;
-		result = NS_StringContainerInit(&str);
-		if (XPCOM.NS_FAILED(result)) 
-			throw new Exception("Init string container fail");
-	}
+    this()
+    {
+        nsresult result;
+        result = NS_StringContainerInit(&str);
+        if (XPCOM.NS_FAILED(result)) 
+            throw new Exception("Init string container fail");
+    }
 
-	nsAString* opCast()
-	{
-		return cast(nsAString*)&str;
-	}
+    nsAString* opCast()
+    {
+        return cast(nsAString*)&str;
+    }
 
-	wchar[] toString16()
-	{
-		wchar* buffer = null;
-		PRBool terminated;
-		uint len = NS_StringGetData(cast(nsAString*)&str, &buffer, &terminated);
-		return buffer[0 .. len].dup;
-	}
+    wchar[] toString16()
+    {
+        wchar* buffer = null;
+        PRBool terminated;
+        uint len = NS_StringGetData(cast(nsAString*)&str, &buffer, &terminated);
+        return buffer[0 .. len].dup;
+    }
     
-    char[] toString()
+    override String toString()
     {
         return String_valueOf(this.toString16());
     }
     ~this()
-	{
-		NS_StringContainerFinish(&str);
-	}
+    {
+        NS_StringContainerFinish(&str);
+    }
 private:
-	nsStringContainer str;
+    nsStringContainer str;
 }
 
 
 scope class nsEmbedCString
 {
-	this(char[] s)
-	{
-		nsresult result;
-		result = NS_CStringContainerInit2(&str, s.ptr, s.length, 0);
-		if (XPCOM.NS_FAILED(result)) 
-			throw new Exception("Init string container fail");
-	}
+    this(char[] s)
+    {
+        nsresult result;
+        result = NS_CStringContainerInit2(&str, s.ptr, s.length, 0);
+        if (XPCOM.NS_FAILED(result)) 
+            throw new Exception("Init string container fail");
+    }
 
-	this()
-	{
-		nsresult result;
-		result = NS_CStringContainerInit(&str);
-		if (XPCOM.NS_FAILED(result)) 
-			throw new Exception("Init string container fail");
-	}
+    this()
+    {
+        nsresult result;
+        result = NS_CStringContainerInit(&str);
+        if (XPCOM.NS_FAILED(result)) 
+            throw new Exception("Init string container fail");
+    }
 
-	nsACString* opCast()
-	{
-		return cast(nsACString*)&str;
-	}
+    nsACString* opCast()
+    {
+        return cast(nsACString*)&str;
+    }
 
-	char[] toString()
-	{
-		char* buffer = null;
-		PRBool terminated;
-		uint len = NS_CStringGetData(cast(nsACString*)&str, &buffer, &terminated);
+    override String toString()
+    {
+        char* buffer = null;
+        PRBool terminated;
+        uint len = NS_CStringGetData(cast(nsACString*)&str, &buffer, &terminated);
         return buffer[0 .. len].dup;
-	}
+    }
 
-	~this()
-	{
-		NS_CStringContainerFinish(&str);
-	}
+    ~this()
+    {
+        NS_CStringContainerFinish(&str);
+    }
 private:
-	nsCStringContainer str;
+    nsCStringContainer str;
 }