incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 117975] XLSX: Calc is showing hidden sheet
Date Tue, 18 Sep 2012 08:37:16 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=117975

bjcheny <companycy@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #79550|                            |review?
              Flags|                            |

--- Comment #3 from bjcheny <companycy@gmail.com> ---
Created attachment 79550
  --> https://issues.apache.org/ooo/attachment.cgi?id=79550&action=edit
patch for hidden sheet in xlsx

When loading xlsx, it's supposed to set sheet hidden if necessary.
However, in ScDocFunc::SetTableVisible, it misses ooxml case when trying to
skip setting hidden property. That's why I add a flag to indicate ooxml. 

Below code is to ensure when there is only 1 sheet, and it's hidden, Aoo will
still show it.

        if ( !bVisible && !pDoc->IsImportingXML()      // #i57869# allow hiding
in any order for loading
             && !pDoc->IsImportingMSXML())
    {
        sal_uInt16 nVisCount = 0;
        SCTAB nCount = pDoc->GetTableCount();
        for (SCTAB i=0; i<nCount; i++)
            if (pDoc->IsVisible(i))
                ++nVisCount;

        if (nVisCount <= 1)
        {
            if (!bApi)
                rDocShell.ErrorMessage(STR_PROTECTIONERR);    
            return sal_False;
        }
    }

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Mime
View raw message