[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sc/qa sc/source
Justin Luth
justin_luth at sil.org
Fri Feb 10 08:36:36 UTC 2017
sc/qa/unit/subsequent_export-test.cxx | 18 ------------------
sc/source/filter/excel/xetable.cxx | 9 ++++-----
2 files changed, 4 insertions(+), 23 deletions(-)
New commits:
commit 3e67dc9dbbd802dd82b92304098aaa44e70c014c
Author: Justin Luth <justin_luth at sil.org>
Date: Thu Feb 9 21:10:56 2017 +0300
revert tdf#98106 Preserving hidden and empty rows after xlsx export
That patch has caused massive file bloat and and import hanging
in xls and xlsx files (bug 105840). That patch was backported to 5.2.5.
Just revert from the stable 5.2 branch and work on fixing 5.3
since the proper fix needs to be well tested.
Since bug 98106 is just an enhancement, it is an obvious candidate for
a simple revert of commit 7dd19273530730478b5ed24b79f42ac480c7ae43
Change-Id: I339694a86bab489ba0905b4d1090245bcb07fe86
Reviewed-on: https://gerrit.libreoffice.org/34104
Reviewed-by: Bartosz Kosiorek <gang65 at poczta.onet.pl>
Tested-by: Bartosz Kosiorek <gang65 at poczta.onet.pl>
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index efcb38f..0941a0b 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -115,7 +115,6 @@ public:
void testColumnWidthResaveXLSX();
void testColumnWidthExportFromODStoXLSX();
void testOutlineExportXLSX();
- void testHiddenEmptyRowsXLSX();
void testLandscapeOrientationXLSX();
void testInlineArrayXLS();
@@ -205,7 +204,6 @@ public:
CPPUNIT_TEST(testColumnWidthResaveXLSX);
CPPUNIT_TEST(testColumnWidthExportFromODStoXLSX);
CPPUNIT_TEST(testOutlineExportXLSX);
- CPPUNIT_TEST(testHiddenEmptyRowsXLSX);
CPPUNIT_TEST(testLandscapeOrientationXLSX);
CPPUNIT_TEST(testInlineArrayXLS);
CPPUNIT_TEST(testEmbeddedChartXLS);
@@ -859,22 +857,6 @@ void ScExportTest::testOutlineExportXLSX()
}
-void ScExportTest::testHiddenEmptyRowsXLSX()
-{
- //tdf#98106 FILESAVE: Hidden and empty rows became visible when export to .XLSX
- ScDocShellRef xShell = loadDoc("hidden-empty-rows.", FORMAT_ODS);
- CPPUNIT_ASSERT(xShell.Is());
-
- std::shared_ptr<utl::TempFile> pXPathFile = ScBootstrapFixture::exportTo(&(*xShell), FORMAT_XLSX);
- xmlDocPtr pSheet = XPathHelper::parseExport(pXPathFile, m_xSFactory, "xl/worksheets/sheet1.xml");
- CPPUNIT_ASSERT(pSheet);
-
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[1]", "hidden", "true");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[2]", "hidden", "true");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[3]", "hidden", "true");
- assertXPath(pSheet, "/x:worksheet/x:sheetData/x:row[4]", "hidden", "false");
-}
-
void ScExportTest::testLandscapeOrientationXLSX()
{
//tdf#48767 - Landscape page orientation is not loaded from .xlsx format with MS Excel, after export with Libre Office
diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx
index 30a3da4..c959340 100644
--- a/sc/source/filter/excel/xetable.cxx
+++ b/sc/source/filter/excel/xetable.cxx
@@ -2045,7 +2045,7 @@ sal_uInt16 XclExpRow::GetFirstFreeXclCol() const
bool XclExpRow::IsDefaultable() const
{
- const sal_uInt16 nFlagsAlwaysMarkedAsDefault = EXC_ROW_DEFAULTFLAGS | EXC_ROW_UNSYNCED;
+ const sal_uInt16 nFlagsAlwaysMarkedAsDefault = EXC_ROW_DEFAULTFLAGS | EXC_ROW_HIDDEN | EXC_ROW_UNSYNCED;
return !::get_flag( mnFlags, static_cast< sal_uInt16 >( ~nFlagsAlwaysMarkedAsDefault ) ) &&
IsEmpty();
}
@@ -2054,6 +2054,7 @@ void XclExpRow::DisableIfDefault( const XclExpDefaultRowData& rDefRowData )
{
mbEnabled = !IsDefaultable() ||
(mnHeight != rDefRowData.mnHeight) ||
+ (IsHidden() != rDefRowData.IsHidden()) ||
(IsUnsynced() != rDefRowData.IsUnsynced());
}
@@ -2225,7 +2226,6 @@ 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
- // if the row is hidden, then row xml must be created even if it not contain cells
XclExpRow* pPrev = nullptr;
typedef std::vector< XclExpRow* > XclRepeatedRows;
XclRepeatedRows aRepeated;
@@ -2380,12 +2380,11 @@ XclExpRow& XclExpRowBuffer::GetOrCreateRow( sal_uInt32 nXclRow, bool bRowAlwaysE
{
// only create RowMap entries if it is first row in spreadsheet,
// if it is the desired row, for rows that height differ from previous,
- // if row is collapsed, has outline level (tdf#100347), or row is hidden (tdf#98106).
+ // if row is collapsed, or has outline level (tdf#100347).
if ( !nFrom || ( nFrom == nXclRow ) ||
( rDoc.GetRowHeight(nFrom, nScTab, false) != rDoc.GetRowHeight(nFrom - 1, nScTab, false) ) ||
( maOutlineBfr.IsCollapsed() ) ||
- ( maOutlineBfr.GetLevel() != 0 ) ||
- ( rDoc.RowHidden(nFrom, nScTab) ) )
+ ( maOutlineBfr.GetLevel() != 0 ) )
{
if( maOutlineBfr.GetLevel() > maHighestOutlineLevel )
{
More information about the Libreoffice-commits
mailing list