From e8fff12af2c0bc3172c3db830b5f6a59869e5be0 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Tue, 10 Dec 2013 20:53:44 -0500 Subject: [PATCH] fdo#66969: Add test to ensure we import page field's visibility correctly. Change-Id: I407b1f552ce089c0ff1d6bdadc1cc618fb713646 --- sc/inc/document.hxx | 2 +- sc/inc/dpobject.hxx | 4 +- .../pivot-table-shared-cache-with-group.ods | Bin 0 -> 28325 bytes sc/qa/unit/subsequent_filters-test.cxx | 70 ++++++++++++++++++ 4 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 sc/qa/unit/data/ods/pivot-table-shared-cache-with-group.ods diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 7a00c1d358a9..47ff391a3e6c 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -531,7 +531,7 @@ public: bool HasPivotTable() const; SC_DLLPUBLIC ScDPCollection* GetDPCollection(); SC_DLLPUBLIC const ScDPCollection* GetDPCollection() const; - ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const; + SC_DLLPUBLIC ScDPObject* GetDPAtCursor(SCCOL nCol, SCROW nRow, SCTAB nTab) const; ScDPObject* GetDPAtBlock( const ScRange& rBlock ) const; SC_DLLPUBLIC ScChartCollection* GetChartCollection() const; diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx index 803a05ebedcb..6c0a64dd3b0e 100644 --- a/sc/inc/dpobject.hxx +++ b/sc/inc/dpobject.hxx @@ -282,7 +282,7 @@ public: SheetCaches(ScDocument* pDoc); bool hasCache(const ScRange& rRange) const; const ScDPCache* getCache(const ScRange& rRange, const ScDPDimensionSaveData* pDimData); - size_t size() const; + SC_DLLPUBLIC size_t size() const; void updateReference( UpdateRefMode eMode, const ScRange& r, SCsCOL nDx, SCsROW nDy, SCsTAB nDz); @@ -397,7 +397,7 @@ public: void FreeTable(ScDPObject* pDPObj); SC_DLLPUBLIC bool InsertNewTable(ScDPObject* pDPObj); - SheetCaches& GetSheetCaches(); + SC_DLLPUBLIC SheetCaches& GetSheetCaches(); NameCaches& GetNameCaches(); DBCaches& GetDBCaches(); diff --git a/sc/qa/unit/data/ods/pivot-table-shared-cache-with-group.ods b/sc/qa/unit/data/ods/pivot-table-shared-cache-with-group.ods new file mode 100644 index 0000000000000000000000000000000000000000..b1ec9819cd14a2e6565fbcbc1350e9c22ae63dfd GIT binary patch literal 28325 zcmeFZ2UJtr+BT}&f*nOEf`E#Ebdla|h|)uq8tFZucM=s5l_nx25Q>QO5_;$n5s(^s z3n5ZNZwUzr1b%d%bMN`iKL5S@?(hHa82=cX^=9Oq>sicqu4m3QGuNEYTDlrXj$S%+ z=)|EzXF-U2VXks-MGqZ1^z(DD>yVq1o1J%nyPcK0yQ`CpmA4ZZB<2gU6$M*)IeCeK z-R(fOU>hGdJCL`im%FE(m93Yfot?Mtf64Q06#U%c#Y2aFe%KE3G;s8Bvj$l?xq69t z|I-z92RXda)mA%uiv85VA!i>ydZ2gkU3=)z;X@~WJMe5@zf(DM=wiv^2X_tplUHy- z=3NwShV``t2;iEZQOSje@2hR+U}o2HAD)enoEeKRPQUqiM1IC-)#!n%lzjsCmc-XN zcKi71PMe*m<{H3~FN6?Og!hu?tY7e?1t{(RASvOAbO#OL`-7MHV@~Xakz_LUGwf@@f_%KP>T|q1j|zuy5=P0e!q1OPliI=v`;|**kNoZ3%%h`MmmfSnxO z5GeO~#jmMgTS-K-oEa85kIxm7$b@mBKRstS7xj70uVKtS#q_ch2cx-c$J2s}$%Hp| zIlpxv49$K6GXbnS&HML#ndvvHCk6K;hM!whl3Tx4jEBR|0xYiw$?opoS32$}c~e}G z3t19=HT+>&QXRy4v9u@q8Yb?copHarkiX{AMvxfyR;8|b?7F28 zE8#_pehs}E>}Myj_NZm)wi61u6*s<%VaCQ~ z-Dg+JJgNTbpjG{Yva4A(B1UAIYz=}L?@tmIeJ}E;UGX!M+?$y`f0wkA@pUzU?iIkJ z-*{`-S_OTn{MKX{@!V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^$dguMarPylz3d(Q=Y4k#T-2UF?{eg<=Z036u`SI5=e@W$D2uU zU+}2P4qP7L|L_M@;g7*0N6`34B16C;bNT0gcqNH5QezdsjvUnEa zR=7%Q+10Y$bMfv!I^>smR`s4tKmFSeYib9IlFoT&wryqpr)uwt)#7x?waY7@snauF zBMntvs6X(q-bS(U4Dcwo*zRVggX@Y^&!ksT)R`p+wah6|^JS~YwfTwl{bwuP&+*NN zid{n23%+eWckC&};=X>Hz*H)-u1yad$ewsL@%D5t)bYg93-3q|UX7vPZ6ONU z_hzLU1o9Mk68d_msjq@8Tv`eUt&+$KO?_(hY4Iq92?_Xfp;A(E6#1GeCyfMC%qm0x z3{W}Y?5CE>ueM-PNrf~6TS_U#&0sH}Gg7 zw~|i~)ROZNNM;Hdrhm>s3s9RJR6Z01h^%mz;+h!oIjDlzK3;c)6$AoOn?hn$pnObp z3nPJ)rH~6Mkd%qc`g>gVCR0urs^Z0y5j0=N(Jh@O6V9G?fFb+t13dvQ0 xqae #include @@ -138,6 +139,8 @@ public: void testCellAnchoredShapesODS(); void testPivotTableBasicODS(); + void testPivotTableSharedCacheGroupODS(); + void testFormulaDependency(); void testRowHeightODS(); @@ -198,6 +201,7 @@ public: CPPUNIT_TEST(testCellAnchoredShapesODS); CPPUNIT_TEST(testPivotTableBasicODS); + CPPUNIT_TEST(testPivotTableSharedCacheGroupODS); CPPUNIT_TEST(testRowHeightODS); CPPUNIT_TEST(testFormulaDependency); CPPUNIT_TEST(testRichTextContentODS); @@ -1646,6 +1650,72 @@ void ScFiltersTest::testPivotTableBasicODS() xDocSh->DoClose(); } +namespace { + +bool checkVisiblePageFieldMember( const ScDPSaveDimension::MemberList& rMembers, const OUString& rVisibleMember ) +{ + ScDPSaveDimension::MemberList::const_iterator it = rMembers.begin(), itEnd = rMembers.end(); + bool bFound = false; + for (; it != itEnd; ++it) + { + const ScDPSaveMember* pMem = *it; + if (pMem->GetName() == rVisibleMember) + { + bFound = true; + if (!pMem->GetIsVisible()) + // This member is supposed to be visible. Fail. + return false; + } + else + { + if (pMem->GetIsVisible()) + // This member is supposed to be hidden. Not good. + return false; + } + } + + return bFound; +} + +} + +void ScFiltersTest::testPivotTableSharedCacheGroupODS() +{ + ScDocShellRef xDocSh = loadDoc("pivot-table-shared-cache-with-group.", ODS); + CPPUNIT_ASSERT_MESSAGE("Failed to load file", xDocSh.Is()); + ScDocument* pDoc = xDocSh->GetDocument(); + + // Make sure that page field's visibility settings are loaded correctly. + + ScDPObject* pDPObj = pDoc->GetDPAtCursor(0, 0, 1); // A1 on 2nd sheet + CPPUNIT_ASSERT_MESSAGE("There should be a pivot table here.", pDPObj); + ScDPSaveData* pSaveData = pDPObj->GetSaveData(); + CPPUNIT_ASSERT_MESSAGE("Save data is expected.", pSaveData); + ScDPSaveDimension* pDim = pSaveData->GetExistingDimensionByName("Project Name"); + CPPUNIT_ASSERT_MESSAGE("Failed to get page field named 'Project Name'.", pDim); + const ScDPSaveDimension::MemberList* pMembers = &pDim->GetMembers(); + CPPUNIT_ASSERT_EQUAL(static_cast(14), pMembers->size()); + CPPUNIT_ASSERT_MESSAGE("Incorrect member visibility.", checkVisiblePageFieldMember(*pMembers, "APL-01-1")); + + pDPObj = pDoc->GetDPAtCursor(0, 1, 2); // A2 on 3rd sheet + CPPUNIT_ASSERT_MESSAGE("There should be a pivot table here.", pDPObj); + pSaveData = pDPObj->GetSaveData(); + CPPUNIT_ASSERT_MESSAGE("Save data is expected.", pSaveData); + pDim = pSaveData->GetExistingDimensionByName("Project Name"); + CPPUNIT_ASSERT_MESSAGE("Failed to get page field named 'Project Name'.", pDim); + pMembers = &pDim->GetMembers(); + CPPUNIT_ASSERT_EQUAL(static_cast(14), pMembers->size()); + CPPUNIT_ASSERT_MESSAGE("Incorrect member visibility.", checkVisiblePageFieldMember(*pMembers, "VEN-01-1")); + + // These two pivot tables shared the same data range. We should only have + // one pivot cache. + ScDPCollection* pDPs = pDoc->GetDPCollection(); + ScDPCollection::SheetCaches& rSheetCaches = pDPs->GetSheetCaches(); + CPPUNIT_ASSERT_EQUAL(static_cast(1), rSheetCaches.size()); + + xDocSh->DoClose(); +} + void ScFiltersTest::testRowHeightODS() { ScDocShellRef xDocSh = loadDoc("row-height-import.", ODS);