tdf#129924 critical fix: use SvxColorItem instead of SvxBrushItem
Change-Id: I09b1e9fe53315974864c8d6947c7cb861f069a68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86953
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 813ace5..8bd8dd4 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -258,12 +258,12 @@
}
else if (nWhich == RES_CHRATR_COLOR)
{
const SvxBrushItem& rBrushColor = static_cast<const SvxBrushItem&>(*pItem);
const SvxColorItem& rColor = static_cast<const SvxColorItem&>(*pItem);
const SfxPoolItem* pBackgroundItem = SearchPoolItems(rItems, RES_CHRATR_BACKGROUND);
if (rBrushColor.GetColor() == COL_AUTO && pBackgroundItem)
if (rColor.GetValue() == COL_AUTO && pBackgroundItem)
{
const SvxBrushItem& rBrushBackground = static_cast<const SvxBrushItem&>(*pBackgroundItem);
SvxBrushItem aForeground(rBrushBackground.GetColor().IsDark() ? COL_WHITE : COL_BLACK, RES_CHRATR_COLOR);
SvxColorItem aForeground(rBrushBackground.GetColor().IsDark() ? COL_WHITE : COL_BLACK, RES_CHRATR_COLOR);
AttrOutput().OutputItem(aForeground);
}
else