Tomotaka SUWA
t-suw****@users*****
2006年 4月 2日 (日) 12:33:40 JST
Index: AquaSKK/ChangeLog diff -u AquaSKK/ChangeLog:1.20.2.21 AquaSKK/ChangeLog:1.20.2.22 --- AquaSKK/ChangeLog:1.20.2.21 Sun Apr 2 11:01:35 2006 +++ AquaSKK/ChangeLog Sun Apr 2 12:33:40 2006 @@ -1,5 +1,8 @@ 2006-04-02 Tomotaka SUWA <t.suw****@mac*****> + * WordRegisterMode.cpp (handleCy): Rosetta oRÌ IE ÅRs[ & y[ + XgÅ«È¢sïðC³B + * Info-*.plist: o[WðÏXB 2006-04-01 Tomotaka SUWA <t.suw****@mac*****> Index: AquaSKK/WordRegisterMode.cpp diff -u AquaSKK/WordRegisterMode.cpp:1.3.2.2 AquaSKK/WordRegisterMode.cpp:1.3.2.3 --- AquaSKK/WordRegisterMode.cpp:1.3.2.2 Sun Mar 26 23:39:11 2006 +++ AquaSKK/WordRegisterMode.cpp Sun Apr 2 12:33:40 2006 @@ -1,5 +1,5 @@ /* - $Id: WordRegisterMode.cpp,v 1.3.2.2 2006/03/26 14:39:11 t-suwa Exp $ + $Id: WordRegisterMode.cpp,v 1.3.2.3 2006/04/02 03:33:40 t-suwa Exp $ MacOS X implementation of the SKK input method. @@ -123,16 +123,26 @@ // index Í 1 based if(PasteboardGetItemIdentifier(pasteboard, pos + 1, &id) < 0) continue; + CppCFString str; #if MAC_OS_X_VERSION_MAX_ALLOWED>=1040 - if(PasteboardCopyItemFlavorData(pasteboard, id, kUTTypeUTF16ExternalPlainText, &data) < 0) continue; - CppCFString str(data); + if(PasteboardCopyItemFlavorData(pasteboard, id, kUTTypeUTF16ExternalPlainText, &data) == 0) { + str = CppCFString(data); #else - if(PasteboardCopyItemFlavorData(pasteboard, id, CFSTR("public.utf16-plain-text"), &data) < 0) continue; - CFStringRef tmp = CFStringCreateWithBytes(NULL, CFDataGetBytePtr(data), CFDataGetLength(data), - kCFStringEncodingUnicode, false); - CppCFString str(tmp); - CFRelease(tmp); + if(PasteboardCopyItemFlavorData(pasteboard, id, CFSTR("public.utf16-plain-text"), &data) == 0) { + CFStringRef tmp = CFStringCreateWithBytes(NULL, CFDataGetBytePtr(data), CFDataGetLength(data), + kCFStringEncodingUnicode, false); + str = CppCFString(tmp); + CFRelease(tmp); #endif + } else { + if(PasteboardCopyItemFlavorData(pasteboard, id, CFSTR("com.apple.traditional-mac-plain-text"), &data) < 0) { + continue; + } + CFStringRef tmp = CFStringCreateWithBytes(NULL, CFDataGetBytePtr(data), CFDataGetLength(data), + CFStringGetSystemEncoding(), false); + str = CppCFString(tmp); + CFRelease(tmp); + } CFRelease(data); buffer.insert(caret, str);