Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 146840 Details for
Bug 225184
Handling of embedded pictures in RTF docs is broken
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix handling of embedded pictures
unrtf_0.20.2-in_pict.patch (text/plain), 2.40 KB, created by
Robert Vogelgesang
on 2007-01-29 17:41:50 UTC
(
hide
)
Description:
Fix handling of embedded pictures
Filename:
MIME Type:
Creator:
Robert Vogelgesang
Created:
2007-01-29 17:41:50 UTC
Size:
2.40 KB
patch
obsolete
> This patch fixes the handling of \pict's which was broken when > nopict_mode was introduced to convert.c. > > Before nopict_mode was there, pictfile was used to control the > "reset" of within_picture to FALSE. After the "nopict_mode changes" > and without this patch, within_picture gets reset too early when > the \pict has sub-groups/children because within_picture is > a global variable and word_print_core() is used recursively. > We need a local variable to control this operation, and this patch > introduces the new local variable in_pict_data for this purpose. > >diff -u unrtf_0.20.2/src/convert.c.in_pict unrtf_0.20.2/src/convert.c >--- unrtf_0.20.2/src/convert.c.in_pict 2006-06-18 10:52:33.000000000 +0200 >+++ unrtf_0.20.2/src/convert.c 2006-08-04 10:29:19.000000000 +0200 >@@ -3280,6 +3280,7 @@ > { > char *s; > FILE *pictfile=NULL; >+ int in_pict_data=FALSE; > int is_cell_group=FALSE; > int paragraph_begined=FALSE; > int paragraph_align=ALIGN_LEFT; >@@ -3319,20 +3320,23 @@ > /*----------------------------------------*/ > if (within_picture) { > starting_body(); >- if (!pictfile && !nopict_mode) { >- char *ext=NULL; >- switch (picture_type) { >- case PICT_WB: ext="bmp"; break; >- case PICT_WM: ext="wmf"; break; >- case PICT_MAC: ext="pict"; break; >- case PICT_JPEG: ext="jpg"; break; >- case PICT_PNG: ext="png"; break; >- case PICT_DI: ext="dib"; break; /* Device independent bitmap=??? */ >- case PICT_PM: ext="pmm"; break; /* OS/2 metafile=??? */ >+ if (!in_pict_data) { >+ in_pict_data=TRUE; >+ if (!nopict_mode) { >+ char *ext=NULL; >+ switch (picture_type) { >+ case PICT_WB: ext="bmp"; break; >+ case PICT_WM: ext="wmf"; break; >+ case PICT_MAC: ext="pict"; break; >+ case PICT_JPEG: ext="jpg"; break; >+ case PICT_PNG: ext="png"; break; >+ case PICT_DI: ext="dib"; break; /* Device independent bitmap=??? */ >+ case PICT_PM: ext="pmm"; break; /* OS/2 metafile=??? */ >+ } >+ sprintf(picture_path, "pict%03d.%s", >+ picture_file_number++,ext); >+ pictfile=fopen(picture_path,"w"); > } >- sprintf(picture_path, "pict%03d.%s", >- picture_file_number++,ext); >- pictfile=fopen(picture_path,"w"); > } > > if (s[0]!=' ') { >@@ -3586,7 +3590,7 @@ > w = w->next; > } > >- if (within_picture) { >+ if (in_pict_data) { > if(pictfile) { > fclose(pictfile); > printf(op->imagelink_begin);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 225184
: 146840