Changeset 375 for trunk/src/helpers/textview.c
- Timestamp:
- Nov 30, 2008, 1:57:41 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/textview.c
r373 r375 270 270 lstInit(&pxfd->llWords, 271 271 TRUE); // auto-free items 272 xstrInit(&pxfd->strOrigText, 0); // WarpIN V1.0.18 272 273 xstrInit(&pxfd->strViewText, 0); 273 274 } … … 420 421 *@@added V0.9.3 (2000-05-07) [umoeller] 421 422 *@@changed V0.9.20 (2002-08-10) [umoeller]: now stripping \xFF too 423 *@@changed V1.0.18 (2008-11-24) [pr]: fixes \xFF stripping @@fixes 1116 422 424 */ 423 425 … … 452 454 break; 453 455 454 case '\xFF': // V0.9.20 (2002-08-10) [umoeller]456 case TXVESC_CHAR: // V0.9.20 (2002-08-10) [umoeller] 455 457 AppendCharNoCheck(&pszNew, 456 458 &cbNew, 457 459 &pTarget, 458 460 ' '); 459 pSource ++;461 pSource += 3; // V1.0.18 460 462 break; 461 463 … … 2124 2126 * 2125 2127 *@@added V0.9.20 (2002-08-10) [umoeller] 2128 *@@changed WarpIN V1.0.18 (2008-11-29) [pr] 2126 2129 */ 2127 2130 … … 2135 2138 PSZ p; 2136 2139 2140 // WarpIN V1.0.18 2141 xstrcpy(&ptxvd->xfd.strOrigText, 2142 pcszText, 2143 0); 2144 2137 2145 switch (ptxvd->flStyle & XS_FORMAT_MASK) 2138 2146 { 2139 2147 case XS_PLAINTEXT: // 0x0100 2140 xstrcpy(pstr, 2141 pcszText, 2142 0); 2143 xstrConvertLineFormat(pstr, 2144 CRLF2LF); 2145 p = pstr->psz; 2146 while (p = strchr(p, '\xFF')) 2147 *p = ' '; 2148 break; 2149 2150 case XS_HTML: // 0x0200 2148 // WarpIN V1.0.18 2151 2149 if (p = strdup(pcszText)) 2152 2150 { 2153 PSZ p2 = p; 2154 while (p2 = strchr(p2, '\xFF')) 2155 *p2 = ' '; 2151 PSZ p2; 2152 for (p2 = p; p2 = strchr(p2, TXVESC_CHAR); *p2 = ' '); 2153 txvStripLinefeeds(&p, 4); 2154 xstrset(pstr, p); 2155 } 2156 break; 2157 2158 case XS_HTML: // 0x0200 2159 // WarpIN V1.0.18 2160 if (p = strdup(pcszText)) 2161 { 2162 PSZ p2; 2163 for (p2 = p; p2 = strchr(p2, TXVESC_CHAR); *p2 = ' '); 2156 2164 txvConvertFromHTML(&p, NULL, NULL, NULL); 2157 2165 xstrset(pstr, p); … … 2799 2807 *@@added V1.0.0 (2002-08-12) [umoeller] 2800 2808 *@@changed WarpIN V1.0.18 (2008-11-16) [pr]: added correct ID for horiz. scroll @@fixes 1086 2809 *@@changed WarpIN V1.0.18 (2008-11-16) [pr]: added Ctrl-Ins copy capability @@fixes 1116 2801 2810 */ 2802 2811 … … 2896 2905 2897 2906 usCmd = SB_SLIDERPOSITION; 2907 break; 2908 2909 // WarpIN V1.0.18 2910 case VK_INSERT: 2911 if (usFlags & KC_CTRL) 2912 { 2913 ulMsg = TXM_COPY; 2914 usID = 0; 2915 } 2898 2916 break; 2899 2917 … … 2993 3011 { 2994 3012 xstrClear(&ptxvd->xfd.strViewText); 3013 xstrClear(&ptxvd->xfd.strOrigText); // WarpIN V1.0.18 2995 3014 lstClear(&ptxvd->xfd.llRectangles); 2996 3015 lstClear(&ptxvd->xfd.llWords); … … 3059 3078 *@@changed V1.0.0 (2002-08-12) [umoeller]: optimized locality by moving big chunks into subfuncs 3060 3079 *@@changed V1.0.1 (2003-01-25) [umoeller]: adjusted scroll msgs for new handler code 3080 *@@changed WarpIN V1.0.18 (2008-11-16) [pr]: added Ctrl-Ins copy capability @@fixes 1116 3081 *@@changed WarpIN V1.0.18 (2008-11-29) [pr]: added style set/query functions @@fixes 1116 3061 3082 */ 3062 3083 … … 3438 3459 sizeof(SIZEL)); 3439 3460 mrc = (MRESULT)TRUE; 3461 } 3462 break; 3463 3464 /* 3465 *@@ TXM_QUERYSTYLE: 3466 * returns the current style flags. 3467 * 3468 * This must be sent, not posted, to the control. 3469 * 3470 * Parameters: 3471 * 3472 * -- PULONG mp1: pointer to a ULONG buffer. 3473 * 3474 * Returns TRUE on success. 3475 * 3476 *@@added WarpIN V1.0.18 (2008-11-29) [pr] 3477 */ 3478 3479 case TXM_QUERYSTYLE: 3480 if ( (mp1) 3481 && (ptxvd = (PTEXTVIEWWINDATA)WinQueryWindowPtr(hwndTextView, QWL_PRIVATE)) 3482 ) 3483 { 3484 *((ULONG *) mp1) = ptxvd->flStyle; 3485 mrc = (MRESULT)TRUE; 3486 } 3487 break; 3488 3489 /* 3490 *@@ TXM_SETSTYLE: 3491 * sets the current style flags. 3492 * 3493 * This must be sent, not posted, to the control. 3494 * 3495 * Parameters: 3496 * 3497 * -- PULONG mp1: pointer to a ULONG buffer. 3498 * 3499 * Returns TRUE on success. 3500 * 3501 *@@added WarpIN V1.0.18 (2008-11-29) [pr] 3502 */ 3503 3504 case TXM_SETSTYLE: 3505 if ( (mp1) 3506 && (ptxvd = (PTEXTVIEWWINDATA)WinQueryWindowPtr(hwndTextView, QWL_PRIVATE)) 3507 ) 3508 { 3509 ptxvd->flStyle = *((ULONG *) mp1); 3510 mrc = (MRESULT)TRUE; 3511 } 3512 break; 3513 3514 /* 3515 *@@ TXM_COPY: 3516 * copies the unprocessed window text to the clipboard. 3517 * 3518 * Returns TRUE on success. 3519 * 3520 *@@added WarpIN V1.0.18 (2008-11-16) [pr] 3521 */ 3522 3523 case TXM_COPY: 3524 if (ptxvd = (PTEXTVIEWWINDATA)WinQueryWindowPtr(hwndTextView, QWL_PRIVATE)) 3525 { 3526 mrc = (MRESULT) winhSetClipboardText(ptxvd->hab, 3527 ptxvd->xfd.strOrigText.psz, 3528 strlen(ptxvd->xfd.strOrigText.psz)); 3440 3529 } 3441 3530 break;
Note:
See TracChangeset
for help on using the changeset viewer.