summaryrefslogtreecommitdiff
path: root/starmath/qa
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-10 10:07:13 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-10 18:00:39 +0100
commit6f69982c6bad31615faac1fdbeed846dc29664b3 (patch)
tree097dc30ff4cc759759a4fb32a8f4333fd2aa0af8 /starmath/qa
parent99ab7bf20e3b40c911a89adc1040eb2572cc7293 (diff)
ofz#5221 depth protect Prepare
Change-Id: I49804a8c65b3af204bfd79d6ff5b3280ab876ec4 Reviewed-on: https://gerrit.libreoffice.org/47693 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath/qa')
-rw-r--r--starmath/qa/cppunit/test_cursor.cxx8
-rw-r--r--starmath/qa/cppunit/test_nodetotextvisitors.cxx20
2 files changed, 14 insertions, 14 deletions
diff --git a/starmath/qa/cppunit/test_cursor.cxx b/starmath/qa/cppunit/test_cursor.cxx
index 02c7ff433371..702777a614f8 100644
--- a/starmath/qa/cppunit/test_cursor.cxx
+++ b/starmath/qa/cppunit/test_cursor.cxx
@@ -69,7 +69,7 @@ void Test::testCopyPaste()
{
OUString const sInput("a * b + c");
std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput));
- xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get());
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
@@ -92,7 +92,7 @@ void Test::testCopySelectPaste()
{
OUString const sInput("a * b + c");
std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput));
- xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get());
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
@@ -119,7 +119,7 @@ void Test::testCutPaste()
{
OUString const sInput("a * b + c");
std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput));
- xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get());
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
@@ -142,7 +142,7 @@ void Test::testCutSelectPaste()
{
OUString const sInput("a * b + c");
std::unique_ptr<SmNode> xTree(SmParser().Parse(sInput));
- xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get());
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index dee561d371aa..6791e9d6270c 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -436,12 +436,12 @@ void Test::parseandparseagain(const char *formula, const char *test_name)
// parse 1
OUString input = OUString::createFromAscii(formula);
pNode1 = SmParser().ParseExpression(input);
- pNode1->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ pNode1->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode1, output1);
// parse 2
pNode2 = SmParser().ParseExpression(output1);
- pNode2->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ pNode2->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode2, output2);
// compare
@@ -466,7 +466,7 @@ void Test::ParseAndCheck(const char *formula, const char * expected, const char
// parse
OUString sInput = OUString::createFromAscii(formula);
pNode = SmParser().ParseExpression(sInput);
- pNode->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ pNode->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode, sOutput);
// compare
@@ -491,13 +491,13 @@ void Test::ParseAndCompare(const char *formula1, const char *formula2, const cha
// parse formula1
OUString sInput1 = OUString(formula1, strlen(formula1), RTL_TEXTENCODING_UTF8);
pNode1 = SmParser().ParseExpression(sInput1);
- pNode1->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ pNode1->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode1, sOutput1);
// parse formula2
OUString sInput2 = OUString(formula2, strlen(formula2), RTL_TEXTENCODING_UTF8);
pNode2 = SmParser().ParseExpression(sInput2);
- pNode2->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ pNode2->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode2, sOutput2);
CPPUNIT_ASSERT_EQUAL_MESSAGE(test_name, sOutput1, sOutput2);
@@ -519,7 +519,7 @@ void Test::testBinomInBinHor()
// set up a binom (table) node
sInput += "binom a b + c";
pTree = SmParser().Parse(sInput);
- pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(pTree, xDocShRef.get());
ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
@@ -547,7 +547,7 @@ void Test::testBinVerInUnary()
// set up a unary operator with operand
sInput += "- 1";
pTree = SmParser().Parse(sInput);
- pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(pTree, xDocShRef.get());
ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
@@ -574,7 +574,7 @@ void Test::testBinHorInSubSup()
{
// set up a blank formula
SmNode* pTree = SmParser().Parse(OUString());
- pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(pTree, xDocShRef.get());
ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
@@ -602,7 +602,7 @@ void Test::testUnaryInMixedNumberAsNumerator()
// set up a unary operator
OUString sInput = "- 1";
SmNode* pTree = SmParser().Parse(sInput);
- pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(pTree, xDocShRef.get());
ScopedVclPtrInstance< VirtualDevice > pOutputDevice;
@@ -671,7 +671,7 @@ void Test::testParser()
OUString sInput(u"{ \U0001D44E }"); // non-BMP Unicode
OUString sExpected(u"\U0001D44E");
std::unique_ptr<SmNode> pNode(SmParser().ParseExpression(sInput));
- pNode->Prepare(xDocShRef->GetFormat(), *xDocShRef);
+ pNode->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmNodeToTextVisitor(pNode.get(), sOutput);
CPPUNIT_ASSERT_EQUAL(sExpected, sOutput);
}