[Libreoffice-commits] .: Branch 'libreoffice-3-5' - oox/source

Andras Timar timar at kemper.freedesktop.org
Thu Feb 23 01:49:44 PST 2012


 oox/source/xls/viewsettings.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit bd2145e740b61b69cda6456d483bcd62883e2fe3
Author: Noel Power <noel.power at novell.com>
Date:   Wed Feb 22 15:08:21 2012 +0000

    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 at suse.com>

diff --git a/oox/source/xls/viewsettings.cxx b/oox/source/xls/viewsettings.cxx
index 1eb07c7..297b3dc 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();


More information about the Libreoffice-commits mailing list