diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2023-01-26 20:03:44 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2023-01-27 07:26:53 +0000 |
commit | 12a5e9bd92c0969051e035a4f2b7c18f0e3e79b5 (patch) | |
tree | 36ed8e46b3f502b6f7720866636e09d05c7892bd /sw/qa/core/text/text.cxx | |
parent | f7544650cc4e31da67873898e2d587afa846b9b4 (diff) |
sw: avoid copy&paste in SwFieldPortion::dumpAsXml()
Improve SwFont::dumpAsXml() a little, then we can just call it.
Change-Id: I581445230cd0732819e1bbb45727cf59231c5f47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146191
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/core/text/text.cxx')
-rw-r--r-- | sw/qa/core/text/text.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx index 0ddc9a0885d8..d16e7b324656 100644 --- a/sw/qa/core/text/text.cxx +++ b/sw/qa/core/text/text.cxx @@ -914,8 +914,9 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testNumberPortionFormat) // - Actual : 240 // i.e. the numbering portion font size was 12pt, not 24pt (but only when the doc had a // bookmark). - assertXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']", - "font-height", "480"); + assertXPath(pXmlDoc, + "//SwParaPortion/SwLineLayout/child::*[@type='PortionType::Number']/SwFont", + "height", "480"); } CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testNumberPortionNoformat) @@ -933,7 +934,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testNumberPortionNoformat) // i.e. the run color affected the color of the number portion in Writer, but not in Word. CPPUNIT_ASSERT_EQUAL( OUString("ffffffff"), - getXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwFieldPortion", "font-color")); + getXPath(pXmlDoc, "//SwParaPortion/SwLineLayout/SwFieldPortion/SwFont", "color")); } CPPUNIT_PLUGIN_IMPLEMENT(); |