[ooo-build-commit] .: Branch 'ooo-build-3-2' - patches/dev300

Kohei Yoshida kohei at kemper.freedesktop.org
Tue Jan 26 12:09:03 PST 2010


 patches/dev300/apply                                  |    3 
 patches/dev300/calc-xls-export-hidden-row-height.diff |   89 ++++++++++++++++++
 2 files changed, 92 insertions(+)

New commits:
commit cb19c30597daea805b10980440cfd1627e92b566
Author: Kohei Yoshida <kyoshida at novell.com>
Date:   Tue Jan 26 15:05:59 2010 -0500

    Correctly export the heights of hidden rows.
    
    * patches/dev300/apply:
    * patches/dev300/calc-xls-export-hidden-row-height.diff: When a row
      is hidden, Excel expects the height of that row before it got
      hidden.  But Calc incorrectly stored the default height value
      for all hidden rows. (n#573938)

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 33963c4..f96b974 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -871,6 +871,9 @@ sc-uninitialized-var-fix.diff, kohei
 # when double-clicking on a cell that contains a field name, it crashes.
 calc-dp-drilldown-fieldname-crash-fix.diff, n#573456, i#103347, kohei
 
+# correctly export the heights of hidden rows.
+calc-xls-export-hidden-row-height.diff, n#573938, kohei
+
 # Support PHONETIC function to display asian phonetic guide.
 # LATER: I'll take care of this later.  --kohei
 # calc-formula-asian-phonetic.diff, i#80764, i#80765, i#80766, kohei
diff --git a/patches/dev300/calc-xls-export-hidden-row-height.diff b/patches/dev300/calc-xls-export-hidden-row-height.diff
new file mode 100644
index 0000000..c3d9a16
--- /dev/null
+++ b/patches/dev300/calc-xls-export-hidden-row-height.diff
@@ -0,0 +1,89 @@
+diff --git sc/inc/document.hxx sc/inc/document.hxx
+index 4d94701..82b1582 100644
+--- sc/inc/document.hxx
++++ sc/inc/document.hxx
+@@ -1249,7 +1249,7 @@ public:
+     void			SetManualHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, BOOL bManual );
+ 
+     SC_DLLPUBLIC USHORT			GetColWidth( SCCOL nCol, SCTAB nTab ) const;
+-    SC_DLLPUBLIC USHORT			GetRowHeight( SCROW nRow, SCTAB nTab ) const;
++    SC_DLLPUBLIC USHORT         GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero = true ) const;
+     SC_DLLPUBLIC ULONG			GetRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab ) const;
+     ULONG			GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, SCTAB nTab, double fScale ) const;
+     SC_DLLPUBLIC ULONG			GetColOffset( SCCOL nCol, SCTAB nTab ) const;
+diff --git sc/inc/table.hxx sc/inc/table.hxx
+index 9606b98..7d6f363 100644
+--- sc/inc/table.hxx
++++ sc/inc/table.hxx
+@@ -613,7 +613,7 @@ public:
+     void		SetManualHeight( SCROW nStartRow, SCROW nEndRow, BOOL bManual );
+ 
+ 	USHORT		GetColWidth( SCCOL nCol );
+-    SC_DLLPUBLIC USHORT GetRowHeight( SCROW nRow, SCROW* pStartRow = NULL, SCROW* pEndRow = NULL );
++    SC_DLLPUBLIC USHORT GetRowHeight( SCROW nRow, SCROW* pStartRow = NULL, SCROW* pEndRow = NULL, bool bHiddenAsZero = true );
+ 	ULONG		GetRowHeight( SCROW nStartRow, SCROW nEndRow );
+ 	ULONG		GetScaledRowHeight( SCROW nStartRow, SCROW nEndRow, double fScale );
+ 	ULONG		GetColOffset( SCCOL nCol );
+diff --git sc/source/core/data/document.cxx sc/source/core/data/document.cxx
+index 65a3cc7..40df826 100644
+--- sc/source/core/data/document.cxx
++++ sc/source/core/data/document.cxx
+@@ -3191,10 +3191,10 @@ USHORT ScDocument::GetOriginalHeight( SCROW nRow, SCTAB nTab ) const
+ }
+ 
+ 
+-USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab ) const
++USHORT ScDocument::GetRowHeight( SCROW nRow, SCTAB nTab, bool bHiddenAsZero ) const
+ {
+     if ( ValidTab(nTab) && pTab[nTab] )
+-        return pTab[nTab]->GetRowHeight( nRow );
++        return pTab[nTab]->GetRowHeight( nRow, NULL, NULL, bHiddenAsZero );
+     DBG_ERROR("Falsche Tabellennummer");
+     return 0;
+ }
+diff --git sc/source/core/data/table2.cxx sc/source/core/data/table2.cxx
+index 35c126d..7511774 100644
+--- sc/source/core/data/table2.cxx
++++ sc/source/core/data/table2.cxx
+@@ -2307,13 +2307,13 @@ USHORT ScTable::GetCommonWidth( SCCOL nEndCol )
+ }
+ 
+ 
+-USHORT ScTable::GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow )
++USHORT ScTable::GetRowHeight( SCROW nRow, SCROW* pStartRow, SCROW* pEndRow, bool bHiddenAsZero )
+ {
+     DBG_ASSERT(VALIDROW(nRow),"Falsche Zeilennummer");
+ 
+ 	if (VALIDROW(nRow) && mpRowHeights)
+     {
+-        if (RowHidden(nRow))
++        if (bHiddenAsZero && RowHidden(nRow))
+             return 0;
+         else
+         {
+diff --git sc/source/filter/excel/xetable.cxx sc/source/filter/excel/xetable.cxx
+index 2816daf..ceb708e 100644
+--- sc/source/filter/excel/xetable.cxx
++++ sc/source/filter/excel/xetable.cxx
+@@ -1835,17 +1835,11 @@ XclExpRow::XclExpRow( const XclExpRoot& rRoot, sal_uInt16 nXclRow,
+ 
+     // *** Row height *** -----------------------------------------------------
+ 
+-    USHORT nScHeight = GetDoc().GetRowHeight( nScRow, nScTab );
+-    if( nScHeight == 0 )
+-    {
+-        ::set_flag( mnFlags, EXC_ROW_HIDDEN );
+-        mnHeight = EXC_ROW_DEFAULTHEIGHT;
+-    }
++    if (bUserHeight)
++        mnHeight = GetDoc().GetRowHeight(nScRow, nScTab, false);
+     else
+-    {
+-        // Calc and Excel use twips
+-        mnHeight = static_cast< sal_uInt16 >( nScHeight );
+-    }
++        mnHeight = EXC_ROW_DEFAULTHEIGHT;
++
+     // #76250# not usable in Applix
+ //    ::set_flag( mnHeight, EXC_ROW_FLAGDEFHEIGHT, !bUserHeight );
+ 


More information about the ooo-build-commit mailing list