diff --git a/sc/source/filter/inc/viewsettings.hxx b/sc/source/filter/inc/viewsettings.hxx index dde545189a80..c5a7f93bce1b 100644 --- a/sc/source/filter/inc/viewsettings.hxx +++ b/sc/source/filter/inc/viewsettings.hxx @@ -127,15 +127,6 @@ public: /** Imports the CHARTSHEETVIEW record containing view settings of a chart sheet. */ void importChartSheetView( SequenceInputStream& rStrm ); - /** Imports the WINDOW2 record containing sheet view settings. */ - void importWindow2( BiffInputStream& rStrm ); - /** Imports the PANE record containing sheet pane settings. */ - void importPane( BiffInputStream& rStrm ); - /** Imports the SCL record containing sheet zoom settings. */ - void importScl( BiffInputStream& rStrm ); - /** Imports the SELECTION record containing selection settings for a pane. */ - void importSelection( BiffInputStream& rStrm ); - /** Converts all imported sheet view settings. */ void finalizeImport(); diff --git a/sc/source/filter/oox/viewsettings.cxx b/sc/source/filter/oox/viewsettings.cxx index 10e9f9f6e8bd..3503011df51c 100644 --- a/sc/source/filter/oox/viewsettings.cxx +++ b/sc/source/filter/oox/viewsettings.cxx @@ -364,115 +364,6 @@ void SheetViewSettings::importChartSheetView( SequenceInputStream& rStrm ) rModel.mbZoomToFit = getFlag( nFlags, BIFF12_CHARTSHEETVIEW_ZOOMTOFIT ); } -void SheetViewSettings::importWindow2( BiffInputStream& rStrm ) -{ - OSL_ENSURE( maSheetViews.empty(), "SheetViewSettings::importWindow2 - multiple WINDOW2 records" ); - SheetViewModel& rModel = *createSheetView(); - if( getBiff() == BIFF2 ) - { - rModel.mbShowFormulas = rStrm.readuInt8() != 0; - rModel.mbShowGrid = rStrm.readuInt8() != 0; - rModel.mbShowHeadings = rStrm.readuInt8() != 0; - rModel.mnPaneState = (rStrm.readuInt8() == 0) ? XML_split : XML_frozen; - rModel.mbShowZeros = rStrm.readuInt8() != 0; - BinAddress aFirstPos; - rStrm >> aFirstPos; - rModel.maFirstPos = getAddressConverter().createValidCellAddress( aFirstPos, getSheetIndex(), false ); - rModel.mbDefGridColor = rStrm.readuInt8() != 0; - rModel.maGridColor.importColorRgb( rStrm ); - } - else - { - sal_uInt16 nFlags; - BinAddress aFirstPos; - rStrm >> nFlags >> aFirstPos; - - rModel.maFirstPos = getAddressConverter().createValidCellAddress( aFirstPos, getSheetIndex(), false ); - rModel.mnPaneState = getFlagValue( nFlags, BIFF_WINDOW2_FROZEN, getFlagValue( nFlags, BIFF_WINDOW2_FROZENNOSPLIT, XML_frozen, XML_frozenSplit ), XML_split ); - rModel.mbSelected = getFlag( nFlags, BIFF_WINDOW2_SELECTED ); - rModel.mbRightToLeft = getFlag( nFlags, BIFF_WINDOW2_RIGHTTOLEFT ); - rModel.mbDefGridColor = getFlag( nFlags, BIFF_WINDOW2_DEFGRIDCOLOR ); - rModel.mbShowFormulas = getFlag( nFlags, BIFF_WINDOW2_SHOWFORMULAS ); - rModel.mbShowGrid = getFlag( nFlags, BIFF_WINDOW2_SHOWGRID ); - rModel.mbShowHeadings = getFlag( nFlags, BIFF_WINDOW2_SHOWHEADINGS ); - rModel.mbShowZeros = getFlag( nFlags, BIFF_WINDOW2_SHOWZEROS ); - rModel.mbShowOutline = getFlag( nFlags, BIFF_WINDOW2_SHOWOUTLINE ); - - if( getBiff() == BIFF8 ) - { - rModel.mnViewType = getFlagValue( nFlags, BIFF_WINDOW2_PAGEBREAKMODE, XML_pageBreakPreview, XML_normal ); - - rModel.maGridColor.importColorId( rStrm ); - // zoom data not included in chart sheets - if( (getSheetType() != SHEETTYPE_CHARTSHEET) && (rStrm.getRemaining() >= 6) ) - { - rStrm.skip( 2 ); - sal_uInt16 nPageZoom, nNormalZoom; - rStrm >> nPageZoom >> nNormalZoom; - rModel.mnSheetLayoutZoom = nPageZoom; - rModel.mnNormalZoom = nNormalZoom; - } - } - else - { - rModel.maGridColor.importColorRgb( rStrm ); - } - } -} - -void SheetViewSettings::importPane( BiffInputStream& rStrm ) -{ - OSL_ENSURE( !maSheetViews.empty(), "SheetViewSettings::importPane - missing leading WINDOW2 record" ); - if( !maSheetViews.empty() ) - { - sal_uInt8 nActivePaneId; - sal_uInt16 nSplitX, nSplitY; - BinAddress aSecondPos; - rStrm >> nSplitX >> nSplitY >> aSecondPos >> nActivePaneId; - - SheetViewModel& rModel = *maSheetViews.back(); - rModel.mfSplitX = nSplitX; - rModel.mfSplitY = nSplitY; - rModel.maSecondPos = getAddressConverter().createValidCellAddress( aSecondPos, getSheetIndex(), false ); - rModel.mnActivePaneId = lclGetOoxPaneId( nActivePaneId, XML_topLeft ); - } -} - -void SheetViewSettings::importScl( BiffInputStream& rStrm ) -{ - OSL_ENSURE( !maSheetViews.empty(), "SheetViewSettings::importScl - missing leading WINDOW2 record" ); - if( !maSheetViews.empty() ) - { - sal_uInt16 nNum, nDenom; - rStrm >> nNum >> nDenom; - OSL_ENSURE( nDenom > 0, "SheetViewSettings::importScl - invalid denominator" ); - if( nDenom > 0 ) - maSheetViews.back()->mnCurrentZoom = getLimitedValue< sal_Int32, sal_uInt16 >( (nNum * 100) / nDenom, 10, 400 ); - } -} - -void SheetViewSettings::importSelection( BiffInputStream& rStrm ) -{ - OSL_ENSURE( !maSheetViews.empty(), "SheetViewSettings::importPane - missing leading WINDOW2 record" ); - if( !maSheetViews.empty() ) - { - // pane this selection belongs to - sal_uInt8 nPaneId = rStrm.readuInt8(); - PaneSelectionModel& rPaneSel = maSheetViews.back()->createPaneSelection( lclGetOoxPaneId( nPaneId, -1 ) ); - // cursor position - BinAddress aActiveCell; - sal_uInt16 nActiveCellId; - rStrm >> aActiveCell >> nActiveCellId; - rPaneSel.maActiveCell = getAddressConverter().createValidCellAddress( aActiveCell, getSheetIndex(), false ); - rPaneSel.mnActiveCellId = nActiveCellId; - // selection - rPaneSel.maSelection.clear(); - BinRangeList aSelection; - aSelection.read( rStrm, false ); - getAddressConverter().convertToCellRangeList( rPaneSel.maSelection, aSelection, getSheetIndex(), false ); - } -} - void SheetViewSettings::finalizeImport() { // force creation of sheet view model to get the Excel defaults diff --git a/unusedcode.easy b/unusedcode.easy index 7441a3a7e1d3..4fc0cb64f76e 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -815,10 +815,6 @@ oox::xls::Font::importFont(oox::xls::BiffInputStream&) oox::xls::NumberFormatsBuffer::importFormat(oox::xls::BiffInputStream&) oox::xls::PivotCache::importPCDSource(oox::xls::BiffInputStream&) oox::xls::SheetScenarios::importScenarios(oox::xls::BiffInputStream&) -oox::xls::SheetViewSettings::importPane(oox::xls::BiffInputStream&) -oox::xls::SheetViewSettings::importScl(oox::xls::BiffInputStream&) -oox::xls::SheetViewSettings::importSelection(oox::xls::BiffInputStream&) -oox::xls::SheetViewSettings::importWindow2(oox::xls::BiffInputStream&) oox::xls::WorkbookGlobals::createBuffersPerSheet(short) oox::xls::WorkbookGlobals::setCodePage(unsigned short) oox::xls::WorkbookGlobals::setIsWorkbookFile()