sw/source/filter/ww8/wrtw8esh.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit 11937a68aecb8db9aebb1c929d940c5b85a0ecec Author: Justin Luth <jl...@mail.com> AuthorDate: Thu Jul 14 09:52:58 2022 -0400 Commit: Justin Luth <jl...@mail.com> CommitDate: Thu Jul 14 22:51:36 2022 +0200 tdf#139759 sw ms-formats: export comment char background EditEngine's character background is a SvxColorItem, while Writer uses a SvxBrushItem. Thus we have no automatic transition possible between the two, and during export it was just being ignored as > RES_UNKNOWNATR_BEGIN. A unit test will have to wait until import (of shd) works. P.S. Import of "highlight" was fixed in an earlier commit. Setting Options - Save - MS Office Compat - As Highlighting would fully work now. Change-Id: I8674173a3d1bf1581c09458c3087d6fd39e48a1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137090 Tested-by: Justin Luth <jl...@mail.com> Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index bcfc410ffb6e..1d8c99349163 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -33,6 +33,7 @@ #include <svx/svdobj.hxx> #include <svx/svdotext.hxx> #include <svx/svdpage.hxx> +#include <editeng/colritem.hxx> #include <editeng/outlobj.hxx> #include <editeng/editobj.hxx> #include <editeng/brushitem.hxx> @@ -1157,6 +1158,12 @@ void MSWord_SdrAttrIter::OutAttr( sal_Int32 nSwPos ) m_rExport.WriteChar(0x9); continue; } + if (nWhich == EE_CHAR_BKGCOLOR) + { + Color aColor(static_cast<const SvxColorItem*>(rTextAtr.pAttr)->GetValue()); + m_rExport.AttrOutput().OutputItem(SvxBrushItem(aColor, RES_CHRATR_BACKGROUND)); + continue; + } const sal_uInt16 nSlotId = pSrcPool->GetSlotId(nWhich); if (nSlotId && nWhich != nSlotId)