.append("\n");
buffer.append(" .Status bar text (Unicode string without length field) = ").append( field_17_status_bar_text )
.append("\n");
- buffer.append(org.apache.poi.util.HexDump.dump(this.field_13_raw_name_definition,0,0));
+ if (field_13_raw_name_definition != null)
+ buffer.append(org.apache.poi.util.HexDump.dump(this.field_13_raw_name_definition,0,0));
buffer.append("[/NAME]\n");
return buffer.toString();
}
if ( nameRecord == null )
{
- nameRecord = workbook.createBuiltInName(NameRecord.BUILTIN_PRINT_TITLE, externSheetIndex+1);
+ nameRecord = workbook.createBuiltInName(NameRecord.BUILTIN_PRINT_TITLE, sheetIndex+1);
//does a lot of the house keeping for builtin records, like setting lengths to zero etc
isNewRecord = true;
}
package org.apache.poi.hssf.usermodel;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
+import java.io.*;
import junit.framework.TestCase;
assertEquals("Re-Written Formula String Cell value", d1.getStringCellValue(), rd2.getStringCellValue());
}
+
}
--- /dev/null
+package org.apache.poi.hssf.usermodel;
+
+import junit.framework.*;
+import org.apache.poi.hssf.record.NameRecord;
+
+public class TestHSSFWorkbook extends TestCase
+{
+ HSSFWorkbook hssfWorkbook;
+
+ public void testSetRepeatingRowsAndColumns() throws Exception
+ {
+ // Test bug 29747
+ HSSFWorkbook b = new HSSFWorkbook( );
+ b.createSheet();
+ b.createSheet();
+ b.createSheet();
+ b.setRepeatingRowsAndColumns( 2, 0,1,-1,-1 );
+ NameRecord nameRecord = b.getWorkbook().getNameRecord( 0 );
+ assertEquals( 3, nameRecord.getIndexToSheet() );
+ }
+}
\ No newline at end of file