Commit graph

81 commits

Author SHA1 Message Date
Eric Wasylishen
62a3374ae9 * Source/NSAttributedString.m
(-initWithData:options:documentAttributes:error:): Set
NSCharacterEncodingDocumentAttribute in the documentAttributes dict
when reading plain text.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34987 72102866-910b-0410-8b05-ffd578937521
2012-03-23 03:16:40 +00:00
Eric Wasylishen
9345069a14 * Source/NSAttributedString.m
(-initWithData:options:documentAttributes:error:): Fixes for TextEdit.
If no type is provided, assume plain text. If no encoding is provided,
assume UTF-8 unless a UTF-16 BOM is detected.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34985 72102866-910b-0410-8b05-ffd578937521
2012-03-23 01:40:11 +00:00
Fred Kiefer
ddcbd5cada * Source/externs.m: Correct the strings for NSPrintPanel.
* Source/NSAttributedString.m (-setBaseWritingDirection:range:):
Add proper implementation for this method.
* Source/NSTextView_actions.m (-insertContainerBreak:,
-insertLineBreak): Add this methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33254 72102866-910b-0410-8b05-ffd578937521
2011-06-06 11:33:40 +00:00
David Chisnall
b4e3915c33 Turn release messages sent to autorelease pools into drain messages. No
functionality change in non-GC mode, in GC mode it invokes a quick GC pass to
try to delete the short-lived objects.

