diff options
Diffstat (limited to 'sc/source/filter/oox/querytablebuffer.cxx')
-rw-r--r-- | sc/source/filter/oox/querytablebuffer.cxx | 65 |
1 files changed, 0 insertions, 65 deletions
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 ); |