Merged revisions 651323,651333,651538,651540,651543-651544,651551,651558 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r651323 | spepping | 2008-04-24 18:46:31 +0100 (Thu, 24 Apr 2008) | 3 lines
Improve table-unit computation if proportional-column-width() is used
as a subexpression. Fixes bug 44658.
........
r651333 | spepping | 2008-04-24 19:19:06 +0100 (Thu, 24 Apr 2008) | 4 lines
Make the eventResourceGenerator task for the test files a separate
task. Now one can do: ant codegen, compile outside of ant, ant
compile-copy-resources, ant junit-compile-copy-resources.
........
r651538 | jeremias | 2008-04-25 09:42:02 +0100 (Fri, 25 Apr 2008) | 1 line
Javadocs
........
r651540 | jeremias | 2008-04-25 09:44:39 +0100 (Fri, 25 Apr 2008) | 1 line
Cleanup
........
r651543 | adelmelle | 2008-04-25 09:59:56 +0100 (Fri, 25 Apr 2008) | 3 lines
Removed TODO: New validation event to generate an error in case an fo:marker appears as a child of an fo:block-container with absolutely positioned areas.
Additionally: some javadoc updates in BlockContainer.java
........
r651544 | acumiskey | 2008-04-25 10:04:06 +0100 (Fri, 25 Apr 2008) | 1 line
Removed the tab characters that were causing a big moan from eclipse
........
r651551 | adelmelle | 2008-04-25 10:30:09 +0100 (Fri, 25 Apr 2008) | 3 lines
Cleanup: removal of commented block/methods + some javadoc updates
........
r651558 | jeremias | 2008-04-25 11:07:58 +0100 (Fri, 25 Apr 2008) | 1 line
Second part of the implementation of stage 1 for advanced keeps (see Wiki): Integer values are treated differently from "always" values in keep-with-next/previous.within-column for all block-level FOs.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@651570 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 660979,660998,661276,661310,661999,662009,662203 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r660979 | vhennebert | 2008-05-28 16:24:23 +0100 (Wed, 28 May 2008) | 3 lines
Bugzilla 37579: added support for footnotes in lists and table bodies (not header nor footer).
This is /not/ to be considered a final fix: similar code is duplicated over several classes (LineLayoutManager, ListItemLayoutManager and to less extent TableStepper). Footnotes should probably be handled another way.
........
r660998 | maxberger | 2008-05-28 17:10:32 +0100 (Wed, 28 May 2008) | 1 line
Implemented Font auto-selection word-by-word
........
r661276 | vhennebert | 2008-05-29 10:58:06 +0100 (Thu, 29 May 2008) | 2 lines
Set svn:keywords and svn:eol-style properties for files added in revision 660998
........
r661310 | maxberger | 2008-05-29 13:03:48 +0100 (Thu, 29 May 2008) | 1 line
Added docs for my recent commit (word-by-word character selection)
........
r661999 | adelmelle | 2008-05-31 11:56:05 +0100 (Sat, 31 May 2008) | 3 lines
Bugzilla 45097:
Leading/trailing white-space not removed from nested inline-content when there is no preceding/following text.
........
r662009 | maxberger | 2008-05-31 12:45:55 +0100 (Sat, 31 May 2008) | 1 line
Code Cleanups (no functional change)
........
r662203 | maxberger | 2008-06-01 12:57:33 +0100 (Sun, 01 Jun 2008) | 1 line
More code Cleanups (no functional changes)
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@662442 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 651323,651333,651538,651540,651543-651544,651551,651558 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r651323 | spepping | 2008-04-24 18:46:31 +0100 (Thu, 24 Apr 2008) | 3 lines
Improve table-unit computation if proportional-column-width() is used
as a subexpression. Fixes bug 44658.
........
r651333 | spepping | 2008-04-24 19:19:06 +0100 (Thu, 24 Apr 2008) | 4 lines
Make the eventResourceGenerator task for the test files a separate
task. Now one can do: ant codegen, compile outside of ant, ant
compile-copy-resources, ant junit-compile-copy-resources.
........
r651538 | jeremias | 2008-04-25 09:42:02 +0100 (Fri, 25 Apr 2008) | 1 line
Javadocs
........
r651540 | jeremias | 2008-04-25 09:44:39 +0100 (Fri, 25 Apr 2008) | 1 line
Cleanup
........
r651543 | adelmelle | 2008-04-25 09:59:56 +0100 (Fri, 25 Apr 2008) | 3 lines
Removed TODO: New validation event to generate an error in case an fo:marker appears as a child of an fo:block-container with absolutely positioned areas.
Additionally: some javadoc updates in BlockContainer.java
........
r651544 | acumiskey | 2008-04-25 10:04:06 +0100 (Fri, 25 Apr 2008) | 1 line
Removed the tab characters that were causing a big moan from eclipse
........
r651551 | adelmelle | 2008-04-25 10:30:09 +0100 (Fri, 25 Apr 2008) | 3 lines
Cleanup: removal of commented block/methods + some javadoc updates
........
r651558 | jeremias | 2008-04-25 11:07:58 +0100 (Fri, 25 Apr 2008) | 1 line
Second part of the implementation of stage 1 for advanced keeps (see Wiki): Integer values are treated differently from "always" values in keep-with-next/previous.within-column for all block-level FOs.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@651570 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 660979,660998,661276,661310,661999,662009,662203 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r660979 | vhennebert | 2008-05-28 16:24:23 +0100 (Wed, 28 May 2008) | 3 lines
Bugzilla 37579: added support for footnotes in lists and table bodies (not header nor footer).
This is /not/ to be considered a final fix: similar code is duplicated over several classes (LineLayoutManager, ListItemLayoutManager and to less extent TableStepper). Footnotes should probably be handled another way.
........
r660998 | maxberger | 2008-05-28 17:10:32 +0100 (Wed, 28 May 2008) | 1 line
Implemented Font auto-selection word-by-word
........
r661276 | vhennebert | 2008-05-29 10:58:06 +0100 (Thu, 29 May 2008) | 2 lines
Set svn:keywords and svn:eol-style properties for files added in revision 660998
........
r661310 | maxberger | 2008-05-29 13:03:48 +0100 (Thu, 29 May 2008) | 1 line
Added docs for my recent commit (word-by-word character selection)
........
r661999 | adelmelle | 2008-05-31 11:56:05 +0100 (Sat, 31 May 2008) | 3 lines
Bugzilla 45097:
Leading/trailing white-space not removed from nested inline-content when there is no preceding/following text.
........
r662009 | maxberger | 2008-05-31 12:45:55 +0100 (Sat, 31 May 2008) | 1 line
Code Cleanups (no functional change)
........
r662203 | maxberger | 2008-06-01 12:57:33 +0100 (Sun, 01 Jun 2008) | 1 line
More code Cleanups (no functional changes)
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@662442 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 660979,660998,661276,661310,661999,662009,662203 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r660979 | vhennebert | 2008-05-28 16:24:23 +0100 (Wed, 28 May 2008) | 3 lines
Bugzilla 37579: added support for footnotes in lists and table bodies (not header nor footer).
This is /not/ to be considered a final fix: similar code is duplicated over several classes (LineLayoutManager, ListItemLayoutManager and to less extent TableStepper). Footnotes should probably be handled another way.
........
r660998 | maxberger | 2008-05-28 17:10:32 +0100 (Wed, 28 May 2008) | 1 line
Implemented Font auto-selection word-by-word
........
r661276 | vhennebert | 2008-05-29 10:58:06 +0100 (Thu, 29 May 2008) | 2 lines
Set svn:keywords and svn:eol-style properties for files added in revision 660998
........
r661310 | maxberger | 2008-05-29 13:03:48 +0100 (Thu, 29 May 2008) | 1 line
Added docs for my recent commit (word-by-word character selection)
........
r661999 | adelmelle | 2008-05-31 11:56:05 +0100 (Sat, 31 May 2008) | 3 lines
Bugzilla 45097:
Leading/trailing white-space not removed from nested inline-content when there is no preceding/following text.
........
r662009 | maxberger | 2008-05-31 12:45:55 +0100 (Sat, 31 May 2008) | 1 line
Code Cleanups (no functional change)
........
r662203 | maxberger | 2008-06-01 12:57:33 +0100 (Sun, 01 Jun 2008) | 1 line
More code Cleanups (no functional changes)
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@662442 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 660979,660998,661276,661310,661999,662009,662203 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r660979 | vhennebert | 2008-05-28 16:24:23 +0100 (Wed, 28 May 2008) | 3 lines
Bugzilla 37579: added support for footnotes in lists and table bodies (not header nor footer).
This is /not/ to be considered a final fix: similar code is duplicated over several classes (LineLayoutManager, ListItemLayoutManager and to less extent TableStepper). Footnotes should probably be handled another way.
........
r660998 | maxberger | 2008-05-28 17:10:32 +0100 (Wed, 28 May 2008) | 1 line
Implemented Font auto-selection word-by-word
........
r661276 | vhennebert | 2008-05-29 10:58:06 +0100 (Thu, 29 May 2008) | 2 lines
Set svn:keywords and svn:eol-style properties for files added in revision 660998
........
r661310 | maxberger | 2008-05-29 13:03:48 +0100 (Thu, 29 May 2008) | 1 line
Added docs for my recent commit (word-by-word character selection)
........
r661999 | adelmelle | 2008-05-31 11:56:05 +0100 (Sat, 31 May 2008) | 3 lines
Bugzilla 45097:
Leading/trailing white-space not removed from nested inline-content when there is no preceding/following text.
........
r662009 | maxberger | 2008-05-31 12:45:55 +0100 (Sat, 31 May 2008) | 1 line
Code Cleanups (no functional change)
........
r662203 | maxberger | 2008-06-01 12:57:33 +0100 (Sun, 01 Jun 2008) | 1 line
More code Cleanups (no functional changes)
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@662442 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 651323,651333,651538,651540,651543-651544,651551,651558 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r651323 | spepping | 2008-04-24 18:46:31 +0100 (Thu, 24 Apr 2008) | 3 lines
Improve table-unit computation if proportional-column-width() is used
as a subexpression. Fixes bug 44658.
........
r651333 | spepping | 2008-04-24 19:19:06 +0100 (Thu, 24 Apr 2008) | 4 lines
Make the eventResourceGenerator task for the test files a separate
task. Now one can do: ant codegen, compile outside of ant, ant
compile-copy-resources, ant junit-compile-copy-resources.
........
r651538 | jeremias | 2008-04-25 09:42:02 +0100 (Fri, 25 Apr 2008) | 1 line
Javadocs
........
r651540 | jeremias | 2008-04-25 09:44:39 +0100 (Fri, 25 Apr 2008) | 1 line
Cleanup
........
r651543 | adelmelle | 2008-04-25 09:59:56 +0100 (Fri, 25 Apr 2008) | 3 lines
Removed TODO: New validation event to generate an error in case an fo:marker appears as a child of an fo:block-container with absolutely positioned areas.
Additionally: some javadoc updates in BlockContainer.java
........
r651544 | acumiskey | 2008-04-25 10:04:06 +0100 (Fri, 25 Apr 2008) | 1 line
Removed the tab characters that were causing a big moan from eclipse
........
r651551 | adelmelle | 2008-04-25 10:30:09 +0100 (Fri, 25 Apr 2008) | 3 lines
Cleanup: removal of commented block/methods + some javadoc updates
........
r651558 | jeremias | 2008-04-25 11:07:58 +0100 (Fri, 25 Apr 2008) | 1 line
Second part of the implementation of stage 1 for advanced keeps (see Wiki): Integer values are treated differently from "always" values in keep-with-next/previous.within-column for all block-level FOs.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@651570 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 655489,655500,655522,655531,655578,655601,655603,655614,655766,655771,655775 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r655489 | vhennebert | 2008-05-12 13:30:42 +0100 (Mon, 12 May 2008) | 2 lines
Replaced hack in TableStepper to get the steps' penalty values with a more proper implementation. Allows in the same time to avoid skimming, at each step, through the active cells' LinkedLists of elements, which may have a negative impact on performance
........
r655500 | adelmelle | 2008-05-12 14:42:49 +0100 (Mon, 12 May 2008) | 2 lines
Extended caching to CondLengthProperty CommonBorderPaddingBackground.BorderInfo and CommonBorderPaddingBackground.
........
r655522 | adelmelle | 2008-05-12 16:24:06 +0100 (Mon, 12 May 2008) | 2 lines
Tweak: avoid preloading the background-image with each pass through the constructor; only do so for non-cached instances
........
r655531 | adelmelle | 2008-05-12 16:34:49 +0100 (Mon, 12 May 2008) | 2 lines
Avoid an error if unspecified...
........
r655578 | spepping | 2008-05-12 18:53:21 +0100 (Mon, 12 May 2008) | 3 lines
Restore the previous behaviour of the column-number property, viz. if
it is negative, it is set the next free column
........
r655601 | adelmelle | 2008-05-12 20:06:04 +0100 (Mon, 12 May 2008) | 1 line
Added missing file from r655500
........
r655603 | adelmelle | 2008-05-12 20:11:00 +0100 (Mon, 12 May 2008) | 1 line
Re-enabled testcases that pass again after r655578
........
r655614 | vhennebert | 2008-05-12 20:37:39 +0100 (Mon, 12 May 2008) | 3 lines
Put the resolutions of collapsed borders together into the CollapsingBorderResolver class.
The previous scheme allowed for early resolution of borders where possible, but made it hard to understand since the resolution was spread in the various table classes. Now everything is done inside a single class
........
r655766 | adelmelle | 2008-05-13 08:58:31 +0100 (Tue, 13 May 2008) | 2 lines
Added support for auto-generated initial value for the "id" property.
........
r655771 | adelmelle | 2008-05-13 09:11:12 +0100 (Tue, 13 May 2008) | 1 line
Alter auto-id naming to avoid confusion with URI fragment identifiers
........
r655775 | adelmelle | 2008-05-13 09:20:57 +0100 (Tue, 13 May 2008) | 1 line
Javadoc fixups
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@655782 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 651323,651333,651538,651540,651543-651544,651551,651558 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r651323 | spepping | 2008-04-24 18:46:31 +0100 (Thu, 24 Apr 2008) | 3 lines
Improve table-unit computation if proportional-column-width() is used
as a subexpression. Fixes bug 44658.
........
r651333 | spepping | 2008-04-24 19:19:06 +0100 (Thu, 24 Apr 2008) | 4 lines
Make the eventResourceGenerator task for the test files a separate
task. Now one can do: ant codegen, compile outside of ant, ant
compile-copy-resources, ant junit-compile-copy-resources.
........
r651538 | jeremias | 2008-04-25 09:42:02 +0100 (Fri, 25 Apr 2008) | 1 line
Javadocs
........
r651540 | jeremias | 2008-04-25 09:44:39 +0100 (Fri, 25 Apr 2008) | 1 line
Cleanup
........
r651543 | adelmelle | 2008-04-25 09:59:56 +0100 (Fri, 25 Apr 2008) | 3 lines
Removed TODO: New validation event to generate an error in case an fo:marker appears as a child of an fo:block-container with absolutely positioned areas.
Additionally: some javadoc updates in BlockContainer.java
........
r651544 | acumiskey | 2008-04-25 10:04:06 +0100 (Fri, 25 Apr 2008) | 1 line
Removed the tab characters that were causing a big moan from eclipse
........
r651551 | adelmelle | 2008-04-25 10:30:09 +0100 (Fri, 25 Apr 2008) | 3 lines
Cleanup: removal of commented block/methods + some javadoc updates
........
r651558 | jeremias | 2008-04-25 11:07:58 +0100 (Fri, 25 Apr 2008) | 1 line
Second part of the implementation of stage 1 for advanced keeps (see Wiki): Integer values are treated differently from "always" values in keep-with-next/previous.within-column for all block-level FOs.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@651570 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 655489,655500,655522,655531,655578,655601,655603,655614,655766,655771,655775 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r655489 | vhennebert | 2008-05-12 13:30:42 +0100 (Mon, 12 May 2008) | 2 lines
Replaced hack in TableStepper to get the steps' penalty values with a more proper implementation. Allows in the same time to avoid skimming, at each step, through the active cells' LinkedLists of elements, which may have a negative impact on performance
........
r655500 | adelmelle | 2008-05-12 14:42:49 +0100 (Mon, 12 May 2008) | 2 lines
Extended caching to CondLengthProperty CommonBorderPaddingBackground.BorderInfo and CommonBorderPaddingBackground.
........
r655522 | adelmelle | 2008-05-12 16:24:06 +0100 (Mon, 12 May 2008) | 2 lines
Tweak: avoid preloading the background-image with each pass through the constructor; only do so for non-cached instances
........
r655531 | adelmelle | 2008-05-12 16:34:49 +0100 (Mon, 12 May 2008) | 2 lines
Avoid an error if unspecified...
........
r655578 | spepping | 2008-05-12 18:53:21 +0100 (Mon, 12 May 2008) | 3 lines
Restore the previous behaviour of the column-number property, viz. if
it is negative, it is set the next free column
........
r655601 | adelmelle | 2008-05-12 20:06:04 +0100 (Mon, 12 May 2008) | 1 line
Added missing file from r655500
........
r655603 | adelmelle | 2008-05-12 20:11:00 +0100 (Mon, 12 May 2008) | 1 line
Re-enabled testcases that pass again after r655578
........
r655614 | vhennebert | 2008-05-12 20:37:39 +0100 (Mon, 12 May 2008) | 3 lines
Put the resolutions of collapsed borders together into the CollapsingBorderResolver class.
The previous scheme allowed for early resolution of borders where possible, but made it hard to understand since the resolution was spread in the various table classes. Now everything is done inside a single class
........
r655766 | adelmelle | 2008-05-13 08:58:31 +0100 (Tue, 13 May 2008) | 2 lines
Added support for auto-generated initial value for the "id" property.
........
r655771 | adelmelle | 2008-05-13 09:11:12 +0100 (Tue, 13 May 2008) | 1 line
Alter auto-id naming to avoid confusion with URI fragment identifiers
........
r655775 | adelmelle | 2008-05-13 09:20:57 +0100 (Tue, 13 May 2008) | 1 line
Javadoc fixups
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@655782 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 651323,651333,651538,651540,651543-651544,651551,651558 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r651323 | spepping | 2008-04-24 18:46:31 +0100 (Thu, 24 Apr 2008) | 3 lines
Improve table-unit computation if proportional-column-width() is used
as a subexpression. Fixes bug 44658.
........
r651333 | spepping | 2008-04-24 19:19:06 +0100 (Thu, 24 Apr 2008) | 4 lines
Make the eventResourceGenerator task for the test files a separate
task. Now one can do: ant codegen, compile outside of ant, ant
compile-copy-resources, ant junit-compile-copy-resources.
........
r651538 | jeremias | 2008-04-25 09:42:02 +0100 (Fri, 25 Apr 2008) | 1 line
Javadocs
........
r651540 | jeremias | 2008-04-25 09:44:39 +0100 (Fri, 25 Apr 2008) | 1 line
Cleanup
........
r651543 | adelmelle | 2008-04-25 09:59:56 +0100 (Fri, 25 Apr 2008) | 3 lines
Removed TODO: New validation event to generate an error in case an fo:marker appears as a child of an fo:block-container with absolutely positioned areas.
Additionally: some javadoc updates in BlockContainer.java
........
r651544 | acumiskey | 2008-04-25 10:04:06 +0100 (Fri, 25 Apr 2008) | 1 line
Removed the tab characters that were causing a big moan from eclipse
........
r651551 | adelmelle | 2008-04-25 10:30:09 +0100 (Fri, 25 Apr 2008) | 3 lines
Cleanup: removal of commented block/methods + some javadoc updates
........
r651558 | jeremias | 2008-04-25 11:07:58 +0100 (Fri, 25 Apr 2008) | 1 line
Second part of the implementation of stage 1 for advanced keeps (see Wiki): Integer values are treated differently from "always" values in keep-with-next/previous.within-column for all block-level FOs.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@651570 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 651323,651333,651538,651540,651543-651544,651551,651558 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r651323 | spepping | 2008-04-24 18:46:31 +0100 (Thu, 24 Apr 2008) | 3 lines
Improve table-unit computation if proportional-column-width() is used
as a subexpression. Fixes bug 44658.
........
r651333 | spepping | 2008-04-24 19:19:06 +0100 (Thu, 24 Apr 2008) | 4 lines
Make the eventResourceGenerator task for the test files a separate
task. Now one can do: ant codegen, compile outside of ant, ant
compile-copy-resources, ant junit-compile-copy-resources.
........
r651538 | jeremias | 2008-04-25 09:42:02 +0100 (Fri, 25 Apr 2008) | 1 line
Javadocs
........
r651540 | jeremias | 2008-04-25 09:44:39 +0100 (Fri, 25 Apr 2008) | 1 line
Cleanup
........
r651543 | adelmelle | 2008-04-25 09:59:56 +0100 (Fri, 25 Apr 2008) | 3 lines
Removed TODO: New validation event to generate an error in case an fo:marker appears as a child of an fo:block-container with absolutely positioned areas.
Additionally: some javadoc updates in BlockContainer.java
........
r651544 | acumiskey | 2008-04-25 10:04:06 +0100 (Fri, 25 Apr 2008) | 1 line
Removed the tab characters that were causing a big moan from eclipse
........
r651551 | adelmelle | 2008-04-25 10:30:09 +0100 (Fri, 25 Apr 2008) | 3 lines
Cleanup: removal of commented block/methods + some javadoc updates
........
r651558 | jeremias | 2008-04-25 11:07:58 +0100 (Fri, 25 Apr 2008) | 1 line
Second part of the implementation of stage 1 for advanced keeps (see Wiki): Integer values are treated differently from "always" values in keep-with-next/previous.within-column for all block-level FOs.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@651570 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 651323,651333,651538,651540,651543-651544,651551,651558 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r651323 | spepping | 2008-04-24 18:46:31 +0100 (Thu, 24 Apr 2008) | 3 lines
Improve table-unit computation if proportional-column-width() is used
as a subexpression. Fixes bug 44658.
........
r651333 | spepping | 2008-04-24 19:19:06 +0100 (Thu, 24 Apr 2008) | 4 lines
Make the eventResourceGenerator task for the test files a separate
task. Now one can do: ant codegen, compile outside of ant, ant
compile-copy-resources, ant junit-compile-copy-resources.
........
r651538 | jeremias | 2008-04-25 09:42:02 +0100 (Fri, 25 Apr 2008) | 1 line
Javadocs
........
r651540 | jeremias | 2008-04-25 09:44:39 +0100 (Fri, 25 Apr 2008) | 1 line
Cleanup
........
r651543 | adelmelle | 2008-04-25 09:59:56 +0100 (Fri, 25 Apr 2008) | 3 lines
Removed TODO: New validation event to generate an error in case an fo:marker appears as a child of an fo:block-container with absolutely positioned areas.
Additionally: some javadoc updates in BlockContainer.java
........
r651544 | acumiskey | 2008-04-25 10:04:06 +0100 (Fri, 25 Apr 2008) | 1 line
Removed the tab characters that were causing a big moan from eclipse
........
r651551 | adelmelle | 2008-04-25 10:30:09 +0100 (Fri, 25 Apr 2008) | 3 lines
Cleanup: removal of commented block/methods + some javadoc updates
........
r651558 | jeremias | 2008-04-25 11:07:58 +0100 (Fri, 25 Apr 2008) | 1 line
Second part of the implementation of stage 1 for advanced keeps (see Wiki): Integer values are treated differently from "always" values in keep-with-next/previous.within-column for all block-level FOs.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@651570 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 651323,651333,651538,651540,651543-651544,651551,651558 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r651323 | spepping | 2008-04-24 18:46:31 +0100 (Thu, 24 Apr 2008) | 3 lines
Improve table-unit computation if proportional-column-width() is used
as a subexpression. Fixes bug 44658.
........
r651333 | spepping | 2008-04-24 19:19:06 +0100 (Thu, 24 Apr 2008) | 4 lines
Make the eventResourceGenerator task for the test files a separate
task. Now one can do: ant codegen, compile outside of ant, ant
compile-copy-resources, ant junit-compile-copy-resources.
........
r651538 | jeremias | 2008-04-25 09:42:02 +0100 (Fri, 25 Apr 2008) | 1 line
Javadocs
........
r651540 | jeremias | 2008-04-25 09:44:39 +0100 (Fri, 25 Apr 2008) | 1 line
Cleanup
........
r651543 | adelmelle | 2008-04-25 09:59:56 +0100 (Fri, 25 Apr 2008) | 3 lines
Removed TODO: New validation event to generate an error in case an fo:marker appears as a child of an fo:block-container with absolutely positioned areas.
Additionally: some javadoc updates in BlockContainer.java
........
r651544 | acumiskey | 2008-04-25 10:04:06 +0100 (Fri, 25 Apr 2008) | 1 line
Removed the tab characters that were causing a big moan from eclipse
........
r651551 | adelmelle | 2008-04-25 10:30:09 +0100 (Fri, 25 Apr 2008) | 3 lines
Cleanup: removal of commented block/methods + some javadoc updates
........
r651558 | jeremias | 2008-04-25 11:07:58 +0100 (Fri, 25 Apr 2008) | 1 line
Second part of the implementation of stage 1 for advanced keeps (see Wiki): Integer values are treated differently from "always" values in keep-with-next/previous.within-column for all block-level FOs.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@651570 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 651323,651333,651538,651540,651543-651544,651551,651558 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r651323 | spepping | 2008-04-24 18:46:31 +0100 (Thu, 24 Apr 2008) | 3 lines
Improve table-unit computation if proportional-column-width() is used
as a subexpression. Fixes bug 44658.
........
r651333 | spepping | 2008-04-24 19:19:06 +0100 (Thu, 24 Apr 2008) | 4 lines
Make the eventResourceGenerator task for the test files a separate
task. Now one can do: ant codegen, compile outside of ant, ant
compile-copy-resources, ant junit-compile-copy-resources.
........
r651538 | jeremias | 2008-04-25 09:42:02 +0100 (Fri, 25 Apr 2008) | 1 line
Javadocs
........
r651540 | jeremias | 2008-04-25 09:44:39 +0100 (Fri, 25 Apr 2008) | 1 line
Cleanup
........
r651543 | adelmelle | 2008-04-25 09:59:56 +0100 (Fri, 25 Apr 2008) | 3 lines
Removed TODO: New validation event to generate an error in case an fo:marker appears as a child of an fo:block-container with absolutely positioned areas.
Additionally: some javadoc updates in BlockContainer.java
........
r651544 | acumiskey | 2008-04-25 10:04:06 +0100 (Fri, 25 Apr 2008) | 1 line
Removed the tab characters that were causing a big moan from eclipse
........
r651551 | adelmelle | 2008-04-25 10:30:09 +0100 (Fri, 25 Apr 2008) | 3 lines
Cleanup: removal of commented block/methods + some javadoc updates
........
r651558 | jeremias | 2008-04-25 11:07:58 +0100 (Fri, 25 Apr 2008) | 1 line
Second part of the implementation of stage 1 for advanced keeps (see Wiki): Integer values are treated differently from "always" values in keep-with-next/previous.within-column for all block-level FOs.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@651570 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten Merged revisions 665691 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk
................
r665691 | jeremias | 2008-06-09 15:01:53 +0100 (Mon, 09 Jun 2008) | 82 lines
Merged revisions 636407-637074,637076-637118,637120-637790,637792-637856,637858-637992,637994-638047,638049-638307,638309-638315,638318-664698 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95
........
r638937 | jeremias | 2008-03-19 18:08:57 +0100 (Mi, 19 Mrz 2008) | 1 line
A nit.
........
r640889 | vhennebert | 2008-03-25 17:43:55 +0100 (Di, 25 Mrz 2008) | 2 lines
Set the final release date and added a news item about the 0.95beta release (the change was made before updating the website)
........
r642906 | jeremias | 2008-03-31 09:12:40 +0200 (Mo, 31 Mrz 2008) | 3 lines
Added version number to xml-apis-ext (as suggested by Karel Vervaeke).
Moved xml-apis to same version as xml-apis-ext.
Added missing licensing info about xml-apis-ext.
........
r647403 | jeremias | 2008-04-12 11:02:01 +0200 (Sa, 12 Apr 2008) | 1 line
Fixed NullPointerException when loading a TrueType font using XML font metric files.
........
r647537 | jeremias | 2008-04-13 09:36:00 +0200 (So, 13 Apr 2008) | 1 line
Performance improvement when encoding images: Fixed an important hotspot by extending CloseBlocker from ProxyOutputStream instead of FilterOutputStream as the latter routes all write(byte[]) calls through write(int).
........
r648984 | jeremias | 2008-04-17 09:00:22 +0200 (Do, 17 Apr 2008) | 1 line
HeadURL was missing in the properties.
........
r649006 | jeremias | 2008-04-17 10:42:52 +0200 (Do, 17 Apr 2008) | 1 line
Fixed text extraction problem with ZapfDingbats and Symbol font in PDF output. These fonts are symbolic and must not use an Encoding value in PDF. Applies to the built-in base 14 variant and to the case where these fonts are explicitely embedded.
........
r649014 | jeremias | 2008-04-17 11:10:15 +0200 (Do, 17 Apr 2008) | 1 line
Added missing change information.
........
r650550 | vhennebert | 2008-04-22 17:22:31 +0200 (Di, 22 Apr 2008) | 4 lines
Bugzilla 41621:
- length of the penalty now correctly computed;
- AssertionError fixed.
........
r651302 | jeremias | 2008-04-24 18:08:53 +0200 (Do, 24 Apr 2008) | 3 lines
Fixed regression causing bad positioning of block-containers if used as descendant of a table-cell. This was not caught because of the lack of a test case that would have shown the problem in visual testing with BatchDiffer.
See also: http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200804.mbox/%3c20080424164128.973A.DEV@jeremias-maerki.ch%3e
........
r653537 | vhennebert | 2008-05-05 19:47:28 +0200 (Mo, 05 Mai 2008) | 2 lines
Bugfix: the before border of cells below a column-spanning cell had their value taken from the leading case, instead of the normal one.
........
r654453 | jeremias | 2008-05-08 11:14:04 +0200 (Do, 08 Mai 2008) | 2 lines
Added /usr/local/share/fonts as additional possible location for fonts on Unixes.
........
r656286 | jeremias | 2008-05-14 16:16:49 +0200 (Mi, 14 Mai 2008) | 1 line
Restored plug-in API compatibility with FOP 0.94. Fixes a NoSuchMethodError when Barcode4J is run.
........
r656524 | jeremias | 2008-05-15 09:07:18 +0200 (Do, 15 Mai 2008) | 1 line
Fixed rendering of fixed block-containers in AFP output. The break-out was actually never implemented which is necessary for supporting fixed positioned viewports.
........
r657520 | maxberger | 2008-05-18 11:38:45 +0200 (So, 18 Mai 2008) | 1 line
Updated as per suggestions in bug 45019
........
r661580 | maxberger | 2008-05-30 08:42:17 +0200 (Fr, 30 Mai 2008) | 1 line
added my key to KEYS, it is used for signing mvn artifacts
........
r663482 | jeremias | 2008-06-05 09:06:37 +0200 (Do, 05 Jun 2008) | 1 line
Fixed positioning of absolutely positioned block-containers in multi-column documents.
........
r664692 | jeremias | 2008-06-09 14:49:45 +0200 (Mo, 09 Jun 2008) | 1 line
Restored PSImageUtils. I had deleted it prematurely. Extensions like Barcode4J rely on this class.
........
................
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@665697 13f79535-47bb-0310-9956-ffa450edef68
16 vuotta sitten |
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511 |
- /*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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$ */
-
- package org.apache.fop.layoutmgr.table;
-
- import java.util.Iterator;
- import java.util.LinkedList;
- import java.util.List;
-
- import org.apache.commons.logging.Log;
- import org.apache.commons.logging.LogFactory;
-
- import org.apache.fop.fo.Constants;
- import org.apache.fop.fo.flow.table.EffRow;
- import org.apache.fop.fo.flow.table.GridUnit;
- import org.apache.fop.fo.flow.table.PrimaryGridUnit;
- import org.apache.fop.layoutmgr.BlockLevelLayoutManager;
- import org.apache.fop.layoutmgr.BreakElement;
- import org.apache.fop.layoutmgr.KeepUtil;
- import org.apache.fop.layoutmgr.KnuthBlockBox;
- import org.apache.fop.layoutmgr.KnuthBox;
- import org.apache.fop.layoutmgr.KnuthElement;
- import org.apache.fop.layoutmgr.KnuthGlue;
- import org.apache.fop.layoutmgr.KnuthPenalty;
- import org.apache.fop.layoutmgr.LayoutContext;
- import org.apache.fop.layoutmgr.Position;
- import org.apache.fop.util.BreakUtil;
-
- /**
- * This class processes row groups to create combined element lists for tables.
- */
- public class TableStepper {
-
- /** Logger **/
- private static Log log = LogFactory.getLog(TableStepper.class);
-
- private TableContentLayoutManager tclm;
-
- private EffRow[] rowGroup;
- /** Number of columns in the row group. */
- private int columnCount;
- private int totalHeight;
- private int previousRowsLength;
- private int activeRowIndex;
-
- private boolean rowFinished;
-
- /** Cells spanning the current row. */
- private List activeCells = new LinkedList();
-
- /** Cells that will start the next row. */
- private List nextActiveCells = new LinkedList();
-
- /**
- * True if the next row is being delayed, that is, if cells spanning the current and
- * the next row have steps smaller than the next row's first step. In this case the
- * next row may be extended to offer additional break possibilities.
- */
- private boolean delayingNextRow;
-
- /**
- * The first step for a row. This is the minimal step necessary to include some
- * content from all the cells starting the row.
- */
- private int rowFirstStep;
-
- /**
- * Flag used to produce an infinite penalty if the height of the current row is
- * smaller than the first step for that row (may happen with row-spanning cells).
- *
- * @see #considerRowLastStep(int)
- */
- private boolean rowHeightSmallerThanFirstStep;
-
- /**
- * The class of the next break. One of {@link Constants#EN_AUTO},
- * {@link Constants#EN_COLUMN}, {@link Constants#EN_PAGE},
- * {@link Constants#EN_EVEN_PAGE}, {@link Constants#EN_ODD_PAGE}. Defaults to
- * EN_AUTO.
- */
- private int nextBreakClass;
-
- /**
- * Main constructor
- * @param tclm The parent TableContentLayoutManager
- */
- public TableStepper(TableContentLayoutManager tclm) {
- this.tclm = tclm;
- this.columnCount = tclm.getTableLM().getTable().getNumberOfColumns();
- }
-
- /**
- * Initializes the fields of this instance to handle a new row group.
- *
- * @param rows the new row group to handle
- */
- private void setup(EffRow[] rows) {
- rowGroup = rows;
- previousRowsLength = 0;
- activeRowIndex = 0;
- activeCells.clear();
- nextActiveCells.clear();
- delayingNextRow = false;
- rowFirstStep = 0;
- rowHeightSmallerThanFirstStep = false;
- }
-
- private void calcTotalHeight() {
- totalHeight = 0;
- for (int i = 0; i < rowGroup.length; i++) {
- totalHeight += rowGroup[i].getHeight().opt;
- }
- if (log.isDebugEnabled()) {
- log.debug("totalHeight=" + totalHeight);
- }
- }
-
- private int getMaxRemainingHeight() {
- int maxW = 0;
- for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- int remain = activeCell.getRemainingLength();
- PrimaryGridUnit pgu = activeCell.getPrimaryGridUnit();
- for (int i = activeRowIndex + 1; i < pgu.getRowIndex() - rowGroup[0].getIndex()
- + pgu.getCell().getNumberRowsSpanned(); i++) {
- remain -= rowGroup[i].getHeight().opt;
- }
- maxW = Math.max(maxW, remain);
- }
- for (int i = activeRowIndex + 1; i < rowGroup.length; i++) {
- maxW += rowGroup[i].getHeight().opt;
- }
- return maxW;
- }
-
- /**
- * Creates ActiveCell instances for cells starting on the row at the given index.
- *
- * @param activeCellList the list that will hold the active cells
- * @param rowIndex the index of the row from which cells must be activated
- */
- private void activateCells(List activeCellList, int rowIndex) {
- EffRow row = rowGroup[rowIndex];
- for (int i = 0; i < columnCount; i++) {
- GridUnit gu = row.getGridUnit(i);
- if (!gu.isEmpty() && gu.isPrimary()) {
- activeCellList.add(new ActiveCell((PrimaryGridUnit) gu, row, rowIndex,
- previousRowsLength, getTableLM()));
- }
- }
- }
-
- /**
- * Creates the combined element list for a row group.
- * @param context Active LayoutContext
- * @param rows the row group
- * @param bodyType Indicates what type of body is processed (body, header or footer)
- * @return the combined element list
- */
- public LinkedList getCombinedKnuthElementsForRowGroup(LayoutContext context, EffRow[] rows,
- int bodyType) {
- setup(rows);
- activateCells(activeCells, 0);
- calcTotalHeight();
-
- int cumulateLength = 0; // Length of the content accumulated before the break
- TableContentPosition lastTCPos = null;
- LinkedList returnList = new LinkedList();
- int laststep = 0;
- int step = getFirstStep();
- do {
- int maxRemainingHeight = getMaxRemainingHeight();
- int penaltyOrGlueLen = step + maxRemainingHeight - totalHeight;
- int boxLen = step - cumulateLength - Math.max(0, penaltyOrGlueLen)/* penalty, if any */;
- cumulateLength += boxLen + Math.max(0, -penaltyOrGlueLen)/* the glue, if any */;
-
- if (log.isDebugEnabled()) {
- log.debug("Next step: " + step + " (+" + (step - laststep) + ")");
- log.debug(" max remaining height: " + maxRemainingHeight);
- if (penaltyOrGlueLen >= 0) {
- log.debug(" box = " + boxLen + " penalty = " + penaltyOrGlueLen);
- } else {
- log.debug(" box = " + boxLen + " glue = " + (-penaltyOrGlueLen));
- }
- }
-
- LinkedList footnoteList = new LinkedList();
- //Put all involved grid units into a list
- List cellParts = new java.util.ArrayList(columnCount);
- for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- CellPart part = activeCell.createCellPart();
- cellParts.add(part);
- activeCell.addFootnotes(footnoteList);
- }
-
- //Create elements for step
- TableContentPosition tcpos = new TableContentPosition(getTableLM(),
- cellParts, rowGroup[activeRowIndex]);
- if (delayingNextRow) {
- tcpos.setNewPageRow(rowGroup[activeRowIndex + 1]);
- }
- if (returnList.size() == 0) {
- tcpos.setFlag(TableContentPosition.FIRST_IN_ROWGROUP, true);
- }
- lastTCPos = tcpos;
-
- // TODO TableStepper should remain as footnote-agnostic as possible
- if (footnoteList.isEmpty()) {
- returnList.add(new KnuthBox(boxLen, tcpos, false));
- } else {
- returnList.add(new KnuthBlockBox(boxLen, footnoteList, tcpos, false));
- }
-
- int effPenaltyLen = Math.max(0, penaltyOrGlueLen);
- TableHFPenaltyPosition penaltyPos = new TableHFPenaltyPosition(getTableLM());
- if (bodyType == TableRowIterator.BODY) {
- if (!getTableLM().getTable().omitHeaderAtBreak()) {
- effPenaltyLen += tclm.getHeaderNetHeight();
- penaltyPos.headerElements = tclm.getHeaderElements();
- }
- if (!getTableLM().getTable().omitFooterAtBreak()) {
- effPenaltyLen += tclm.getFooterNetHeight();
- penaltyPos.footerElements = tclm.getFooterElements();
- }
- }
-
- int strength = BlockLevelLayoutManager.KEEP_AUTO;
- int stepPenalty = 0;
- for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- strength = Math.max(strength, activeCell.getKeepWithNextStrength());
- stepPenalty = Math.max(stepPenalty, activeCell.getPenaltyValue());
- }
- if (!rowFinished) {
- strength = Math.max(strength, rowGroup[activeRowIndex].getKeepTogetherStrength());
- //The above call doesn't take the penalty from the table into account, so...
- strength = Math.max(strength, getTableLM().getKeepTogetherStrength());
- } else if (activeRowIndex < rowGroup.length - 1) {
- strength = Math.max(strength,
- rowGroup[activeRowIndex].getKeepWithNextStrength());
- strength = Math.max(strength,
- rowGroup[activeRowIndex + 1].getKeepWithPreviousStrength());
- nextBreakClass = BreakUtil.compareBreakClasses(nextBreakClass,
- rowGroup[activeRowIndex].getBreakAfter());
- nextBreakClass = BreakUtil.compareBreakClasses(nextBreakClass,
- rowGroup[activeRowIndex + 1].getBreakBefore());
- }
- int p = KeepUtil.getPenaltyForKeep(strength);
- if (rowHeightSmallerThanFirstStep) {
- rowHeightSmallerThanFirstStep = false;
- p = KnuthPenalty.INFINITE;
- }
- if (p > -KnuthElement.INFINITE) {
- p = Math.max(p, stepPenalty);
- }
- if (nextBreakClass != Constants.EN_AUTO) {
- log.trace("Forced break encountered");
- p = -KnuthPenalty.INFINITE; //Overrides any keeps (see 4.8 in XSL 1.0)
- }
- returnList.add(new BreakElement(penaltyPos, effPenaltyLen, p, nextBreakClass, context));
- if (penaltyOrGlueLen < 0) {
- returnList.add(new KnuthGlue(-penaltyOrGlueLen, 0, 0, new Position(null), true));
- }
-
- laststep = step;
- step = getNextStep();
- } while (step >= 0);
- assert !returnList.isEmpty();
- lastTCPos.setFlag(TableContentPosition.LAST_IN_ROWGROUP, true);
- return returnList;
- }
-
- /**
- * Returns the first step for the current row group.
- *
- * @return the first step for the current row group
- */
- private int getFirstStep() {
- computeRowFirstStep(activeCells);
- signalRowFirstStep();
- int minStep = considerRowLastStep(rowFirstStep);
- signalNextStep(minStep);
- return minStep;
- }
-
- /**
- * Returns the next break possibility.
- *
- * @return the next step
- */
- private int getNextStep() {
- if (rowFinished) {
- if (activeRowIndex == rowGroup.length - 1) {
- // The row group is finished, no next step
- return -1;
- }
- rowFinished = false;
- removeCellsEndingOnCurrentRow();
- log.trace("Delaying next row");
- delayingNextRow = true;
- }
- if (delayingNextRow) {
- int minStep = computeMinStep();
- if (minStep < 0 || minStep >= rowFirstStep
- || minStep > rowGroup[activeRowIndex].getExplicitHeight().max) {
- if (log.isTraceEnabled()) {
- log.trace("Step = " + minStep);
- }
- delayingNextRow = false;
- minStep = rowFirstStep;
- switchToNextRow();
- signalRowFirstStep();
- minStep = considerRowLastStep(minStep);
- }
- signalNextStep(minStep);
- return minStep;
- } else {
- int minStep = computeMinStep();
- minStep = considerRowLastStep(minStep);
- signalNextStep(minStep);
- return minStep;
- }
- }
-
- /**
- * Computes the minimal necessary step to make the next row fit. That is, so such as
- * cell on the next row can contribute some content.
- *
- * @param cells the cells occupying the next row (may include cells starting on
- * previous rows and spanning over this one)
- */
- private void computeRowFirstStep(List cells) {
- for (Iterator iter = cells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- rowFirstStep = Math.max(rowFirstStep, activeCell.getFirstStep());
- }
- }
-
- /**
- * Computes the next minimal step.
- *
- * @return the minimal step from the active cells, < 0 if there is no such step
- */
- private int computeMinStep() {
- int minStep = Integer.MAX_VALUE;
- boolean stepFound = false;
- for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- int nextStep = activeCell.getNextStep();
- if (nextStep >= 0) {
- stepFound = true;
- minStep = Math.min(minStep, nextStep);
- }
- }
- if (stepFound) {
- return minStep;
- } else {
- return -1;
- }
- }
-
- /**
- * Signals the first step to the active cells, to allow them to add more content to
- * the step if possible.
- *
- * @see ActiveCell#signalRowFirstStep(int)
- */
- private void signalRowFirstStep() {
- for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- activeCell.signalRowFirstStep(rowFirstStep);
- }
- }
-
- /**
- * Signals the next selected step to the active cells.
- *
- * @param step the next step
- */
- private void signalNextStep(int step) {
- nextBreakClass = Constants.EN_AUTO;
- for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- nextBreakClass = BreakUtil.compareBreakClasses(nextBreakClass,
- activeCell.signalNextStep(step));
- }
- }
-
- /**
- * Determines if the given step will finish the current row, and if so switch to the
- * last step for this row.
- * <p>If the row is finished then the after borders for the cell may change (their
- * conditionalities no longer apply for the cells ending on the current row). Thus the
- * final step may grow with respect to the given one.</p>
- * <p>In more rare occasions, the given step may correspond to the first step of a
- * row-spanning cell, and may be greater than the height of the current row (consider,
- * for example, an unbreakable cell spanning three rows). In such a case the returned
- * step will correspond to the row height and a flag will be set to produce an
- * infinite penalty for this step. This will prevent the breaking algorithm from
- * choosing this break, but still allow to create the appropriate TableContentPosition
- * for the cells ending on the current row.</p>
- *
- * @param step the next step
- * @return the updated step if any
- */
- private int considerRowLastStep(int step) {
- rowFinished = true;
- for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- if (activeCell.endsOnRow(activeRowIndex)) {
- rowFinished &= activeCell.finishes(step);
- }
- }
- if (rowFinished) {
- if (log.isTraceEnabled()) {
- log.trace("Step = " + step);
- log.trace("Row finished, computing last step");
- }
- int maxStep = 0;
- for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- if (activeCell.endsOnRow(activeRowIndex)) {
- maxStep = Math.max(maxStep, activeCell.getLastStep());
- }
- }
- if (log.isTraceEnabled()) {
- log.trace("Max step: " + maxStep);
- }
- for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- activeCell.endRow(activeRowIndex);
- if (!activeCell.endsOnRow(activeRowIndex)) {
- activeCell.signalRowLastStep(maxStep);
- }
- }
- if (maxStep < step) {
- log.trace("Row height smaller than first step, produced penalty will be infinite");
- rowHeightSmallerThanFirstStep = true;
- }
- step = maxStep;
- prepareNextRow();
- }
- return step;
- }
-
- /**
- * Pre-activates the cells that will start the next row, and computes the first step
- * for that row.
- */
- private void prepareNextRow() {
- if (activeRowIndex < rowGroup.length - 1) {
- previousRowsLength += rowGroup[activeRowIndex].getHeight().opt;
- activateCells(nextActiveCells, activeRowIndex + 1);
- if (log.isTraceEnabled()) {
- log.trace("Computing first step for row " + (activeRowIndex + 2));
- }
- computeRowFirstStep(nextActiveCells);
- if (log.isTraceEnabled()) {
- log.trace("Next first step = " + rowFirstStep);
- }
- }
- }
-
- private void removeCellsEndingOnCurrentRow() {
- for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- if (activeCell.endsOnRow(activeRowIndex)) {
- iter.remove();
- }
- }
- }
-
- /**
- * Actually switches to the next row, increasing activeRowIndex and transferring to
- * activeCells the cells starting on the next row.
- */
- private void switchToNextRow() {
- activeRowIndex++;
- if (log.isTraceEnabled()) {
- log.trace("Switching to row " + (activeRowIndex + 1));
- }
- for (Iterator iter = activeCells.iterator(); iter.hasNext();) {
- ActiveCell activeCell = (ActiveCell) iter.next();
- activeCell.nextRowStarts();
- }
- activeCells.addAll(nextActiveCells);
- nextActiveCells.clear();
- }
-
- /** @return the table layout manager */
- private TableLayoutManager getTableLM() {
- return this.tclm.getTableLM();
- }
- }
|