250251252253254255256257258259260
r = docUnicode.getRange(); assertEquals( u_page_1 + page_break + "\r" + u_page_2, r.text() ); r = docUnicode.getHeaderStoryRange(); assertEquals( headerDef +
260261262263264265266267268269270
headerDef + u_header + footerDef + u_footer + endHeaderFooter, r.text() ); r = docUnicode.getOverallRange(); assertEquals( u_page_1 +
274275276277278279280281282
u_header + footerDef + u_footer + endHeaderFooter + "\r", r.text() ); } }
597598599600601602603604605606607
try { HWPFDocument doc = new HWPFDocument(new FileInputStream(args[0])); Range r = doc.getRange(); String str = r.text(); int x = 0; // CharacterRun run = new CharacterRun(); // run.setBold(true); // run.setItalic(true); // run.setCapitalized(true);
150151152153154155156157158159160
r = docAscii.getRange(); assertEquals( a_page_1 + page_break + "\r" + a_page_2, r.text() ); r = docAscii.getHeaderStoryRange(); assertEquals( headerDef +
160161162163164165166167168169170
headerDef + a_header + footerDef + a_footer + endHeaderFooter, r.text() ); r = docAscii.getOverallRange(); assertEquals( a_page_1 +
174175176177178179180181182183184
a_header + footerDef + a_footer + endHeaderFooter + "\r", r.text() ); } public void testBasicsUnicode() throws Exception { // First check the start and end bits
221222223224225226227228229230231
231232233234235236237238239240241
245246247248249250251252253