summaryrefslogtreecommitdiff
path: root/chart2/qa
diff options
context:
space:
mode:
authorPhilipp Hofer <philipp.hofer@protonmail.com>2020-11-12 12:50:27 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-11-22 01:57:32 +0100
commit79b6055acd1ea27a9f054e6980abbe2024cdc4a2 (patch)
tree1f441f303313ef5500e4b24a596c33640837b787 /chart2/qa
parent315f270d2db7541e9400852b070afb30f371f644 (diff)
tdf#123936 Formatting files in module chart2 with clang-format
Change-Id: Ie4dea73190040e5716fe531cf35fae20d7e175db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105650 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'chart2/qa')
-rw-r--r--chart2/qa/extras/xshape/chart2xshape.cxx39
1 files changed, 19 insertions, 20 deletions
diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx b/chart2/qa/extras/xshape/chart2xshape.cxx
index a4f24e666691..68dcc1e7e030 100644
--- a/chart2/qa/extras/xshape/chart2xshape.cxx
+++ b/chart2/qa/extras/xshape/chart2xshape.cxx
@@ -22,7 +22,6 @@
class Chart2XShapeTest : public ChartTest, public XmlTestTools
{
public:
-
void testFdo75075();
void testPropertyMappingBarChart();
void testPieChartLabels1();
@@ -45,31 +44,29 @@ public:
CPPUNIT_TEST_SUITE_END();
private:
-
void compareAgainstReference(const OUString& rReferenceFile, bool bCreateReference = false);
OUString getXShapeDumpString();
xmlDocUniquePtr getXShapeDumpXmlDoc();
};
-namespace {
-
-bool checkDumpAgainstFile( const OUString& rDump, const OUString& aFilePath)
+namespace
+{
+bool checkDumpAgainstFile(const OUString& rDump, const OUString& aFilePath)
{
OString aOFile = OUStringToOString(aFilePath, RTL_TEXTENCODING_UTF8);
CPPUNIT_ASSERT_MESSAGE("dump is empty", !rDump.isEmpty());
OString aDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8);
- return doXMLDiff(aOFile.getStr(), aDump.getStr(),
- static_cast<int>(rDump.getLength()), nullptr);
+ return doXMLDiff(aOFile.getStr(), aDump.getStr(), static_cast<int>(rDump.getLength()), nullptr);
}
-
}
OUString Chart2XShapeTest::getXShapeDumpString()
{
- uno::Reference< chart::XChartDocument > xChartDoc ( getChartCompFromSheet( 0, mxComponent ), UNO_QUERY_THROW);
- uno::Reference< qa::XDumper > xDumper( xChartDoc, UNO_QUERY_THROW );
+ uno::Reference<chart::XChartDocument> xChartDoc(getChartCompFromSheet(0, mxComponent),
+ UNO_QUERY_THROW);
+ uno::Reference<qa::XDumper> xDumper(xChartDoc, UNO_QUERY_THROW);
return xDumper->dump();
}
@@ -80,12 +77,14 @@ xmlDocUniquePtr Chart2XShapeTest::getXShapeDumpXmlDoc()
return xmlDocUniquePtr(xmlParseDoc(reinterpret_cast<const xmlChar*>(aXmlDump.getStr())));
}
-void Chart2XShapeTest::compareAgainstReference(const OUString& rReferenceFile, bool bCreateReference)
+void Chart2XShapeTest::compareAgainstReference(const OUString& rReferenceFile,
+ bool bCreateReference)
{
OUString aDump = getXShapeDumpString();
- OUString aReference = m_directories.getPathFromSrc("/chart2/qa/extras/xshape/data/reference/") + rReferenceFile;
- if(bCreateReference)
+ OUString aReference
+ = m_directories.getPathFromSrc("/chart2/qa/extras/xshape/data/reference/") + rReferenceFile;
+ if (bCreateReference)
{
OString aOFile = OUStringToOString(aReference, RTL_TEXTENCODING_UTF8);
OString aODump = OUStringToOString(aDump, RTL_TEXTENCODING_UTF8);
@@ -183,14 +182,14 @@ void Chart2XShapeTest::testTdf76649TrendLineBug()
void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
{
load("chart2/qa/extras/xshape/data/pptx/", "tdf88154_LabelRotatedLayout.pptx");
- uno::Reference< chart::XChartDocument > xChartDoc = getChartDocFromDrawImpress(0,6);
- uno::Reference< qa::XDumper > xDumper( xChartDoc, UNO_QUERY_THROW );
+ uno::Reference<chart::XChartDocument> xChartDoc = getChartDocFromDrawImpress(0, 6);
+ uno::Reference<qa::XDumper> xDumper(xChartDoc, UNO_QUERY_THROW);
OUString rDump = xDumper->dump();
OString aXmlDump = OUStringToOString(rDump, RTL_TEXTENCODING_UTF8);
xmlDocUniquePtr pXmlDoc(xmlParseDoc(reinterpret_cast<const xmlChar*>(aXmlDump.getStr())));
{
- OString aPath( "//XShape[@text='Oct-12']/Transformation" );
+ OString aPath("//XShape[@text='Oct-12']/Transformation");
assertXPath(pXmlDoc, aPath, 1);
double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble();
double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble();
@@ -201,7 +200,7 @@ void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath( "//XShape[@text='Nov-12']/Transformation" );
+ OString aPath("//XShape[@text='Nov-12']/Transformation");
assertXPath(pXmlDoc, aPath, 1);
double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble();
double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble();
@@ -212,7 +211,7 @@ void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath( "//XShape[@text='Dec-12']/Transformation" );
+ OString aPath("//XShape[@text='Dec-12']/Transformation");
assertXPath(pXmlDoc, aPath, 1);
double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble();
double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble();
@@ -223,7 +222,7 @@ void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath( "//XShape[@text='May-13']/Transformation" );
+ OString aPath("//XShape[@text='May-13']/Transformation");
assertXPath(pXmlDoc, aPath, 1);
double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble();
double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble();
@@ -234,7 +233,7 @@ void Chart2XShapeTest::testTdf88154LabelRotatedLayout()
CPPUNIT_ASSERT_DOUBLES_EQUAL(fT12, fT22, 1e-8);
}
{
- OString aPath( "//XShape[@text='Jan-14']/Transformation" );
+ OString aPath("//XShape[@text='Jan-14']/Transformation");
assertXPath(pXmlDoc, aPath, 1);
double fT11 = getXPath(pXmlDoc, aPath + "/Line1", "column1").toDouble();
double fT12 = getXPath(pXmlDoc, aPath + "/Line1", "column2").toDouble();