Also deleted some [pool release] lines just before exit() or return-from-main
statements.  These cause objects to be swapped in and destructors to be run to
no benefit (the OS will reclaim this memory without requiring stuff to be
swapped in when the process exits).



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33146 72102866-910b-0410-8b05-ffd578937521
2011-05-27 12:42:37 +00:00
Wolfgang Lux
081fc4e701 Avoid potential illegal access violation introduced with the previous
commit.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30775 72102866-910b-0410-8b05-ffd578937521
2010-06-18 17:03:55 +00:00
Wolfgang Lux
fc60476d53 Attempt to auto detect the document type when initializing an
attributed string and the type wasn't specified by the caller.
Carefully add base URL to the document importing options only when it
is not nil.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30774 72102866-910b-0410-8b05-ffd578937521
2010-06-18 07:49:26 +00:00
Fred Kiefer
99e273a57d few compiler warning fixes plus a lot of #import replacement.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30448 72102866-910b-0410-8b05-ffd578937521
2010-05-24 10:48:14 +00:00
Wolfgang Lux
bed9ea8c64 Change move word forwoard to move to the next end of a word rather
than the beginning of the next word so users can quickly navigate to
either end of words.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30056 72102866-910b-0410-8b05-ffd578937521
2010-03-27 21:51:33 +00:00
Fred Kiefer
4b1472cf8a Make the signatures of methods consistent between headers and implementation files.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29687 72102866-910b-0410-8b05-ffd578937521
2010-02-20 13:21:57 +00:00
Wolfgang Lux
ba58449d3c Fix a whole bunch of potential crashers in NSAttributedString.m and
NSDocument.m where the error return parameter was written to without a
null pointer check.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29580 72102866-910b-0410-8b05-ffd578937521
2010-02-12 14:18:59 +00:00
Fred Kiefer
b04fdf46b9 Implementation of -rangeOfTextTable:atIndex: method on
NSAttributedString.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29420 72102866-910b-0410-8b05-ffd578937521
2010-01-27 14:10:38 +00:00
Fred Kiefer
4195bb1f3d Better handling of text attachtment. Fixes bug #28464
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29260 72102866-910b-0410-8b05-ffd578937521
2010-01-11 12:32:27 +00:00
Fred Kiefer
3b51ebf3fe Unify the text converter handling. Plus added a bit of implementation
for the new test block methods.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28713 72102866-910b-0410-8b05-ffd578937521
2009-09-19 14:55:57 +00:00
Richard Frith-MacDonald
452ffee567 Small theme update, plus documentation fixes and tweaks to avoid warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28538 72102866-910b-0410-8b05-ffd578937521
2009-08-25 07:46:37 +00:00
Fred Kiefer
d82dad9351 Fix compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28527 72102866-910b-0410-8b05-ffd578937521
2009-08-23 22:10:32 +00:00
Fred Kiefer
08dc55de96 Improve localization.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28014 72102866-910b-0410-8b05-ffd578937521
2009-03-01 17:42:46 +00:00
Fred Kiefer
ddf1b1a269 Improvement of attributed string loading and attachment display in text
view.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27705 72102866-910b-0410-8b05-ffd578937521
2009-01-27 19:16:04 +00:00
Fred Kiefer
7831bedb6d Basic implementation for NSAttributedString data save methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27696 72102866-910b-0410-8b05-ffd578937521
2009-01-26 13:33:27 +00:00
Fred Kiefer
3fecc787d4 Basic implementation of the initWithData:.. methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27437 72102866-910b-0410-8b05-ffd578937521
2008-12-26 21:56:09 +00:00
Wolfgang Lux
28b86a0bae Double clicking on a white space character also selects the
surrounding white space as on OS X.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27131 72102866-910b-0410-8b05-ffd578937521
2008-11-25 21:46:23 +00:00
Adam Fedor
7afdd32ac1 Revert library license version to 2 until applications can be converted
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26619 72102866-910b-0410-8b05-ffd578937521
2008-06-10 04:01:49 +00:00
Fred Kiefer
45ada7b31d Limit the amount of character sets cached by the font substitution code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26547 72102866-910b-0410-8b05-ffd578937521
2008-05-20 23:53:42 +00:00
Fred Kiefer
193e31e678 Change all files to use GPL 3 and LGPL 3.
Prepare for next release.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25536 72102866-910b-0410-8b05-ffd578937521
2007-10-29 21:16:17 +00:00
Fred Kiefer
5ac3cf358b Ignore characters below 31 in font substitution.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25404 72102866-910b-0410-8b05-ffd578937521
2007-08-21 09:04:52 +00:00
Fred Kiefer
1a13394fea Let the font manager handle the font convertion for font subsitution.
Correct printing for the case where we know the page range.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25386 72102866-910b-0410-8b05-ffd578937521
2007-08-12 20:12:19 +00:00
Fred Kiefer
f6460ab632 First attempt at font attribute fixing.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25384 72102866-910b-0410-8b05-ffd578937521
2007-08-09 09:39:50 +00:00
Fred Kiefer
4835a35c1c Add new MacOSX methods. Code mostly by Nikolaus Schaller.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25270 72102866-910b-0410-8b05-ffd578937521
2007-06-18 21:08:54 +00:00
Richard Frith-MacDonald
561b06efe1 Add attributed string constants for Riccardo
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24932 72102866-910b-0410-8b05-ffd578937521
2007-03-26 13:37:33 +00:00
Fred Kiefer
34b0abf4d0 Added MacOS 10.4 methods for NSDocument, NSDocumentController,
NSPrintOperation, NSResponder and NSCell.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24378 72102866-910b-0410-8b05-ffd578937521
2007-01-17 12:09:41 +00:00
Matt Rice
abfea70cf8 * Source/NSTextView_actions.m: Change cursor movement implementations
when collapsing a selection.
        * Source/NSParagraphStyle.m (-setBaseWritingDirection:): Add comment.
        * Source/NSAttributedString: Add and remove characters in the word
        break character set.
        * KeyBindings/DefaultKeyBindings.dict: Change control-f and control-b
        to moveForward: and moveBackward:



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24136 72102866-910b-0410-8b05-ffd578937521
2006-11-20 16:20:15 +00:00
Richard Frith-MacDonald
45acf44de1 documentation cleanups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24035 72102866-910b-0410-8b05-ffd578937521
2006-11-06 13:58:37 +00:00
Adam Fedor
303dd1baf9 Update FSF Address.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21259 72102866-910b-0410-8b05-ffd578937521
2005-05-26 02:52:46 +00:00
Alexander Malmberg
432df0d14d Add some missing void:s.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19860 72102866-910b-0410-8b05-ffd578937521
2004-08-09 22:51:38 +00:00
Fred Kiefer
4035581bdd [readFromURL:options:documentAttributes:] corrected the handling
to type "text", where [NSString alloc] was missing.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17595 72102866-910b-0410-8b05-ffd578937521
2003-09-01 18:14:47 +00:00
David Ayers
b18f1c4ac4 Header reorganization - Please refer to ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17408 72102866-910b-0410-8b05-ffd578937521
2003-07-31 23:52:10 +00:00
Alexander Malmberg
974395db91 (-fixParagraphStyleAttributeInRange:): Handle paragraphs with paragraph styles set for part of it correctly.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17134 72102866-910b-0410-8b05-ffd578937521
2003-07-05 15:23:34 +00:00
Adam Fedor
6be9174933 Include <> -> ""
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16917 72102866-910b-0410-8b05-ffd578937521
2003-06-13 15:01:12 +00:00
Alexander Malmberg
ea14bf8170 (-fixAttachmentAttributesInRange:): Update end index when a character is deleted.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15935 72102866-910b-0410-8b05-ffd578937521
2003-02-11 15:39:20 +00:00
Fred Kiefer
fa182b53a4 Implemented [textFileTypes], [textPasteboardTypes],
[textUnfilteredFileTypes], [textUnfilteredPasteboardTypes].


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14414 72102866-910b-0410-8b05-ffd578937521
2002-09-06 23:38:57 +00:00
Nicola Pero
0d9f2c6dbe When parsing RTF (or other formats) require the generated attributed
string to be of the appropriate class


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13841 72102866-910b-0410-8b05-ffd578937521
2002-06-11 14:59:51 +00:00
Nicola Pero
f3f65c281e Rewritten moving a word forward or backward
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12428 72102866-910b-0410-8b05-ffd578937521
2002-02-08 01:53:18 +00:00
Adam Fedor
d47e202fbe Markup for autogsdoc
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11788 72102866-910b-0410-8b05-ffd578937521
2001-12-17 16:51:51 +00:00
Nicola Pero
8abb202934 Fixed problem when fixing up paragraph style attributes ... would get
into an infinite loop if no style was set at the beginning of paragraph


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11596 72102866-910b-0410-8b05-ffd578937521
2001-12-02 11:12:52 +00:00
Fred Kiefer
4854b4cad2 Protected all initXXX methods so that for empty input nil will be
returned.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@11098 72102866-910b-0410-8b05-ffd578937521
2001-10-06 22:30:54 +00:00
Fred Kiefer
6b2f41f67e Implemented [readFromURL:options:documentAttributes:]. In
[applyFontTraits:range:] use [NSFontManager
convertFont:toHaveTrait:] instead of explicit font creation.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10923 72102866-910b-0410-8b05-ffd578937521
2001-09-17 12:09:40 +00:00
Adam Fedor
30d3fd1bc0 Moved text conversion classes to separate bundle
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10755 72102866-910b-0410-8b05-ffd578937521
2001-08-21 14:52:00 +00:00
Fred Kiefer
fa8999f56a Include GSTextConverter.h. New function converter_class() to load
the class for a given text converter format. Use this function in
the RTF methods and use new protocol there.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10720 72102866-910b-0410-8b05-ffd578937521
2001-08-18 22:03:17 +00:00
Richard Frith-MacDonald
7fdaabcdde Selection fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8450 72102866-910b-0410-8b05-ffd578937521
2000-12-27 06:28:29 +00:00
Richard Frith-MacDonald
0ae0da7dad Handle apostrophes and hyphens within words.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8415 72102866-910b-0410-8b05-ffd578937521
2000-12-23 07:10:27 +00:00
Nicola Pero
352ef9339a Optimizations
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8321 72102866-910b-0410-8b05-ffd578937521
2000-12-13 23:19:57 +00:00