private Block curBlockArea;
- private int referenceBPD;
private double tableUnits;
private boolean autoLayout = true;
}
}
- referenceBPD = context.getStackLimit().opt;
referenceIPD = context.getRefIPD();
if (getTable().getInlineProgressionDimension().getOptimum(this).getEnum() != EN_AUTO) {
*/
public boolean mustKeepTogether() {
//TODO Keeps will have to be more sophisticated sooner or later
- return ((BlockLevelLayoutManager)getParent()).mustKeepTogether()
+ return super.mustKeepTogether()
|| !getTable().getKeepTogether().getWithinPage().isAuto()
|| !getTable().getKeepTogether().getWithinColumn().isAuto();
}
}
}
- /**
- * Returns the BPD of the content area
- * @return the BPD of the content area
- */
- public int getContentAreaBPD() {
- return referenceBPD;
- }
-
/** @see org.apache.fop.layoutmgr.ConditionalElementListener */
public void notifySpace(RelSide side, MinOptMax effectiveLength) {
if (RelSide.BEFORE == side) {
<changes>
<release version="FOP Trunk">
+ <action context="Code" dev="JM" type="fix" fixes-bug="39443">
+ Bugfix: tables nested in inline elements caused a NullPointerException.
+ </action>
<action context="Code" dev="JM" type="update">
The default sRGB color profile provided by the Java class library is no longer
embedded if it is encountered. This should reduce the PDF size considerably.
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2006 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!-- $Id$ -->
+<testcase>
+ <info>
+ <p>
+ This test checks fo:inline and nested fo:tables.
+ </p>
+ </info>
+ <fo>
+ <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
+ <fo:layout-master-set>
+ <fo:simple-page-master master-name="normal" page-width="5in" page-height="5in">
+ <fo:region-body/>
+ </fo:simple-page-master>
+ </fo:layout-master-set>
+ <fo:page-sequence master-reference="normal">
+ <fo:flow flow-name="xsl-region-body">
+ <fo:block>
+ <fo:inline>part1<fo:table width="100%" table-layout="fixed">
+ <fo:table-column column-width="65%"/>
+ <fo:table-column column-width="10%"/>
+ <fo:table-column column-width="25%"/>
+ <fo:table-body>
+ <fo:table-row>
+ <fo:table-cell>
+ <fo:block>table content</fo:block>
+ </fo:table-cell>
+ </fo:table-row>
+ </fo:table-body>
+ </fo:table>part2</fo:inline>
+ </fo:block>
+ </fo:flow>
+ </fo:page-sequence>
+ </fo:root>
+ </fo>
+ <checks>
+ <eval expected="3" xpath="count(//flow/block[1]/lineArea)"/>
+ <eval expected="table content" xpath="//flow/block[1]/lineArea[2]"/>
+ </checks>
+</testcase>