Revision: 4044
http://skim-app.svn.sourceforge.net/skim-app/?rev=4044&view=rev
Author: hofman
Date: 2008-06-20 04:56:01 -0700 (Fri, 20 Jun 2008)
Log Message:
-----------
type to avoid compiler warnings
Modified Paths:
--------------
trunk/SKTemplateParser.m
Modified: trunk/SKTemplateParser.m
===================================================================
--- trunk/SKTemplateParser.m 2008-06-20 09:30:07 UTC (rev 4043)
+++ trunk/SKTemplateParser.m 2008-06-20 11:56:01 UTC (rev 4044)
@@ -540,10 +540,10 @@
if ([scanner scanUpToString:START_TAG_OPEN_DELIM
intoString:&beforeText]) {
if (currentTag && [(SKTag *)currentTag type] == SKTextTagType) {
- tmpAttrStr = [[currentTag attributedText] mutableCopy];
+ tmpAttrStr = [[(SKRichTextTag *)currentTag attributedText]
mutableCopy];
[tmpAttrStr appendAttributedString:[template
attributedSubstringFromRange:NSMakeRange(start, [beforeText length])]];
[tmpAttrStr fixAttributesInRange:NSMakeRange(0, [tmpAttrStr
length])];
- [currentTag setAttributedText:tmpAttrStr];
+ [(SKRichTextTag *)currentTag setAttributedText:tmpAttrStr];
[tmpAttrStr release];
} else {
currentTag = [[SKRichTextTag alloc]
initWithAttributedText:[template
attributedSubstringFromRange:NSMakeRange(start, [beforeText length])]];
@@ -578,13 +578,13 @@
// collection template tag
// ignore whitespace before the tag. Should we also remove a
newline?
if (currentTag && [(SKTag *)currentTag type] == SKTextTagType)
{
- wsRange = [[[currentTag attributedText] string]
rangeOfTrailingEmptyLineRequiringNewline:[result count] != 1];
+ wsRange = [[[(SKRichTextTag *)currentTag attributedText]
string] rangeOfTrailingEmptyLineRequiringNewline:[result count] != 1];
if (wsRange.location != NSNotFound) {
- if (wsRange.length == [[currentTag attributedText]
length]) {
+ if (wsRange.length == [[(SKRichTextTag *)currentTag
attributedText] length]) {
[result removeLastObject];
currentTag = [result lastObject];
} else {
- [currentTag setAttributedText:[[currentTag
attributedText] attributedSubstringFromRange:NSMakeRange(0, wsRange.location)]];
+ [(SKRichTextTag *)currentTag
setAttributedText:[[(SKRichTextTag *)currentTag attributedText]
attributedSubstringFromRange:NSMakeRange(0, wsRange.location)]];
}
}
}
@@ -649,13 +649,13 @@
// condition template tag
// ignore whitespace before the tag. Should we also remove
a newline?
if (currentTag && [(SKTag *)currentTag type] ==
SKTextTagType) {
- wsRange = [[[currentTag attributedText] string]
rangeOfTrailingEmptyLineRequiringNewline:[result count] != 1];
+ wsRange = [[[(SKRichTextTag *)currentTag
attributedText] string] rangeOfTrailingEmptyLineRequiringNewline:[result count]
!= 1];
if (wsRange.location != NSNotFound) {
- if (wsRange.length == [[currentTag attributedText]
length]) {
+ if (wsRange.length == [[(SKRichTextTag
*)currentTag attributedText] length]) {
[result removeLastObject];
currentTag = [result lastObject];
} else {
- [currentTag setAttributedText:[[currentTag
attributedText] attributedSubstringFromRange:NSMakeRange(0, wsRange.location)]];
+ [(SKRichTextTag *)currentTag
setAttributedText:[[(SKRichTextTag *)currentTag attributedText]
attributedSubstringFromRange:NSMakeRange(0, wsRange.location)]];
}
}
}
@@ -708,10 +708,10 @@
// a START_TAG_OPEN_DELIM without
COLLECTION_TAG_CLOSE_DELIM, so no template tag. Rewind
if (currentTag && [(SKTag *)currentTag type] ==
SKTextTagType) {
- tmpAttrStr = [[currentTag attributedText] mutableCopy];
+ tmpAttrStr = [[(SKRichTextTag *)currentTag
attributedText] mutableCopy];
[tmpAttrStr appendAttributedString:[template
attributedSubstringFromRange:NSMakeRange(start - [START_TAG_OPEN_DELIM length],
[START_TAG_OPEN_DELIM length])]];
[tmpAttrStr fixAttributesInRange:NSMakeRange(0,
[tmpAttrStr length])];
- [currentTag setAttributedText:tmpAttrStr];
+ [(SKRichTextTag *)currentTag
setAttributedText:tmpAttrStr];
[tmpAttrStr release];
} else {
currentTag = [[SKRichTextTag alloc]
initWithAttributedText:[template attributedSubstringFromRange:NSMakeRange(start
- [START_TAG_OPEN_DELIM length], [START_TAG_OPEN_DELIM length])]];
@@ -741,7 +741,7 @@
if (type == SKTextTagType) {
- [result appendAttributedString:[tag attributedText]];
+ [result appendAttributedString:[(SKRichTextTag *)tag
attributedText]];
} else {
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit