changeset 242:448eacc3a526

Change behaviour of dwt.graphics.GC textExtend(): allow null for string argument
author Frank Benoit <benoit@tionex.de>
date Sat, 17 May 2008 23:21:33 +0200
parents 4653e99936cf
children 84629474b5ec
files dwt/graphics/GC.d
diffstat 1 files changed, 2 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/dwt/graphics/GC.d	Mon May 12 19:27:09 2008 +0200
+++ b/dwt/graphics/GC.d	Sat May 17 23:21:33 2008 +0200
@@ -3940,9 +3940,6 @@
  * @param str the str to measure
  * @return a point containing the extent of the str
  *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the str is null</li>
- * </ul>
  * @exception DWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
@@ -3963,9 +3960,6 @@
  * @param str the str to measure
  * @return a point containing the extent of the str
  *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the str is null</li>
- * </ul>
  * @exception DWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
@@ -3998,16 +3992,14 @@
  * @param flags the flags specifying how to process the text
  * @return a point containing the extent of the str
  *
- * @exception IllegalArgumentException <ul>
- *    <li>ERROR_NULL_ARGUMENT - if the str is null</li>
- * </ul>
  * @exception DWTException <ul>
  *    <li>ERROR_GRAPHIC_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  */
 public Point textExtent(String str, int flags) {
     if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED);
-    if (str is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
+    //DWT_CHANGE: allow null for string
+    //if (str is null) DWT.error(DWT.ERROR_NULL_ARGUMENT);
     auto cairo = data.cairo;
     if (cairo !is null) {
         if (OS.GTK_VERSION < OS.buildVERSION(2, 8, 0)) {