| commit | c726c7ca57a1484aaeb4bdcc1baa29d91fa9cff9 | [log] |
|---|---|---|
| author | Serge Krot <Serge.Krot@cib.de> | Fri Jan 10 14:44:25 2020 +0100 |
| committer | Serge Krot (CIB) <Serge.Krot@cib.de> | Fri Jan 17 14:03:04 2020 +0100 |
| tree | 2769152bb05ec3de6f97d60c644dfddea93e43bf | |
| parent | 5d2f65b299f849f4ca12c744945433569095cc1f [diff] |
tdf#129924 docx import: set background color Change-Id: If586a7a11e375c1592253630af87772bca40b52e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86542 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 9476dfe7d1b86b367966e7dedf67e11936c8d9d7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86895 Reviewed-by: Serge Krot (CIB) <Serge.Krot@cib.de>
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 9719ba6..204c915 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -261,6 +261,22 @@ AttrOutput().OutputItem( fontHeight ); } else if (nWhich == RES_CHRATR_COLOR) { const SvxBrushItem& rBrushColor = static_cast<const SvxBrushItem&>(*pItem); const SfxPoolItem* pBackgroundItem = SearchPoolItems(rItems, RES_CHRATR_BACKGROUND); if (rBrushColor.GetColor() == COL_AUTO && pBackgroundItem) { const SvxBrushItem& rBrushBackground = static_cast<const SvxBrushItem&>(*pBackgroundItem); SvxBrushItem aForeground(rBrushBackground.GetColor().IsDark() ? COL_WHITE : COL_BLACK, RES_CHRATR_COLOR); AttrOutput().OutputItem(aForeground); } else { // default AttrOutput().OutputItem( *pItem ); } } else { AttrOutput().OutputItem( *pItem );