summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-04-13 22:57:19 +0200
committerJulien Nabet <serval2412@yahoo.fr>2012-04-13 22:58:10 +0200
commitbb5fa5773461e14de153266ccfa36e5f454ff9b8 (patch)
treefb655f7bde985eb40e6cd82b489b318b6c8192f3
parentadaa6ee5ea7852ecaf3a43ee8f0a908a54c8650a (diff)
Cleaning sc (oox)
-rw-r--r--sc/source/filter/inc/commentsbuffer.hxx8
-rw-r--r--sc/source/filter/inc/querytablebuffer.hxx7
-rw-r--r--sc/source/filter/inc/richstring.hxx7
-rw-r--r--sc/source/filter/inc/scenariobuffer.hxx3
-rw-r--r--sc/source/filter/oox/commentsbuffer.cxx46
-rw-r--r--sc/source/filter/oox/querytablebuffer.cxx65
-rw-r--r--sc/source/filter/oox/richstring.cxx83
-rw-r--r--sc/source/filter/oox/scenariobuffer.cxx35
-rwxr-xr-xunusedcode.easy9
9 files changed, 0 insertions, 263 deletions
diff --git a/sc/source/filter/inc/commentsbuffer.hxx b/sc/source/filter/inc/commentsbuffer.hxx
index 9827b8299e34..b02e209b9b05 100644
--- a/sc/source/filter/inc/commentsbuffer.hxx
+++ b/sc/source/filter/inc/commentsbuffer.hxx
@@ -81,14 +81,6 @@ public:
void finalizeImport();
private:
- /** Reads a BIFF2-BIFF5 NOTE record. */
- void importNoteBiff2( BiffInputStream& rStrm );
- /** Reads a BIFF8 NOTE record. */
- void importNoteBiff8( BiffInputStream& rStrm );
- /** Reads a NOTESOUND record. */
- void importNoteSound( BiffInputStream& rStrm );
-
-private:
CommentModel maModel;
};
diff --git a/sc/source/filter/inc/querytablebuffer.hxx b/sc/source/filter/inc/querytablebuffer.hxx
index 8496e40e3529..79116ec250e1 100644
--- a/sc/source/filter/inc/querytablebuffer.hxx
+++ b/sc/source/filter/inc/querytablebuffer.hxx
@@ -70,13 +70,6 @@ public:
/** Imports query table settings from the QUERYTABLE record. */
void importQueryTable( SequenceInputStream& rStrm );
- /** Imports query table settings from the QUERYTABLE record. */
- void importQueryTable( BiffInputStream& rStrm );
- /** Imports query table settings from the QUERYTABLEREFRESH record. */
- void importQueryTableRefresh( BiffInputStream& rStrm );
- /** Imports query table settings from the QUERYTABLESETTINGS record. */
- void importQueryTableSettings( BiffInputStream& rStrm );
-
/** Inserts a web query into the sheet. */
void finalizeImport();
diff --git a/sc/source/filter/inc/richstring.hxx b/sc/source/filter/inc/richstring.hxx
index 07a645a59c24..95dd4f542d3a 100644
--- a/sc/source/filter/inc/richstring.hxx
+++ b/sc/source/filter/inc/richstring.hxx
@@ -251,13 +251,6 @@ public:
/** Imports a Unicode rich-string from the passed record stream. */
void importString( SequenceInputStream& rStrm, bool bRich );
- /** Imports nChars byte characters from the passed BIFF stream and appends a new text portion. */
- void importCharArray( BiffInputStream& rStrm, sal_uInt16 nChars, rtl_TextEncoding eTextEnc );
- /** Imports a byte string from the passed BIFF stream and appends new text portions. */
- void importByteString( BiffInputStream& rStrm, rtl_TextEncoding eTextEnc, BiffStringFlags nFlags = BIFF_STR_DEFAULT );
- /** Imports a Unicode rich-string from the passed BIFF stream and appends new text portions. */
- void importUniString( BiffInputStream& rStrm, BiffStringFlags nFlags = BIFF_STR_DEFAULT );
-
/** Final processing after import of all strings. */
void finalizeImport();
diff --git a/sc/source/filter/inc/scenariobuffer.hxx b/sc/source/filter/inc/scenariobuffer.hxx
index 4205d8b0faec..3e5c2032a94d 100644
--- a/sc/source/filter/inc/scenariobuffer.hxx
+++ b/sc/source/filter/inc/scenariobuffer.hxx
@@ -79,9 +79,6 @@ public:
/** Imports a new cell for this scenario from a INPUTCELLS record. */
void importInputCells( SequenceInputStream& rStrm );
- /** Imports a scenario definition from a SCENARIO record. */
- void importScenario( BiffInputStream& rStrm );
-
/** Creates the scenario in the Calc document. */
void finalizeImport();
diff --git a/sc/source/filter/oox/commentsbuffer.cxx b/sc/source/filter/oox/commentsbuffer.cxx
index 0ea4ca2e2b4f..3bbf751f2f84 100644
--- a/sc/source/filter/oox/commentsbuffer.cxx
+++ b/sc/source/filter/oox/commentsbuffer.cxx
@@ -220,52 +220,6 @@ void Comment::finalizeImport()
// private --------------------------------------------------------------------
-void Comment::importNoteBiff2( BiffInputStream& rStrm )
-{
- sal_uInt16 nTotalLen;
- rStrm >> nTotalLen;
- sal_uInt16 nPartLen = ::std::min( nTotalLen, static_cast< sal_uInt16 >( rStrm.getRemaining() ) );
- RichStringRef xNoteText = createText();
- xNoteText->importCharArray( rStrm, nPartLen, getTextEncoding() );
-
- nTotalLen = nTotalLen - nPartLen; // operator-=() gives compiler warning
- while( (nTotalLen > 0) && (rStrm.getNextRecId() == BIFF_ID_NOTE) && rStrm.startNextRecord() )
- {
- sal_uInt16 nMarker;
- rStrm >> nMarker;
- rStrm.skip( 2 );
- rStrm >> nPartLen;
- OSL_ENSURE( nMarker == 0xFFFF, "Comment::importNoteBiff2 - missing continuation NOTE record" );
- if( nMarker == 0xFFFF )
- {
- OSL_ENSURE( nPartLen <= nTotalLen, "Comment::importNoteBiff2 - string too long" );
- // call to RichString::importCharArray() appends new text portion
- xNoteText->importCharArray( rStrm, nPartLen, getTextEncoding() );
- nTotalLen = nTotalLen - ::std::min( nTotalLen, nPartLen );
- }
- else
- {
- // seems to be a new note, rewind record, so worksheet fragment loop will find it
- rStrm.rewindRecord();
- nTotalLen = 0;
- }
- }
-}
-
-void Comment::importNoteBiff8( BiffInputStream& rStrm )
-{
- sal_uInt16 nFlags;
- rStrm >> nFlags >> maModel.mnObjId;
- maModel.maAuthor = rStrm.readUniString();
- maModel.mbVisible = getFlag( nFlags, BIFF_NOTE_VISIBLE );
-}
-
-void Comment::importNoteSound( BiffInputStream& /*rStrm*/ )
-{
-}
-
-// ============================================================================
-
CommentsBuffer::CommentsBuffer( const WorksheetHelper& rHelper ) :
WorksheetHelper( rHelper )
{
diff --git a/sc/source/filter/oox/querytablebuffer.cxx b/sc/source/filter/oox/querytablebuffer.cxx
index 63d2ea8f6119..2a34d65c41ed 100644
--- a/sc/source/filter/oox/querytablebuffer.cxx
+++ b/sc/source/filter/oox/querytablebuffer.cxx
@@ -249,71 +249,6 @@ void QueryTable::importQueryTable( SequenceInputStream& rStrm )
maModel.mbApplyProtection = getFlag( nFlags, BIFF12_QUERYTABLE_APPLYPROTECTION );
}
-void QueryTable::importQueryTable( BiffInputStream& rStrm )
-{
- sal_uInt16 nFlags, nAutoFormatFlags;
- rStrm >> nFlags;
- maModel.mnAutoFormatId = rStrm.readuInt16();
- rStrm >> nAutoFormatFlags;
- rStrm.skip( 4 );
- maModel.maDefName = rStrm.readUniString();
-
- bool bDeleteUnused = getFlag( nFlags, BIFF_QUERYTABLE_DELETEUNUSED );
- bool bOverwriteExisting = getFlag( nFlags, BIFF_QUERYTABLE_OVERWRITEEXISTING );
- OSL_ENSURE( !bDeleteUnused || !bOverwriteExisting, "QueryTable::importQueryTable - invalid flags" );
- maModel.mnGrowShrinkType = bDeleteUnused ? XML_insertDelete : (bOverwriteExisting ? XML_overwriteClear : XML_insertClear);
-
- maModel.mbHeaders = getFlag( nFlags, BIFF_QUERYTABLE_HEADERS );
- maModel.mbRowNumbers = getFlag( nFlags, BIFF_QUERYTABLE_ROWNUMBERS );
- maModel.mbDisableRefresh = getFlag( nFlags, BIFF_QUERYTABLE_DISABLEREFRESH );
- maModel.mbBackground = getFlag( nFlags, BIFF_QUERYTABLE_BACKGROUND );
- maModel.mbFirstBackground = getFlag( nFlags, BIFF_QUERYTABLE_FIRSTBACKGROUND );
- maModel.mbRefreshOnLoad = getFlag( nFlags, BIFF_QUERYTABLE_REFRESHONLOAD );
- maModel.mbFillFormulas = getFlag( nFlags, BIFF_QUERYTABLE_FILLFORMULAS );
- maModel.mbRemoveDataOnSave = !getFlag( nFlags, BIFF_QUERYTABLE_SAVEDATA ); // flag negated in BIFF
- maModel.mbDisableEdit = getFlag( nFlags, BIFF_QUERYTABLE_DISABLEEDIT );
- maModel.mbAdjustColWidth = getFlag( nFlags, BIFF_QUERYTABLE_ADJUSTCOLWIDTH );
- maModel.mbApplyNumFmt = getFlag( nAutoFormatFlags, BIFF_QUERYTABLE_APPLYNUMFMT );
- maModel.mbApplyFont = getFlag( nAutoFormatFlags, BIFF_QUERYTABLE_APPLYFONT );
- maModel.mbApplyAlignment = getFlag( nAutoFormatFlags, BIFF_QUERYTABLE_APPLYALIGNMENT );
- maModel.mbApplyBorder = getFlag( nAutoFormatFlags, BIFF_QUERYTABLE_APPLYBORDER );
- maModel.mbApplyFill = getFlag( nAutoFormatFlags, BIFF_QUERYTABLE_APPLYFILL );
- maModel.mbApplyProtection = getFlag( nAutoFormatFlags, BIFF_QUERYTABLE_APPLYPROTECTION );
-
- // create a new connection object that will store settings from following records
- OSL_ENSURE( maModel.mnConnId == -1, "QueryTable::importQueryTable - multiple call" );
- Connection& rConnection = getConnections().createConnectionWithId();
- maModel.mnConnId = rConnection.getConnectionId();
-
- // a DBQUERY record with some PCITEM_STRING records must follow
- bool bHasDbQuery = (rStrm.getNextRecId() == BIFF_ID_DBQUERY) && rStrm.startNextRecord();
- OSL_ENSURE( bHasDbQuery, "QueryTable::importQueryTable - missing DBQUERY record" );
- if( bHasDbQuery )
- rConnection.importDbQuery( rStrm );
-}
-
-void QueryTable::importQueryTableRefresh( BiffInputStream& rStrm )
-{
- rStrm.skip( 4 );
- bool bPivot = rStrm.readuInt16() != 0;
- OSL_ENSURE( !bPivot, "QueryTable::importQueryTableRefresh - unexpected pivot flag" );
- if( !bPivot )
- {
- rStrm.skip( 2 );
- sal_uInt32 nFlags = rStrm.readuInt32();
- maModel.mbPreserveFormat = getFlag( nFlags, BIFF_QTREFRESH_PRESERVEFORMAT );
- maModel.mbAdjustColWidth = getFlag( nFlags, BIFF_QTREFRESH_ADJUSTCOLWIDTH );
- }
-}
-
-void QueryTable::importQueryTableSettings( BiffInputStream& rStrm )
-{
- ConnectionRef xConnection = getConnections().getConnection( maModel.mnConnId );
- OSL_ENSURE( xConnection.get(), "QueryTable::importQueryTableSettings - missing connection object" );
- if( xConnection.get() )
- xConnection->importQueryTableSettings( rStrm );
-}
-
void QueryTable::finalizeImport()
{
ConnectionRef xConnection = getConnections().getConnection( maModel.mnConnId );
diff --git a/sc/source/filter/oox/richstring.cxx b/sc/source/filter/oox/richstring.cxx
index 823d9dee0684..6fbaa5f482ee 100644
--- a/sc/source/filter/oox/richstring.cxx
+++ b/sc/source/filter/oox/richstring.cxx
@@ -426,89 +426,6 @@ void RichString::importString( SequenceInputStream& rStrm, bool bRich )
}
}
-void RichString::importCharArray( BiffInputStream& rStrm, sal_uInt16 nChars, rtl_TextEncoding eTextEnc )
-{
- createPortion()->setText( rStrm.readCharArrayUC( nChars, eTextEnc ) );
-}
-
-void RichString::importByteString( BiffInputStream& rStrm, rtl_TextEncoding eTextEnc, BiffStringFlags nFlags )
-{
- OSL_ENSURE( !getFlag( nFlags, BIFF_STR_KEEPFONTS ), "RichString::importString - keep fonts not implemented" );
- OSL_ENSURE( !getFlag( nFlags, static_cast< BiffStringFlags >( ~(BIFF_STR_8BITLENGTH | BIFF_STR_EXTRAFONTS) ) ), "RichString::importByteString - unknown flag" );
- bool b8BitLength = getFlag( nFlags, BIFF_STR_8BITLENGTH );
-
- OString aBaseText = rStrm.readByteString( !b8BitLength );
-
- if( !rStrm.isEof() && getFlag( nFlags, BIFF_STR_EXTRAFONTS ) )
- {
- FontPortionModelList aPortions;
- aPortions.importPortions( rStrm, false );
- createTextPortions( aBaseText, eTextEnc, aPortions );
- }
- else
- {
- createPortion()->setText( OStringToOUString( aBaseText, eTextEnc ) );
- }
-}
-
-void RichString::importUniString( BiffInputStream& rStrm, BiffStringFlags nFlags )
-{
- OSL_ENSURE( !getFlag( nFlags, BIFF_STR_KEEPFONTS ), "RichString::importUniString - keep fonts not implemented" );
- OSL_ENSURE( !getFlag( nFlags, static_cast< BiffStringFlags >( ~(BIFF_STR_8BITLENGTH | BIFF_STR_SMARTFLAGS) ) ), "RichString::importUniString - unknown flag" );
- bool b8BitLength = getFlag( nFlags, BIFF_STR_8BITLENGTH );
-
- // --- string header ---
- sal_uInt16 nChars = b8BitLength ? rStrm.readuInt8() : rStrm.readuInt16();
- sal_uInt8 nFlagField = 0;
- if( (nChars > 0) || !getFlag( nFlags, BIFF_STR_SMARTFLAGS ) )
- rStrm >> nFlagField;
- bool b16Bit = getFlag( nFlagField, BIFF_STRF_16BIT );
- bool bFonts = getFlag( nFlagField, BIFF_STRF_RICH );
- bool bPhonetic = getFlag( nFlagField, BIFF_STRF_PHONETIC );
- sal_uInt16 nFontCount = bFonts ? rStrm.readuInt16() : 0;
- sal_Int32 nPhoneticSize = bPhonetic ? rStrm.readInt32() : 0;
-
- // --- character array ---
- OUString aBaseText = rStrm.readUniStringChars( nChars, b16Bit );
-
- // --- formatting ---
- // #122185# bRich flag may be set, but format runs may be missing
- if( !rStrm.isEof() && (nFontCount > 0) )
- {
- FontPortionModelList aPortions;
- aPortions.importPortions( rStrm, nFontCount, BIFF_FONTPORTION_16BIT );
- createTextPortions( aBaseText, aPortions );
- }
- else
- {
- createPortion()->setText( aBaseText );
- }
-
- // --- Asian phonetic information ---
- // #122185# bPhonetic flag may be set, but phonetic info may be missing
- if( !rStrm.isEof() && (nPhoneticSize > 0) )
- {
- sal_Int64 nPhoneticEnd = rStrm.tell() + nPhoneticSize;
- OSL_ENSURE( nPhoneticSize > 14, "RichString::importUniString - wrong size of phonetic data" );
- if( nPhoneticSize > 14 )
- {
- sal_uInt16 nId, nSize;
- rStrm >> nId >> nSize;
- OSL_ENSURE( nId == 1, "RichString::importUniString - unknown phonetic data identifier" );
- sal_Int32 nMinSize = nSize + 4;
- OSL_ENSURE( nMinSize <= nPhoneticSize, "RichString::importUniString - wrong size of phonetic data" );
- if( (nId == 1) && (nMinSize <= nPhoneticSize) )
- {
- maPhonSettings.importStringData( rStrm );
- PhoneticPortionModelList aPortions;
- OUString aPhoneticText = aPortions.importPortions( rStrm, nPhoneticSize );
- createPhoneticPortions( aPhoneticText, aPortions, aBaseText.getLength() );
- }
- }
- rStrm.seek( nPhoneticEnd );
- }
-}
-
void RichString::finalizeImport()
{
maTextPortions.forEachMem( &RichStringPortion::finalizeImport );
diff --git a/sc/source/filter/oox/scenariobuffer.cxx b/sc/source/filter/oox/scenariobuffer.cxx
index 15fa2eac319b..fbfb72266d3e 100644
--- a/sc/source/filter/oox/scenariobuffer.cxx
+++ b/sc/source/filter/oox/scenariobuffer.cxx
@@ -125,41 +125,6 @@ void Scenario::importInputCells( SequenceInputStream& rStrm )
maCells.push_back( aModel );
}
-void Scenario::importScenario( BiffInputStream& rStrm )
-{
- sal_uInt16 nCellCount;
- sal_uInt8 nNameLen, nCommentLen, nUserLen;
- rStrm >> nCellCount;
- // two bytes instead of flag field
- maModel.mbLocked = rStrm.readuInt8() != 0;
- maModel.mbHidden = rStrm.readuInt8() != 0;
- rStrm >> nNameLen >> nCommentLen >> nUserLen;
- maModel.maName = rStrm.readUniStringBody( nNameLen );
- // user name: before comment (in difference to leading length field), repeated length
- if( nUserLen > 0 )
- maModel.maUser = rStrm.readUniString();
- // comment: repeated length
- if( nCommentLen > 0 )
- maModel.maComment = rStrm.readUniString();
-
- // list of cell addresses
- for( sal_uInt16 nCell = 0; !rStrm.isEof() && (nCell < nCellCount); ++nCell )
- {
- ScenarioCellModel aModel;
- BinAddress aPos;
- rStrm >> aPos;
- // deleted flag is encoded in column index
- aModel.mbDeleted = getFlag( aPos.mnCol, BIFF_SCENARIO_DELETED );
- setFlag( aPos.mnCol, BIFF_SCENARIO_DELETED, false );
- getAddressConverter().convertToCellAddressUnchecked( aModel.maPos, aPos, mnSheet );
- maCells.push_back( aModel );
- }
-
- // list of cell values
- for( ScenarioCellVector::iterator aIt = maCells.begin(), aEnd = maCells.end(); !rStrm.isEof() && (aIt != aEnd); ++aIt )
- aIt->maValue = rStrm.readUniString();
-}
-
void Scenario::finalizeImport()
{
AddressConverter& rAddrConv = getAddressConverter();
diff --git a/unusedcode.easy b/unusedcode.easy
index e24c9f90fe5f..5bd5976753ed 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -764,9 +764,6 @@ oox::xls::BiffHelper::calcTextEncodingFromCodePage(unsigned short)
oox::xls::BiffWorkbookContextBase::BiffWorkbookContextBase(oox::xls::WorkbookHelper const&)
oox::xls::CellBlock::CellBlock(oox::xls::WorksheetHelper const&, oox::ValueRange const&, int)
oox::xls::CellStyleBuffer::importStyle(oox::xls::BiffInputStream&)
-oox::xls::Comment::importNoteBiff2(oox::xls::BiffInputStream&)
-oox::xls::Comment::importNoteBiff8(oox::xls::BiffInputStream&)
-oox::xls::Comment::importNoteSound(oox::xls::BiffInputStream&)
oox::xls::CondFormat::importCfHeader(oox::xls::BiffInputStream&)
oox::xls::DefinedNamesBuffer::importDefinedName(oox::xls::BiffInputStream&)
oox::xls::DefinedNamesBuffer::setLocalCalcSheet(short)
@@ -783,12 +780,6 @@ oox::xls::PivotTable::importPTDefinition2(oox::xls::BiffInputStream&)
oox::xls::PivotTable::importPTPageFields(oox::xls::BiffInputStream&)
oox::xls::PivotTable::importPTRowColFields(oox::xls::BiffInputStream&)
oox::xls::PivotTableField::importPTField(oox::xls::BiffInputStream&)
-oox::xls::QueryTable::importQueryTable(oox::xls::BiffInputStream&)
-oox::xls::QueryTable::importQueryTableRefresh(oox::xls::BiffInputStream&)
-oox::xls::QueryTable::importQueryTableSettings(oox::xls::BiffInputStream&)
-oox::xls::RichString::importByteString(oox::xls::BiffInputStream&, unsigned short, int)
-oox::xls::RichString::importUniString(oox::xls::BiffInputStream&, int)
-oox::xls::Scenario::importScenario(oox::xls::BiffInputStream&)
oox::xls::Xf::setAllUsedFlags(bool)
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&)