You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ph...@apache.org on 2006/01/27 18:10:41 UTC
svn commit: r372916 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
Author: pherweg
Date: Fri Jan 27 09:10:31 2006
New Revision: 372916
URL: http://svn.apache.org/viewcvs?rev=372916&view=rev
Log:
RTF: testcase 'tableunits.fo' failed because there was no PercentBaseContext passed.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java?rev=372916&r1=372915&r2=372916&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java Fri Jan 27 09:10:31 2006
@@ -63,6 +63,8 @@
import org.apache.fop.fo.pagination.StaticContent;
import org.apache.fop.fo.Constants;
import org.apache.fop.fo.FOText;
+import org.apache.fop.layoutmgr.table.TableContentLayoutManager;
+import org.apache.fop.layoutmgr.table.TableLayoutManager;
import org.apache.fop.render.rtf.rtflib.rtfdoc.ITableAttributes;
import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfAfterContainer;
import org.apache.fop.render.rtf.rtflib.rtfdoc.IRtfBeforeContainer;
@@ -534,7 +536,16 @@
}
try {
- Integer iWidth = new Integer(tc.getColumnWidth().getValue() / 1000);
+ Table tbl = (Table) tc.getParent();
+
+ TableLayoutManager tlm
+ = new TableLayoutManager(tbl);
+ TableContentLayoutManager tclm
+ = new TableContentLayoutManager(tlm);
+
+ Integer iWidth
+ = new Integer(tc.getColumnWidth().getValue(tclm) / 1000);
+
String strWidth = iWidth.toString() + "pt";
Float width = new Float(
FoUnitsConverter.getInstance().convertToTwips(strWidth));
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org
Re: svn commit: r372916 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Yes, it makes sense and I agree with you, too. We should try to find a
way to share the handling of relative values for both types of handlers.
On 27.01.2006 20:21:10 Simon Pepping wrote:
> On Fri, Jan 27, 2006 at 06:56:21PM +0100, Andreas L Delmelle wrote:
> > On Jan 27, 2006, at 18:28, Andreas L Delmelle wrote:
> >
> > >
> > >Right now, it works, and it enhances our RTF output, so there's no
> > >need to revert, but I'm wondering if there isn't an alternative
> > >solution that would look/feel better.
> >
> > Since I started this...
> >
> > I'm thinking in the direction of using the PercentBaseContext
> > interface here, instead of the layoutmgr specific classes that
> > implement it. IOW: approach the percentage resolution as something
> > that is shared between structural and non-structural renderers,
> > instead of the non-structural renderer borrowing functionality from
> > the structural one.
> >
> > Does this make sense?
>
> I share your objections against the mixing of packages.
Jeremias Maerki
Re: svn commit: r372916 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
Posted by Simon Pepping <sp...@leverkruid.nl>.
On Fri, Jan 27, 2006 at 06:56:21PM +0100, Andreas L Delmelle wrote:
> On Jan 27, 2006, at 18:28, Andreas L Delmelle wrote:
>
> >
> >Right now, it works, and it enhances our RTF output, so there's no
> >need to revert, but I'm wondering if there isn't an alternative
> >solution that would look/feel better.
>
> Since I started this...
>
> I'm thinking in the direction of using the PercentBaseContext
> interface here, instead of the layoutmgr specific classes that
> implement it. IOW: approach the percentage resolution as something
> that is shared between structural and non-structural renderers,
> instead of the non-structural renderer borrowing functionality from
> the structural one.
>
> Does this make sense?
I share your objections against the mixing of packages.
Regards, Simon
--
Simon Pepping
home page: http://www.leverkruid.nl
Re: svn commit: r372916 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jan 27, 2006, at 18:28, Andreas L Delmelle wrote:
>
> Right now, it works, and it enhances our RTF output, so there's no
> need to revert, but I'm wondering if there isn't an alternative
> solution that would look/feel better.
Since I started this...
I'm thinking in the direction of using the PercentBaseContext
interface here, instead of the layoutmgr specific classes that
implement it. IOW: approach the percentage resolution as something
that is shared between structural and non-structural renderers,
instead of the non-structural renderer borrowing functionality from
the structural one.
Does this make sense?
Cheers,
Andreas
AW: svn commit: r372916 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
Posted by Peter Herweg <ph...@web.de>.
> Right now, it works, and it enhances our RTF output, so there's no
> need to revert, but I'm wondering if there isn't an alternative
> solution that would look/feel better.
Yes, but it does not work very good. There is no exception anymore, but
column width are not calculated correctly.
I would not mind to remove usage of TableLayoutManager and simply
pass a SimplePercentBaseContext with base length always being 0, until
we find a better solution.
Kind regards,
Peter Herweg
-----Ursprungliche Nachricht-----
Von: fop-dev-return-29433-pherweg=web.de@xmlgraphics.apache.org
[mailto:fop-dev-return-29433-pherweg=web.de@xmlgraphics.apache.org]Im
Auftrag von Andreas L Delmelle
Gesendet: Freitag, 27. Januar 2006 18:28
An: fop-dev@xmlgraphics.apache.org
Betreff: Re: svn commit: r372916 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.jav
a
On Jan 27, 2006, at 18:10, pherweg@apache.org wrote:
Hi Peter and others,
I really don't mean to be a pest, but this somehow doesn't feel
right. I just wonder if any of you share the same concern, or can
offer me some solid justification...
Although I do see the necessity of it to make percentage values work
right, it seems a bit hybrid (if you catch the drift) to bypass the
whole layoutengine for RTF output on the one hand, and on the other
hand import classes from the layoutmgr package into the RTFHandler.
Right now, it works, and it enhances our RTF output, so there's no
need to revert, but I'm wondering if there isn't an alternative
solution that would look/feel better.
Any thoughts?
Cheers,
Andreas
> Author: pherweg
> Date: Fri Jan 27 09:10:31 2006
> New Revision: 372916
>
> URL: http://svn.apache.org/viewcvs?rev=372916&view=rev
> Log:
> RTF: testcase 'tableunits.fo' failed because there was no
> PercentBaseContext passed.
>
> Modified:
> xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/
> RTFHandler.java
>
> Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/
> RTFHandler.java
> URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/
> org/apache/fop/render/rtf/RTFHandler.java?
> rev=372916&r1=372915&r2=372916&view=diff
> ======================================================================
> ========
> --- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/
> RTFHandler.java (original)
> +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/
> RTFHandler.java Fri Jan 27 09:10:31 2006
> @@ -63,6 +63,8 @@
> import org.apache.fop.fo.pagination.StaticContent;
> import org.apache.fop.fo.Constants;
> import org.apache.fop.fo.FOText;
> +import org.apache.fop.layoutmgr.table.TableContentLayoutManager;
> +import org.apache.fop.layoutmgr.table.TableLayoutManager;
Re: svn commit: r372916 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/RTFHandler.java
Posted by Andreas L Delmelle <a_...@pandora.be>.
On Jan 27, 2006, at 18:10, pherweg@apache.org wrote:
Hi Peter and others,
I really don't mean to be a pest, but this somehow doesn't feel
right. I just wonder if any of you share the same concern, or can
offer me some solid justification...
Although I do see the necessity of it to make percentage values work
right, it seems a bit hybrid (if you catch the drift) to bypass the
whole layoutengine for RTF output on the one hand, and on the other
hand import classes from the layoutmgr package into the RTFHandler.
Right now, it works, and it enhances our RTF output, so there's no
need to revert, but I'm wondering if there isn't an alternative
solution that would look/feel better.
Any thoughts?
Cheers,
Andreas
> Author: pherweg
> Date: Fri Jan 27 09:10:31 2006
> New Revision: 372916
>
> URL: http://svn.apache.org/viewcvs?rev=372916&view=rev
> Log:
> RTF: testcase 'tableunits.fo' failed because there was no
> PercentBaseContext passed.
>
> Modified:
> xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/
> RTFHandler.java
>
> Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/
> RTFHandler.java
> URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/
> org/apache/fop/render/rtf/RTFHandler.java?
> rev=372916&r1=372915&r2=372916&view=diff
> ======================================================================
> ========
> --- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/
> RTFHandler.java (original)
> +++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/rtf/
> RTFHandler.java Fri Jan 27 09:10:31 2006
> @@ -63,6 +63,8 @@
> import org.apache.fop.fo.pagination.StaticContent;
> import org.apache.fop.fo.Constants;
> import org.apache.fop.fo.FOText;
> +import org.apache.fop.layoutmgr.table.TableContentLayoutManager;
> +import org.apache.fop.layoutmgr.table.TableLayoutManager;