Mercurial > projects > dwt2
diff org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/custom/DefaultContent.d @ 51:c01d033c633a
[swt lin]
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 27 Mar 2009 19:58:06 +0100 |
parents | d5075f5226e5 |
children | fb3aa8075988 |
line wrap: on
line diff
--- a/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/custom/DefaultContent.d Fri Mar 27 15:30:20 2009 +0100 +++ b/org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/custom/DefaultContent.d Fri Mar 27 19:58:06 2009 +0100 @@ -503,7 +503,7 @@ while ((length_ - 1 >= 0) && isDelimiter(textStore[start+length_-1])) { length_--; } - return textStore[ start .. start + length_].dup; + return textStore[ start .. start + length_]._idup(); } else { // gap is in the specified range, strip out the gap StringBuffer buf = new StringBuffer(); @@ -514,7 +514,7 @@ while ((length_ - 1 >=0) && isDelimiter(buf.slice[length_ - 1])) { length_--; } - return buf.toString()[ 0 .. length_ ].dup; + return buf.toString()[ 0 .. length_ ]._idup(); } } /** @@ -541,14 +541,14 @@ int end = start + length_ - 1; if (!gapExists() || (end < gapStart) || (start >= gapEnd)) { // line is before or after the gap - return textStore[ start .. start + length_ ].dup; + return textStore[ start .. start + length_ ]._idup(); } else { // gap is in the specified range, strip out the gap StringBuffer buffer = new StringBuffer(); int gapLength = gapEnd - gapStart; buffer.append(textStore[ start .. gapStart ]); buffer.append(textStore[ gapEnd .. gapEnd + length_ - gapLength - (gapStart - start) ]); - return buffer.toString().dup; + return buffer.toString()._idup(); } } /** @@ -707,7 +707,7 @@ * @return the text */ String getPhysicalText(int start, int length_) { - return textStore[ start .. start + length_ ].dup; + return textStore[ start .. start + length_ ]._idup(); } /** * Returns a string representing the logical content of @@ -725,15 +725,15 @@ return ""; int end= start + length_; if (!gapExists() || (end < gapStart)) - return textStore[ start .. start + length_].dup; + return textStore[ start .. start + length_]._idup(); if (gapStart < start) { int gapLength= gapEnd - gapStart; - return textStore[ start + gapLength .. start + gapLength + length_ ].dup; + return textStore[ start + gapLength .. start + gapLength + length_ ]._idup(); } StringBuffer buf = new StringBuffer(); buf.append(textStore[ start .. start + gapStart - start ] ); buf.append(textStore[ gapEnd .. gapEnd + end - gapStart ] ); - return buf.toString().dup; + return buf.toString()._idup(); } /** * Removes the specified <code>TextChangeListener</code>.