[SCM] LibreOffice packaging repository branch, ubuntu-precise-3.5, updated. libreoffice_3.5.2_rc2-1-171-g3d70add
The following commit has been merged in the ubuntu-precise-3.5 branch:
commit 3d70add0dc9a217cb1f0bac63e39566978eedbc2
Author: Nobuto MURATA <nmurata@ashisuto.co.jp>
Date: Thu Jun 27 19:32:10 2013 +0200
lp#1194740: fix xls file size ballooning
diff --git a/changelog b/changelog
index c17b2f5..58c1a18 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,17 @@
+libreoffice (1:3.5.7-0ubuntu5~ppa2) precise; urgency=low
+
+ [Nobuto MURATA]
+ * fix xls file size ballooning (LP: #1194740)
+ - it was caused by a incomplete patch for fdo#50304 in upstream
+ - revert the commit to fix the regression(fdo#51878), then
+ apply a better patch to prevent the original problem from
+ happening again
+
+ [Bjoern Michaelsen]
+ * rebase changes on ppa
+
+ -- Bjoern Michaelsen <bjoern.michaelsen@canonical.com> Thu, 27 Jun 2013 19:17:21 +0200
+
libreoffice (1:3.5.7-0ubuntu5~ppa1) precise; urgency=low
* backport theming fix for dark themes (LP: #628105)
diff --git a/patches/lp-1194740-fdo-50304-fix-xls-row-height-again.diff b/patches/lp-1194740-fdo-50304-fix-xls-row-height-again.diff
new file mode 100644
index 0000000..36f8c16
--- /dev/null
+++ b/patches/lp-1194740-fdo-50304-fix-xls-row-height-again.diff
@@ -0,0 +1,45 @@
+From 4ed0eaca6c14aeb652cbebe18081cc9e7e1444ac Mon Sep 17 00:00:00 2001
+From: Noel Power <noel.power@novell.com>
+Date: Wed, 25 Jul 2012 17:23:38 +0000
+Subject: hopefully more successful attempt to solve fdo#50304
+
+Change-Id: I86dfff571c14bce97d0851b4093dbc376d8b6ea4
+---
+diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
+index e3967f2..d611077 100644
+--- a/sc/source/filter/excel/xetable.cxx
++++ b/sc/source/filter/excel/xetable.cxx
+@@ -2146,14 +2146,26 @@ XclExpDimensions* XclExpRowBuffer::GetDimensions()
+
+ XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 nXclRow, bool bRowAlwaysEmpty )
+ {
+- RowMap::iterator itr = maRowMap.find(nXclRow);
+- if (itr == maRowMap.end())
++ RowMap::iterator itr = maRowMap.begin();
++ ScDocument& rDoc = GetRoot().GetDoc();
++ SCTAB nScTab = GetRoot().GetCurrScTab();
++ for ( size_t nFrom = maRowMap.size(); nFrom <= nXclRow; ++nFrom )
+ {
+- RowRef p(new XclExpRow(GetRoot(), nXclRow, maOutlineBfr, bRowAlwaysEmpty));
+- ::std::pair<RowMap::iterator, bool> r = maRowMap.insert(RowMap::value_type(nXclRow, p));
+- itr = r.first;
++ itr = maRowMap.find(nFrom);
++ if ( itr == maRowMap.end() )
++ {
++ // only create RowMap entries for rows that differ from previous,
++ // or if it is the desired row
++ if ( !nFrom || ( nFrom == nXclRow ) || ( nFrom && ( rDoc.GetRowHeight(nFrom, nScTab, false) != rDoc.GetRowHeight(nFrom-1, nScTab, false) ) ) )
++ {
++ RowRef p(new XclExpRow(GetRoot(), nFrom, maOutlineBfr, bRowAlwaysEmpty));
++ maRowMap.insert(RowMap::value_type(nFrom, p));
++ }
++ }
+ }
++ itr = maRowMap.find(nXclRow);
+ return *itr->second;
++
+ }
+
+ // ============================================================================
+--
+cgit v0.9.0.2-2-gbebe
diff --git a/patches/lp-1194740-fdo-51878-fix-regression-of-size-ballooning.diff b/patches/lp-1194740-fdo-51878-fix-regression-of-size-ballooning.diff
new file mode 100644
index 0000000..5009a72
--- /dev/null
+++ b/patches/lp-1194740-fdo-51878-fix-regression-of-size-ballooning.diff
@@ -0,0 +1,91 @@
+From de9c6a7829b08968491c8b57b5bd4f182e5e873e Mon Sep 17 00:00:00 2001
+From: Markus Mohrhard <markus.mohrhard@googlemail.com>
+Date: Mon, 16 Jul 2012 14:44:43 +0000
+Subject: Revert "fix excel row height export problems ( I hope ) fdo#50304"
+
+This reverts commit 9746c6de3a05fe9284d6d6bb2f636bfe912733cd.
+
+Signed-off-by: Kohei Yoshida <kohei.yoshida@gmail.com>
+Signed-off-by: Eike Rathke <erack@redhat.com>
+---
+diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
+index 69db2be..e3967f2 100644
+--- a/sc/source/filter/excel/xetable.cxx
++++ b/sc/source/filter/excel/xetable.cxx
+@@ -2029,41 +2029,22 @@ void XclExpRowBuffer::Finalize( XclExpDefaultRowData& rDefRowData, const ScfUInt
+ XclExpDefaultRowData aMaxDefData;
+ size_t nMaxDefCount = 0;
+ // only look for default format in existing rows, if there are more than unused
+- bool bSearchExisting = ( maRowMap.size() >= ( GetMaxPos().Row() - maRowMap.size() ) );
+- if ( bSearchExisting )
+- {
+- for (itr = itrBeg; itr != itrEnd; ++itr)
+- {
+- const RowRef& rRow = itr->second;
+- if (rRow->IsDefaultable())
+- {
+- XclExpDefaultRowData aDefData( *rRow );
+- size_t& rnDefCount = aDefRowMap[ aDefData ];
+- ++rnDefCount;
+- if( rnDefCount > nMaxDefCount )
+- {
+- nMaxDefCount = rnDefCount;
+- aMaxDefData = aDefData;
+- }
+- }
+- }
+- }
+- else
++ for (itr = itrBeg; itr != itrEnd; ++itr)
+ {
+- // find a suitable unused row to get the default height from,
+- // searching backwards from max row
+- for ( SCROW nRow = GetMaxPos().Row(); nRow >= 0; --nRow )
++ const RowRef& rRow = itr->second;
++ if (rRow->IsDefaultable())
+ {
+- if ( maRowMap.find( nRow ) == maRowMap.end() )
++ XclExpDefaultRowData aDefData( *rRow );
++ size_t& rnDefCount = aDefRowMap[ aDefData ];
++ ++rnDefCount;
++ if( rnDefCount > nMaxDefCount )
+ {
+- // use first encountered unused row height as default
+- // I wonder should we do this always ( and abandon the search
+- // of exising rows )
+- aMaxDefData.mnHeight = GetDoc().GetRowHeight(nRow, GetCurrScTab(), false);
+- break;
++ nMaxDefCount = rnDefCount;
++ aMaxDefData = aDefData;
+ }
+ }
+ }
++
+ // return the default row format to caller
+ rDefRowData = aMaxDefData;
+
+@@ -2165,17 +2146,13 @@ XclExpDimensions* XclExpRowBuffer::GetDimensions()
+
+ XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 nXclRow, bool bRowAlwaysEmpty )
+ {
+- RowMap::iterator itr = maRowMap.begin();
+- for ( size_t nFrom = maRowMap.size(); nFrom <= nXclRow; ++nFrom )
++ RowMap::iterator itr = maRowMap.find(nXclRow);
++ if (itr == maRowMap.end())
+ {
+- itr = maRowMap.find(nFrom);
+- if ( itr == maRowMap.end() )
+- {
+- RowRef p(new XclExpRow(GetRoot(), nFrom, maOutlineBfr, bRowAlwaysEmpty));
+- maRowMap.insert(RowMap::value_type(nFrom, p));
+- }
++ RowRef p(new XclExpRow(GetRoot(), nXclRow, maOutlineBfr, bRowAlwaysEmpty));
++ ::std::pair<RowMap::iterator, bool> r = maRowMap.insert(RowMap::value_type(nXclRow, p));
++ itr = r.first;
+ }
+- itr = maRowMap.find(nXclRow);
+ return *itr->second;
+ }
+
+--
+cgit v0.9.0.2-2-gbebe
--
LibreOffice packaging repository
Reply to: