aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/wp
diff options
context:
space:
mode:
authorMark Murphy <jmarkmurphy@apache.org>2016-10-13 01:13:45 +0000
committerMark Murphy <jmarkmurphy@apache.org>2016-10-13 01:13:45 +0000
commit37f1598ac2989fef0be17d65a7e0407802380f7a (patch)
tree2bd39a6657527ab971a8ec13273f862c3d00b603 /src/java/org/apache/poi/wp
parent740932ee85c1d465933ebfd306bcc4bc5795f070 (diff)
downloadpoi-37f1598ac2989fef0be17d65a7e0407802380f7a.tar.gz
poi-37f1598ac2989fef0be17d65a7e0407802380f7a.zip
53009: Problem creating header and footer
Task-Url: https://bz.apache.org/bugzilla/show_bug.cgi?id=53009 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1764563 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/wp')
-rw-r--r--src/java/org/apache/poi/wp/usermodel/HeaderFooterType.java62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/java/org/apache/poi/wp/usermodel/HeaderFooterType.java b/src/java/org/apache/poi/wp/usermodel/HeaderFooterType.java
new file mode 100644
index 0000000000..bca6b6658d
--- /dev/null
+++ b/src/java/org/apache/poi/wp/usermodel/HeaderFooterType.java
@@ -0,0 +1,62 @@
+/* ====================================================================
+ 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.
+==================================================================== */
+
+package org.apache.poi.wp.usermodel;
+
+/**
+ * @since POI v3.16 beta 1
+ */
+public enum HeaderFooterType {
+
+ /**
+ * This is the default header or Footer, It is displayed on every page where
+ * a more specific header or footer is not specified. It is always displayed
+ * on ODD pages that are not the first page of the section.
+ */
+ DEFAULT(2),
+
+ /**
+ * This is an even page header or footer, it is displayed on even pages that
+ * are not the first page of the section.
+ */
+ EVEN(1),
+
+ /**
+ * This is a first page header or footer It is displayed on the first page
+ * of the section.
+ */
+ FIRST(3);
+
+ private final int code;
+
+ private HeaderFooterType(int i) {
+ code = i;
+ }
+
+ public int toInt() {
+ return code;
+ }
+
+ public static HeaderFooterType forInt(int i) {
+ for (HeaderFooterType type : values()) {
+ if (type.code == i) {
+ return type;
+ }
+ }
+ throw new IllegalArgumentException("Invalid HeaderFooterType code: " + i);
+ }
+}