summaryrefslogtreecommitdiff
path: root/sw/qa/inc/bordertest.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-06-13 15:08:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-06-13 19:56:40 +0200
commit902541d805c7de0c2f10b1c9ed5520a1e6ce5d12 (patch)
treef84ddb8bbc89d106b018f18ff8d5a4310260cd4b /sw/qa/inc/bordertest.hxx
parent12e48f91d488e6ce42cf1c361e782ab8a2737c4c (diff)
loplugin:ostr in sw/qa
Change-Id: Ib67997a3f491afaec380ef65bc60588362d9cc3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168812 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa/inc/bordertest.hxx')
-rw-r--r--sw/qa/inc/bordertest.hxx158
1 files changed, 79 insertions, 79 deletions
diff --git a/sw/qa/inc/bordertest.hxx b/sw/qa/inc/bordertest.hxx
index 3137c85c9766..6a538169c741 100644
--- a/sw/qa/inc/bordertest.hxx
+++ b/sw/qa/inc/bordertest.hxx
@@ -43,105 +43,105 @@ public:
// maps containing TopBorder widths for every cell
// one map for each tables - there are 8 of them, counting from 0
BorderLineMap map0;
- map0.insert(StringBorderPair(OUString("A1"), table::BorderLine(0, 53, 26, 26)));
- map0.insert(StringBorderPair(OUString("B1"), table::BorderLine(0, 79, 26, 26)));
- map0.insert(StringBorderPair(OUString("C1"), table::BorderLine(0, 106, 26, 26)));
- map0.insert(StringBorderPair(OUString("D1"), table::BorderLine(0, 159, 26, 26)));
- map0.insert(StringBorderPair(OUString("E1"), table::BorderLine(0, 212, 26, 26)));
+ map0.insert(StringBorderPair(u"A1"_ustr, table::BorderLine(0, 53, 26, 26)));
+ map0.insert(StringBorderPair(u"B1"_ustr, table::BorderLine(0, 79, 26, 26)));
+ map0.insert(StringBorderPair(u"C1"_ustr, table::BorderLine(0, 106, 26, 26)));
+ map0.insert(StringBorderPair(u"D1"_ustr, table::BorderLine(0, 159, 26, 26)));
+ map0.insert(StringBorderPair(u"E1"_ustr, table::BorderLine(0, 212, 26, 26)));
BorderLineMap map1;
- map1.insert(StringBorderPair(OUString("A1"), table::BorderLine(0, 9, 9, 9)));
- map1.insert(StringBorderPair(OUString("B1"), table::BorderLine(0, 18, 18, 18)));
- map1.insert(StringBorderPair(OUString("C1"), table::BorderLine(0, 26, 26, 26)));
- map1.insert(StringBorderPair(OUString("D1"), table::BorderLine(0, 53, 53, 53)));
- map1.insert(StringBorderPair(OUString("E1"), table::BorderLine(0, 79, 79, 79)));
- map1.insert(StringBorderPair(OUString("F1"), table::BorderLine(0, 106, 106, 106)));
+ map1.insert(StringBorderPair(u"A1"_ustr, table::BorderLine(0, 9, 9, 9)));
+ map1.insert(StringBorderPair(u"B1"_ustr, table::BorderLine(0, 18, 18, 18)));
+ map1.insert(StringBorderPair(u"C1"_ustr, table::BorderLine(0, 26, 26, 26)));
+ map1.insert(StringBorderPair(u"D1"_ustr, table::BorderLine(0, 53, 53, 53)));
+ map1.insert(StringBorderPair(u"E1"_ustr, table::BorderLine(0, 79, 79, 79)));
+ map1.insert(StringBorderPair(u"F1"_ustr, table::BorderLine(0, 106, 106, 106)));
BorderLineMap map2;
- map2.insert(StringBorderPair(OUString("A1"), table::BorderLine(0, 9, 5, 5)));
- map2.insert(StringBorderPair(OUString("B1"), table::BorderLine(0, 18, 9, 9)));
- map2.insert(StringBorderPair(OUString("C1"), table::BorderLine(0, 26, 14, 14)));
- map2.insert(StringBorderPair(OUString("D1"), table::BorderLine(0, 35, 18, 18)));
- map2.insert(StringBorderPair(OUString("E1"), table::BorderLine(0, 53, 26, 26)));
- map2.insert(StringBorderPair(OUString("F1"), table::BorderLine(0, 79, 41, 41)));
- map2.insert(StringBorderPair(OUString("G1"), table::BorderLine(0, 106, 53, 53)));
- map2.insert(StringBorderPair(OUString("H1"), table::BorderLine(0, 159, 79, 79)));
- map2.insert(StringBorderPair(OUString("I1"), table::BorderLine(0, 212, 106, 106)));
+ map2.insert(StringBorderPair(u"A1"_ustr, table::BorderLine(0, 9, 5, 5)));
+ map2.insert(StringBorderPair(u"B1"_ustr, table::BorderLine(0, 18, 9, 9)));
+ map2.insert(StringBorderPair(u"C1"_ustr, table::BorderLine(0, 26, 14, 14)));
+ map2.insert(StringBorderPair(u"D1"_ustr, table::BorderLine(0, 35, 18, 18)));
+ map2.insert(StringBorderPair(u"E1"_ustr, table::BorderLine(0, 53, 26, 26)));
+ map2.insert(StringBorderPair(u"F1"_ustr, table::BorderLine(0, 79, 41, 41)));
+ map2.insert(StringBorderPair(u"G1"_ustr, table::BorderLine(0, 106, 53, 53)));
+ map2.insert(StringBorderPair(u"H1"_ustr, table::BorderLine(0, 159, 79, 79)));
+ map2.insert(StringBorderPair(u"I1"_ustr, table::BorderLine(0, 212, 106, 106)));
BorderLineMap map3;
- map3.insert(StringBorderPair(OUString("A1"), table::BorderLine(0, 53, 26, 9)));
- map3.insert(StringBorderPair(OUString("B1"), table::BorderLine(0, 53, 26, 18)));
- map3.insert(StringBorderPair(OUString("C1"), table::BorderLine(0, 53, 26, 26)));
- map3.insert(StringBorderPair(OUString("D1"), table::BorderLine(0, 53, 26, 35)));
- map3.insert(StringBorderPair(OUString("E1"), table::BorderLine(0, 53, 26, 53)));
- map3.insert(StringBorderPair(OUString("F1"), table::BorderLine(0, 53, 26, 79)));
- map3.insert(StringBorderPair(OUString("G1"), table::BorderLine(0, 53, 26, 106)));
- map3.insert(StringBorderPair(OUString("H1"), table::BorderLine(0, 53, 26, 159)));
- map3.insert(StringBorderPair(OUString("I1"), table::BorderLine(0, 53, 26, 212)));
- map3.insert(StringBorderPair(OUString("A1"), table::BorderLine(0, 53, 26, 9)));
+ map3.insert(StringBorderPair(u"A1"_ustr, table::BorderLine(0, 53, 26, 9)));
+ map3.insert(StringBorderPair(u"B1"_ustr, table::BorderLine(0, 53, 26, 18)));
+ map3.insert(StringBorderPair(u"C1"_ustr, table::BorderLine(0, 53, 26, 26)));
+ map3.insert(StringBorderPair(u"D1"_ustr, table::BorderLine(0, 53, 26, 35)));
+ map3.insert(StringBorderPair(u"E1"_ustr, table::BorderLine(0, 53, 26, 53)));
+ map3.insert(StringBorderPair(u"F1"_ustr, table::BorderLine(0, 53, 26, 79)));
+ map3.insert(StringBorderPair(u"G1"_ustr, table::BorderLine(0, 53, 26, 106)));
+ map3.insert(StringBorderPair(u"H1"_ustr, table::BorderLine(0, 53, 26, 159)));
+ map3.insert(StringBorderPair(u"I1"_ustr, table::BorderLine(0, 53, 26, 212)));
+ map3.insert(StringBorderPair(u"A1"_ustr, table::BorderLine(0, 53, 26, 9)));
// Binary-DOC importer changes 'inset' and 'outset' border styles to other styles
// during import, so for now - leaving binary-doc results as they were.
BorderLineMap map4;
if (isBinaryDoc)
{
- map4.insert(StringBorderPair(OUString("B1"), table::BorderLine(0, 53, 26, 18)));
- map4.insert(StringBorderPair(OUString("C1"), table::BorderLine(0, 53, 26, 26)));
- map4.insert(StringBorderPair(OUString("D1"), table::BorderLine(0, 53, 26, 35)));
- map4.insert(StringBorderPair(OUString("E1"), table::BorderLine(0, 53, 26, 35)));
- map4.insert(StringBorderPair(OUString("F1"), table::BorderLine(0, 53, 26, 79)));
- map4.insert(StringBorderPair(OUString("G1"), table::BorderLine(0, 53, 26, 106)));
- map4.insert(StringBorderPair(OUString("H1"), table::BorderLine(0, 53, 26, 159)));
- map4.insert(StringBorderPair(OUString("I1"), table::BorderLine(0, 53, 26, 212)));
+ map4.insert(StringBorderPair(u"B1"_ustr, table::BorderLine(0, 53, 26, 18)));
+ map4.insert(StringBorderPair(u"C1"_ustr, table::BorderLine(0, 53, 26, 26)));
+ map4.insert(StringBorderPair(u"D1"_ustr, table::BorderLine(0, 53, 26, 35)));
+ map4.insert(StringBorderPair(u"E1"_ustr, table::BorderLine(0, 53, 26, 35)));
+ map4.insert(StringBorderPair(u"F1"_ustr, table::BorderLine(0, 53, 26, 79)));
+ map4.insert(StringBorderPair(u"G1"_ustr, table::BorderLine(0, 53, 26, 106)));
+ map4.insert(StringBorderPair(u"H1"_ustr, table::BorderLine(0, 53, 26, 159)));
+ map4.insert(StringBorderPair(u"I1"_ustr, table::BorderLine(0, 53, 26, 212)));
}
else
{
- map4.insert(StringBorderPair(OUString("A1"), table::BorderLine(0, 0, 26, 4)));
- map4.insert(StringBorderPair(OUString("B1"), table::BorderLine(0, 5, 26, 5)));
- map4.insert(StringBorderPair(OUString("C1"), table::BorderLine(0, 14, 26, 14)));
- map4.insert(StringBorderPair(OUString("D1"), table::BorderLine(0, 23, 26, 23)));
- map4.insert(StringBorderPair(OUString("E1"), table::BorderLine(0, 41, 26, 41)));
- map4.insert(StringBorderPair(OUString("F1"), table::BorderLine(0, 67, 26, 67)));
- map4.insert(StringBorderPair(OUString("G1"), table::BorderLine(0, 93, 26, 93)));
- map4.insert(StringBorderPair(OUString("H1"), table::BorderLine(0, 146, 26, 146)));
- map4.insert(StringBorderPair(OUString("I1"), table::BorderLine(0, 199, 26, 199)));
+ map4.insert(StringBorderPair(u"A1"_ustr, table::BorderLine(0, 0, 26, 4)));
+ map4.insert(StringBorderPair(u"B1"_ustr, table::BorderLine(0, 5, 26, 5)));
+ map4.insert(StringBorderPair(u"C1"_ustr, table::BorderLine(0, 14, 26, 14)));
+ map4.insert(StringBorderPair(u"D1"_ustr, table::BorderLine(0, 23, 26, 23)));
+ map4.insert(StringBorderPair(u"E1"_ustr, table::BorderLine(0, 41, 26, 41)));
+ map4.insert(StringBorderPair(u"F1"_ustr, table::BorderLine(0, 67, 26, 67)));
+ map4.insert(StringBorderPair(u"G1"_ustr, table::BorderLine(0, 93, 26, 93)));
+ map4.insert(StringBorderPair(u"H1"_ustr, table::BorderLine(0, 146, 26, 146)));
+ map4.insert(StringBorderPair(u"I1"_ustr, table::BorderLine(0, 199, 26, 199)));
}
BorderLineMap map5;
if (isBinaryDoc)
{
- map5.insert(StringBorderPair(OUString("A1"), table::BorderLine(0, 26, 53, 9)));
- map5.insert(StringBorderPair(OUString("B1"), table::BorderLine(0, 26, 53, 18)));
- map5.insert(StringBorderPair(OUString("C1"), table::BorderLine(0, 26, 53, 26)));
- map5.insert(StringBorderPair(OUString("D1"), table::BorderLine(0, 26, 53, 35)));
- map5.insert(StringBorderPair(OUString("E1"), table::BorderLine(0, 26, 53, 53)));
- map5.insert(StringBorderPair(OUString("F1"), table::BorderLine(0, 26, 53, 79)));
- map5.insert(StringBorderPair(OUString("G1"), table::BorderLine(0, 26, 53, 106)));
- map5.insert(StringBorderPair(OUString("H1"), table::BorderLine(0, 26, 53, 159)));
- map5.insert(StringBorderPair(OUString("I1"), table::BorderLine(0, 26, 53, 212)));
+ map5.insert(StringBorderPair(u"A1"_ustr, table::BorderLine(0, 26, 53, 9)));
+ map5.insert(StringBorderPair(u"B1"_ustr, table::BorderLine(0, 26, 53, 18)));
+ map5.insert(StringBorderPair(u"C1"_ustr, table::BorderLine(0, 26, 53, 26)));
+ map5.insert(StringBorderPair(u"D1"_ustr, table::BorderLine(0, 26, 53, 35)));
+ map5.insert(StringBorderPair(u"E1"_ustr, table::BorderLine(0, 26, 53, 53)));
+ map5.insert(StringBorderPair(u"F1"_ustr, table::BorderLine(0, 26, 53, 79)));
+ map5.insert(StringBorderPair(u"G1"_ustr, table::BorderLine(0, 26, 53, 106)));
+ map5.insert(StringBorderPair(u"H1"_ustr, table::BorderLine(0, 26, 53, 159)));
+ map5.insert(StringBorderPair(u"I1"_ustr, table::BorderLine(0, 26, 53, 212)));
}
else
{
- map5.insert(StringBorderPair(OUString("A1"), table::BorderLine(0, 26, 2, 4)));
- map5.insert(StringBorderPair(OUString("B1"), table::BorderLine(0, 26, 5, 5)));
- map5.insert(StringBorderPair(OUString("C1"), table::BorderLine(0, 26, 14, 14)));
- map5.insert(StringBorderPair(OUString("D1"), table::BorderLine(0, 26, 23, 23)));
- map5.insert(StringBorderPair(OUString("E1"), table::BorderLine(0, 26, 41, 41)));
- map5.insert(StringBorderPair(OUString("F1"), table::BorderLine(0, 26, 67, 67)));
- map5.insert(StringBorderPair(OUString("G1"), table::BorderLine(0, 26, 93, 93)));
- map5.insert(StringBorderPair(OUString("H1"), table::BorderLine(0, 26, 146, 146)));
- map5.insert(StringBorderPair(OUString("I1"), table::BorderLine(0, 26, 199, 199)));
+ map5.insert(StringBorderPair(u"A1"_ustr, table::BorderLine(0, 26, 2, 4)));
+ map5.insert(StringBorderPair(u"B1"_ustr, table::BorderLine(0, 26, 5, 5)));
+ map5.insert(StringBorderPair(u"C1"_ustr, table::BorderLine(0, 26, 14, 14)));
+ map5.insert(StringBorderPair(u"D1"_ustr, table::BorderLine(0, 26, 23, 23)));
+ map5.insert(StringBorderPair(u"E1"_ustr, table::BorderLine(0, 26, 41, 41)));
+ map5.insert(StringBorderPair(u"F1"_ustr, table::BorderLine(0, 26, 67, 67)));
+ map5.insert(StringBorderPair(u"G1"_ustr, table::BorderLine(0, 26, 93, 93)));
+ map5.insert(StringBorderPair(u"H1"_ustr, table::BorderLine(0, 26, 146, 146)));
+ map5.insert(StringBorderPair(u"I1"_ustr, table::BorderLine(0, 26, 199, 199)));
}
BorderLineMap map6;
- map6.insert(StringBorderPair(OUString("A1"), table::BorderLine(0, 14, 14, 26)));
- map6.insert(StringBorderPair(OUString("B1"), table::BorderLine(0, 26, 26, 53)));
- map6.insert(StringBorderPair(OUString("C1"), table::BorderLine(0, 41, 41, 79)));
- map6.insert(StringBorderPair(OUString("D1"), table::BorderLine(0, 53, 53, 106)));
- map6.insert(StringBorderPair(OUString("E1"), table::BorderLine(0, 79, 79, 159)));
- map6.insert(StringBorderPair(OUString("F1"), table::BorderLine(0, 106, 106, 212)));
+ map6.insert(StringBorderPair(u"A1"_ustr, table::BorderLine(0, 14, 14, 26)));
+ map6.insert(StringBorderPair(u"B1"_ustr, table::BorderLine(0, 26, 26, 53)));
+ map6.insert(StringBorderPair(u"C1"_ustr, table::BorderLine(0, 41, 41, 79)));
+ map6.insert(StringBorderPair(u"D1"_ustr, table::BorderLine(0, 53, 53, 106)));
+ map6.insert(StringBorderPair(u"E1"_ustr, table::BorderLine(0, 79, 79, 159)));
+ map6.insert(StringBorderPair(u"F1"_ustr, table::BorderLine(0, 106, 106, 212)));
BorderLineMap map7;
- map7.insert(StringBorderPair(OUString("A1"), table::BorderLine(0, 14, 14, 26)));
- map7.insert(StringBorderPair(OUString("B1"), table::BorderLine(0, 26, 26, 53)));
- map7.insert(StringBorderPair(OUString("C1"), table::BorderLine(0, 41, 41, 79)));
- map7.insert(StringBorderPair(OUString("D1"), table::BorderLine(0, 53, 53, 106)));
- map7.insert(StringBorderPair(OUString("E1"), table::BorderLine(0, 79, 79, 159)));
- map7.insert(StringBorderPair(OUString("F1"), table::BorderLine(0, 106, 106, 212)));
+ map7.insert(StringBorderPair(u"A1"_ustr, table::BorderLine(0, 14, 14, 26)));
+ map7.insert(StringBorderPair(u"B1"_ustr, table::BorderLine(0, 26, 26, 53)));
+ map7.insert(StringBorderPair(u"C1"_ustr, table::BorderLine(0, 41, 41, 79)));
+ map7.insert(StringBorderPair(u"D1"_ustr, table::BorderLine(0, 53, 53, 106)));
+ map7.insert(StringBorderPair(u"E1"_ustr, table::BorderLine(0, 79, 79, 159)));
+ map7.insert(StringBorderPair(u"F1"_ustr, table::BorderLine(0, 106, 106, 212)));
sal_Int32 currentTable = 0; //to know which map should we check with the current table
BorderLineMap* tempMap;
@@ -151,7 +151,7 @@ public:
uno::Reference<lang::XServiceInfo> xServiceInfo;
if (xParaEnum->nextElement() >>= xServiceInfo)
{
- if (xServiceInfo->supportsService("com.sun.star.text.TextTable"))
+ if (xServiceInfo->supportsService(u"com.sun.star.text.TextTable"_ustr))
{
uno::Reference<text::XTextTable> const xTextTable(xServiceInfo, uno::UNO_QUERY_THROW);
uno::Sequence<OUString> const cells = xTextTable->getCellNames();
@@ -177,7 +177,7 @@ public:
{
uno::Reference<table::XCell> xCell = xTextTable->getCellByName(rCell);
uno::Reference< beans::XPropertySet > xPropSet(xCell, uno::UNO_QUERY_THROW);
- uno::Any aAny = xPropSet->getPropertyValue("TopBorder");
+ uno::Any aAny = xPropSet->getPropertyValue(u"TopBorder"_ustr);
table::BorderLine aBorderLine;
it = tempMap->find(rCell);
if ((aAny >>= aBorderLine) && (it!=tempMap->end()))