summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout/layout.cxx
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-09-10 11:58:50 +0200
committerLászló Németh <nemeth@numbertext.org>2019-09-11 07:44:47 +0200
commitf0c832acb53326ccc9a8c1a47401fbc9e1081feb (patch)
tree9aa5124178fe2093ef54334722d9c8da00efc628 /sw/qa/extras/layout/layout.cxx
parentd8bd31af915136d2453da25f1500f036a1f8cfd1 (diff)
tdf#113014 Writer: show numbering in narrow cells
Paragraph numbering was invisible in narrow cells of Writer tables, when the paragraphs have a wider indentation and an equivalent negative first line indentation, too. GetLeftMarginWithNum()==0 doesn't mean that the paragraph is not numbered with the "new" numbering style SvxNumberFormat::LABEL_ALIGNMENT. Change-Id: I99f0a84404876db6cefdf0da845cd8b425860553 Reviewed-on: https://gerrit.libreoffice.org/78802 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/qa/extras/layout/layout.cxx')
-rw-r--r--sw/qa/extras/layout/layout.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 43f2381ada5b..66421ec4998b 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -3060,6 +3060,25 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf64222)
assertXPath(pXmlDoc, "/root/page/body/txt[2]/Special", "nHeight", "560");
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf113014)
+{
+ SwDoc* pDoc = createDoc("tdf113014.fodt");
+ SwDocShell* pShell = pDoc->GetDocShell();
+
+ // Dump the rendering of the first page as an XML file.
+ std::shared_ptr<GDIMetaFile> xMetaFile = pShell->GetPreviewMetaFile();
+ MetafileXmlDump dumper;
+ xmlDocPtr pXmlDoc = dumpAndParse(dumper, *xMetaFile);
+ CPPUNIT_ASSERT(pXmlDoc);
+
+ // This failed, if numbering of cell A1 is missing
+ // (A1: left indent: 3 cm, first line indent: -3 cm
+ // A2: left indent: 0 cm, first line indent: 0 cm)
+ assertXPathContent(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/textarray[1]/text", "1.");
+ assertXPathContent(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/textarray[3]/text", "2.");
+ assertXPathContent(pXmlDoc, "/metafile/push[1]/push[1]/push[1]/textarray[5]/text", "3.");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */