mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Fixed the RTFD generation when the attachments do not have filenames. It is now possible to write RTFD documents with pasted images.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22921 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b1c6991a10
commit
f529b9121c
3 changed files with 17 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2006-05-12 Nicolas Roard <nicolas@roard.com>
|
||||
|
||||
* TextConverters/RTF/RTFProducer.h:
|
||||
* TextConverters/RTF/RTFProducer.m: Fixed the RTFD generation
|
||||
when the attachments do not have filenames. It is now possible
|
||||
to write RTFD documents with pasted images.
|
||||
|
||||
2006-05-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Documentation/GuiUser/DefaultsSuppary.gsdoc,
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
to build the delta "*/
|
||||
|
||||
BOOL _inlineGraphics; /*" Indicates if graphics should be inlined. "*/
|
||||
int unnamedAttachmentCounter; /*" Count the number of unnamed attachments so we can name them uniquely "*/
|
||||
}
|
||||
|
||||
+ (NSData *)produceDataFrom: (NSAttributedString *)aText
|
||||
|
|
|
@ -925,7 +925,15 @@
|
|||
|
||||
if (! attachmentFilename)
|
||||
{
|
||||
attachmentFilename = @"unnamed";
|
||||
// If we do not have a proper filename, we set it here, incrementing
|
||||
// the number of unnamed attachment so we do not overwrite existing ones.
|
||||
|
||||
// FIXME: setting the filename extension to tiff is not that great, but as
|
||||
// we anyway append \NeXTGraphic just after it makes sense... (without the
|
||||
// extension the file is not loaded)
|
||||
|
||||
attachmentFilename = [NSString stringWithFormat: @"__unnamed_file_%d.tiff",
|
||||
unnamedAttachmentCounter++];
|
||||
[attachmentFileWrapper setPreferredFilename:
|
||||
attachmentFilename];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue