Revision: 6846
http://skim-app.svn.sourceforge.net/skim-app/?rev=6846&view=rev
Author: hofman
Date: 2010-09-24 14:06:42 +0000 (Fri, 24 Sep 2010)
Log Message:
-----------
set some document attributes in exported rich text from template
Modified Paths:
--------------
trunk/NSDocument_SKExtensions.m
Modified: trunk/NSDocument_SKExtensions.m
===================================================================
--- trunk/NSDocument_SKExtensions.m 2010-09-24 14:05:39 UTC (rev 6845)
+++ trunk/NSDocument_SKExtensions.m 2010-09-24 14:06:42 UTC (rev 6846)
@@ -190,6 +190,11 @@
NSDictionary *docAttributes = nil;
NSAttributedString *templateAttrString = [[NSAttributedString alloc]
initWithPath:templatePath documentAttributes:&docAttributes];
NSAttributedString *attrString = [SKTemplateParser
attributedStringByParsingTemplateAttributedString:templateAttrString
usingObject:self];
+ if ([[NSUserDefaults standardUserDefaults]
boolForKey:SKDisableExportAttributesKey] == NO) {
+ NSMutableDictionary *mutableAttributes = [[docAttributes
mutableCopy] autorelease];
+ [mutableAttributes addEntriesFromDictionary:[NSDictionary
dictionaryWithObjectsAndKeys:NSFullUserName(), NSAuthorDocumentAttribute,
[NSDate date], NSCreationTimeDocumentAttribute, [[[[self fileURL] path]
lastPathComponent] stringByDeletingPathExtension], NSTitleDocumentAttribute,
nil]];
+ docAttributes = mutableAttributes;
+ }
fileWrapper = [attrString RTFDFileWrapperFromRange:NSMakeRange(0,
[attrString length]) documentAttributes:docAttributes];
[templateAttrString release];
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit