aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/rtf/PageAttributesConverter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/render/rtf/PageAttributesConverter.java')
-rw-r--r--src/java/org/apache/fop/render/rtf/PageAttributesConverter.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/render/rtf/PageAttributesConverter.java b/src/java/org/apache/fop/render/rtf/PageAttributesConverter.java
index 50355e145..c7f97ef4f 100644
--- a/src/java/org/apache/fop/render/rtf/PageAttributesConverter.java
+++ b/src/java/org/apache/fop/render/rtf/PageAttributesConverter.java
@@ -5,9 +5,9 @@
* 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.
@@ -46,19 +46,19 @@ final class PageAttributesConverter {
*/
private PageAttributesConverter() {
}
-
+
/** convert xsl:fo attributes to RTF text attributes */
static RtfAttributes convertPageAttributes(SimplePageMaster pagemaster) {
FOPRtfAttributes attrib = new FOPRtfAttributes();
-
+
try {
RegionBA before = (RegionBA) pagemaster.getRegion(Constants.FO_REGION_BEFORE);
RegionBody body = (RegionBody) pagemaster.getRegion(Constants.FO_REGION_BODY);
RegionBA after = (RegionBA) pagemaster.getRegion(Constants.FO_REGION_AFTER);
-
+
attrib.setTwips(RtfPage.PAGE_WIDTH, pagemaster.getPageWidth());
attrib.setTwips(RtfPage.PAGE_HEIGHT, pagemaster.getPageHeight());
-
+
Object widthRaw = attrib.getValue(RtfPage.PAGE_WIDTH);
Object heightRaw = attrib.getValue(RtfPage.PAGE_HEIGHT);
if ((widthRaw instanceof Integer) && (heightRaw instanceof Integer)
@@ -84,7 +84,7 @@ final class PageAttributesConverter {
bodyLeft = (Length) NumericOp.addition(pageLeft, bodyMargin.marginLeft);
bodyRight = (Length) NumericOp.addition(pageRight, bodyMargin.marginRight);
}
-
+
attrib.setTwips(RtfPage.MARGIN_TOP, bodyTop);
attrib.setTwips(RtfPage.MARGIN_BOTTOM, bodyBottom);
attrib.setTwips(RtfPage.MARGIN_LEFT, bodyLeft);
@@ -104,7 +104,7 @@ final class PageAttributesConverter {
}
attrib.setTwips(RtfPage.FOOTERY, beforeTop);
} catch (Exception e) {
- log.error("Exception in convertPageAttributes: "
+ log.error("Exception in convertPageAttributes: "
+ e.getMessage() + "- page attributes ignored");
attrib = new FOPRtfAttributes();
}