diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-07 13:27:32 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-09-07 14:12:17 +0100 |
commit | 54f9576aa43e3d6d687469aa0b2ea56ce0bbaca3 (patch) | |
tree | 4c127b3e4b4fd9014c4254a2a28bfb68858a255c /sw | |
parent | 10654c038c0bc20fb348be7164e08f3de98718f4 (diff) |
Related: tdf#93675 'new' ms-alike numbering has same problem as old numbering
when it comes to nodes which were numbered, but have their number deleted,
where the indent from the numbering is still in effect in writer, but not
in msoffice.
Change-Id: I700f34171d8c9e9f6fb725d115ff1fe704ceb4bb
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/no-numlevel-but-indented.odt | bin | 0 -> 19535 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport7.cxx | 8 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 18 |
3 files changed, 19 insertions, 7 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/no-numlevel-but-indented.odt b/sw/qa/extras/ooxmlexport/data/no-numlevel-but-indented.odt Binary files differnew file mode 100644 index 000000000000..e435acdad35e --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/no-numlevel-but-indented.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx index a9858f4923c3..76ff02a898c7 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport7.cxx @@ -1068,6 +1068,14 @@ DECLARE_OOXMLEXPORT_TEST(testTDF87348, "tdf87348_linkedTextboxes.docx") CPPUNIT_ASSERT ( (followCount >= 6) && (precedeCount >= 6) ); } +DECLARE_OOXMLEXPORT_TEST(testTDF93675, "no-numlevel-but-indented.odt") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + if (!pXmlDoc) + return; + assertXPath(pXmlDoc, "//w:ind", "start", "1418"); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index a6fdbd6b34f7..14ac38b14f06 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -2627,15 +2627,19 @@ void MSWordExportBase::OutputTextNode( const SwTextNode& rNode ) SvxNumberFormat::LABEL_WIDTH_AND_POSITION ) { aLRSpace.SetTextLeft( aLRSpace.GetLeft() + rNumFormat.GetAbsLSpace() ); + } + else + { + aLRSpace.SetTextLeft( aLRSpace.GetLeft() + rNumFormat.GetIndentAt() ); + } - // new first line indent = 0 - // (first line indent is ignored for NO_NUMLEVEL) - if (!bParaRTL) - aLRSpace.SetTextFirstLineOfst( 0 ); + // new first line indent = 0 + // (first line indent is ignored for NO_NUMLEVEL) + if (!bParaRTL) + aLRSpace.SetTextFirstLineOfst( 0 ); - // put back the new item - pTmpSet->Put( aLRSpace ); - } + // put back the new item + pTmpSet->Put( aLRSpace ); // assure that numbering rule is in <pTmpSet> if (SfxItemState::SET != pTmpSet->GetItemState(RES_PARATR_NUMRULE, false) ) |