summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-10-10 16:56:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-10 16:56:59 +0200
commit2862dcf7dd8a6f9cde9df2cc2b785df65e814f0c (patch)
treebb45721ccf6f8d3928d5651d6ad2e2a5b882f300 /sw/source
parent890d0254db133b746c8562133da8241816acc13d (diff)
UBSan: SvxColorItem vs. SvxBrushItem confusion
Assume RES_CHRATR_BACKGROUND shall indeed be an SvxBrushItem while SID_ATTR_CHAR_COLOR_BACKGROUND shall indeed be an SvxColorItem. (This probably never caused trouble in practice as the member vars of SvxColorItem happen to be a prefix of the member vars of SvxBrushItem.) Change-Id: Ifb2a137ad89de6e03da3b61dd17bcd8882cce2d7
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/shells/textsh1.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index e9edc6c91898..024c15c10f87 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1574,8 +1574,8 @@ void SwTextShell::GetState( SfxItemSet &rSet )
{
SfxItemSet aSet( GetPool() );
rSh.GetCurAttr( aSet );
- const SvxColorItem& aColorItem = static_cast< const SvxColorItem& >( aSet.Get(RES_CHRATR_BACKGROUND) );
- rSet.Put( aColorItem, SID_ATTR_CHAR_COLOR_BACKGROUND );
+ const SvxBrushItem& aBrushItem = static_cast< const SvxBrushItem& >( aSet.Get(RES_CHRATR_BACKGROUND) );
+ rSet.Put( SvxColorItem(aBrushItem.GetColor(), nWhich) );
}
break;
case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT: