[Libreoffice-commits] core.git: sw/source
Stephan Bergmann
sbergman at redhat.com
Fri Oct 10 07:59:15 PDT 2014
sw/source/uibase/shells/textsh1.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 2862dcf7dd8a6f9cde9df2cc2b785df65e814f0c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Oct 10 16:56:59 2014 +0200
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
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index e9edc6c..024c15c 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:
More information about the Libreoffice-commits
mailing list