summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-07-25 19:55:14 -0400
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-08-24 14:45:03 +0200
commit49877dc91b2f91baa656facd462ac1b1e832f182 (patch)
tree6f4440a50b15354e655182b583690833ae49a4d6 /sw
parentb23cd7ea0607ea1c0ec2022e80349d96368e3923 (diff)
sw:rtf - timely export of footnote char properties
related to tdf#82173 and tdf#108949. Write the footnote character properties now - otherwise they will affect text incorrectly later on. Change-Id: I33af1586a51f9028ef5b0d646e4ba3d746c77a2c Reviewed-on: https://gerrit.libreoffice.org/40435 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfexport/rtfexport3.cxx4
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx2
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/qa/extras/rtfexport/rtfexport3.cxx b/sw/qa/extras/rtfexport/rtfexport3.cxx
index 35d7fc9861ec..fbf63740f444 100644
--- a/sw/qa/extras/rtfexport/rtfexport3.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport3.cxx
@@ -33,10 +33,10 @@ DECLARE_RTFEXPORT_TEST(testTdf108949, "tdf108949_footnoteCharFormat.odt")
uno::Reference<text::XText> xFootnoteText;
xFootnotes->getByIndex(0) >>= xFootnoteText;
// This was green (0x00A800), the character property of the footnote character, not the footnote text
- //CPPUNIT_ASSERT_EQUAL(sal_Int32(0x000000), getProperty<sal_Int32>(getRun(getParagraphOfText(1, xFootnoteText),1), "CharColor"));
+ CPPUNIT_ASSERT_MESSAGE ("Footnote Text color",sal_Int32(0x000000) >= getProperty<sal_Int32>(getRun(getParagraphOfText(1, xFootnoteText),1), "CharColor"));
}
-DECLARE_RTFIMPORT_TEST(testTdf108949_footnote, "tdf108949_footnote.rtf")
+DECLARE_RTFEXPORT_TEST(testTdf108949_footnote, "tdf108949_footnote.rtf")
{
CPPUNIT_ASSERT_EQUAL_MESSAGE("Paragraph Numbering style", OUString(), getProperty<OUString>(getParagraph(2), "NumberingStyleName"));
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 5a1cd9252921..acb9385ebc6b 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2657,6 +2657,8 @@ void RtfAttributeOutput::TextFootnote_Impl(const SwFormatFootnote& rFootnote)
SAL_INFO("sw.rtf", OSL_THIS_FUNC << " start");
m_aRun->append("{" OOO_STRING_SVTOOLS_RTF_SUPER " ");
+ EndRunProperties(nullptr);
+ m_aRun->append(' ');
WriteTextFootnoteNumStr(rFootnote);
m_aRun->append("{" OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_FOOTNOTE);
if (rFootnote.IsEndNote() || m_rExport.m_pDoc->GetFootnoteInfo().ePos == FTNPOS_CHAPTER)