--- a/WinWorkstation.st Mon Aug 02 17:57:05 1999 +0200
+++ b/WinWorkstation.st Thu Aug 05 13:36:56 1999 +0200
@@ -8455,7 +8455,7 @@
Pie(hDC,
__x, __y,
- __x + w, __y + h,
+ __x + w + 1, __y + h + 1,
(int)xB, (int)yB,
(int)xE, (int)yE);
@@ -12509,41 +12509,41 @@
/* check for format CF_TEXT */
if (IsClipboardFormatAvailable(CF_TEXT)) {
- hClip = OpenClipboard(NULL);
- if (hClip) {
- hData = GetClipboardData(CF_TEXT);
- src = GlobalLock(hData);
- len = src ? strlen(src) : 0;
-
- /* see how much we really need (when CRLF is replaced by LF) */
- for (realLen = 0, n=len, p=src; n; ) {
- unsigned char ch;
-
- ch = *p++; n--; realLen++;
- if (ch == 0x0D) {
- if (n && (*p == 0x0A)) {
- p++; n--;
- }
- }
- }
- s = __MKEMPTYSTRING(realLen);
- for (n=0, p=__stringVal(s); len; ) {
- unsigned char ch;
-
- *p = ch = *src++;
- len--;
- if (len && (ch == 0x0D) && (*src == 0x0A)) {
- *p = 0x0A;
- src++;
- len--;
- }
- p++;
- }
- GlobalUnlock(hData);
- CloseClipboard();
- DDPRINTF((stderr, "WinWorkstation [info]: clipBoard data is <%s>\n", (char *)hData));
- RETURN(s);
- }
+ hClip = OpenClipboard(NULL);
+ if (hClip) {
+ hData = GetClipboardData(CF_TEXT);
+ src = GlobalLock(hData);
+ len = src ? strlen(src) : 0;
+
+ /* see how much we really need (when CRLF is replaced by LF) */
+ for (realLen = 0, n=len, p=src; n; ) {
+ unsigned char ch;
+
+ ch = *p++; n--; realLen++;
+ if (ch == 0x0D) {
+ if (n && (*p == 0x0A)) {
+ p++; n--;
+ }
+ }
+ }
+ s = __MKEMPTYSTRING(realLen);
+ for (n=0, p=__stringVal(s); len; ) {
+ unsigned char ch;
+
+ *p = ch = *src++;
+ len--;
+ if (len && (ch == 0x0D) && (*src == 0x0A)) {
+ *p = 0x0A;
+ src++;
+ len--;
+ }
+ p++;
+ }
+ GlobalUnlock(hData);
+ CloseClipboard();
+ DDPRINTF((stderr, "WinWorkstation [info]: clipBoard data is <%s>\n", (char *)hData));
+ RETURN(s);
+ }
}
RETURN(nil);
%}
@@ -12555,7 +12555,7 @@
|clip|
(clip := (self getSelectionFor:nil)) notNil ifTrue:[
- ^ clip
+ ^ clip
].
^ copyBuffer
@@ -12568,12 +12568,12 @@
s := self getClipboardData.
(s isString and:[s includes:Character cr]) ifTrue:[
- "/ must make it a string-collection
- lines := s asStringCollection.
- (s endsWith:Character cr) ifTrue:[
- lines := lines copyWith: ''
- ].
- ^ lines
+ "/ must make it a string-collection
+ lines := s asStringCollection.
+ (s endsWith:Character cr) ifTrue:[
+ lines := lines copyWith: ''
+ ].
+ ^ lines
].
^ s
@@ -12590,53 +12590,53 @@
int n, len, realLen;
if (__isString(aString)) {
- s = __stringVal(aString);
- hClip = OpenClipboard(NULL);
- if (hClip) {
- /* must replace CR by CRLF */
- len = realLen = __stringSize(aString);
- for (src=s, n=len; n; n--) {
- if ((src[0] == 0x0A) && ((src == s) || (src[-1] != 0x0D))) {
- realLen++;
- }
- src++;
- }
-
- hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, realLen+1);
- if (hData) {
- char *t = GlobalLock(hData);
-
- if (t) {
- for (src=s, dst=t, n=len; n;) {
- unsigned char ch;
-
- ch = src[0]; n--;
- if ((ch == 0x0A) && ((src == s) || (src[-1] != 0x0D))) {
- *dst++ = 0x0D;
- *dst++ = 0x0A;
- } else {
- *dst++ = ch;
- }
- src++;
- }
- *dst = 0;
-
- EmptyClipboard();
- if (SetClipboardData(CF_TEXT, hData) != 0) {
- /* Note: After setting clipboard data,
- * the memory block previously allocated belongs to
- * the clipboard - not to the app.
- */
- CloseClipboard();
- RETURN (true);
- }
- DPRINTF(("SetClipboardData error:%d\n", GetLastError()));
- GlobalUnlock(hData);
- }
- }
- CloseClipboard();
- }
- RETURN(false);
+ s = __stringVal(aString);
+ hClip = OpenClipboard(NULL);
+ if (hClip) {
+ /* must replace CR by CRLF */
+ len = realLen = __stringSize(aString);
+ for (src=s, n=len; n; n--) {
+ if ((src[0] == 0x0A) && ((src == s) || (src[-1] != 0x0D))) {
+ realLen++;
+ }
+ src++;
+ }
+
+ hData = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, realLen+1);
+ if (hData) {
+ char *t = GlobalLock(hData);
+
+ if (t) {
+ for (src=s, dst=t, n=len; n;) {
+ unsigned char ch;
+
+ ch = src[0]; n--;
+ if ((ch == 0x0A) && ((src == s) || (src[-1] != 0x0D))) {
+ *dst++ = 0x0D;
+ *dst++ = 0x0A;
+ } else {
+ *dst++ = ch;
+ }
+ src++;
+ }
+ *dst = 0;
+
+ EmptyClipboard();
+ if (SetClipboardData(CF_TEXT, hData) != 0) {
+ /* Note: After setting clipboard data,
+ * the memory block previously allocated belongs to
+ * the clipboard - not to the app.
+ */
+ CloseClipboard();
+ RETURN (true);
+ }
+ DPRINTF(("SetClipboardData error:%d\n", GetLastError()));
+ GlobalUnlock(hData);
+ }
+ }
+ CloseClipboard();
+ }
+ RETURN(false);
}
%}.
self primitiveFailed.
@@ -13638,6 +13638,6 @@
!WinWorkstation class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.162 1999-07-13 19:44:36 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/WinWorkstation.st,v 1.163 1999-08-05 11:36:56 cg Exp $'
! !
WinWorkstation initialize!