From 52041a000aae6816601dbfba5d4b0702ec4fb1e6 Mon Sep 17 00:00:00 2001 From: Christopher Lloyd Date: Thu, 25 Aug 2011 23:08:17 -0400 Subject: [PATCH] rough in more spelling, fix build warnings --- AppKit/AppKit.xcodeproj/project.pbxproj | 68 ++ .../NSSpellingViewController.xib | 643 ++++++++++++++++++ AppKit/NSAttributedString.h | 7 + AppKit/NSAttributedString.m | 1 + AppKit/NSSearchFieldCell.m | 3 +- AppKit/NSSpellChecker.h | 25 +- AppKit/NSSpellChecker.m | 252 +++++++ AppKit/NSSpellCheckerTagData.h | 21 + AppKit/NSSpellCheckerTagData.m | 36 + AppKit/NSSpellingViewController.h | 26 + AppKit/NSSpellingViewController.m | 13 + AppKit/NSTextView.subproj/NSTextView.h | 22 + AppKit/NSTextView.subproj/NSTextView.m | 74 +- AppKit/Win32.subproj/Win32Display.m | 2 +- .../Foundation.xcodeproj/project.pbxproj | 58 +- Foundation/NSSpellEngine.h | 17 + Foundation/NSSpellEngine.m | 47 ++ Foundation/NSSpellServer.h | 4 + .../English.lproj/InfoPlist.strings | 2 + NSSpellEngine_hunspell/Info.plist | 28 + .../project.pbxproj | 261 +++++++ .../NSSpellEngine_hunspell_Prefix.pch | 7 + Onyx2D/O2LZW.m | 2 +- 23 files changed, 1596 insertions(+), 23 deletions(-) create mode 100644 AppKit/English.lproj/NSSpellingViewController.xib create mode 100644 AppKit/NSSpellCheckerTagData.h create mode 100644 AppKit/NSSpellCheckerTagData.m create mode 100644 AppKit/NSSpellingViewController.h create mode 100644 AppKit/NSSpellingViewController.m create mode 100644 Foundation/NSSpellEngine.h create mode 100644 Foundation/NSSpellEngine.m create mode 100644 NSSpellEngine_hunspell/English.lproj/InfoPlist.strings create mode 100644 NSSpellEngine_hunspell/Info.plist create mode 100644 NSSpellEngine_hunspell/NSSpellEngine_hunspell.xcodeproj/project.pbxproj create mode 100644 NSSpellEngine_hunspell/NSSpellEngine_hunspell_Prefix.pch diff --git a/AppKit/AppKit.xcodeproj/project.pbxproj b/AppKit/AppKit.xcodeproj/project.pbxproj index da1e6e9b..f06d69e5 100644 --- a/AppKit/AppKit.xcodeproj/project.pbxproj +++ b/AppKit/AppKit.xcodeproj/project.pbxproj @@ -2128,6 +2128,21 @@ FE2759A712341F3A00BD6643 /* O2Context_distill.m in Sources */ = {isa = PBXBuildFile; fileRef = FE2759A312341F3A00BD6643 /* O2Context_distill.m */; }; FE2759A812341F3A00BD6643 /* O2Context_distill.m in Sources */ = {isa = PBXBuildFile; fileRef = FE2759A312341F3A00BD6643 /* O2Context_distill.m */; }; FE2A4FE110CCAACC00458F2E /* O2Font_FT.m in Sources */ = {isa = PBXBuildFile; fileRef = FE34054910CAB38F00A989F0 /* O2Font_FT.m */; }; + FE2C93D414035649002E0CB4 /* NSSpellingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = FE2C93D214035649002E0CB4 /* NSSpellingViewController.h */; }; + FE2C93D514035649002E0CB4 /* NSSpellingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE2C93D314035649002E0CB4 /* NSSpellingViewController.m */; }; + FE2C93D614035649002E0CB4 /* NSSpellingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = FE2C93D214035649002E0CB4 /* NSSpellingViewController.h */; }; + FE2C93D714035649002E0CB4 /* NSSpellingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE2C93D314035649002E0CB4 /* NSSpellingViewController.m */; }; + FE2C93D814035649002E0CB4 /* NSSpellingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = FE2C93D214035649002E0CB4 /* NSSpellingViewController.h */; }; + FE2C93D914035649002E0CB4 /* NSSpellingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE2C93D314035649002E0CB4 /* NSSpellingViewController.m */; }; + FE2C93DA14035649002E0CB4 /* NSSpellingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = FE2C93D214035649002E0CB4 /* NSSpellingViewController.h */; }; + FE2C93DB14035649002E0CB4 /* NSSpellingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE2C93D314035649002E0CB4 /* NSSpellingViewController.m */; }; + FE2C93DC14035649002E0CB4 /* NSSpellingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = FE2C93D214035649002E0CB4 /* NSSpellingViewController.h */; }; + FE2C93DD14035649002E0CB4 /* NSSpellingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FE2C93D314035649002E0CB4 /* NSSpellingViewController.m */; }; + FE2C93E414035935002E0CB4 /* NSSpellingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FE2C93E214035935002E0CB4 /* NSSpellingViewController.xib */; }; + FE2C93E514035935002E0CB4 /* NSSpellingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FE2C93E214035935002E0CB4 /* NSSpellingViewController.xib */; }; + FE2C93E614035935002E0CB4 /* NSSpellingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FE2C93E214035935002E0CB4 /* NSSpellingViewController.xib */; }; + FE2C93E714035935002E0CB4 /* NSSpellingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FE2C93E214035935002E0CB4 /* NSSpellingViewController.xib */; }; + FE2C93E814035935002E0CB4 /* NSSpellingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = FE2C93E214035935002E0CB4 /* NSSpellingViewController.xib */; }; FE311FA80CCC430200EBD696 /* KTFont_gdi.h in Headers */ = {isa = PBXBuildFile; fileRef = FE311FA40CCC430200EBD696 /* KTFont_gdi.h */; }; FE311FA90CCC430200EBD696 /* KTFont_gdi.m in Sources */ = {isa = PBXBuildFile; fileRef = FE311FA50CCC430200EBD696 /* KTFont_gdi.m */; }; FE337FCA0EE77A6C00D4A751 /* CTFont.m in Sources */ = {isa = PBXBuildFile; fileRef = FE337FC90EE77A6C00D4A751 /* CTFont.m */; }; @@ -3946,6 +3961,16 @@ FEB07FA10FF9B37C00C27509 /* O2Font+PDF.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB07F9F0FF9B37C00C27509 /* O2Font+PDF.m */; }; FEB07FA20FF9B37C00C27509 /* O2Font+PDF.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB07F9F0FF9B37C00C27509 /* O2Font+PDF.m */; }; FEB07FA30FF9B37C00C27509 /* O2Font+PDF.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB07F9F0FF9B37C00C27509 /* O2Font+PDF.m */; }; + FEB3F1E914049CC400059C8F /* NSSpellCheckerTagData.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F1E714049CC400059C8F /* NSSpellCheckerTagData.h */; }; + FEB3F1EA14049CC400059C8F /* NSSpellCheckerTagData.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F1E814049CC400059C8F /* NSSpellCheckerTagData.m */; }; + FEB3F1EB14049CC400059C8F /* NSSpellCheckerTagData.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F1E714049CC400059C8F /* NSSpellCheckerTagData.h */; }; + FEB3F1EC14049CC400059C8F /* NSSpellCheckerTagData.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F1E814049CC400059C8F /* NSSpellCheckerTagData.m */; }; + FEB3F1ED14049CC400059C8F /* NSSpellCheckerTagData.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F1E714049CC400059C8F /* NSSpellCheckerTagData.h */; }; + FEB3F1EE14049CC400059C8F /* NSSpellCheckerTagData.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F1E814049CC400059C8F /* NSSpellCheckerTagData.m */; }; + FEB3F1EF14049CC400059C8F /* NSSpellCheckerTagData.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F1E714049CC400059C8F /* NSSpellCheckerTagData.h */; }; + FEB3F1F014049CC400059C8F /* NSSpellCheckerTagData.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F1E814049CC400059C8F /* NSSpellCheckerTagData.m */; }; + FEB3F1F114049CC400059C8F /* NSSpellCheckerTagData.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F1E714049CC400059C8F /* NSSpellCheckerTagData.h */; }; + FEB3F1F214049CC400059C8F /* NSSpellCheckerTagData.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F1E814049CC400059C8F /* NSSpellCheckerTagData.m */; }; FEBF55E50DCA112900CE5A1C /* O2ImageSource_JPEG.h in Headers */ = {isa = PBXBuildFile; fileRef = FEBF55E20DCA112900CE5A1C /* O2ImageSource_JPEG.h */; }; FEBF55E60DCA112900CE5A1C /* O2Paint.h in Headers */ = {isa = PBXBuildFile; fileRef = FEBF55E30DCA112900CE5A1C /* O2Paint.h */; }; FEBF55E70DCA112900CE5A1C /* O2Paint.m in Sources */ = {isa = PBXBuildFile; fileRef = FEBF55E40DCA112900CE5A1C /* O2Paint.m */; }; @@ -4936,6 +4961,9 @@ FE2A11530B45C65E006C03DE /* NSTokenField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSTokenField.m; sourceTree = ""; }; FE2A115A0B45C66A006C03DE /* NSTokenFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSTokenFieldCell.h; sourceTree = ""; }; FE2A115B0B45C66A006C03DE /* NSTokenFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSTokenFieldCell.m; sourceTree = ""; }; + FE2C93D214035649002E0CB4 /* NSSpellingViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSSpellingViewController.h; sourceTree = ""; }; + FE2C93D314035649002E0CB4 /* NSSpellingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSSpellingViewController.m; sourceTree = ""; }; + FE2C93E314035935002E0CB4 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/NSSpellingViewController.xib; sourceTree = ""; }; FE311FA40CCC430200EBD696 /* KTFont_gdi.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = KTFont_gdi.h; sourceTree = ""; }; FE311FA50CCC430200EBD696 /* KTFont_gdi.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = KTFont_gdi.m; sourceTree = ""; }; FE337FC90EE77A6C00D4A751 /* CTFont.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CTFont.m; sourceTree = ""; }; @@ -5199,6 +5227,8 @@ FEAED7A40FD6C9820043F915 /* CGPDFContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CGPDFContext.m; sourceTree = ""; }; FEAEFF7911E4D1B600CA0912 /* glweak.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = glweak.m; sourceTree = ""; }; FEB07F9F0FF9B37C00C27509 /* O2Font+PDF.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "O2Font+PDF.m"; sourceTree = ""; }; + FEB3F1E714049CC400059C8F /* NSSpellCheckerTagData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSSpellCheckerTagData.h; sourceTree = ""; }; + FEB3F1E814049CC400059C8F /* NSSpellCheckerTagData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSSpellCheckerTagData.m; sourceTree = ""; }; FEBF55E20DCA112900CE5A1C /* O2ImageSource_JPEG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = O2ImageSource_JPEG.h; sourceTree = ""; }; FEBF55E30DCA112900CE5A1C /* O2Paint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = O2Paint.h; sourceTree = ""; }; FEBF55E40DCA112900CE5A1C /* O2Paint.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = O2Paint.m; sourceTree = ""; }; @@ -5364,6 +5394,10 @@ 6E2B53240976075200DA0954 /* Classes */ = { isa = PBXGroup; children = ( + FEB3F1E714049CC400059C8F /* NSSpellCheckerTagData.h */, + FEB3F1E814049CC400059C8F /* NSSpellCheckerTagData.m */, + FE2C93D214035649002E0CB4 /* NSSpellingViewController.h */, + FE2C93D314035649002E0CB4 /* NSSpellingViewController.m */, FE09AF3413FCC56600B53D10 /* NSSpellProtocol.h */, FE20C240118924A4006F01BA /* NSAccessibility.h */, FE20C241118924A4006F01BA /* NSAccessibility.m */, @@ -5743,6 +5777,7 @@ 6E2B55050976075300DA0954 /* Resources */ = { isa = PBXGroup; children = ( + FE2C93E214035935002E0CB4 /* NSSpellingViewController.xib */, 6E2B55060976075300DA0954 /* NSMenu.plist */, ); name = Resources; @@ -7055,6 +7090,8 @@ FEDEA8B412C112EE008E5A59 /* CATransactionGroup.h in Headers */, FEE4B2FC133BB8770095E656 /* NSWindowScripting.h in Headers */, FE09AF3613FCC56600B53D10 /* NSSpellProtocol.h in Headers */, + FE2C93D614035649002E0CB4 /* NSSpellingViewController.h in Headers */, + FEB3F1ED14049CC400059C8F /* NSSpellCheckerTagData.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -7458,6 +7495,8 @@ FEDEA8B512C112EE008E5A59 /* CATransactionGroup.h in Headers */, FEE4B2FE133BB8770095E656 /* NSWindowScripting.h in Headers */, FE09AF3713FCC56600B53D10 /* NSSpellProtocol.h in Headers */, + FE2C93D814035649002E0CB4 /* NSSpellingViewController.h in Headers */, + FEB3F1E914049CC400059C8F /* NSSpellCheckerTagData.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -7858,6 +7897,8 @@ FEDEA8B312C112EE008E5A59 /* CATransactionGroup.h in Headers */, FEE4B2FA133BB8770095E656 /* NSWindowScripting.h in Headers */, FE09AF3513FCC56600B53D10 /* NSSpellProtocol.h in Headers */, + FE2C93D414035649002E0CB4 /* NSSpellingViewController.h in Headers */, + FEB3F1EB14049CC400059C8F /* NSSpellCheckerTagData.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -8263,6 +8304,8 @@ FEDEA8B712C112EE008E5A59 /* CATransactionGroup.h in Headers */, FEE4B302133BB8770095E656 /* NSWindowScripting.h in Headers */, FE09AF3913FCC56600B53D10 /* NSSpellProtocol.h in Headers */, + FE2C93DA14035649002E0CB4 /* NSSpellingViewController.h in Headers */, + FEB3F1EF14049CC400059C8F /* NSSpellCheckerTagData.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -8585,6 +8628,8 @@ FEDEA8B612C112EE008E5A59 /* CATransactionGroup.h in Headers */, FEE4B300133BB8770095E656 /* NSWindowScripting.h in Headers */, FE09AF3813FCC56600B53D10 /* NSSpellProtocol.h in Headers */, + FE2C93DC14035649002E0CB4 /* NSSpellingViewController.h in Headers */, + FEB3F1F114049CC400059C8F /* NSSpellCheckerTagData.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -8964,6 +9009,7 @@ FEED42D61224B82B0059B0DF /* NSInfo.pdf in Resources */, FEED42D81224B82B0059B0DF /* NSStopProgressTemplate.pdf in Resources */, FE1708001260A1E000D18E9E /* NSEnterFullScreenTemplate.pdf in Resources */, + FE2C93E514035935002E0CB4 /* NSSpellingViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -9029,6 +9075,7 @@ FEED42DC1224B82B0059B0DF /* NSInfo.pdf in Resources */, FEED42DE1224B82B0059B0DF /* NSStopProgressTemplate.pdf in Resources */, FE1708021260A1E000D18E9E /* NSEnterFullScreenTemplate.pdf in Resources */, + FE2C93E614035935002E0CB4 /* NSSpellingViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -9095,6 +9142,7 @@ FEED42D01224B82B0059B0DF /* NSInfo.pdf in Resources */, FEED42D21224B82B0059B0DF /* NSStopProgressTemplate.pdf in Resources */, FE1707FE1260A1E000D18E9E /* NSEnterFullScreenTemplate.pdf in Resources */, + FE2C93E714035935002E0CB4 /* NSSpellingViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -9160,6 +9208,7 @@ FEED42E81224B82B0059B0DF /* NSInfo.pdf in Resources */, FEED42EA1224B82B0059B0DF /* NSStopProgressTemplate.pdf in Resources */, FE1708061260A1E000D18E9E /* NSEnterFullScreenTemplate.pdf in Resources */, + FE2C93E814035935002E0CB4 /* NSSpellingViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -9225,6 +9274,7 @@ FEED42E21224B82B0059B0DF /* NSInfo.pdf in Resources */, FEED42E41224B82B0059B0DF /* NSStopProgressTemplate.pdf in Resources */, FE1708041260A1E000D18E9E /* NSEnterFullScreenTemplate.pdf in Resources */, + FE2C93E414035935002E0CB4 /* NSSpellingViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -9666,6 +9716,8 @@ FEDEAA9A12C2639B008E5A59 /* CAValueFunction.m in Sources */, FEDEABAF12C98F4C008E5A59 /* CALayerContext.m in Sources */, FEE4B2FD133BB8770095E656 /* NSWindowScripting.m in Sources */, + FE2C93D714035649002E0CB4 /* NSSpellingViewController.m in Sources */, + FEB3F1EE14049CC400059C8F /* NSSpellCheckerTagData.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -10065,6 +10117,8 @@ FEDEAA9B12C2639B008E5A59 /* CAValueFunction.m in Sources */, FEDEABB012C98F4C008E5A59 /* CALayerContext.m in Sources */, FEE4B2FF133BB8770095E656 /* NSWindowScripting.m in Sources */, + FE2C93D914035649002E0CB4 /* NSSpellingViewController.m in Sources */, + FEB3F1EA14049CC400059C8F /* NSSpellCheckerTagData.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -10495,6 +10549,8 @@ FEDEAA9912C2639B008E5A59 /* CAValueFunction.m in Sources */, FEDEABAE12C98F4C008E5A59 /* CALayerContext.m in Sources */, FEE4B2FB133BB8770095E656 /* NSWindowScripting.m in Sources */, + FE2C93D514035649002E0CB4 /* NSSpellingViewController.m in Sources */, + FEB3F1EC14049CC400059C8F /* NSSpellCheckerTagData.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -10896,6 +10952,8 @@ FEDEAA9D12C2639B008E5A59 /* CAValueFunction.m in Sources */, FEDEABB212C98F4C008E5A59 /* CALayerContext.m in Sources */, FEE4B303133BB8770095E656 /* NSWindowScripting.m in Sources */, + FE2C93DB14035649002E0CB4 /* NSSpellingViewController.m in Sources */, + FEB3F1F014049CC400059C8F /* NSSpellCheckerTagData.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -11192,6 +11250,8 @@ FEDEAA9C12C2639B008E5A59 /* CAValueFunction.m in Sources */, FEDEABB112C98F4C008E5A59 /* CALayerContext.m in Sources */, FEE4B301133BB8770095E656 /* NSWindowScripting.m in Sources */, + FE2C93DD14035649002E0CB4 /* NSSpellingViewController.m in Sources */, + FEB3F1F214049CC400059C8F /* NSSpellCheckerTagData.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -11282,6 +11342,14 @@ name = NSMenu.plist; sourceTree = ""; }; + FE2C93E214035935002E0CB4 /* NSSpellingViewController.xib */ = { + isa = PBXVariantGroup; + children = ( + FE2C93E314035935002E0CB4 /* English */, + ); + name = NSSpellingViewController.xib; + sourceTree = ""; + }; FE71E83711FA88BE00E6F801 /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( diff --git a/AppKit/English.lproj/NSSpellingViewController.xib b/AppKit/English.lproj/NSSpellingViewController.xib new file mode 100644 index 00000000..bd6e2ccb --- /dev/null +++ b/AppKit/English.lproj/NSSpellingViewController.xib @@ -0,0 +1,643 @@ + + + + 1060 + 10J869 + 851 + 1038.35 + 461.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 851 + + + YES + + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + NSObject + + + FirstResponder + + + NSApplication + + + + 268 + + YES + + + 274 + {{20, 45}, {270, 164}} + + YES + + 67239488 + 2048 + IA + + LucidaGrande + 12 + 16 + + + / + 100 + 1 + 1 + 1 + 100 + YES + 135544832 + 17 + + + + 290 + {{17, 16}, {276, 22}} + + YES + + -2076049856 + 133120 + + LucidaGrande + 11 + 3100 + + + 109199615 + 129 + + + 400 + 75 + + + Item 1 + + 1048576 + 2147483647 + 1 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + _popUpItemAction: + + + YES + + OtherViews + + YES + + + + Item 2 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + Item 3 + + 1048576 + 2147483647 + + + _popUpItemAction: + + + + + LucidaGrande + 13 + 1044 + + + 1 + YES + YES + 2 + + + + + 265 + {{303, 104}, {140, 28}} + + YES + + -2080244224 + 134348800 + Guess + + + -2038284033 + 129 + + + 200 + 25 + + + + + 265 + {{303, 131}, {140, 28}} + + YES + + -2080244224 + 134348800 + Define + + + -2038284033 + 129 + + + 200 + 25 + + + + + 265 + {{303, 158}, {140, 28}} + + YES + + -2080244224 + 134348800 + Learn + + + -2038284033 + 129 + + + 200 + 25 + + + + + 265 + {{303, 185}, {140, 28}} + + YES + + -2080244224 + 134348800 + Ignore + + + -2038284033 + 129 + + + 200 + 25 + + + + + 265 + {{303, 227}, {140, 28}} + + YES + + -2080244224 + 134348800 + Find Next + + + -2038284033 + 129 + + + 200 + 25 + + + + + 265 + {{303, 254}, {140, 28}} + + YES + + 67239424 + 134348800 + Change + + + -2038284033 + 129 + + + 200 + 25 + + + + + 266 + {{20, 256}, {270, 22}} + + YES + + -1804468671 + 272630784 + + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + 3 + MAA + + + + + + {458, 298} + + NSView + + + + + YES + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + YES + + + + + + + + + + + + + + 2 + + + YES + + + + + + 3 + + + + + 4 + + + YES + + + + + + 5 + + + + + 6 + + + YES + + + + + + 7 + + + + + 8 + + + YES + + + + + + 9 + + + + + 10 + + + YES + + + + + + 11 + + + + + 12 + + + YES + + + + + + 13 + + + + + 14 + + + YES + + + + + + 15 + + + + + 16 + + + YES + + + + + + 17 + + + YES + + + + + + 18 + + + YES + + + + + + + + 19 + + + + + 20 + + + + + 21 + + + + + 22 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1.IBEditorWindowLastContentRect + 1.IBPluginDependency + 1.WindowOrigin + 1.editorWindowContentRectSynchronizationRect + 10.IBPluginDependency + 10.IBViewBoundsToFrameTransform + 11.IBPluginDependency + 12.IBPluginDependency + 12.IBViewBoundsToFrameTransform + 13.IBPluginDependency + 14.IBPluginDependency + 14.IBViewBoundsToFrameTransform + 15.IBPluginDependency + 16.IBPluginDependency + 16.IBViewBoundsToFrameTransform + 17.IBPluginDependency + 18.IBPluginDependency + 19.IBPluginDependency + 2.IBPluginDependency + 20.IBPluginDependency + 21.IBPluginDependency + 22.IBPluginDependency + 3.IBPluginDependency + 4.IBPluginDependency + 4.IBViewBoundsToFrameTransform + 5.IBPluginDependency + 6.IBPluginDependency + 6.IBViewBoundsToFrameTransform + 7.IBPluginDependency + 8.IBPluginDependency + 8.IBViewBoundsToFrameTransform + 9.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{344, 660}, {458, 298}} + com.apple.InterfaceBuilder.CocoaPlugin + {628, 654} + {{357, 416}, {480, 272}} + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDl4AAwysAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDl4AAwxAAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDl4AAwuoAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABBiAAAwggAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDgQAAw1MAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDgQAAwzMAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDl4AAw0YAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + YES + + + + + YES + + + YES + + + + 22 + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/AppKit/NSAttributedString.h b/AppKit/NSAttributedString.h index 0461c53d..69f05dc8 100755 --- a/AppKit/NSAttributedString.h +++ b/AppKit/NSAttributedString.h @@ -35,6 +35,13 @@ APPKIT_EXPORT NSString * const NSCursorAttributeName; APPKIT_EXPORT NSString * const NSToolTipAttributeName; APPKIT_EXPORT NSString * const NSBackgroundColorDocumentAttribute; +APPKIT_EXPORT NSString * const NSSpellingStateAttributeName; + +enum { + NSSpellingStateSpellingFlag=0x01, + NSSpellingStateGrammarFlag =0x02, +}; + enum { NSUnderlineStyleNone, NSUnderlineStyleSingle, diff --git a/AppKit/NSAttributedString.m b/AppKit/NSAttributedString.m index 1e66302c..aec01602 100755 --- a/AppKit/NSAttributedString.m +++ b/AppKit/NSAttributedString.m @@ -36,6 +36,7 @@ NSString * const NSExpansionAttributeName=@"NSExpansionAttributeName"; NSString * const NSCursorAttributeName=@"NSCursorAttributeName"; NSString * const NSToolTipAttributeName=@"NSToolTipAttributeName"; NSString * const NSBackgroundColorDocumentAttribute=@"NSBackgroundColorDocumentAttribute"; +NSString * const NSSpellingStateAttributeName=@"NSSpellingStateAttributeName"; // temporary attribute @implementation NSAttributedString(NSAttributedString_AppKit) diff --git a/AppKit/NSSearchFieldCell.m b/AppKit/NSSearchFieldCell.m index fc497bcd..8501a2b5 100644 --- a/AppKit/NSSearchFieldCell.m +++ b/AppKit/NSSearchFieldCell.m @@ -11,6 +11,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #import #import #import +#import #import @implementation NSSearchFieldCell @@ -155,7 +156,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI -(BOOL)trackMouse:(NSEvent *)event inRect:(NSRect)frame ofView:(NSView *)view untilMouseUp:(BOOL)untilMouseUp { if([_cancelButtonCell trackMouse:event inRect:[self cancelButtonRectForBounds:frame] ofView:view untilMouseUp:YES]){ [(NSControl *)view setStringValue:@""]; - [(NSControl *)view selectText:nil]; + [(NSTextField *)view selectText:nil]; return YES; } diff --git a/AppKit/NSSpellChecker.h b/AppKit/NSSpellChecker.h index f1c2d395..6347ab14 100644 --- a/AppKit/NSSpellChecker.h +++ b/AppKit/NSSpellChecker.h @@ -11,7 +11,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #import #import -@class NSView, NSMenu,NSViewController,NSPanel; +@class NSView, NSMenu,NSViewController,NSPanel,NSMutableDictionary,NSMutableSet; APPKIT_EXPORT NSString * const NSSpellCheckerDidChangeAutomaticTextReplacementNotification; APPKIT_EXPORT NSString * const NSSpellCheckerDidChangeAutomaticSpellingCorrectionNotification; @@ -43,7 +43,13 @@ enum { typedef NSInteger NSCorrectionResponse; @interface NSSpellChecker : NSObject { - + NSPanel *_spellingPanel; + NSViewController *_spellingViewController; + NSView *_accessoryView; + NSPanel *_substitutionsPanel; + NSMutableDictionary *_tagToData; + NSMutableSet *_learnedWords; + NSString *_language; } +(NSSpellChecker *)sharedSpellChecker; @@ -54,6 +60,8 @@ typedef NSInteger NSCorrectionResponse; +(NSInteger)uniqueSpellDocumentTag; -(NSView *)accessoryView; +-(void)setAccessoryView:(NSView *)view; + -(BOOL)automaticallyIdentifiesLanguages; -(NSArray *)availableLanguages; @@ -77,15 +85,12 @@ typedef NSInteger NSCorrectionResponse; -(NSArray *)guessesForWordRange:(NSRange)range inString:(NSString *)string language:(NSString *)language inSpellDocumentWithTag:(NSInteger)tag; +-(void)learnWord:(NSString *)word; -(BOOL)hasLearnedWord:(NSString *)word; --(NSArray *)ignoredWordsInSpellDocumentWithTag:(NSInteger)tag; - --(void)ignoreWord:(NSString *)word inSpellDocumentWithTag:(NSInteger)tag; - -(NSString *)language; +-(BOOL)setLanguage:(NSString *)language; --(void)learnWord:(NSString *)word; -(NSMenu *)menuForResult:(NSTextCheckingResult *)result string:(NSString *)checkedString options:(NSDictionary *)options atLocation:(NSPoint)location inView:(NSView *)view; @@ -95,13 +100,15 @@ typedef NSInteger NSCorrectionResponse; -(NSInteger)requestCheckingOfString:(NSString *)stringToCheck range:(NSRange)range types:(NSTextCheckingTypes)checkingTypes options:(NSDictionary *)options inSpellDocumentWithTag:(NSInteger)tag completionHandler:(void (^)(NSInteger sequenceNumber, NSArray *results, NSOrthography *orthography, NSInteger wordCount))completionHandler; #endif --(void)setAccessoryView:(NSView *)view; -(void)setAutomaticallyIdentifiesLanguages:(BOOL)flag; +-(void)ignoreWord:(NSString *)word inSpellDocumentWithTag:(NSInteger)tag; + +-(NSArray *)ignoredWordsInSpellDocumentWithTag:(NSInteger)tag; + -(void)setIgnoredWords:(NSArray *)ignoredWords inSpellDocumentWithTag:(NSInteger)tag; --(BOOL)setLanguage:(NSString *)language; -(void)setSubstitutionsPanelAccessoryViewController:(NSViewController *)viewController; diff --git a/AppKit/NSSpellChecker.m b/AppKit/NSSpellChecker.m index 2d8b9c67..9c07bc1d 100644 --- a/AppKit/NSSpellChecker.m +++ b/AppKit/NSSpellChecker.m @@ -7,4 +7,256 @@ The above copyright notice and this permission notice shall be included in all c THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #import +#import +#import +#import +#import +#import "NSSpellCheckerTagData.h" +#import "NSSpellingViewController.h" +@implementation NSSpellChecker + +-init { + _tagToData=[[NSMutableDictionary alloc] init]; + _learnedWords=[[NSMutableSet alloc] init]; + return self; +} + +-(void)dealloc { + [super dealloc]; +} + +static NSSpellChecker *shared=nil; + ++(NSSpellChecker *)sharedSpellChecker { + + if(shared==nil) + shared=[[NSSpellChecker alloc] init]; + + return shared; +} + ++(BOOL)sharedSpellCheckerExists { + return (shared!=nil)?YES:NO; +} + ++(BOOL)isAutomaticSpellingCorrectionEnabled { + NSUnimplementedMethod(); + return 0; +} + ++(BOOL)isAutomaticTextReplacementEnabled { + NSUnimplementedMethod(); + return 0; +} + ++(NSInteger)uniqueSpellDocumentTag { + /* These start at 1, don't change */ + static NSInteger tag=1; + + return tag++; +} + +-(NSSpellCheckerTagData *)_dataForDocumentTag:(NSInteger)tagInt { + NSNumber *tag=[NSNumber numberWithInteger:tagInt]; + NSSpellCheckerTagData *result=[_tagToData objectForKey:tag]; + + if(result==nil){ + result=[[[NSSpellCheckerTagData alloc] init] autorelease]; + [_tagToData setObject:result forKey:tag]; + } + + return result; +} + +-(NSView *)accessoryView { + return _accessoryView; +} + +-(void)setAccessoryView:(NSView *)view { + view=[view retain]; + [_accessoryView release]; + _accessoryView=view; + NSUnimplementedMethod(); +} + + +-(BOOL)automaticallyIdentifiesLanguages { + NSUnimplementedMethod(); + return 0; +} + +-(NSArray *)availableLanguages { + NSUnimplementedMethod(); + return 0; +} + +-(NSRange)checkGrammarOfString:(NSString *)string startingAt:(NSInteger)start language:(NSString *)language wrap:(BOOL)wrap inSpellDocumentWithTag:(NSInteger)documentTag details:(NSArray **)outDetails { + NSUnimplementedMethod(); + return NSMakeRange(0,0); +} + +-(NSRange)checkSpellingOfString:(NSString *)string startingAt:(NSInteger)offset { + return [self checkSpellingOfString:string startingAt:offset language:nil wrap:NO inSpellDocumentWithTag:0 wordCount:NULL]; +} + +-(NSRange)checkSpellingOfString:(NSString *)string startingAt:(NSInteger)offset language:(NSString *)language wrap:(BOOL)wrap inSpellDocumentWithTag:(NSInteger)tag wordCount:(NSInteger *)wordCount { + NSUnimplementedMethod(); + return NSMakeRange(0,0); +} + +-(NSArray *)checkString:(NSString *)string range:(NSRange)range types:(NSTextCheckingTypes)types options:(NSDictionary *)options inSpellDocumentWithTag:(NSInteger)tag orthography:(NSOrthography **)orthography wordCount:(NSInteger *)wordCount { + NSUnimplementedMethod(); + return 0; +} + +-(void)closeSpellDocumentWithTag:(NSInteger)tag { + NSUnimplementedMethod(); +} + +-(NSArray *)completionsForPartialWordRange:(NSRange)partialWordRange inString:(NSString *)string language:(NSString *)language inSpellDocumentWithTag:(NSInteger)tag { + NSUnimplementedMethod(); + return 0; +} + +-(NSString *)correctionForWordRange:(NSRange)range inString:(NSString *)string language:(NSString *)language inSpellDocumentWithTag:(NSInteger)tag { + NSUnimplementedMethod(); + return 0; +} + +-(NSInteger)countWordsInString:(NSString *)string language:(NSString *)language { + NSUnimplementedMethod(); + return 0; +} + +-(void)dismissCorrectionIndicatorForView:(NSView *)view { + NSUnimplementedMethod(); +} + +-(NSArray *)guessesForWordRange:(NSRange)range inString:(NSString *)string language:(NSString *)language inSpellDocumentWithTag:(NSInteger)tag { + NSUnimplementedMethod(); + return 0; +} + +-(void)learnWord:(NSString *)word { + [_learnedWords addObject:[[word copy] autorelease]]; +} + +-(BOOL)hasLearnedWord:(NSString *)word { + return [_learnedWords containsObject:word]; +} + +-(NSString *)language { + return _language; +} + +-(BOOL)setLanguage:(NSString *)language { + language=[language copy]; + NSUnimplementedMethod(); + // Check if known language, return YES if so. TODO: Does NO still set the language? + return YES; +} + + + +-(NSMenu *)menuForResult:(NSTextCheckingResult *)result string:(NSString *)checkedString options:(NSDictionary *)options atLocation:(NSPoint)location inView:(NSView *)view { + NSUnimplementedMethod(); + return 0; +} + +-(void)recordResponse:(NSCorrectionResponse)response toCorrection:(NSString *)correction forWord:(NSString *)word language :(NSString *)language inSpellDocumentWithTag :(NSInteger)tag { + NSUnimplementedMethod(); +} + +#ifdef NS_BLOCKS +-(NSInteger)requestCheckingOfString:(NSString *)stringToCheck range:(NSRange)range types:(NSTextCheckingTypes)checkingTypes options:(NSDictionary *)options inSpellDocumentWithTag:(NSInteger)tag completionHandler:(void (^)(NSInteger sequenceNumber, NSArray *results, NSOrthography *orthography, NSInteger wordCount))completionHandler { + NSUnimplementedMethod(); + return 0; +} + +#endif + +-(void)setAutomaticallyIdentifiesLanguages:(BOOL)flag { + NSUnimplementedMethod(); +} + + +-(void)ignoreWord:(NSString *)word inSpellDocumentWithTag:(NSInteger)tag { + [[self _dataForDocumentTag:tag] ignoreWord:word]; +} + +-(NSArray *)ignoredWordsInSpellDocumentWithTag:(NSInteger)tag { + return [[self _dataForDocumentTag:tag] ignoredWords]; +} + +-(void)setIgnoredWords:(NSArray *)ignoredWords inSpellDocumentWithTag:(NSInteger)tag { + [[self _dataForDocumentTag:tag] setIgnoredWords:ignoredWords]; +} + +-(void)setSubstitutionsPanelAccessoryViewController:(NSViewController *)viewController { + NSUnimplementedMethod(); +} + +-(void)setWordFieldStringValue:(NSString *)string { + NSUnimplementedMethod(); +} + +#ifdef NS_BLOCKS +-(void)showCorrectionIndicatorOfType:(NSCorrectionIndicatorType)type primaryString:(NSString *)primaryString alternativeStrings:(NSArray *)alternativeStrings forStringInRect:(NSRect)rect view:(NSView *)view completionHandler:(void (^)(NSString *acceptedString))completionBlock { + NSUnimplementedMethod(); +} +#endif + +-(NSPanel *)spellingPanel { + if(_spellingPanel==nil){ + _spellingViewController=[[NSSpellingViewController alloc] initWithNibName:@"NSSpellingViewController" bundle:[NSBundle bundleForClass:[NSSpellingViewController class]]]; + + NSView *view=[_spellingViewController view]; + _spellingPanel=[[NSPanel alloc] initWithContentRect:[view frame] styleMask:NSUtilityWindowMask backing:NSBackingStoreBuffered defer:YES]; + [_spellingPanel center]; + } + + return _spellingPanel; +} + +-(NSPanel *)substitutionsPanel { + return _substitutionsPanel; +} + +-(NSViewController *)substitutionsPanelAccessoryViewController { + NSUnimplementedMethod(); + return 0; +} + +-(void)unlearnWord:(NSString *)word { + NSUnimplementedMethod(); +} + +-(void)updatePanels { + NSUnimplementedMethod(); +} + +-(void)updateSpellingPanelWithGrammarString:(NSString *)problemString detail:(NSDictionary *)detail { + NSUnimplementedMethod(); +} + +-(void)updateSpellingPanelWithMisspelledWord:(NSString *)word { + NSUnimplementedMethod(); +} + +-(NSArray *)userPreferredLanguages { + NSUnimplementedMethod(); + return 0; +} + +-(NSArray *)userQuotesArrayForLanguage:(NSString *)language { + NSUnimplementedMethod(); + return 0; +} + +-(NSDictionary *)userReplacementsDictionary { + NSUnimplementedMethod(); + return 0; +} + +@end diff --git a/AppKit/NSSpellCheckerTagData.h b/AppKit/NSSpellCheckerTagData.h new file mode 100644 index 00000000..c81bbc5f --- /dev/null +++ b/AppKit/NSSpellCheckerTagData.h @@ -0,0 +1,21 @@ +// +// NSSpellCheckerTagData.h +// AppKit +// +// Created by Christopher Lloyd on 8/23/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import + +@class NSMutableSet,NSArray; + +@interface NSSpellCheckerTagData : NSObject { + NSMutableSet *_ignoredWords; +} + +-(void)ignoreWord:(NSString *)word; +-(NSArray *)ignoredWords; +-(void)setIgnoredWords:(NSArray *)words; + +@end diff --git a/AppKit/NSSpellCheckerTagData.m b/AppKit/NSSpellCheckerTagData.m new file mode 100644 index 00000000..97ad798f --- /dev/null +++ b/AppKit/NSSpellCheckerTagData.m @@ -0,0 +1,36 @@ +// +// NSSpellCheckerTagData.m +// AppKit +// +// Created by Christopher Lloyd on 8/23/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import "NSSpellCheckerTagData.h" +#import + +@implementation NSSpellCheckerTagData + +-init { + _ignoredWords=[[NSMutableSet alloc] init]; + return self; +} + +-(void)dealloc { + [_ignoredWords release]; + [super dealloc]; +} + +-(void)ignoreWord:(NSString *)word { + [_ignoredWords addObject:[[word copy] autorelease]]; +} + +-(NSArray *)ignoredWords { + return [_ignoredWords allObjects]; +} + +-(void)setIgnoredWords:(NSArray *)words { + [_ignoredWords setByAddingObjectsFromArray:words]; +} + +@end diff --git a/AppKit/NSSpellingViewController.h b/AppKit/NSSpellingViewController.h new file mode 100644 index 00000000..19ee7039 --- /dev/null +++ b/AppKit/NSSpellingViewController.h @@ -0,0 +1,26 @@ +/* Copyright (c) 2011 Christopher J. W. Lloyd + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#import +#import + +@class NSTextField,NSButton,NSPopUpButton,NSBrowser; + +@interface NSSpellingViewController : NSViewController { + IBOutlet NSTextField *_currentWord; + IBOutlet NSButton *_changeButton; + IBOutlet NSButton *_findNextButton; + + IBOutlet NSBrowser *_suggestionBrowser; + IBOutlet NSButton *_ignoreButton; + IBOutlet NSButton *_learnButton; + IBOutlet NSButton *_defineButton; + IBOutlet NSButton *_guessButton; + IBOutlet NSPopUpButton *_languagesPopUp; +} + +@end diff --git a/AppKit/NSSpellingViewController.m b/AppKit/NSSpellingViewController.m new file mode 100644 index 00000000..f4dc93a3 --- /dev/null +++ b/AppKit/NSSpellingViewController.m @@ -0,0 +1,13 @@ +/* Copyright (c) 2011 Christopher J. W. Lloyd + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#import "NSSpellingViewController.h" + + +@implementation NSSpellingViewController + +@end diff --git a/AppKit/NSTextView.subproj/NSTextView.h b/AppKit/NSTextView.subproj/NSTextView.h index cf507784..6044bfcb 100755 --- a/AppKit/NSTextView.subproj/NSTextView.h +++ b/AppKit/NSTextView.subproj/NSTextView.h @@ -17,6 +17,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #import #import #import +#import @class NSTextStorage, NSLayoutManager, NSTextContainer, NSUndoManager; @class NSRulerView, NSRulerMarker; @@ -99,6 +100,11 @@ APPKIT_EXPORT NSString * const NSOldSelectedCharacterRange; NSRange _undoRange; // The range of text that was entered in the current typing operation BOOL _processingKeyEvent; BOOL _firstResponderButNotEditingYet; + + NSInteger _spellCheckerDocumentTag; + BOOL _isContinuousSpellCheckingEnabled; + BOOL _isAutomaticSpellingCorrectionEnabled; + NSTextCheckingTypes _enabledTextCheckingTypes; } -initWithFrame:(NSRect)frame textContainer:(NSTextContainer *)container; @@ -184,6 +190,22 @@ APPKIT_EXPORT NSString * const NSOldSelectedCharacterRange; -(void)_setFieldEditorUndoManager:(NSUndoManager *)undoManager; -(void)breakUndoCoalescing; + +-(NSInteger)spellCheckerDocumentTag; + +-(BOOL)isContinuousSpellCheckingEnabled; +-(void)setContinuousSpellCheckingEnabled:(BOOL)value; +-(void)toggleContinuousSpellChecking:sender; + +-(BOOL)isAutomaticSpellingCorrectionEnabled; +-(void)setAutomaticSpellingCorrectionEnabled:(BOOL)value; +-(void)toggleAutomaticSpellingCorrection:sender; + +-(NSTextCheckingTypes)enabledTextCheckingTypes; +-(void)setEnabledTextCheckingTypes:(NSTextCheckingTypes)checkingTypes; + +-(void)setSpellingState:(NSInteger)value range:(NSRange)characterRange; + @end @interface NSObject(NSTextView_undoManager) diff --git a/AppKit/NSTextView.subproj/NSTextView.m b/AppKit/NSTextView.subproj/NSTextView.m index 5128bffc..3da41ffe 100755 --- a/AppKit/NSTextView.subproj/NSTextView.m +++ b/AppKit/NSTextView.subproj/NSTextView.m @@ -39,6 +39,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI #import "NSTextViewSharedData.h" #import #import +#import +#import NSString * const NSTextViewDidChangeSelectionNotification=@"NSTextViewDidChangeSelectionNotification"; NSString * const NSOldSelectedCharacterRange=@"NSOldSelectedCharacterRange"; @@ -2585,12 +2587,80 @@ NSString * const NSOldSelectedCharacterRange=@"NSOldSelectedCharacterRange"; } -(void)changeSpelling:sender { - + NSString *correction=[[sender selectedCell] stringValue]; + NSRange selectedRange=[self selectedRange]; + + if (![self _delegateChangeTextInRange: selectedRange replacementString: correction]) + return; + + [self _replaceCharactersInRange:selectedRange withString:correction]; + [self didChangeText]; } -(void)ignoreSpelling:sender { - + [[NSSpellChecker sharedSpellChecker] ignoreWord:[[sender selectedCell] stringValue] inSpellDocumentWithTag: [self spellCheckerDocumentTag]]; } +-(NSInteger)spellCheckerDocumentTag { + /* There is no explicity invalid document tag, this is indirectly documented as zero in the full checkSpellingOfString: method. + and supported by behavior. */ + if(_spellCheckerDocumentTag==0){ + + /* Check if any other text view in the group has a document tag and use it. */ + /* We could put this in the text storage, but there are no provisions for that. */ + for(NSLayoutManager *checkLayout in [[self textStorage] layoutManagers]) + for(NSTextContainer *checkContainer in [checkLayout textContainers]) + if([checkContainer textView]->_spellCheckerDocumentTag!=0){ + // Direct access the ivar to avoid the method logic here. + _spellCheckerDocumentTag=[checkContainer textView]->_spellCheckerDocumentTag; + } + + if(_spellCheckerDocumentTag==0) + _spellCheckerDocumentTag=[NSSpellChecker uniqueSpellDocumentTag]; + } + + return _spellCheckerDocumentTag; +} + +-(BOOL)isContinuousSpellCheckingEnabled { + return _isContinuousSpellCheckingEnabled; +} + +-(void)setContinuousSpellCheckingEnabled:(BOOL)value { + _isContinuousSpellCheckingEnabled=value; + NSUnimplementedMethod(); +} + +-(void)toggleContinuousSpellChecking:sender { + NSUnimplementedMethod(); + _isContinuousSpellCheckingEnabled=!_isContinuousSpellCheckingEnabled; +} + +-(BOOL)isAutomaticSpellingCorrectionEnabled { + return _isAutomaticSpellingCorrectionEnabled; +} + +-(void)setAutomaticSpellingCorrectionEnabled:(BOOL)value { + _isAutomaticSpellingCorrectionEnabled=value; + NSUnimplementedMethod(); +} + +-(void)toggleAutomaticSpellingCorrection:sender { + _isAutomaticSpellingCorrectionEnabled=!_isAutomaticSpellingCorrectionEnabled; + NSUnimplementedMethod(); +} + +-(NSTextCheckingTypes)enabledTextCheckingTypes { + NSUnimplementedMethod(); + return 0; +} + +-(void)setEnabledTextCheckingTypes:(NSTextCheckingTypes)checkingTypes { + NSUnimplementedMethod(); +} + +-(void)setSpellingState:(NSInteger)value range:(NSRange)characterRange { + NSUnimplementedMethod(); +} @end diff --git a/AppKit/Win32.subproj/Win32Display.m b/AppKit/Win32.subproj/Win32Display.m index 338fa604..1f83e604 100755 --- a/AppKit/Win32.subproj/Win32Display.m +++ b/AppKit/Win32.subproj/Win32Display.m @@ -400,7 +400,7 @@ static BOOL CALLBACK monitorEnumerator(HMONITOR hMonitor,HDC hdcMonitor,LPRECT r result=[super nextEventMatchingMask:mask|NSPlatformSpecificDisplayMask untilDate:untilDate inMode:mode dequeue:dequeue]; if([result type]==NSPlatformSpecificDisplayEvent){ - Win32Event *win32Event=[(NSEvent_CoreGraphics *)result coreGraphicsEvent]; + Win32Event *win32Event=(Win32Event *)[(NSEvent_CoreGraphics *)result coreGraphicsEvent]; MSG msg=[win32Event msg]; DispatchMessage(&msg); diff --git a/Foundation/Foundation.xcodeproj/project.pbxproj b/Foundation/Foundation.xcodeproj/project.pbxproj index a7cec22d..b17ef3ee 100644 --- a/Foundation/Foundation.xcodeproj/project.pbxproj +++ b/Foundation/Foundation.xcodeproj/project.pbxproj @@ -332,7 +332,7 @@ 15D92047105E918000171406 /* NSRaiseException.h in Headers */ = {isa = PBXBuildFile; fileRef = FEA317850FD5843900F480D4 /* NSRaiseException.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15D92048105E918000171406 /* NSString_win1252.h in Headers */ = {isa = PBXBuildFile; fileRef = FE8C913E0FFD1E430027C889 /* NSString_win1252.h */; settings = {ATTRIBUTES = (Private, ); }; }; 15D92049105E918000171406 /* NSString_macOSRoman.h in Headers */ = {isa = PBXBuildFile; fileRef = FE452E80102097EF00585DFE /* NSString_macOSRoman.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 15D9204A105E918000171406 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; }; + 15D9204A105E918000171406 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15D9204B105E918000171406 /* NSURLError.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E29102CD5A600B265D6 /* NSURLError.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15D9204C105E918000171406 /* NSGarbageCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E44102CD5B700B265D6 /* NSGarbageCollector.h */; }; 15D9204D105E918000171406 /* NSPointerArray.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E54102CD5C700B265D6 /* NSPointerArray.h */; }; @@ -3224,7 +3224,7 @@ FE30A17F10C6ED6F00A1BF7F /* NSRaiseException.h in Headers */ = {isa = PBXBuildFile; fileRef = FEA317850FD5843900F480D4 /* NSRaiseException.h */; settings = {ATTRIBUTES = (Private, ); }; }; FE30A18010C6ED6F00A1BF7F /* NSString_win1252.h in Headers */ = {isa = PBXBuildFile; fileRef = FE8C913E0FFD1E430027C889 /* NSString_win1252.h */; settings = {ATTRIBUTES = (Private, ); }; }; FE30A18110C6ED6F00A1BF7F /* NSString_macOSRoman.h in Headers */ = {isa = PBXBuildFile; fileRef = FE452E80102097EF00585DFE /* NSString_macOSRoman.h */; settings = {ATTRIBUTES = (Private, ); }; }; - FE30A18210C6ED6F00A1BF7F /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; }; + FE30A18210C6ED6F00A1BF7F /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE30A18310C6ED6F00A1BF7F /* NSURLError.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E29102CD5A600B265D6 /* NSURLError.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE30A18410C6ED6F00A1BF7F /* NSGarbageCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E44102CD5B700B265D6 /* NSGarbageCollector.h */; }; FE30A18510C6ED6F00A1BF7F /* NSPointerArray.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E54102CD5C700B265D6 /* NSPointerArray.h */; }; @@ -3657,19 +3657,19 @@ FE452E8D102097EF00585DFE /* NSString_macOSRoman.m in Sources */ = {isa = PBXBuildFile; fileRef = FE452E81102097EF00585DFE /* NSString_macOSRoman.m */; }; FE452E8E102097EF00585DFE /* NSString_macOSRoman.h in Headers */ = {isa = PBXBuildFile; fileRef = FE452E80102097EF00585DFE /* NSString_macOSRoman.h */; settings = {ATTRIBUTES = (Private, ); }; }; FE452E8F102097EF00585DFE /* NSString_macOSRoman.m in Sources */ = {isa = PBXBuildFile; fileRef = FE452E81102097EF00585DFE /* NSString_macOSRoman.m */; }; - FE463E1B102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; }; + FE463E1B102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE463E1C102CD59500B265D6 /* NSSpellServer.m in Sources */ = {isa = PBXBuildFile; fileRef = FE463E1A102CD59500B265D6 /* NSSpellServer.m */; }; - FE463E1D102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; }; + FE463E1D102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE463E1E102CD59500B265D6 /* NSSpellServer.m in Sources */ = {isa = PBXBuildFile; fileRef = FE463E1A102CD59500B265D6 /* NSSpellServer.m */; }; - FE463E1F102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; }; + FE463E1F102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE463E20102CD59500B265D6 /* NSSpellServer.m in Sources */ = {isa = PBXBuildFile; fileRef = FE463E1A102CD59500B265D6 /* NSSpellServer.m */; }; - FE463E21102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; }; + FE463E21102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE463E22102CD59500B265D6 /* NSSpellServer.m in Sources */ = {isa = PBXBuildFile; fileRef = FE463E1A102CD59500B265D6 /* NSSpellServer.m */; }; - FE463E23102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; }; + FE463E23102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE463E24102CD59500B265D6 /* NSSpellServer.m in Sources */ = {isa = PBXBuildFile; fileRef = FE463E1A102CD59500B265D6 /* NSSpellServer.m */; }; - FE463E25102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; }; + FE463E25102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE463E26102CD59500B265D6 /* NSSpellServer.m in Sources */ = {isa = PBXBuildFile; fileRef = FE463E1A102CD59500B265D6 /* NSSpellServer.m */; }; - FE463E27102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; }; + FE463E27102CD59500B265D6 /* NSSpellServer.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E19102CD59500B265D6 /* NSSpellServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE463E28102CD59500B265D6 /* NSSpellServer.m in Sources */ = {isa = PBXBuildFile; fileRef = FE463E1A102CD59500B265D6 /* NSSpellServer.m */; }; FE463E2B102CD5A600B265D6 /* NSURLError.h in Headers */ = {isa = PBXBuildFile; fileRef = FE463E29102CD5A600B265D6 /* NSURLError.h */; settings = {ATTRIBUTES = (Public, ); }; }; FE463E2C102CD5A600B265D6 /* NSURLError.m in Sources */ = {isa = PBXBuildFile; fileRef = FE463E2A102CD5A600B265D6 /* NSURLError.m */; }; @@ -4917,6 +4917,24 @@ FEADE5CF12FEF1120048F5DE /* NSValueTransformer_KeyedUnarchiveFromData.m in Sources */ = {isa = PBXBuildFile; fileRef = FEADE5BF12FEF1120048F5DE /* NSValueTransformer_KeyedUnarchiveFromData.m */; }; FEADE5D012FEF1120048F5DE /* NSValueTransformer_KeyedUnarchiveFromData.h in Headers */ = {isa = PBXBuildFile; fileRef = FEADE5BE12FEF1120048F5DE /* NSValueTransformer_KeyedUnarchiveFromData.h */; }; FEADE5D112FEF1120048F5DE /* NSValueTransformer_KeyedUnarchiveFromData.m in Sources */ = {isa = PBXBuildFile; fileRef = FEADE5BF12FEF1120048F5DE /* NSValueTransformer_KeyedUnarchiveFromData.m */; }; + FEB3F2BA1404A92400059C8F /* NSSpellEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F2B81404A92400059C8F /* NSSpellEngine.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FEB3F2BB1404A92400059C8F /* NSSpellEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F2B91404A92400059C8F /* NSSpellEngine.m */; }; + FEB3F2BC1404A92400059C8F /* NSSpellEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F2B81404A92400059C8F /* NSSpellEngine.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FEB3F2BD1404A92400059C8F /* NSSpellEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F2B91404A92400059C8F /* NSSpellEngine.m */; }; + FEB3F2BE1404A92400059C8F /* NSSpellEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F2B81404A92400059C8F /* NSSpellEngine.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FEB3F2BF1404A92400059C8F /* NSSpellEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F2B91404A92400059C8F /* NSSpellEngine.m */; }; + FEB3F2C01404A92400059C8F /* NSSpellEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F2B81404A92400059C8F /* NSSpellEngine.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FEB3F2C11404A92400059C8F /* NSSpellEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F2B91404A92400059C8F /* NSSpellEngine.m */; }; + FEB3F2C21404A92400059C8F /* NSSpellEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F2B81404A92400059C8F /* NSSpellEngine.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FEB3F2C31404A92400059C8F /* NSSpellEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F2B91404A92400059C8F /* NSSpellEngine.m */; }; + FEB3F2C41404A92400059C8F /* NSSpellEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F2B81404A92400059C8F /* NSSpellEngine.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FEB3F2C51404A92400059C8F /* NSSpellEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F2B91404A92400059C8F /* NSSpellEngine.m */; }; + FEB3F2C61404A92400059C8F /* NSSpellEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F2B81404A92400059C8F /* NSSpellEngine.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FEB3F2C71404A92400059C8F /* NSSpellEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F2B91404A92400059C8F /* NSSpellEngine.m */; }; + FEB3F2C81404A92400059C8F /* NSSpellEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F2B81404A92400059C8F /* NSSpellEngine.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FEB3F2C91404A92400059C8F /* NSSpellEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F2B91404A92400059C8F /* NSSpellEngine.m */; }; + FEB3F2CA1404A92400059C8F /* NSSpellEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB3F2B81404A92400059C8F /* NSSpellEngine.h */; settings = {ATTRIBUTES = (Private, ); }; }; + FEB3F2CB1404A92400059C8F /* NSSpellEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB3F2B91404A92400059C8F /* NSSpellEngine.m */; }; FEB6CBB20B4A139F004FADF2 /* NSKeyValueCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB6CBAE0B4A139F004FADF2 /* NSKeyValueCoding.h */; settings = {ATTRIBUTES = (Public, ); }; }; FEB6CBB30B4A139F004FADF2 /* NSKeyValueCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = FEB6CBAF0B4A139F004FADF2 /* NSKeyValueCoding.m */; }; FEB6CBB40B4A139F004FADF2 /* NSKeyValueCoding.h in Headers */ = {isa = PBXBuildFile; fileRef = FEB6CBAE0B4A139F004FADF2 /* NSKeyValueCoding.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -7442,6 +7460,8 @@ FEA9D30A0F5D9C5A00772064 /* NSRunLoopState_posix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSRunLoopState_posix.m; path = platform_posix/NSRunLoopState_posix.m; sourceTree = ""; }; FEADE5BE12FEF1120048F5DE /* NSValueTransformer_KeyedUnarchiveFromData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSValueTransformer_KeyedUnarchiveFromData.h; sourceTree = ""; }; FEADE5BF12FEF1120048F5DE /* NSValueTransformer_KeyedUnarchiveFromData.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSValueTransformer_KeyedUnarchiveFromData.m; sourceTree = ""; }; + FEB3F2B81404A92400059C8F /* NSSpellEngine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSSpellEngine.h; sourceTree = ""; }; + FEB3F2B91404A92400059C8F /* NSSpellEngine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSSpellEngine.m; sourceTree = ""; }; FEB6CBAE0B4A139F004FADF2 /* NSKeyValueCoding.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = NSKeyValueCoding.h; sourceTree = ""; }; FEB6CBAF0B4A139F004FADF2 /* NSKeyValueCoding.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = NSKeyValueCoding.m; sourceTree = ""; }; FEB6CC400B4A1922004FADF2 /* objc.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = objc.xcodeproj; path = ../objc/objc.xcodeproj; sourceTree = SOURCE_ROOT; }; @@ -7816,6 +7836,8 @@ 034768DFFF38A50411DB9C8B /* Products */, 089C1665FE841158C02AAC07 /* Resources */, 6E28034B09747A8200EC542B /* xml */, + FEB3F2B81404A92400059C8F /* NSSpellEngine.h */, + FEB3F2B91404A92400059C8F /* NSSpellEngine.m */, ); name = Foundation; sourceTree = ""; @@ -9343,6 +9365,7 @@ FE937F4E1358DC8000C93531 /* NSNumber_CF.h in Headers */, FE09AF8013FCC68100B53D10 /* NSOrthography.h in Headers */, FE09AF9413FCC69200B53D10 /* NSTextCheckingResult.h in Headers */, + FEB3F2BA1404A92400059C8F /* NSSpellEngine.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -9674,6 +9697,7 @@ FE937F4C1358DC8000C93531 /* NSNumber_CF.h in Headers */, FE09AF7C13FCC68100B53D10 /* NSOrthography.h in Headers */, FE09AF9013FCC69200B53D10 /* NSTextCheckingResult.h in Headers */, + FEB3F2CA1404A92400059C8F /* NSSpellEngine.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -10005,6 +10029,7 @@ FE937F441358DC8000C93531 /* NSNumber_CF.h in Headers */, FE09AF7413FCC68100B53D10 /* NSOrthography.h in Headers */, FE09AF8813FCC69200B53D10 /* NSTextCheckingResult.h in Headers */, + FEB3F2C61404A92400059C8F /* NSSpellEngine.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -10336,6 +10361,7 @@ FE937F421358DC8000C93531 /* NSNumber_CF.h in Headers */, FE09AF7213FCC68100B53D10 /* NSOrthography.h in Headers */, FE09AF8613FCC69200B53D10 /* NSTextCheckingResult.h in Headers */, + FEB3F2BC1404A92400059C8F /* NSSpellEngine.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -10672,6 +10698,7 @@ FE937F401358DC8000C93531 /* NSNumber_CF.h in Headers */, FE09AF7013FCC68100B53D10 /* NSOrthography.h in Headers */, FE09AF8413FCC69200B53D10 /* NSTextCheckingResult.h in Headers */, + FEB3F2C01404A92400059C8F /* NSSpellEngine.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -11003,6 +11030,7 @@ FE937F501358DC8000C93531 /* NSNumber_CF.h in Headers */, FE09AF7E13FCC68100B53D10 /* NSOrthography.h in Headers */, FE09AF9213FCC69200B53D10 /* NSTextCheckingResult.h in Headers */, + FEB3F2C81404A92400059C8F /* NSSpellEngine.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -11335,6 +11363,7 @@ FE937F4A1358DC8000C93531 /* NSNumber_CF.h in Headers */, FE09AF7A13FCC68100B53D10 /* NSOrthography.h in Headers */, FE09AF8E13FCC69200B53D10 /* NSTextCheckingResult.h in Headers */, + FEB3F2C21404A92400059C8F /* NSSpellEngine.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -11667,6 +11696,7 @@ FE937F461358DC8000C93531 /* NSNumber_CF.h in Headers */, FE09AF7613FCC68100B53D10 /* NSOrthography.h in Headers */, FE09AF8A13FCC69200B53D10 /* NSTextCheckingResult.h in Headers */, + FEB3F2C41404A92400059C8F /* NSSpellEngine.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -11999,6 +12029,7 @@ FE937F481358DC8000C93531 /* NSNumber_CF.h in Headers */, FE09AF7813FCC68100B53D10 /* NSOrthography.h in Headers */, FE09AF8C13FCC69200B53D10 /* NSTextCheckingResult.h in Headers */, + FEB3F2BE1404A92400059C8F /* NSSpellEngine.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -12930,6 +12961,7 @@ FE937F4F1358DC8000C93531 /* NSNumber_CF.m in Sources */, FE09AF8113FCC68100B53D10 /* NSOrthography.m in Sources */, FE09AF9513FCC69200B53D10 /* NSTextCheckingResult.m in Sources */, + FEB3F2BB1404A92400059C8F /* NSSpellEngine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -13299,6 +13331,7 @@ FE937F4D1358DC8000C93531 /* NSNumber_CF.m in Sources */, FE09AF7D13FCC68100B53D10 /* NSOrthography.m in Sources */, FE09AF9113FCC69200B53D10 /* NSTextCheckingResult.m in Sources */, + FEB3F2CB1404A92400059C8F /* NSSpellEngine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -13669,6 +13702,7 @@ FE937F451358DC8000C93531 /* NSNumber_CF.m in Sources */, FE09AF7513FCC68100B53D10 /* NSOrthography.m in Sources */, FE09AF8913FCC69200B53D10 /* NSTextCheckingResult.m in Sources */, + FEB3F2C71404A92400059C8F /* NSSpellEngine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -14040,6 +14074,7 @@ FE937F431358DC8000C93531 /* NSNumber_CF.m in Sources */, FE09AF7313FCC68100B53D10 /* NSOrthography.m in Sources */, FE09AF8713FCC69200B53D10 /* NSTextCheckingResult.m in Sources */, + FEB3F2BD1404A92400059C8F /* NSSpellEngine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -14418,6 +14453,7 @@ FE937F411358DC8000C93531 /* NSNumber_CF.m in Sources */, FE09AF7113FCC68100B53D10 /* NSOrthography.m in Sources */, FE09AF8513FCC69200B53D10 /* NSTextCheckingResult.m in Sources */, + FEB3F2C11404A92400059C8F /* NSSpellEngine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -14789,6 +14825,7 @@ FE937F511358DC8000C93531 /* NSNumber_CF.m in Sources */, FE09AF7F13FCC68100B53D10 /* NSOrthography.m in Sources */, FE09AF9313FCC69200B53D10 /* NSTextCheckingResult.m in Sources */, + FEB3F2C91404A92400059C8F /* NSSpellEngine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -15163,6 +15200,7 @@ FE937F4B1358DC8000C93531 /* NSNumber_CF.m in Sources */, FE09AF7B13FCC68100B53D10 /* NSOrthography.m in Sources */, FE09AF8F13FCC69200B53D10 /* NSTextCheckingResult.m in Sources */, + FEB3F2C31404A92400059C8F /* NSSpellEngine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -15538,6 +15576,7 @@ FE937F471358DC8000C93531 /* NSNumber_CF.m in Sources */, FE09AF7713FCC68100B53D10 /* NSOrthography.m in Sources */, FE09AF8B13FCC69200B53D10 /* NSTextCheckingResult.m in Sources */, + FEB3F2C51404A92400059C8F /* NSSpellEngine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -15913,6 +15952,7 @@ FE937F491358DC8000C93531 /* NSNumber_CF.m in Sources */, FE09AF7913FCC68100B53D10 /* NSOrthography.m in Sources */, FE09AF8D13FCC69200B53D10 /* NSTextCheckingResult.m in Sources */, + FEB3F2BF1404A92400059C8F /* NSSpellEngine.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Foundation/NSSpellEngine.h b/Foundation/NSSpellEngine.h new file mode 100644 index 00000000..afe97e77 --- /dev/null +++ b/Foundation/NSSpellEngine.h @@ -0,0 +1,17 @@ +// +// NSSpellEngine.h +// Foundation +// +// Created by Christopher Lloyd on 8/23/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import +#import + +/* Private class */ +@interface NSSpellEngine : NSObject { + +} + +@end diff --git a/Foundation/NSSpellEngine.m b/Foundation/NSSpellEngine.m new file mode 100644 index 00000000..67b0742b --- /dev/null +++ b/Foundation/NSSpellEngine.m @@ -0,0 +1,47 @@ +// +// NSSpellEngine.m +// Foundation +// +// Created by Christopher Lloyd on 8/23/11. +// Copyright 2011 __MyCompanyName__. All rights reserved. +// + +#import +#import + +@implementation NSSpellEngine + +-(NSRange)spellServer:(NSSpellServer *)sender checkGrammarInString:(NSString *)string language:(NSString *)language details:(NSArray **)outDetails { + NSUnimplementedMethod(); + return NSMakeRange(0,0); +} + +-(NSArray *)spellServer:(NSSpellServer *)sender checkString:(NSString *)stringToCheck offset:(NSUInteger)offset types:(NSTextCheckingTypes)checkingTypes options:(NSDictionary *)options orthography:(NSOrthography *)orthography wordCount:(NSInteger *)wordCount { + NSUnimplementedMethod(); + return nil; +} + +-(void)spellServer:(NSSpellServer *)sender didForgetWord:(NSString *)word inLanguage:(NSString *)language { + NSUnimplementedMethod(); +} + +-(void)spellServer:(NSSpellServer *)sender didLearnWord:(NSString *)word inLanguage:(NSString *)language { + NSUnimplementedMethod(); +} + +-(NSRange)spellServer:(NSSpellServer *)sender findMisspelledWordInString:(NSString *)stringToCheck language:(NSString *)language wordCount:(NSInteger *)wordCount countOnly:(BOOL)countOnly { + NSUnimplementedMethod(); + return NSMakeRange(0,0); +} + +-(NSArray *)spellServer:(NSSpellServer *)sender suggestCompletionsForPartialWordRange:(NSRange)range inString:(NSString *)string language:(NSString *)language { + NSUnimplementedMethod(); + return nil; +} + +-(NSArray *)spellServer:(NSSpellServer *)sender suggestGuessesForWord:(NSString *)word inLanguage:(NSString *)language { + NSUnimplementedMethod(); + return nil; +} + +@end diff --git a/Foundation/NSSpellServer.h b/Foundation/NSSpellServer.h index abbc15e5..da14fead 100644 --- a/Foundation/NSSpellServer.h +++ b/Foundation/NSSpellServer.h @@ -1,4 +1,8 @@ #import +#import +#import + +@class NSSpellServer,NSArray,NSDictionary,NSOrthography; NSString *const NSGrammarRange; NSString *const NSGrammarUserDescription; diff --git a/NSSpellEngine_hunspell/English.lproj/InfoPlist.strings b/NSSpellEngine_hunspell/English.lproj/InfoPlist.strings new file mode 100644 index 00000000..88f65cf6 --- /dev/null +++ b/NSSpellEngine_hunspell/English.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/NSSpellEngine_hunspell/Info.plist b/NSSpellEngine_hunspell/Info.plist new file mode 100644 index 00000000..ee0a69d9 --- /dev/null +++ b/NSSpellEngine_hunspell/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + + CFBundleIdentifier + com.yourcompany.${PRODUCT_NAME:rfc1034Identifier} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + NSPrincipalClass + + + diff --git a/NSSpellEngine_hunspell/NSSpellEngine_hunspell.xcodeproj/project.pbxproj b/NSSpellEngine_hunspell/NSSpellEngine_hunspell.xcodeproj/project.pbxproj new file mode 100644 index 00000000..e2219a78 --- /dev/null +++ b/NSSpellEngine_hunspell/NSSpellEngine_hunspell.xcodeproj/project.pbxproj @@ -0,0 +1,261 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 32DBCF630370AF2F00C91783 /* NSSpellEngine_hunspell_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSSpellEngine_hunspell_Prefix.pch; sourceTree = ""; }; + 8D5B49B6048680CD000E48DA /* NSSpellEngine_hunspell.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = NSSpellEngine_hunspell.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; + 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D5B49B3048680CD000E48DA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 089C166AFE841209C02AAC07 /* NSSpellEngine_hunspell */ = { + isa = PBXGroup; + children = ( + 08FB77AFFE84173DC02AAC07 /* Classes */, + 32C88E010371C26100C91783 /* Other Sources */, + 089C167CFE841241C02AAC07 /* Resources */, + 089C1671FE841209C02AAC07 /* Frameworks and Libraries */, + 19C28FB8FE9D52D311CA2CBB /* Products */, + ); + name = NSSpellEngine_hunspell; + sourceTree = ""; + }; + 089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = { + isa = PBXGroup; + children = ( + 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */, + 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */, + ); + name = "Frameworks and Libraries"; + sourceTree = ""; + }; + 089C167CFE841241C02AAC07 /* Resources */ = { + isa = PBXGroup; + children = ( + 8D5B49B7048680CD000E48DA /* Info.plist */, + 089C167DFE841241C02AAC07 /* InfoPlist.strings */, + ); + name = Resources; + sourceTree = ""; + }; + 08FB77AFFE84173DC02AAC07 /* Classes */ = { + isa = PBXGroup; + children = ( + ); + name = Classes; + sourceTree = ""; + }; + 1058C7ACFEA557BF11CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7AEFEA557BF11CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 089C1672FE841209C02AAC07 /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FB8FE9D52D311CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D5B49B6048680CD000E48DA /* NSSpellEngine_hunspell.bundle */, + ); + name = Products; + sourceTree = ""; + }; + 32C88E010371C26100C91783 /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32DBCF630370AF2F00C91783 /* NSSpellEngine_hunspell_Prefix.pch */, + ); + name = "Other Sources"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D5B49AC048680CD000E48DA /* NSSpellEngine_hunspell */ = { + isa = PBXNativeTarget; + buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "NSSpellEngine_hunspell" */; + buildPhases = ( + 8D5B49AF048680CD000E48DA /* Resources */, + 8D5B49B1048680CD000E48DA /* Sources */, + 8D5B49B3048680CD000E48DA /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = NSSpellEngine_hunspell; + productInstallPath = "$(HOME)/Library/Bundles"; + productName = NSSpellEngine_hunspell; + productReference = 8D5B49B6048680CD000E48DA /* NSSpellEngine_hunspell.bundle */; + productType = "com.apple.product-type.bundle"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 089C1669FE841209C02AAC07 /* Project object */ = { + isa = PBXProject; + buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "NSSpellEngine_hunspell" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 089C166AFE841209C02AAC07 /* NSSpellEngine_hunspell */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D5B49AC048680CD000E48DA /* NSSpellEngine_hunspell */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D5B49AF048680CD000E48DA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D5B49B0048680CD000E48DA /* InfoPlist.strings in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D5B49B1048680CD000E48DA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C167DFE841241C02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C167EFE841241C02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 1DEB913B08733D840010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = NSSpellEngine_hunspell_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + PRODUCT_NAME = NSSpellEngine_hunspell; + WRAPPER_EXTENSION = bundle; + }; + name = Debug; + }; + 1DEB913C08733D840010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = NSSpellEngine_hunspell_Prefix.pch; + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Library/Bundles"; + PRODUCT_NAME = NSSpellEngine_hunspell; + WRAPPER_EXTENSION = bundle; + }; + name = Release; + }; + 1DEB913F08733D840010E9CD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + ONLY_ACTIVE_ARCH = YES; + PREBINDING = NO; + SDKROOT = macosx10.6; + }; + name = Debug; + }; + 1DEB914008733D840010E9CD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + PREBINDING = NO; + SDKROOT = macosx10.6; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "NSSpellEngine_hunspell" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB913B08733D840010E9CD /* Debug */, + 1DEB913C08733D840010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "NSSpellEngine_hunspell" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 1DEB913F08733D840010E9CD /* Debug */, + 1DEB914008733D840010E9CD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 089C1669FE841209C02AAC07 /* Project object */; +} diff --git a/NSSpellEngine_hunspell/NSSpellEngine_hunspell_Prefix.pch b/NSSpellEngine_hunspell/NSSpellEngine_hunspell_Prefix.pch new file mode 100644 index 00000000..5cc669f8 --- /dev/null +++ b/NSSpellEngine_hunspell/NSSpellEngine_hunspell_Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'NSSpellEngine_hunspell' target in the 'NSSpellEngine_hunspell' project. +// + +#ifdef __OBJC__ + #import +#endif diff --git a/Onyx2D/O2LZW.m b/Onyx2D/O2LZW.m index 3580a8b9..fbedff9f 100644 --- a/Onyx2D/O2LZW.m +++ b/Onyx2D/O2LZW.m @@ -281,7 +281,7 @@ int DLZWDecompressLine(LZWFileType * LZWFile,O2DataConsumerRef consumer,int Line NSData *LZWDecodeWithExpectedResultLength(NSData *data,unsigned stripLength){ NSMutableData *outputData=[NSMutableData data]; - O2DataConsumerRef consumer=O2DataConsumerCreateWithCFData((CFDataRef)outputData); + O2DataConsumerRef consumer=O2DataConsumerCreateWithCFData((CFMutableDataRef)outputData); LZWFileType lzwStream; lzwStream.inputStream=[NSInputStream inputStreamWithData:data];