You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2011/07/06 18:03:55 UTC
DO NOT REPLY [Bug 51484] New: Empty secion at end of file (generates
blank page in openoffice)
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
Bug #: 51484
Summary: Empty secion at end of file (generates blank page in
openoffice)
Product: Fop
Version: all
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: rtf
AssignedTo: fop-dev@xmlgraphics.apache.org
ReportedBy: rj.1970@googlemail.com
Classification: Unclassified
Created attachment 27266
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27266
The fo file I use to generate the rtf
At the end of the generated rtf file a "\sect" is created.
I believe this is wrong, it might however be a matter of definition and up to
the reader how it should interpret it.
The effect it currently has is that in libreoffice/openoffice a blank page is
created at the end of the document.
In Mirosoft Viewer there is no blank page.
I have attached the fo file and the generated rtf file.
Even if this is not considered a bug,
I would be grateful for any hints how I can modify the source, to prevent this
empty section to be generated.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty section at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
Benjamin Riefenstahl <ri...@mecom.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #8 from Benjamin Riefenstahl <ri...@mecom.de> 2012-04-26 09:10:25 UTC ---
Thank you for looking into it.
The code does not yet work. Currently it is testing that the current
element is in the siblings, but what you want to check is, if it has a
next after that, something like:
List siblings = parent.getChildren();
// write suffix /sect only if this section is not last section (see bug
#51484)
Iterator iterator = siblings.listIterator ( siblings.indexOf ( this )
);
iterator.next(); // Skip ourselfs
if ( iterator.hasNext() ) {
writeControlWord("sect");
}
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 51484] Empty section at end of file (generates blank page in
openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
Glenn Adams <ga...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--
You are receiving this mail because:
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty section at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
--- Comment #9 from Glenn Adams <ga...@apache.org> 2012-04-26 13:21:57 UTC ---
(In reply to comment #8)
> Thank you for looking into it.
>
> The code does not yet work. Currently it is testing that the current
> element is in the siblings, but what you want to check is, if it has a
> next after that, something like:
>
> List siblings = parent.getChildren();
> // write suffix /sect only if this section is not last section (see bug
> #51484)
> Iterator iterator = siblings.listIterator ( siblings.indexOf ( this )
> );
> iterator.next(); // Skip ourselfs
> if ( iterator.hasNext() ) {
> writeControlWord("sect");
> }
ah, right; forgot to skip this section; here is an improved version that
doesn't rely on iteration; please test, and if it resolves it, move this bug to
closed... thanks!
http://svn.apache.org/viewvc?rev=1330838&view=rev
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty section at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
Glenn Adams <gl...@skynav.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #4 from Glenn Adams <gl...@skynav.com> 2012-04-08 05:20:49 UTC ---
(In reply to comment #2)
> Created attachment 27708 [details]
> Hack for RtfSection.java
>
> The RTF spec seems to say that FOP is right here and OpenOffice is
> wrong, see <http://www.biblioscape.com/rtf15_spec.htm#Heading27>.
> It's also worth linking here to the corresponding bug report for
> LibreOffice, <https://bugs.freedesktop.org/show_bug.cgi?id=39001>.
>
> OTOH the attached patch seems to fix the problem for me, I have not
> tested it thoroughly yet, though.
could you provide additional input showing that the proposed fix is adequate to
address this problem, doesn't introduce regressions, etc.?
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[Bug 51484] Empty section at end of file (generates blank page in
openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
Benjamin Riefenstahl <ri...@mecom.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from Benjamin Riefenstahl <ri...@mecom.de> ---
Works for my test-case. Thank you very much.
--
You are receiving this mail because:
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty section at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
Glenn Adams <gl...@skynav.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P3
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty secion at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
--- Comment #1 from Roger <rj...@googlemail.com> 2011-07-06 16:04:14 UTC ---
Created attachment 27267
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27267
the generated rtf
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty section at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
--- Comment #5 from Glenn Adams <ga...@apache.org> 2012-04-24 05:44:51 UTC ---
(In reply to comment #4)
> (In reply to comment #2)
> > Created attachment 27708 [details]
> > Hack for RtfSection.java
> >
> > The RTF spec seems to say that FOP is right here and OpenOffice is
> > wrong, see <http://www.biblioscape.com/rtf15_spec.htm#Heading27>.
> > It's also worth linking here to the corresponding bug report for
> > LibreOffice, <https://bugs.freedesktop.org/show_bug.cgi?id=39001>.
> >
> > OTOH the attached patch seems to fix the problem for me, I have not
> > tested it thoroughly yet, though.
>
> could you provide additional input showing that the proposed fix is adequate to
> address this problem, doesn't introduce regressions, etc.?
Roger/Benjamin, I am still awaiting your input as requested above. if I see no
further input by April 30, I will close this bug due to lack of requested
information. Regards, Glenn
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty section at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
--- Comment #6 from Benjamin Riefenstahl <ri...@mecom.de> 2012-04-25 08:16:59 UTC ---
> Roger/Benjamin, I am still awaiting your input as requested
> above.
Sorry for not answering this earlier.
>> could you provide additional input showing that the proposed fix is
>> adequate to address this problem, doesn't introduce regressions,
>> etc.?
The short answer is, I can't.
At the time I looked at the source, found a spot that seemed
reasonable to fix the bug and gave you the patch. I am really not
very knowledgeable in the library, in the RTF spec or in the usage of
RTF in the wild. So no, I can't judge if this is a correct fix in
general.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty section at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
Glenn Adams <ga...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |FIXED
--- Comment #7 from Glenn Adams <ga...@apache.org> 2012-04-25 14:01:08 UTC ---
applied patch (with rewrite) at
http://svn.apache.org/viewvc?rev=1330296&view=rev
roger/benjamin, perhaps you can check if this resolves your problem (i don't
use openoffice)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty section at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
Benjamin Riefenstahl <ri...@mecom.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |riefenstahl@mecom.de
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty section at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
Roger <rj...@googlemail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Empty secion at end of file |Empty section at end of
|(generates blank page in |file (generates blank page
|openoffice) |in openoffice)
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty section at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
--- Comment #3 from Glenn Adams <gl...@skynav.com> 2012-04-07 01:41:29 UTC ---
resetting P2 open bugs to P3 pending further review
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 51484] Empty section at end of file (generates
blank page in openoffice)
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51484
--- Comment #2 from Benjamin Riefenstahl <ri...@mecom.de> 2011-10-06 10:11:24 UTC ---
Created attachment 27708
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27708
Hack for RtfSection.java
The RTF spec seems to say that FOP is right here and OpenOffice is
wrong, see <http://www.biblioscape.com/rtf15_spec.htm#Heading27>.
It's also worth linking here to the corresponding bug report for
LibreOffice, <https://bugs.freedesktop.org/show_bug.cgi?id=39001>.
OTOH the attached patch seems to fix the problem for me, I have not
tested it thoroughly yet, though.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.