Revision: 7293
Author: victormote
Date: 2006-05-27 09:54:33 -0700 (Sat, 27 May 2006)
ViewCVS: http://svn.sourceforge.net/foray/?rev=7293&view=rev
Log Message:
-----------
Don't remove empty blocks if they are empty on purpose.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
Modified: trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java
===================================================================
--- trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-05-26 22:46:24 UTC (rev 7292)
+++ trunk/foray/foray-areatree/src/java/org/foray/area/PageRA.java 2006-05-27 16:54:33 UTC (rev 7293)
@@ -313,11 +313,20 @@
purgeEmptyNodes((Area) object);
}
}
- if (area instanceof LineArea && ! area.hasChildren()) {
+
+ /* Remove empty line areas. */
+ if (area instanceof LineArea
+ && ! area.hasChildren()) {
area.remove();
getLogger().debug("Removing empty line-area.");
}
- if (area instanceof NormalBlockArea && ! area.hasChildren()) {
+
+ /* Remove empty block areas only if they are generated by FONodes that
+ * actually have children. If the FONode has no children, then an empty
+ * area is needed in the area tree. */
+ if (area instanceof NormalBlockArea
+ && ! area.hasChildren()
+ && area.generatedBy.getFONode().hasChildren()) {
area.remove();
getLogger().debug("Removing empty normal block-area.");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|