//fcMin = _fib.getFcMin()
// Start to load up our standard structures.
_dop = new DocumentProperties(_tableStream, _fib.getFcDop(), _fib.getLcbDop() );
_cft = new ComplexFileTable(_mainStream, _tableStream, _fib.getFcClx(), fcMin);
TextPieceTable _tpt = _cft.getTextPieceTable();
// Now load the rest of the properties, which need to be adjusted
// for where text really begin
_cbt = new CHPBinTable(_mainStream, _tableStream, _fib.getFcPlcfbteChpx(), _fib.getLcbPlcfbteChpx(), _tpt);
_pbt = new PAPBinTable(_mainStream, _tableStream, _dataStream, _fib.getFcPlcfbtePapx(), _fib.getLcbPlcfbtePapx(), _tpt);
_text = _tpt.getText();
/*
* in this mode we preserving PAPX/CHPX structure from file, so text may
* miss from output, and text order may be corrupted
*/
boolean preserveBinTables = false;
try
{
preserveBinTables = Boolean.parseBoolean( System
.getProperty( PROPERTY_PRESERVE_BIN_TABLES ) );
}
catch ( Exception exc )
{
// ignore;
}
if ( !preserveBinTables )
{
_cbt.rebuild( _cft );
_pbt.rebuild( _text, _cft );
}
/*
* Property to disable text rebuilding. In this mode changing the text
* will lead to unpredictable behavior
*/
boolean preserveTextTable = false;
try
{
preserveTextTable = Boolean.parseBoolean( System
.getProperty( PROPERTY_PRESERVE_TEXT_TABLE ) );
}
catch ( Exception exc )
{
// ignore;
}
if ( !preserveTextTable )
{
_cft = new ComplexFileTable();
_tpt = _cft.getTextPieceTable();
final TextPiece textPiece = new SinglentonTextPiece( _text );
_tpt.add( textPiece );
_text = textPiece.getStringBuilder();
}
// Read FSPA and Escher information
// _fspa = new FSPATable(_tableStream, _fib.getFcPlcspaMom(),