mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-28 09:22:03 +00:00
fixed: rtf parser did not propagate paragraph style sometimes
This commit is contained in:
1 parent
75c102f304
commit
5afa7e9fc3
2 files changed
+6
-4
No files matched your search
@@ -4,8 +4,8 @@
|
||||
|
||||
Copyright (C) 2014 Daniel Boehringer
|
||||
|
||||
FIXME: this really sucks and should be redone using a 'real' parser
|
||||
e.g. using zaach/jison on github
|
||||
FIXME: this class should be redone using a 'real' parser
|
||||
|
||||
* all paragraph spacing information is currently not parsed
|
||||
|
||||
|
||||
@@ -406,9 +406,11 @@ var kRgsymRtf = {
|
||||
var dict = [_currentRun dictionary];
|
||||
|
||||
[_result setAttributes:dict range:_currentRun._range]; // flush previous run
|
||||
_currentRun.fgColour = [CPColor blackColor];
|
||||
}
|
||||
else
|
||||
_currentRun = [_RTFAttribute new];
|
||||
|
||||
_currentRun = [_RTFAttribute new];
|
||||
_currentRun._range = CPMakeRange(newOffset, 0); // open a new one
|
||||
}
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ function _points2twips(a) { return (a) * 20.0; }
|
||||
|
||||
- (CPString)paragraphStyle:(CPParagraphStyle)paraStyle
|
||||
{
|
||||
var headerString = [CPString stringWithString:@"\\pard\\plain"],
|
||||
var headerString = [CPString stringWithString:@"\\pard"],
|
||||
twips;
|
||||
|
||||
if (paraStyle == nil)
|
||||
|
||||
Reference in new issue
Block a user