diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2015-09-07 22:34:21 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2015-09-07 22:34:21 +0000 |
commit | e84b4d041c63936ab584bc3ca075e24035591f88 (patch) | |
tree | 28497ad2b15fd3a5f2d9fc89ec0ef88f18a952a6 /src/ooxml | |
parent | a3d2eb57ff4ac10ae215b9b7404260103eb6f538 (diff) | |
download | poi-e84b4d041c63936ab584bc3ca075e24035591f88.tar.gz poi-e84b4d041c63936ab584bc3ca075e24035591f88.zip |
forbidden apis fixes
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1701710 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml')
-rw-r--r-- | src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java index 0cbe5bacf6..a75fc84857 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/TOC.java @@ -19,6 +19,7 @@ package org.apache.poi.xwpf.usermodel; import java.math.BigInteger; import org.apache.poi.util.Internal; +import org.apache.poi.util.LocaleUtil; import org.apache.xmlbeans.impl.xb.xmlschema.SpaceAttribute.Space; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTDecimalNumber; import org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFonts; @@ -67,8 +68,8 @@ public class TOC { rPr.addNewSzCs().setVal(new BigInteger("24"));
CTSdtContentBlock content = block.addNewSdtContent();
CTP p = content.addNewP();
- p.setRsidR("00EF7E24".getBytes());
- p.setRsidRDefault("00EF7E24".getBytes());
+ p.setRsidR("00EF7E24".getBytes(LocaleUtil.CHARSET_1252));
+ p.setRsidRDefault("00EF7E24".getBytes(LocaleUtil.CHARSET_1252));
p.addNewPPr().addNewPStyle().setVal("TOCHeading");
p.addNewR().addNewT().setStringValue("Table of Contents");
}
@@ -81,8 +82,8 @@ public class TOC { public void addRow(int level, String title, int page, String bookmarkRef) {
CTSdtContentBlock contentBlock = this.block.getSdtContent();
CTP p = contentBlock.addNewP();
- p.setRsidR("00EF7E24".getBytes());
- p.setRsidRDefault("00EF7E24".getBytes());
+ p.setRsidR("00EF7E24".getBytes(LocaleUtil.CHARSET_1252));
+ p.setRsidRDefault("00EF7E24".getBytes(LocaleUtil.CHARSET_1252));
CTPPr pPr = p.addNewPPr();
pPr.addNewPStyle().setVal("TOC" + level);
CTTabs tabs = pPr.addNewTabs();
|