From 60cf5396d817f66e1da6ab8ad1b589457be8c41c Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 7 Dec 2005 09:40:16 +0000 Subject: [PATCH] Bugzilla #37815: Bugfix: The combination of content-width="scale-to-fit" and content-height="100%" did not work as expected due to a datatype conversion bug. Submitted by: Tom git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@354757 13f79535-47bb-0310-9956-ffa450edef68 --- .../inline/AbstractGraphicsLayoutManager.java | 4 +- status.xml | 4 ++ .../external-graphic_bug37815.xml | 55 +++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 test/layoutengine/standard-testcases/external-graphic_bug37815.xml diff --git a/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java index 01fd854d6..a02e2363d 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/AbstractGraphicsLayoutManager.java @@ -147,8 +147,8 @@ public abstract class AbstractGraphicsLayoutManager extends LeafNodeLayoutManage cwidth = 0; cheight = 0; } else { - double rat1 = cwidth / fobj.getIntrinsicWidth(); - double rat2 = cheight / fobj.getIntrinsicHeight(); + double rat1 = (double) cwidth / fobj.getIntrinsicWidth(); + double rat2 = (double) cheight / fobj.getIntrinsicHeight(); if (rat1 < rat2) { // reduce cheight cheight = (int)(rat1 * fobj.getIntrinsicHeight()); diff --git a/status.xml b/status.xml index 1af95ffff..c05434c7c 100644 --- a/status.xml +++ b/status.xml @@ -27,6 +27,10 @@ + + Bugfix: The combination of content-width="scale-to-fit" and content-height="100%" + did not work as expected due to a datatype conversion bug. + Bugfix: A span="all" on the first block cause a subsequent page break and the first block didn't span all columns. diff --git a/test/layoutengine/standard-testcases/external-graphic_bug37815.xml b/test/layoutengine/standard-testcases/external-graphic_bug37815.xml new file mode 100644 index 000000000..23e368eda --- /dev/null +++ b/test/layoutengine/standard-testcases/external-graphic_bug37815.xml @@ -0,0 +1,55 @@ + + + + + +

+ This test checks external-graphics concerning Bugzilla #37815. +

+
+ + + + + + + + + + + EOG + + + EOG + + EOF + + + + + + + + + + + + + + + +
-- 2.39.5