summaryrefslogtreecommitdiff
path: root/sc/qa/unit/ucalc_pivottable.cxx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /sc/qa/unit/ucalc_pivottable.cxx
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/qa/unit/ucalc_pivottable.cxx')
-rw-r--r--sc/qa/unit/ucalc_pivottable.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx
index 54a4e85d6dcf..00bb90dfe2c2 100644
--- a/sc/qa/unit/ucalc_pivottable.cxx
+++ b/sc/qa/unit/ucalc_pivottable.cxx
@@ -1629,7 +1629,7 @@ void Test::testPivotTableTextNumber()
// Set the Name dimension to page dimension.
pDPObj->BuildAllDimensionMembers();
ScDPSaveData aSaveData(*pDPObj->GetSaveData());
- ScDPSaveDimension* pDim = aSaveData.GetExistingDimensionByName("Name");
+ ScDPSaveDimension* pDim = aSaveData.GetExistingDimensionByName(u"Name");
CPPUNIT_ASSERT(pDim);
pDim->SetOrientation(sheet::DataPilotFieldOrientation_PAGE);
OUString aVisiblePage("0004");
@@ -2407,9 +2407,9 @@ void Test::testPivotTableDPCollection()
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be no DP table", size_t(0), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("should return nullptr",
- static_cast<ScDPObject*>(nullptr), pDPs->GetByName("DP1"));
+ static_cast<ScDPObject*>(nullptr), pDPs->GetByName(u"DP1"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("should return nullptr",
- static_cast<ScDPObject*>(nullptr), pDPs->GetByName(""));
+ static_cast<ScDPObject*>(nullptr), pDPs->GetByName(u""));
// Add 2 DP objects
ScDPObject* pDPObj = createDPFromRange(m_pDoc, aDataRange , aFields, nFieldCount, false);
@@ -2424,36 +2424,36 @@ void Test::testPivotTableDPCollection()
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be two DP tables", size_t(2), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("should return first DPObject",
- pDPObj, pDPs->GetByName("DP1"));
+ pDPObj, pDPs->GetByName(u"DP1"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("should return second DPObject",
- pDPObj2, pDPs->GetByName("DP2"));
+ pDPObj2, pDPs->GetByName(u"DP2"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("empty string should return nullptr",
- static_cast<ScDPObject*>(nullptr), pDPs->GetByName(""));
+ static_cast<ScDPObject*>(nullptr), pDPs->GetByName(u""));
CPPUNIT_ASSERT_EQUAL_MESSAGE("non existent name should return nullptr",
- static_cast<ScDPObject*>(nullptr), pDPs->GetByName("Non"));
+ static_cast<ScDPObject*>(nullptr), pDPs->GetByName(u"Non"));
// Remove first DP Object
pDPs->FreeTable(pDPObj);
CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one DP table", size_t(1), pDPs->GetCount());
CPPUNIT_ASSERT_EQUAL_MESSAGE("first DP object was deleted, should return nullptr",
- static_cast<ScDPObject*>(nullptr), pDPs->GetByName("DP1"));
+ static_cast<ScDPObject*>(nullptr), pDPs->GetByName(u"DP1"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("should return second DPObject",
- pDPObj2, pDPs->GetByName("DP2"));
+ pDPObj2, pDPs->GetByName(u"DP2"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("empty string should return nullptr",
- static_cast<ScDPObject*>(nullptr), pDPs->GetByName(""));
+ static_cast<ScDPObject*>(nullptr), pDPs->GetByName(u""));
CPPUNIT_ASSERT_EQUAL_MESSAGE("non existent name should return nullptr",
- static_cast<ScDPObject*>(nullptr), pDPs->GetByName("Non"));
+ static_cast<ScDPObject*>(nullptr), pDPs->GetByName(u"Non"));
// Remove second DP Object
pDPs->FreeTable(pDPObj2);
CPPUNIT_ASSERT_EQUAL_MESSAGE("first DP object was deleted, should return nullptr",
- static_cast<ScDPObject*>(nullptr), pDPs->GetByName("DP1"));
+ static_cast<ScDPObject*>(nullptr), pDPs->GetByName(u"DP1"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("second DP object was deleted, should return nullptr",
- static_cast<ScDPObject*>(nullptr), pDPs->GetByName("DP2"));
+ static_cast<ScDPObject*>(nullptr), pDPs->GetByName(u"DP2"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("empty string should return nullptr",
- static_cast<ScDPObject*>(nullptr), pDPs->GetByName(""));
+ static_cast<ScDPObject*>(nullptr), pDPs->GetByName(u""));
CPPUNIT_ASSERT_EQUAL_MESSAGE("non existent name should return nullptr",
- static_cast<ScDPObject*>(nullptr), pDPs->GetByName("Non"));
+ static_cast<ScDPObject*>(nullptr), pDPs->GetByName(u"Non"));
// Clean-up
m_pDoc->DeleteTab(1);