[Libreoffice-commits] .: sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Fri Feb 11 21:46:12 PST 2011


 sc/source/core/data/table5.cxx            |   12 ++++++++++++
 sc/source/filter/xml/cachedattraccess.cxx |    6 +++---
 2 files changed, 15 insertions(+), 3 deletions(-)

New commits:
commit edbb3237d7d15c8ab12dffb62bdced52f709df5d
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Sat Feb 12 00:44:01 2011 -0500

    Fixed a bug where row hidden/filtered attributes were not saved.
    
    ScDocument::RowHidden() and RowFiltered() takes the row index as
    the first argument, not second.  The second argument is the table
    index.

diff --git a/sc/source/core/data/table5.cxx b/sc/source/core/data/table5.cxx
index e85943f..af6e786 100644
--- a/sc/source/core/data/table5.cxx
+++ b/sc/source/core/data/table5.cxx
@@ -580,6 +580,12 @@ bool ScTable::SetRowHidden(SCROW nStartRow, SCROW nEndRow, bool bHidden)
     else
         bChanged = mpHiddenRows->setFalse(nStartRow, nEndRow);
 
+    if (bChanged)
+    {
+        if (IsStreamValid())
+            SetStreamValid(false);
+    }
+
     return bChanged;
 }
 
@@ -591,6 +597,12 @@ bool ScTable::SetColHidden(SCCOL nStartCol, SCCOL nEndCol, bool bHidden)
     else
         bChanged = mpHiddenCols->setFalse(nStartCol, nEndCol);
 
+    if (bChanged)
+    {
+        if (IsStreamValid())
+            SetStreamValid(false);
+    }
+
     return bChanged;
 }
 
diff --git a/sc/source/filter/xml/cachedattraccess.cxx b/sc/source/filter/xml/cachedattraccess.cxx
index b5ef932..906ea30 100644
--- a/sc/source/filter/xml/cachedattraccess.cxx
+++ b/sc/source/filter/xml/cachedattraccess.cxx
@@ -12,7 +12,7 @@
  * License.
  *
  * The Initial Developer of the Original Code is
- *       [ Kohei Yoshida <kyoshida at novell.com> ]
+ *         Kohei Yoshida <kyoshida at novell.com>
  * Portions created by the Initial Developer are Copyright (C) 2010 the
  * Initial Developer. All Rights Reserved.
  *
@@ -48,7 +48,7 @@ bool ScXMLCachedRowAttrAccess::rowHidden(sal_Int32 nTab, sal_Int32 nRow)
     {
         SCROW nRow1, nRow2;
         maHidden.mbValue = mpDoc->RowHidden(
-            static_cast<SCTAB>(nTab), static_cast<SCROW>(nRow), &nRow1, &nRow2);
+            static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), &nRow1, &nRow2);
         maHidden.mnRow1 = static_cast<sal_Int32>(nRow1);
         maHidden.mnRow2 = static_cast<sal_Int32>(nRow2);
     }
@@ -61,7 +61,7 @@ bool ScXMLCachedRowAttrAccess::rowFiltered(sal_Int32 nTab, sal_Int32 nRow)
     {
         SCROW nRow1, nRow2;
         maFiltered.mbValue = mpDoc->RowFiltered(
-            static_cast<SCTAB>(nTab), static_cast<SCROW>(nRow), &nRow1, &nRow2);
+            static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), &nRow1, &nRow2);
         maFiltered.mnRow1 = static_cast<sal_Int32>(nRow1);
         maFiltered.mnRow2 = static_cast<sal_Int32>(nRow2);
     }


More information about the Libreoffice-commits mailing list