diff options
author | Justin Luth <justin.luth@collabora.com> | 2019-11-09 07:27:21 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2019-11-09 11:27:18 +0100 |
commit | 5f0844077d289a257b914f0aad9fd93788f34511 (patch) | |
tree | 52af4a5a3e17de0206118ad74e6ddc859d28f5fa /sw/source/filter/ww8 | |
parent | d628258f279d003ba4e11f1f7e2e69273acd008c (diff) |
partial revert tdf#116071 import to XATTR_FILL not RES_BACKGROUND
caused by commit 3539a1efb41a787237e4333ebc715db96ffacb5b
which fixes table-related regression bug report tdf#128608.
I was not able to create a unit test for this from scratch.
In fact, if I use MSWord2003 to roundtrip the file, then LO
opens it without problems.
A real fix (to move LO away from RES_BACKGROUND in tables) should
be subject to lots of testing time, so just reverting for now.
Change-Id: I328741947b7ed319ff8df0ba169618f6ad0d2c75
Reviewed-on: https://gerrit.libreoffice.org/82339
Tested-by: Jenkins
Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index d83995198272..72e5f77db274 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -4896,8 +4896,13 @@ void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, sho if (nLen <= 0) { // end of attribute - m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), XATTR_FILLSTYLE ); - m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), XATTR_FILLCOLOR ); + if ( m_nInTable ) + m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), RES_BACKGROUND ); + else + { + m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), XATTR_FILLSTYLE ); + m_xCtrlStck->SetAttr( *m_pPaM->GetPoint(), XATTR_FILLCOLOR ); + } } else { @@ -4905,8 +4910,13 @@ void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, sho if (nLen != 10) return; - NewAttr( XFillStyleItem(drawing::FillStyle_SOLID) ); - NewAttr( XFillColorItem(OUString(), ExtractColour(pData, m_bVer67)) ); + if ( m_nInTable ) + NewAttr( SvxBrushItem(ExtractColour(pData, m_bVer67), RES_BACKGROUND) ); + else + { + NewAttr( XFillStyleItem(drawing::FillStyle_SOLID) ); + NewAttr( XFillColorItem(OUString(), ExtractColour(pData, m_bVer67)) ); + } } } |