Kaydet (Commit) bd378b63 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

fdo#75962: Write test for this first.

Change-Id: I731b4cbf72066f8a0cbabb5040acfe9c828afd8f
üst 02abb559
...@@ -1668,6 +1668,31 @@ void Test::testPivotTableTextNumber() ...@@ -1668,6 +1668,31 @@ void Test::testPivotTableTextNumber()
CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess);
} }
// Set the Name dimension to page dimension.
pDPObj->BuildAllDimensionMembers();
ScDPSaveData aSaveData(*pDPObj->GetSaveData());
ScDPSaveDimension* pDim = aSaveData.GetExistingDimensionByName("Name");
CPPUNIT_ASSERT(pDim);
pDim->SetOrientation(sheet::DataPilotFieldOrientation_PAGE);
OUString aVisiblePage("0004");
pDim->SetCurrentPage(&aVisiblePage);
pDPObj->SetSaveData(aSaveData);
aOutRange = refresh(pDPObj);
{
// Expected output table content. 0 = empty cell
const char* aOutputCheck[][2] = {
{ "Name", "0004" },
{ 0, 0 },
{ "Sum - Value", 0 },
{ "4", 0 }
};
bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Text number field members");
CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess);
}
pDPs->FreeTable(pDPObj); pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0)); CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be no more tables.", pDPs->GetCount(), static_cast<size_t>(0));
CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.", CPPUNIT_ASSERT_EQUAL_MESSAGE("There shouldn't be any more cache stored.",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment