summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2012-02-22 15:08:21 +0000
committerAndras Timar <atimar@suse.com>2012-02-23 10:49:31 +0100
commitbd2145e740b61b69cda6456d483bcd62883e2fe3 (patch)
tree5447b1737eff5e7aeff8d5cfbdb2fb3429bd44bb
parent8a8eb870b8037801f81c680441d10a1ef95bfb06 (diff)
force imported xlsx active tab to be shown bnc#748198
weirdly even though a sheet/tab can be marked as hidden in workbook.xml, if that same tab/sheet is the active one then it *will* be shown Signed-off-by: Andras Timar <atimar@suse.com>
-rw-r--r--oox/source/xls/viewsettings.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/oox/source/xls/viewsettings.cxx b/oox/source/xls/viewsettings.cxx
index 1eb07c76afc8..297b3dc9e2a4 100644
--- a/oox/source/xls/viewsettings.cxx
+++ b/oox/source/xls/viewsettings.cxx
@@ -498,7 +498,13 @@ void SheetViewSettings::finalizeImport()
// sheet selected (active sheet must be selected)
bool bSelected = xModel->mbSelected || (getSheetIndex() == getViewSettings().getActiveCalcSheet());
-
+ if ( bSelected )
+ {
+ // active tab/sheet cannot be hidden
+ // always force it to be displayed
+ PropertySet aPropSet( getSheet() );
+ aPropSet.setProperty( PROP_IsVisible, sal_True );
+ }
// visible area and current cursor position (selection not supported via API)
CellAddress aFirstPos = xModel->maFirstPos;
const PaneSelectionModel* pPaneSel = xModel->getActiveSelection();