summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/rtfattributeoutput.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-01-02 23:16:29 +0100
committerMiklos Vajna <vmiklos@collabora.com>2019-01-03 09:12:24 +0100
commit6d38fc3dd500841caed9305285dab614163212ca (patch)
tree691dd6ad3c194d2b9761c0a95fab1bd8218fa3ac /sw/source/filter/ww8/rtfattributeoutput.cxx
parent92edea090128839f54a7f628662529e66d657ab4 (diff)
Related: tdf#121664 RTF filter: fix line numbering start value handling
Writer and RTF is 1-based, OOXML is 0-based. So it means we do an offset roundtrip during import, and no offsets are needed on export. Change-Id: I52cf65f268940d1d43ae76e58d0c7e6de3a54073 Reviewed-on: https://gerrit.libreoffice.org/65827 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/filter/ww8/rtfattributeoutput.cxx')
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index dd5ccc9e9de2..f55f4a7db918 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1200,7 +1200,7 @@ void RtfAttributeOutput::SectionFormProtection(bool bProtected)
m_aSectionBreaks.append(static_cast<sal_Int32>(!bProtected));
}
-void RtfAttributeOutput::SectionLineNumbering(sal_uLong /*nRestartNo*/,
+void RtfAttributeOutput::SectionLineNumbering(sal_uLong nRestartNo,
const SwLineNumberInfo& rLnNumInfo)
{
m_rExport.Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_LINEMOD);
@@ -1209,6 +1209,12 @@ void RtfAttributeOutput::SectionLineNumbering(sal_uLong /*nRestartNo*/,
m_rExport.OutLong(rLnNumInfo.GetPosFromLeft());
if (!rLnNumInfo.IsRestartEachPage())
m_rExport.Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_LINECONT);
+
+ if (nRestartNo > 0)
+ {
+ m_rExport.Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_LINESTARTS);
+ m_rExport.OutLong(nRestartNo);
+ }
}
void RtfAttributeOutput::SectionTitlePage()