Changeset 269:11015f58425e

Show
Ignore:
Timestamp:
07/06/08 09:36:48 (2 months ago)
Author:
Frank Benoit <benoit@tionex.de>
branch:
default
Message:

Fix: StyledText? check for null in clipboard paste
Add: version TANGOSVN

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • dwt/custom/DefaultContent.d

    r259 r269  
    2424import dwt.dwthelper.utils; 
    2525 
    26 static import tango.io.FileConst; 
     26version(TANGOSVN) 
     27    static import tango.io.model.IFile; 
     28
     29else{ 
     30    static import tango.io.FileConst; 
     31
    2732static import tango.text.Text; 
    2833 
     
    3035 
    3136class DefaultContent : StyledTextContent { 
     37version(TANGOSVN) 
     38    private final static String LineDelimiter = tango.io.model.IFile.FileConst.NewlineString; 
     39} 
     40else{ 
    3241    private final static String LineDelimiter = tango.io.FileConst.FileConst.NewlineString; 
     42} 
    3343 
    3444    StyledTextListener[] textListeners; // stores text listeners for event sending 
     
    735745 * 
    736746 * @param listener the listener which should no longer be notified 
    737  *  
     747 * 
    738748 * @exception IllegalArgumentException <ul> 
    739749 *    <li>ERROR_NULL_ARGUMENT when listener is null</li> 
  • dwt/custom/StyledText.d

    r259 r269  
    8686static import tango.text.Text; 
    8787static import tango.text.Util; 
    88 static import tango.io.FileConst; 
     88version(TANGOSVN) 
     89    static import tango.io.model.IFile; 
     90
     91else{ 
     92    static import tango.io.FileConst; 
     93
    8994static import tango.text.convert.Utf; 
    9095import tango.util.Convert; 
     
    153158 
    154159    static const char TAB = '\t'; 
     160version(TANGOSVN){ 
     161    static const String PlatformLineDelimiter = tango.io.model.IFile.FileConst.NewlineString; 
     162} 
     163else { 
    155164    static const String PlatformLineDelimiter = tango.io.FileConst.FileConst.NewlineString; 
     165} 
    156166    static const int BIDI_CARET_WIDTH = 3; 
    157167    static const int DEFAULT_WIDTH  = 64; 
     
    38253835 * 
    38263836 * @return the top pixel of a given line index 
    3827  *  
     3837 * 
    38283838 * @since 3.2 
    38293839 */ 
     
    38523862 * Returns the line index for a y, relative to the client area. 
    38533863 * The line index returned is always in the range 0..lineCount - 1. 
    3854  *  
     3864 * 
    38553865 * @param y the y-coordinate pixel 
    3856  *  
     3866 * 
    38573867 * @return the line index for a given y-coordinate pixel 
    38583868 * 
     
    60336043public void paste(){ 
    60346044    checkWidget(); 
    6035     String text = (cast(ArrayWrapperString) getClipboardContent(DND.CLIPBOARD)).array; 
     6045    String text = null; 
     6046    if( auto o = cast(ArrayWrapperString) getClipboardContent(DND.CLIPBOARD)){ 
     6047        text = o.array; 
     6048    } 
    60366049    if (text !is null && text.length > 0) { 
    60376050        Event event = new Event(); 
     
    62636276 * 
    62646277 * @param listener the listener which should no longer be notified 
    6265  *  
     6278 * 
    62666279 * @exception DWTException <ul> 
    62676280 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
     
    62716284 *    <li>ERROR_NULL_ARGUMENT when listener is null</li> 
    62726285 * </ul> 
    6273  *  
     6286 * 
    62746287 * @since 2.0 
    62756288 */ 
     
    63016314 * 
    63026315 * @param listener the listener which should no longer be notified 
    6303  *  
     6316 * 
    63046317 * @exception DWTException <ul> 
    63056318 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
     
    63196332 * 
    63206333 * @param listener the listener which should no longer be notified 
    6321  *  
     6334 * 
    63226335 * @exception DWTException <ul> 
    63236336 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
     
    63376350 * 
    63386351 * @param modifyListener the listener which should no longer be notified 
    6339  *  
     6352 * 
    63406353 * @exception DWTException <ul> 
    63416354 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
     
    63556368 * 
    63566369 * @param listener the listener which should no longer be notified 
    6357  *  
     6370 * 
    63586371 * @exception DWTException <ul> 
    63596372 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
     
    63966409 * 
    63976410 * @param verifyListener the listener which should no longer be notified 
    6398  *  
     6411 * 
    63996412 * @exception DWTException <ul> 
    64006413 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
     
    64146427 * 
    64156428 * @param listener the listener which should no longer be notified 
    6416  *  
     6429 * 
    64176430 * @exception DWTException <ul> 
    64186431 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
     
    64316444 * 
    64326445 * @param listener the listener which should no longer be notified 
    6433  *  
     6446 * 
    64346447 * @exception DWTException <ul> 
    64356448 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
  • dwt/custom/StyledTextRenderer.d

    r259 r269  
    4444static import tango.text.Text; 
    4545static import tango.text.Util; 
    46 static import tango.io.FileConst; 
    4746static import tango.text.convert.Utf; 
    4847import tango.util.Convert;