Mercurial > projects > dwt-win
diff dwt/ole/win32/OleClientSite.d @ 212:ab60f3309436
reverted the char[] to String and use the an alias.
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 05 May 2008 00:12:38 +0200 |
parents | 619faee45ef6 |
children | fd9c62a2998e |
line wrap: on
line diff
--- a/dwt/ole/win32/OleClientSite.d Sat Apr 26 10:01:48 2008 +0200 +++ b/dwt/ole/win32/OleClientSite.d Mon May 05 00:12:38 2008 +0200 @@ -125,7 +125,7 @@ private bool inInit = true; private bool inDispose = false; - private static const char[] WORDPROGID = "Word.Document"; //$NON-NLS-1$ + private static const String WORDPROGID = "Word.Document"; //$NON-NLS-1$ private Listener listener; @@ -266,7 +266,7 @@ * <li>ERROR_CANNOT_CREATE_OBJECT when failed to create OLE Object * </ul> */ -public this(Composite parent, int style, char[] progId) { +public this(Composite parent, int style, String progId) { this(parent, style); try { appClsid = getClassID(progId); @@ -320,7 +320,7 @@ * <li>ERROR_CANNOT_OPEN_FILE when failed to open file * </ul> */ -public this(Composite parent, int style, char[] progId, File file) { +public this(Composite parent, int style, String progId, File file) { this(parent, style); try { if (file is null || file.isDirectory() || !file.exists()) OLE.error (__FILE__, __LINE__, OLE.ERROR_INVALID_ARGUMENT); @@ -595,7 +595,7 @@ return null; return ppvObject; } -protected GUID* getClassID(char[] clientName) { +protected GUID* getClassID(String clientName) { // create a GUID struct to hold the result GUID* guid = new GUID(); @@ -641,7 +641,7 @@ * * @return the program ID of the OLE Document or ActiveX Control */ -public char[] getProgramID(){ +public String getProgramID(){ if (appClsid !is null){ wchar* hMem; if (COM.ProgIDFromCLSID(appClsid, &hMem) is COM.S_OK) { @@ -652,7 +652,7 @@ OS.GlobalUnlock(hMem); OS.GlobalFree(hMem); - char[] result = WCHARzToStr(buffer.ptr); + String result = WCHARzToStr(buffer.ptr); // remove null terminator //int index = result.indexOf("\0"); return result;//.substring(0, index); @@ -939,7 +939,7 @@ return COM.S_OK; } if (COM.IsEqualGUID(guid, &COM.IIDIOleDocumentSite )) { - char[] progID = getProgramID(); + String progID = getProgramID(); if (!progID.startsWith("PowerPoint")) { //$NON-NLS-1$ *ppvObject = cast(void*)cast(IOleDocumentSite)iOleDocumentSite; AddRef(); @@ -1237,7 +1237,7 @@ * * @param title the name that will appear in the titlebar of the dialog */ -public void showProperties(char[] title) { +public void showProperties(String title) { // Get the Property Page information from the OLE Object ISpecifyPropertyPages objISPP;