[Libreoffice-commits] .: extensions/source
Tor Lillqvist
tml at kemper.freedesktop.org
Thu Sep 29 10:49:32 PDT 2011
extensions/source/macosx/spotlight/OOoContentDataParser.m | 12 +++++++++---
extensions/source/macosx/spotlight/OOoMetaDataParser.m | 11 ++++++++---
2 files changed, 17 insertions(+), 6 deletions(-)
New commits:
commit e177e5bef0586fcba8eae8d3c9871da189ddcbea
Author: Tor Lillqvist <tml at iki.fi>
Date: Thu Sep 29 20:44:40 2011 +0300
WaE: avoid warnings
diff --git a/extensions/source/macosx/spotlight/OOoContentDataParser.m b/extensions/source/macosx/spotlight/OOoContentDataParser.m
index f485607..0bcfa91 100644
--- a/extensions/source/macosx/spotlight/OOoContentDataParser.m
+++ b/extensions/source/macosx/spotlight/OOoContentDataParser.m
@@ -53,7 +53,13 @@
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:data];
- [parser setDelegate:self];
+ // Once again...
+ // class 'OOoContentDataParser' does not implement the 'NSXMLParserDelegate' protocol
+ // So instead of this:
+ // [parser setDelegate:self];
+ // do this:
+ objc_msgSend(parser, @selector(setDelegate:), self);
+
[parser setShouldResolveExternalEntities:NO];
[parser parse];
@@ -110,9 +116,9 @@
- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError
{
//NSLog(@"parsing finished with error");
- NSLog([NSString stringWithFormat:@"An error occurred parsing the document. (Error %i, Description: %@, Line: %i, Column: %i)", [parseError code],
+ NSLog(@"An error occurred parsing the document. (Error %i, Description: %@, Line: %i, Column: %i)", [parseError code],
[[parser parserError] localizedDescription], [parser lineNumber],
- [parser columnNumber]]);
+ [parser columnNumber]);
if (runningTextContent != nil) {
[runningTextContent release];
diff --git a/extensions/source/macosx/spotlight/OOoMetaDataParser.m b/extensions/source/macosx/spotlight/OOoMetaDataParser.m
index cddbbd1..8bc90c8 100644
--- a/extensions/source/macosx/spotlight/OOoMetaDataParser.m
+++ b/extensions/source/macosx/spotlight/OOoMetaDataParser.m
@@ -97,7 +97,12 @@ static NSDictionary *metaXML2MDIKeys;
NSXMLParser *parser = [[NSXMLParser alloc] initWithData:data];
- [parser setDelegate:self];
+ // class 'OOoMetaDataParser' does not implement the 'NSXMLParserDelegate' protocol
+ // So instead of this:
+ // [parser setDelegate:self];
+ // do this:
+ objc_msgSend(parser, @selector(setDelegate:), self);
+
[parser setShouldResolveExternalEntities:NO];
[parser parse];
@@ -192,9 +197,9 @@ static NSDictionary *metaXML2MDIKeys;
- (void)parser:(NSXMLParser *)parser parseErrorOccurred:(NSError *)parseError
{
//NSLog(@"parsing finished with error");
- NSLog([NSString stringWithFormat:@"Error %i, Description: %@, Line: %i, Column: %i", [parseError code],
+ NSLog(@"Error %i, Description: %@, Line: %i, Column: %i", [parseError code],
[[parser parserError] localizedDescription], [parser lineNumber],
- [parser columnNumber]]);
+ [parser columnNumber]);
}
@end
More information about the Libreoffice-commits
mailing list