Browse Source

PR:

Obtained from:
Submitted by:
Reviewed by:
1.) EnumProperty starting-state implemented.
2.) Switch from "makeEnumProperty" to slightly more intuitive "getEnumProperty" in FOPropertyMapping.
3.) Removed no longer used canHaveIds array in PropertySets.


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198250 13f79535-47bb-0310-9956-ffa450edef68
tags/Root_Temp_KnuthStylePageBreaking
Glen Mazza 19 years ago
parent
commit
972239f1c4

+ 1
- 2
src/java/org/apache/fop/fo/Constants.java View File

@@ -1,5 +1,5 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
* Copyright 1999-2005 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.
@@ -125,7 +125,6 @@ public interface Constants {
int COMPOUND_COUNT = 11;
// property constants

int PR_ABSOLUTE_POSITION = 1;
int PR_ACTIVE_STATE = 2;
int PR_ALIGNMENT_ADJUST = 3;

+ 316
- 314
src/java/org/apache/fop/fo/FOPropertyMapping.java
File diff suppressed because it is too large
View File


+ 1
- 49
src/java/org/apache/fop/fo/PropertySets.java View File

@@ -1,5 +1,5 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
* Copyright 1999-2005 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.
@@ -26,7 +26,6 @@ import java.util.ArrayList;
public class PropertySets {
private static short[][] mapping = null;
private static BitSet can_have_markers = null;
private static BitSet can_have_id = null;
private static BitSet no_inline_areas = null;

private Element[] elements = new Element[Constants.FRM_OBJ_COUNT+1];
@@ -1054,53 +1053,6 @@ public class PropertySets {
}
return can_have_markers.get(elementId);
}
/**
* Determines if the XSL "id" property is applicable for this FO
* @param elementId Constants enumeration ID of the FO (e.g., FO_ROOT)
* @return true if id property is applicable, false otherwise
* @todo see if we can stop merging properties applicable for the children
* of an FO into the FO in the mapping[] array above. If so, we can
* rely on getPropertySet() instead of this method.
*/
public static boolean canHaveId(int elementId) {
if (can_have_id == null) {
can_have_id = new BitSet();
can_have_id.set(Constants.FO_BASIC_LINK);
can_have_id.set(Constants.FO_BIDI_OVERRIDE);
can_have_id.set(Constants.FO_BLOCK);
can_have_id.set(Constants.FO_BLOCK_CONTAINER);
can_have_id.set(Constants.FO_CHARACTER);
can_have_id.set(Constants.FO_EXTERNAL_GRAPHIC);
can_have_id.set(Constants.FO_INITIAL_PROPERTY_SET);
can_have_id.set(Constants.FO_INLINE);
can_have_id.set(Constants.FO_INLINE_CONTAINER);
can_have_id.set(Constants.FO_INSTREAM_FOREIGN_OBJECT);
can_have_id.set(Constants.FO_LEADER);
can_have_id.set(Constants.FO_LIST_BLOCK);
can_have_id.set(Constants.FO_LIST_ITEM);
can_have_id.set(Constants.FO_LIST_ITEM_BODY);
can_have_id.set(Constants.FO_LIST_ITEM_LABEL);
can_have_id.set(Constants.FO_MULTI_CASE);
can_have_id.set(Constants.FO_MULTI_PROPERTIES);
can_have_id.set(Constants.FO_MULTI_PROPERTY_SET);
can_have_id.set(Constants.FO_MULTI_SWITCH);
can_have_id.set(Constants.FO_MULTI_TOGGLE);
can_have_id.set(Constants.FO_PAGE_NUMBER);
can_have_id.set(Constants.FO_PAGE_NUMBER_CITATION);
can_have_id.set(Constants.FO_PAGE_SEQUENCE);
can_have_id.set(Constants.FO_TABLE_AND_CAPTION);
can_have_id.set(Constants.FO_TABLE);
can_have_id.set(Constants.FO_TABLE_BODY);
can_have_id.set(Constants.FO_TABLE_CAPTION);
can_have_id.set(Constants.FO_TABLE_CELL);
can_have_id.set(Constants.FO_TABLE_FOOTER);
can_have_id.set(Constants.FO_TABLE_HEADER);
can_have_id.set(Constants.FO_TABLE_ROW);
can_have_id.set(Constants.FO_WRAPPER);
}
return can_have_id.get(elementId);
}

/**
* Determines if the FO generates inline areas. Used only within flow.Block

+ 10
- 3
src/java/org/apache/fop/fo/flow/MultiCase.java View File

@@ -1,5 +1,5 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
* Copyright 1999-2005 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.
@@ -32,7 +32,7 @@ public class MultiCase extends FObj {
// The value of properties relevant for fo:multi-case.
private CommonAccessibility commonAccessibility;
private String id;
// private ToBeImplementedProperty startingState;
private int startingState;
// private ToBeImplementedProperty caseName;
// private ToBeImplementedProperty caseTitle;
// End of property values
@@ -57,7 +57,7 @@ public class MultiCase extends FObj {
public void bind(PropertyList pList) throws FOPException {
commonAccessibility = pList.getAccessibilityProps();
id = pList.get(PR_ID).getString();
// startingState = pList.get(PR_STARTING_STATE);
startingState = pList.get(PR_STARTING_STATE).getEnum();
// caseName = pList.get(PR_CASE_NAME);
// caseTitle = pList.get(PR_CASE_TITLE);
}
@@ -69,6 +69,13 @@ public class MultiCase extends FObj {
checkId(id);
}

/**
* Return the "starting-state" property.
*/
public int getStartingState() {
return startingState;
}

/**
* @see org.apache.fop.fo.FObj#getName()
*/

+ 6
- 2
src/java/org/apache/fop/fo/pagination/bookmarks/Bookmark.java View File

@@ -1,5 +1,5 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
* Copyright 1999-2005 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.
@@ -42,7 +42,7 @@ public class Bookmark extends FObj {
private CommonAccessibility commonAccessibility;
private String internalDestination;
private String externalDestination;
// private ToBeImplementedProperty startingState;
private int startingState;

/**
* Create a new bookmark object.
@@ -130,6 +130,10 @@ public class Bookmark extends FObj {
return externalDestination;
}

public int getStartingState() {
return startingState;
}

public ArrayList getChildBookmarks() {
return childBookmarks;
}

+ 1
- 1
src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTitle.java View File

@@ -1,5 +1,5 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
* Copyright 1999-2005 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.

+ 1
- 1
src/java/org/apache/fop/fo/pagination/bookmarks/BookmarkTree.java View File

@@ -1,5 +1,5 @@
/*
* Copyright 1999-2004 The Apache Software Foundation.
* Copyright 1999-2005 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.

Loading…
Cancel
Save