[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - sc/qa sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 24 21:12:51 UTC 2019


 dev/null                              |binary
 sc/qa/unit/subsequent_export-test.cxx |   19 -------------------
 sc/source/core/data/dpgroup.cxx       |    6 +-----
 sc/source/filter/excel/xepivotxml.cxx |   11 ++---------
 4 files changed, 3 insertions(+), 33 deletions(-)

New commits:
commit 72cdcf9285cd9dfda4a3196a576fe72b58813658
Author:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
AuthorDate: Thu Jan 24 17:58:29 2019 +0100
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Thu Jan 24 22:12:24 2019 +0100

    Revert "tdf#121612: update pivot caches during saving to XLSX"
    
    also revert "crashtesting: ooo55266-3.ods some members are nullptr"
    as follow-up commit.
    
    This reverts commit 41d514ecd43ae9ec673071bfa1d79e788b8f935b.
    This reverts commit 6f5a27a6711fa9c29c732fdac9e1f175b2a6627e.
    
    Conflicts:
            sc/qa/unit/subsequent_export-test.cxx
    
    Change-Id: Ib7d370dbb40553611f9c44d82b56d873492ea324
    Reviewed-on: https://gerrit.libreoffice.org/66880
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sc/qa/unit/data/ods/tdf121612.ods b/sc/qa/unit/data/ods/tdf121612.ods
deleted file mode 100644
index 6afc4e0c931c..000000000000
Binary files a/sc/qa/unit/data/ods/tdf121612.ods and /dev/null differ
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index fed665be7803..ba3e5dc610af 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -176,7 +176,6 @@ public:
     void testHeaderImage();
 
     void testTdf88657();
-    void testTdf121612();
 
     CPPUNIT_TEST_SUITE(ScExportTest);
     CPPUNIT_TEST(test);
@@ -259,7 +258,6 @@ public:
     CPPUNIT_TEST(testHeaderImage);
 
     CPPUNIT_TEST(testTdf88657);
-    CPPUNIT_TEST(testTdf121612);
 
     CPPUNIT_TEST_SUITE_END();
 
@@ -3707,23 +3705,6 @@ void ScExportTest::testConditionalFormatRangeListXLSX()
     assertXPath(pDoc, "//x:conditionalFormatting", "sqref", "F4 F10");
 }
 
-void ScExportTest::testTdf121612()
-{
-    ScDocShellRef xDocSh = loadDoc("tdf121612.", FORMAT_ODS);
-    CPPUNIT_ASSERT(xDocSh.Is());
-    xDocSh = saveAndReload(xDocSh.get(), FORMAT_XLSX);
-
-    ScDocument& rDoc = xDocSh->GetDocument();
-
-    // There should be a pivot table
-    CPPUNIT_ASSERT(rDoc.HasPivotTable());
-
-    // DP collection is not lost after export and has one entry
-    ScDPCollection* pDPColl = rDoc.GetDPCollection();
-    CPPUNIT_ASSERT(pDPColl);
-    CPPUNIT_ASSERT_EQUAL(size_t(1), pDPColl->GetCount());
-}
-
 CPPUNIT_TEST_SUITE_REGISTRATION(ScExportTest);
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sc/source/core/data/dpgroup.cxx b/sc/source/core/data/dpgroup.cxx
index 0af5f2bd1d38..4fecf7970d0a 100644
--- a/sc/source/core/data/dpgroup.cxx
+++ b/sc/source/core/data/dpgroup.cxx
@@ -1035,11 +1035,7 @@ long ScDPGroupTableData::Compare(long nDim, long nDataId1, long nDataId2)
 {
     if ( getIsDataLayoutDimension(nDim) )
         return 0;
-    const ScDPItemData* rItem1 = GetMemberById(nDim, nDataId1);
-    const ScDPItemData* rItem2 = GetMemberById(nDim, nDataId2);
-    if (rItem1 == nullptr || rItem2 == nullptr)
-        return 0;
-    return ScDPItemData::Compare( *rItem1,*rItem2);
+    return ScDPItemData::Compare( *GetMemberById(nDim,  nDataId1),*GetMemberById(nDim,  nDataId2) );
 }
 
 #if DEBUG_PIVOT_TABLE
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index 94130bdbb3f9..31e46b70cf46 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -324,22 +324,15 @@ XclExpXmlPivotTableManager::XclExpXmlPivotTableManager( const XclExpRoot& rRoot
 
 void XclExpXmlPivotTableManager::Initialize()
 {
-    ScDocument& rDoc = GetDoc();
+    const ScDocument& rDoc = GetDoc();
     if (!rDoc.HasPivotTable())
         // No pivot table to export.
         return;
 
-    ScDPCollection* pDPColl = rDoc.GetDPCollection();
+    const ScDPCollection* pDPColl = rDoc.GetDPCollection();
     if (!pDPColl)
         return;
 
-    // Update caches from DPObject
-    for (size_t i = 0; i < pDPColl->GetCount(); ++i)
-    {
-        ScDPObject& rDPObj = (*pDPColl)[i];
-        rDPObj.SyncAllDimensionMembers();
-    }
-
     // Go through the caches first.
 
     std::vector<XclExpXmlPivotCaches::Entry> aCaches;


More information about the Libreoffice-commits mailing list