summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2019-02-19 09:36:03 +0300
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2019-02-24 19:33:14 +0100
commitd0b23025b9ea9bbd911db54ca8a5023a00fab29e (patch)
tree3014078de79dde5e921aa422e54a433b5de2ac64
parent9371b1cee88962ac632ed86968915d95a4625b2e (diff)
tdf#123433 ww8import: end same attribute as what started
This resolves the regression from the bugfix for tdf#116071 from commit 3539a1efb41a787237e4333ebc715db96ffacb5b Change-Id: I59929401d84e3ad201bffc8aa9b50057ac716e71 Reviewed-on: https://gerrit.libreoffice.org/68011 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 1a01b2f7ef83a0c73a52eefaed4a37a2c0812dda) Reviewed-on: https://gerrit.libreoffice.org/68066 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 9b86be693156206e2eb7ace60435b622f4318160) Reviewed-on: https://gerrit.libreoffice.org/68114 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--sw/qa/extras/ww8export/data/tdf123433_fillStyleStop.docbin0 -> 33792 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx7
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx6
3 files changed, 11 insertions, 2 deletions
diff --git a/sw/qa/extras/ww8export/data/tdf123433_fillStyleStop.doc b/sw/qa/extras/ww8export/data/tdf123433_fillStyleStop.doc
new file mode 100644
index 000000000000..f8321e96ee90
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf123433_fillStyleStop.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 836ee562a7b7..955093393ed3 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -182,6 +182,13 @@ DECLARE_WW8EXPORT_TEST(testTdf121111_fillStyleNone, "tdf121111_fillStyleNone.doc
CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_SOLID, getProperty<drawing::FillStyle>(xText, "FillStyle"));
}
+DECLARE_WW8EXPORT_TEST(testTdf123433_fillStyleStop, "tdf123433_fillStyleStop.doc")
+{
+ uno::Reference<text::XTextRange> xText(getParagraph(12));
+ CPPUNIT_ASSERT_EQUAL(drawing::FillStyle_NONE, getProperty<drawing::FillStyle>(xText, "FillStyle"));
+ CPPUNIT_ASSERT_EQUAL(COL_AUTO, Color(getProperty<sal_uInt32>(xText, "ParaBackColor")));
+}
+
DECLARE_WW8EXPORT_TEST(testTdf94009_zeroPgMargin, "tdf94009_zeroPgMargin.odt")
{
uno::Reference<beans::XPropertySet> defaultStyle(getStyles("PageStyles")->getByName("Standard"),
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 5a31a8888d61..7947f510c60d 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -4776,7 +4776,8 @@ void SwWW8ImplReader::Read_Shade( sal_uInt16, const sal_uInt8* pData, short nLen
if (nLen < 2)
{
// end of attribute
- m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_BACKGROUND );
+ m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), XATTR_FILLSTYLE );
+ m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), XATTR_FILLCOLOR );
}
else
{
@@ -4794,7 +4795,8 @@ void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, sho
if (nLen <= 0)
{
// end of attribute
- m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_BACKGROUND );
+ m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), XATTR_FILLSTYLE );
+ m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), XATTR_FILLCOLOR );
}
else
{