chart2/qa/extras/xshape/chart2xshape.cxx |   24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

New commits:
commit b8b72fdbbba57c017fcc3bce09fe8da31826aa2a
Author:     Stephan Bergmann <[email protected]>
AuthorDate: Thu Dec 9 13:49:26 2021 +0100
Commit:     Stephan Bergmann <[email protected]>
CommitDate: Thu Dec 9 16:57:55 2021 +0100

    Remove unused bCreateReference parameter
    
    Change-Id: Ib3656570fcefc2d29b5d363f93dbfef6ed491e3a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126611
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <[email protected]>

diff --git a/chart2/qa/extras/xshape/chart2xshape.cxx 
b/chart2/qa/extras/xshape/chart2xshape.cxx
index 4964bfc455ee..6a9b11540010 100644
--- a/chart2/qa/extras/xshape/chart2xshape.cxx
+++ b/chart2/qa/extras/xshape/chart2xshape.cxx
@@ -43,7 +43,7 @@ public:
     CPPUNIT_TEST_SUITE_END();
 
 private:
-    void compareAgainstReference(std::u16string_view rReferenceFile, bool 
bCreateReference = false);
+    void compareAgainstReference(std::u16string_view rReferenceFile);
     OUString getXShapeDumpString();
     xmlDocUniquePtr getXShapeDumpXmlDoc();
 };
@@ -76,24 +76,12 @@ xmlDocUniquePtr Chart2XShapeTest::getXShapeDumpXmlDoc()
     return xmlDocUniquePtr(xmlParseDoc(reinterpret_cast<const 
xmlChar*>(aXmlDump.getStr())));
 }
 
-void Chart2XShapeTest::compareAgainstReference(std::u16string_view 
rReferenceFile,
-                                               bool bCreateReference)
+void Chart2XShapeTest::compareAgainstReference(std::u16string_view 
rReferenceFile)
 {
-    OUString aDump = getXShapeDumpString();
-
-    OUString aReference = 
m_directories.getPathFromSrc(u"/chart2/qa/extras/xshape/data/reference/")
-                          + rReferenceFile;
-    if (bCreateReference)
-    {
-        OString aOFile = OUStringToOString(aReference, RTL_TEXTENCODING_UTF8);
-        OString aODump = OUStringToOString(aDump, RTL_TEXTENCODING_UTF8);
-        std::ofstream aReferenceFile(aOFile.getStr());
-        aReferenceFile << aODump;
-    }
-    else
-    {
-        checkDumpAgainstFile(aDump, aReference);
-    }
+    checkDumpAgainstFile(getXShapeDumpString(),
+                         OUStringConcatenation(m_directories.getPathFromSrc(
+                                                   
u"/chart2/qa/extras/xshape/data/reference/")
+                                               + rReferenceFile));
 }
 
 void Chart2XShapeTest::testFdo75075()

Reply via email to