Kaydet (Commit) 26398f9d authored tarafından Julien Nabet's avatar Julien Nabet

cleaning in oox part

üst 238ad07d
...@@ -227,9 +227,6 @@ public: ...@@ -227,9 +227,6 @@ public:
/** Closes the input stream but not the wrapped stream. */ /** Closes the input stream but not the wrapped stream. */
virtual void close(); virtual void close();
/** Returns the absolute position in the wrapped binary stream. */
sal_Int64 tellBase() const;
// BinaryInputStream interface (stream read access) ----------------------- // BinaryInputStream interface (stream read access) -----------------------
/** Reads nBytes bytes to the passed sequence. /** Reads nBytes bytes to the passed sequence.
......
...@@ -205,18 +205,6 @@ protected: ...@@ -205,18 +205,6 @@ protected:
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
/** Fragment handler derived from the WorksheetHelper helper class.
Used to import sheet fragments.
*/
class BiffWorksheetFragmentBase : public BiffFragmentHandler, public WorksheetHelper
{
protected:
explicit BiffWorksheetFragmentBase(
const WorksheetHelper& rHelper,
const BiffWorkbookFragmentBase& rParent );
};
} // namespace xls } // namespace xls
} // namespace oox } // namespace oox
......
...@@ -95,21 +95,6 @@ private: ...@@ -95,21 +95,6 @@ private:
PivotTable& mrPivotTable; PivotTable& mrPivotTable;
}; };
// ============================================================================
// ============================================================================
class BiffPivotTableContext : public BiffWorksheetContextBase
{
public:
explicit BiffPivotTableContext( const WorksheetHelper& rHelper );
/** Imports all records related to the current pivot table. */
virtual void importRecord( BiffInputStream& rStrm );
private:
PivotTable& mrPivotTable;
};
// ============================================================================ // ============================================================================
} // namespace xls } // namespace xls
......
...@@ -57,20 +57,6 @@ private: ...@@ -57,20 +57,6 @@ private:
// ============================================================================ // ============================================================================
class BiffQueryTableContext : public BiffWorksheetContextBase
{
public:
explicit BiffQueryTableContext( const WorksheetHelper& rHelper );
/** Imports all records related to the current query table. */
virtual void importRecord( BiffInputStream& rStrm );
private:
QueryTable& mrQueryTable;
};
// ============================================================================
} // namespace xls } // namespace xls
} // namespace oox } // namespace oox
......
...@@ -130,63 +130,6 @@ private: ...@@ -130,63 +130,6 @@ private:
// ============================================================================ // ============================================================================
/** This class implements importing row settings and all cells of a sheet.
*/
class BiffSheetDataContext : public BiffWorksheetContextBase, private SheetDataContextBase
{
public:
explicit BiffSheetDataContext( const WorksheetHelper& rHelper );
/** Tries to import a sheet data record. */
virtual void importRecord( BiffInputStream& rStrm );
private:
/** Imports row settings from a ROW record. */
void importRow( BiffInputStream& rStrm );
/** Reads an XF identifier and initializes a new cell. */
bool readCellXfId( BiffInputStream& rStrm, const BinAddress& rAddr, bool bBiff2 );
/** Reads a BIFF cell address and the following XF identifier. */
bool readCellHeader( BiffInputStream& rStrm, bool bBiff2 );
/** Reads the formula range used by shared formulas, arrays, and data tables. */
bool readFormulaRef( BiffInputStream& rStrm );
/** Imports a BLANK record describing a blank but formatted cell. */
void importBlank( BiffInputStream& rStrm );
/** Imports a BOOLERR record describing a boolean or error code cell. */
void importBoolErr( BiffInputStream& rStrm );
/** Imports a FORMULA record describing a formula cell. */
void importFormula( BiffInputStream& rStrm );
/** Imports an INTEGER record describing a BIFF2 integer cell. */
void importInteger( BiffInputStream& rStrm );
/** Imports a LABEL record describing an unformatted string cell. */
void importLabel( BiffInputStream& rStrm );
/** Imports a LABELSST record describing a string cell using the shared string list. */
void importLabelSst( BiffInputStream& rStrm );
/** Imports a MULTBLANK record describing a range of blank but formatted cells. */
void importMultBlank( BiffInputStream& rStrm );
/** Imports a MULTRK record describing a range of numeric cells. */
void importMultRk( BiffInputStream& rStrm );
/** Imports a NUMBER record describing a floating-point cell. */
void importNumber( BiffInputStream& rStrm );
/** Imports an RK record describing a numeric cell. */
void importRk( BiffInputStream& rStrm );
/** Imports an ARRAY record describing an array formula of a cell range. */
void importArray( BiffInputStream& rStrm );
/** Imports table operation from a DATATABLE or DATATABLE2 record. */
void importDataTable( BiffInputStream& rStrm );
/** Imports a SHAREDFMLA record describing a shared formula in a cell range. */
void importSharedFmla( BiffInputStream& rStrm );
private:
sal_uInt32 mnFormulaSkipSize; /// Number of bytes to be ignored in FORMULA record.
sal_uInt32 mnArraySkipSize; /// Number of bytes to be ignored in ARRAY record.
sal_uInt16 mnBiff2XfId; /// Current XF identifier from IXFE record.
OptValue< bool > mobBiff2HasXfs; /// Select XF formatting or direct formatting in BIFF2.
};
// ============================================================================
} // namespace xls } // namespace xls
} // namespace oox } // namespace oox
......
...@@ -280,8 +280,6 @@ public: ...@@ -280,8 +280,6 @@ public:
/** Returns the text encoding used to import/export byte strings. */ /** Returns the text encoding used to import/export byte strings. */
rtl_TextEncoding getTextEncoding() const; rtl_TextEncoding getTextEncoding() const;
/** Sets text encoding from the default application font, if CODEPAGE record is missing. */
void setAppFontEncoding( rtl_TextEncoding eAppFontEnc );
/** Returns the codec helper that stores the encoder/decoder object. */ /** Returns the codec helper that stores the encoder/decoder object. */
BiffCodecHelper& getCodecHelper() const; BiffCodecHelper& getCodecHelper() const;
......
...@@ -275,11 +275,6 @@ void BiffInputStream::close() ...@@ -275,11 +275,6 @@ void BiffInputStream::close()
{ {
} }
sal_Int64 BiffInputStream::tellBase() const
{
return maRecBuffer.getBaseStream().tell();
}
// BinaryInputStream interface (stream read access) --------------------------- // BinaryInputStream interface (stream read access) ---------------------------
sal_Int32 BiffInputStream::readData( StreamDataSequence& orData, sal_Int32 nBytes, size_t nAtomSize ) sal_Int32 BiffInputStream::readData( StreamDataSequence& orData, sal_Int32 nBytes, size_t nAtomSize )
......
...@@ -127,12 +127,6 @@ BiffWorkbookFragmentBase::BiffWorkbookFragmentBase( const WorkbookHelper& rHelpe ...@@ -127,12 +127,6 @@ BiffWorkbookFragmentBase::BiffWorkbookFragmentBase( const WorkbookHelper& rHelpe
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
BiffWorksheetFragmentBase::BiffWorksheetFragmentBase( const WorksheetHelper& rHelper, const BiffWorkbookFragmentBase& rParent ) :
BiffFragmentHandler( rParent ),
WorksheetHelper( rHelper )
{
}
} // namespace xls } // namespace xls
} // namespace oox } // namespace oox
......
...@@ -292,28 +292,6 @@ const RecordInfo* PivotTableFragment::getRecordInfos() const ...@@ -292,28 +292,6 @@ const RecordInfo* PivotTableFragment::getRecordInfos() const
return spRecInfos; return spRecInfos;
} }
// ============================================================================
// ============================================================================
BiffPivotTableContext::BiffPivotTableContext( const WorksheetHelper& rHelper ) :
BiffWorksheetContextBase( rHelper ),
mrPivotTable( getPivotTables().createPivotTable() )
{
}
void BiffPivotTableContext::importRecord( BiffInputStream& rStrm )
{
switch( rStrm.getRecId() )
{
case BIFF_ID_PTDEFINITION: mrPivotTable.importPTDefinition( rStrm, getSheetIndex() ); break;
case BIFF_ID_PTDEFINITION2: mrPivotTable.importPTDefinition2( rStrm ); break;
case BIFF_ID_PTFIELD: mrPivotTable.createTableField().importPTField( rStrm ); break;
case BIFF_ID_PTROWCOLFIELDS: mrPivotTable.importPTRowColFields( rStrm ); break;
case BIFF_ID_PTPAGEFIELDS: mrPivotTable.importPTPageFields( rStrm ); break;
case BIFF_ID_PTDATAFIELD: mrPivotTable.importPTDataField( rStrm ); break;
}
}
// ============================================================================ // ============================================================================
} // namespace xls } // namespace xls
......
...@@ -85,23 +85,6 @@ const RecordInfo* QueryTableFragment::getRecordInfos() const ...@@ -85,23 +85,6 @@ const RecordInfo* QueryTableFragment::getRecordInfos() const
// ============================================================================ // ============================================================================
BiffQueryTableContext::BiffQueryTableContext( const WorksheetHelper& rHelper ) :
BiffWorksheetContextBase( rHelper ),
mrQueryTable( getQueryTables().createQueryTable() )
{
}
void BiffQueryTableContext::importRecord( BiffInputStream& rStrm )
{
switch( rStrm.getRecId() )
{
case BIFF_ID_QUERYTABLE: mrQueryTable.importQueryTable( rStrm ); break;
case BIFF_ID_QUERYTABLEREFRESH: mrQueryTable.importQueryTableRefresh( rStrm ); break;
case BIFF_ID_QUERYTABLESETTINGS: mrQueryTable.importQueryTableSettings( rStrm ); break;
}
}
// ============================================================================
} // namespace xls } // namespace xls
} // namespace oox } // namespace oox
......
...@@ -233,14 +233,8 @@ public: ...@@ -233,14 +233,8 @@ public:
inline rtl_TextEncoding getTextEncoding() const { return meTextEnc; } inline rtl_TextEncoding getTextEncoding() const { return meTextEnc; }
/** Sets the text encoding to import/export byte strings. */ /** Sets the text encoding to import/export byte strings. */
void setTextEncoding( rtl_TextEncoding eTextEnc ); void setTextEncoding( rtl_TextEncoding eTextEnc );
/** Sets code page read from a CODEPAGE record for byte string import. */
void setCodePage( sal_uInt16 nCodePage );
/** Sets text encoding from the default application font, if CODEPAGE record is missing. */ /** Sets text encoding from the default application font, if CODEPAGE record is missing. */
void setAppFontEncoding( rtl_TextEncoding eAppFontEnc ); void setAppFontEncoding( rtl_TextEncoding eAppFontEnc );
/** Enables workbook file mode, used for BIFF4 workspace files. */
void setIsWorkbookFile();
/** Recreates global buffers that are used per sheet in specific BIFF versions. */
void createBuffersPerSheet( sal_Int16 nSheet );
/** Returns the codec helper that stores the encoder/decoder object. */ /** Returns the codec helper that stores the encoder/decoder object. */
inline BiffCodecHelper& getCodecHelper() { return *mxCodecHelper; } inline BiffCodecHelper& getCodecHelper() { return *mxCodecHelper; }
...@@ -517,60 +511,12 @@ void WorkbookGlobals::setTextEncoding( rtl_TextEncoding eTextEnc ) ...@@ -517,60 +511,12 @@ void WorkbookGlobals::setTextEncoding( rtl_TextEncoding eTextEnc )
meTextEnc = eTextEnc; meTextEnc = eTextEnc;
} }
void WorkbookGlobals::setCodePage( sal_uInt16 nCodePage )
{
setTextEncoding( BiffHelper::calcTextEncodingFromCodePage( nCodePage ) );
mbHasCodePage = true;
}
void WorkbookGlobals::setAppFontEncoding( rtl_TextEncoding eAppFontEnc ) void WorkbookGlobals::setAppFontEncoding( rtl_TextEncoding eAppFontEnc )
{ {
if( !mbHasCodePage ) if( !mbHasCodePage )
setTextEncoding( eAppFontEnc ); setTextEncoding( eAppFontEnc );
} }
void WorkbookGlobals::setIsWorkbookFile()
{
OSL_ENSURE( meBiff == BIFF4, "WorkbookGlobals::setIsWorkbookFile - invalid call" );
mbWorkbook = true;
}
void WorkbookGlobals::createBuffersPerSheet( sal_Int16 nSheet )
{
switch( meBiff )
{
case BIFF2:
case BIFF3:
OSL_ENSURE( nSheet == 0, "WorkbookGlobals::createBuffersPerSheet - unexpected sheet index" );
mxDefNames->setLocalCalcSheet( nSheet );
break;
case BIFF4:
OSL_ENSURE( mbWorkbook || (nSheet == 0), "WorkbookGlobals::createBuffersPerSheet - unexpected sheet index" );
// #i11183# sheets in BIFF4W files have own styles and names
if( nSheet > 0 )
{
mxStyles.reset( new StylesBuffer( *this ) );
mxDefNames.reset( new DefinedNamesBuffer( *this ) );
mxExtLinks.reset( new ExternalLinkBuffer( *this ) );
}
mxDefNames->setLocalCalcSheet( nSheet );
break;
case BIFF5:
// BIFF5 stores external references per sheet
if( nSheet > 0 )
mxExtLinks.reset( new ExternalLinkBuffer( *this ) );
break;
case BIFF8:
break;
case BIFF_UNKNOWN:
break;
}
}
// private -------------------------------------------------------------------- // private --------------------------------------------------------------------
void WorkbookGlobals::initialize( bool bWorkbookFile ) void WorkbookGlobals::initialize( bool bWorkbookFile )
...@@ -962,11 +908,6 @@ rtl_TextEncoding WorkbookHelper::getTextEncoding() const ...@@ -962,11 +908,6 @@ rtl_TextEncoding WorkbookHelper::getTextEncoding() const
return mrBookGlob.getTextEncoding(); return mrBookGlob.getTextEncoding();
} }
void WorkbookHelper::setAppFontEncoding( rtl_TextEncoding eAppFontEnc )
{
mrBookGlob.setAppFontEncoding( eAppFontEnc );
}
BiffCodecHelper& WorkbookHelper::getCodecHelper() const BiffCodecHelper& WorkbookHelper::getCodecHelper() const
{ {
return mrBookGlob.getCodecHelper(); return mrBookGlob.getCodecHelper();
......
...@@ -797,17 +797,8 @@ oox::core::FilterBase::requestEncryptionData(comphelper::IDocPasswordVerifier&) ...@@ -797,17 +797,8 @@ oox::core::FilterBase::requestEncryptionData(comphelper::IDocPasswordVerifier&)
oox::dump::SequenceRecordObjectBase::construct(oox::dump::OutputObjectBase const&, oox::dump::BinaryInputStreamRef const&, oox::dump::String const&, oox::dump::String const&) oox::dump::SequenceRecordObjectBase::construct(oox::dump::OutputObjectBase const&, oox::dump::BinaryInputStreamRef const&, oox::dump::String const&, oox::dump::String const&)
oox::dump::StringHelper::appendRange(rtl::OUStringBuffer&, oox::dump::TokenRange const&, bool) oox::dump::StringHelper::appendRange(rtl::OUStringBuffer&, oox::dump::TokenRange const&, bool)
oox::dump::StringHelper::appendRangeList(rtl::OUStringBuffer&, std::__debug::vector<oox::dump::Range, std::allocator<oox::dump::Range> > const&) oox::dump::StringHelper::appendRangeList(rtl::OUStringBuffer&, std::__debug::vector<oox::dump::Range, std::allocator<oox::dump::Range> > const&)
oox::xls::BiffInputStream::tellBase() const
oox::xls::BiffPivotTableContext::BiffPivotTableContext(oox::xls::WorksheetHelper const&)
oox::xls::BiffQueryTableContext::BiffQueryTableContext(oox::xls::WorksheetHelper const&)
oox::xls::BiffSheetDataContext::BiffSheetDataContext(oox::xls::WorksheetHelper const&)
oox::xls::BiffWorksheetFragmentBase::BiffWorksheetFragmentBase(oox::xls::WorksheetHelper const&, oox::xls::BiffWorkbookFragmentBase const&)
oox::xls::CellBlock::CellBlock(oox::xls::WorksheetHelper const&, oox::ValueRange const&, int) oox::xls::CellBlock::CellBlock(oox::xls::WorksheetHelper const&, oox::ValueRange const&, int)
oox::xls::CellStyleBuffer::importStyle(oox::xls::BiffInputStream&) oox::xls::CellStyleBuffer::importStyle(oox::xls::BiffInputStream&)
oox::xls::WorkbookGlobals::createBuffersPerSheet(short)
oox::xls::WorkbookGlobals::setCodePage(unsigned short)
oox::xls::WorkbookGlobals::setIsWorkbookFile()
oox::xls::WorkbookHelper::setAppFontEncoding(unsigned short)
psp::PrinterGfx::DrawBitmap(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterBmp const&) psp::PrinterGfx::DrawBitmap(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterBmp const&)
psp::PrinterGfx::DrawMask(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterColor&) psp::PrinterGfx::DrawMask(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterColor&)
psp::PrinterGfx::GetGlyphBoundRect(unsigned short, Rectangle&) psp::PrinterGfx::GetGlyphBoundRect(unsigned short, Rectangle&)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment