summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-30 12:16:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-31 08:25:07 +0200
commitc9253818ec8252169c20450b41878be459568d95 (patch)
tree1f271151725042f33c3c8aa3988343bcd7f89e12 /sw/qa
parent242a796a71e29a1d8cdc4dd71d2465b898db32ab (diff)
loplugin:oncevar
extend oncevar to any POD type Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0 Reviewed-on: https://gerrit.libreoffice.org/40564 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport8.cxx6
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx10
-rw-r--r--sw/qa/extras/ww8import/ww8import.cxx4
3 files changed, 10 insertions, 10 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 370d220e6a74..17afb75359fe 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -2105,7 +2105,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf99140, "tdf99140.docx")
DECLARE_OOXMLEXPORT_TEST( testTableCellMargin, "table-cell-margin.docx" )
{
- sal_Int32 cellLeftMarginFromOffice[] = { 250, 100, 0, 0 };
+ sal_Int32 const cellLeftMarginFromOffice[] = { 250, 100, 0, 0 };
uno::Reference< text::XTextTablesSupplier > xTablesSupplier( mxComponent, uno::UNO_QUERY );
uno::Reference< frame::XModel > xModel( mxComponent, uno::UNO_QUERY );
@@ -2133,7 +2133,7 @@ DECLARE_OOXMLEXPORT_TEST( testTableCellMargin, "table-cell-margin.docx" )
// tdf#106742 for DOCX with compatibility level <= 14 (MS Word up to and incl. ver.2010), we should use cell margins when calculating table left border position
DECLARE_OOXMLEXPORT_TEST( testTablePosition14, "table-position-14.docx" )
{
- sal_Int32 aXCoordsFromOffice[] = { 2500, -1000, 0, 0 };
+ sal_Int32 const aXCoordsFromOffice[] = { 2500, -1000, 0, 0 };
uno::Reference< text::XTextTablesSupplier > xTablesSupplier( mxComponent, uno::UNO_QUERY );
uno::Reference< frame::XModel > xModel( mxComponent, uno::UNO_QUERY );
@@ -2157,7 +2157,7 @@ DECLARE_OOXMLEXPORT_TEST( testTablePosition14, "table-position-14.docx" )
// tdf#106742 for DOCX with compatibility level > 14 (MS Word since ver.2013), we should NOT use cell margins when calculating table left border position
DECLARE_OOXMLEXPORT_TEST( testTablePosition15, "table-position-15.docx" )
{
- sal_Int32 aXCoordsFromOffice[] = { 2751, -899, 1, 106 };
+ sal_Int32 const aXCoordsFromOffice[] = { 2751, -899, 1, 106 };
uno::Reference< text::XTextTablesSupplier > xTablesSupplier( mxComponent, uno::UNO_QUERY );
uno::Reference< frame::XModel > xModel( mxComponent, uno::UNO_QUERY );
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index b7745e2c659e..9f75068be62f 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -209,21 +209,21 @@ DECLARE_RTFEXPORT_TEST(testCommentsNested, "comments-nested.odt")
DECLARE_RTFEXPORT_TEST(testMathAccents, "math-accents.rtf")
{
OUString aActual = getFormula(getRun(getParagraph(1), 1));
- OUString aExpected("acute {a} grave {a} check {a} breve {a} circle {a} widevec {a} widetilde {a} widehat {a} dot {a} widevec {a} widevec {a} widetilde {a} underline {a}");
+ OUString const aExpected("acute {a} grave {a} check {a} breve {a} circle {a} widevec {a} widetilde {a} widehat {a} dot {a} widevec {a} widevec {a} widetilde {a} underline {a}");
CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
}
DECLARE_RTFEXPORT_TEST(testMathEqarray, "math-eqarray.rtf")
{
OUString aActual = getFormula(getRun(getParagraph(1), 1));
- OUString aExpected("y = left lbrace stack { 0, x < 0 # 1, x = 0 # {x} ^ {2} , x > 0 } right none");
+ OUString const aExpected("y = left lbrace stack { 0, x < 0 # 1, x = 0 # {x} ^ {2} , x > 0 } right none");
CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
}
DECLARE_RTFEXPORT_TEST(testMathD, "math-d.rtf")
{
OUString aActual = getFormula(getRun(getParagraph(1), 1));
- OUString aExpected("left (x mline y mline z right ) left (1 right ) left [2 right ] left ldbracket 3 right rdbracket left lline 4 right rline left ldline 5 right rdline left langle 6 right rangle left langle a mline b right rangle left ({x} over {y} right )");
+ OUString const aExpected("left (x mline y mline z right ) left (1 right ) left [2 right ] left ldbracket 3 right rdbracket left lline 4 right rline left ldline 5 right rdline left langle 6 right rangle left langle a mline b right rangle left ({x} over {y} right )");
CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
}
@@ -298,7 +298,7 @@ DECLARE_RTFEXPORT_TEST(testMathMso2007, "math-mso2007.rtf")
DECLARE_RTFEXPORT_TEST(testMathNary, "math-nary.rtf")
{
OUString aActual = getFormula(getRun(getParagraph(1), 1));
- OUString aExpected("lllint from {1} to {2} {x + 1} prod from {a} {b} sum to {2} {x}");
+ OUString const aExpected("lllint from {1} to {2} {x + 1} prod from {a} {b} sum to {2} {x}");
CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
}
@@ -338,7 +338,7 @@ DECLARE_RTFEXPORT_TEST(testMathSepchr, "math-sepchr.rtf")
DECLARE_RTFEXPORT_TEST(testMathSubscripts, "math-subscripts.rtf")
{
OUString aActual = getFormula(getRun(getParagraph(1), 1));
- OUString aExpected("{x} ^ {y} + {e} ^ {x} {x} ^ {b} {x} rsub {b} {a} rsub {c} rsup {b} {x} lsub {2} lsup {1} {{x csup {6} csub {3}} lsub {4} lsup {5}} rsub {2} rsup {1}");
+ OUString const aExpected("{x} ^ {y} + {e} ^ {x} {x} ^ {b} {x} rsub {b} {a} rsub {c} rsup {b} {x} lsub {2} lsup {1} {{x csup {6} csub {3}} lsub {4} lsup {5}} rsub {2} rsup {1}");
CPPUNIT_ASSERT_EQUAL(aExpected, aActual);
}
diff --git a/sw/qa/extras/ww8import/ww8import.cxx b/sw/qa/extras/ww8import/ww8import.cxx
index 52cab54b2e61..5ea85cc7360b 100644
--- a/sw/qa/extras/ww8import/ww8import.cxx
+++ b/sw/qa/extras/ww8import/ww8import.cxx
@@ -118,8 +118,8 @@ DECLARE_WW8IMPORT_TEST( testTdf105570, "tdf105570.doc" )
DECLARE_WW8IMPORT_TEST(testTdf106799, "tdf106799.doc")
{
- sal_Int32 nCellWidths[3][4] = { { 9530, 0, 0, 0 },{ 2382, 2382, 2382, 2384 },{ 2382, 2382, 2382, 2384 } };
- sal_Int32 nCellTxtLns[3][4] = { { 1, 0, 0, 0 },{ 1, 0, 0, 0},{ 1, 1, 1, 1 } };
+ sal_Int32 const nCellWidths[3][4] = { { 9530, 0, 0, 0 },{ 2382, 2382, 2382, 2384 },{ 2382, 2382, 2382, 2384 } };
+ sal_Int32 const nCellTxtLns[3][4] = { { 1, 0, 0, 0 },{ 1, 0, 0, 0},{ 1, 1, 1, 1 } };
// Table was distorted because of missing sprmPFInnerTableCell at paragraph marks (0x0D) with sprmPFInnerTtp
for (sal_Int32 nRow : { 0, 1, 2 })
for (sal_Int32 nCell : { 0, 1, 2, 3 })