summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-14 17:40:33 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-14 17:45:17 +0100
commitb6ce0cd83afaab1bc03f7421745ff752c3459e99 (patch)
treecea291250772ef9dbecc1112cade4df0dbc71315 /cui
parent8c12f8145388a586536b874359ad0bae37ffcc3b (diff)
Avoid unnecessary, wrong downcast
...as reported by -fsanitize=vptr when doing "Format - Paragraph... - Area - Color" in Writer: > cui/source/tabpages/tpcolor.cxx:65:19: runtime error: downcast of address 0x6030009782b0 which does not point to an object of type 'XOutdevItemPool' > 0x6030009782b0: note: object is of type 'SwAttrPool' > 20 01 80 1c 50 e8 e9 85 4d 7f 00 00 e0 28 48 86 4d 7f 00 00 c0 d7 11 00 30 61 00 00 80 29 54 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > vptr for 'SwAttrPool' > #0 0x7f4b047cfd3a in SvxColorTabPage::SvxColorTabPage(vcl::Window*, SfxItemSet const&) cui/source/tabpages/tpcolor.cxx:65:19 > #1 0x7f4b0480ec04 in VclPtr<SvxColorTabPage> VclPtr<SvxColorTabPage>::Create<vcl::Window*&, SfxItemSet const&>(vcl::Window*&, SfxItemSet const&) include/vcl/vclptr.hxx:138:46 > #2 0x7f4b047f8567 in SvxColorTabPage::Create(vcl::Window*, SfxItemSet const*) cui/source/tabpages/tpcolor.cxx:326:12 > #3 0x7f4b0472132a in CreateFillStyleTabPage(unsigned short, vcl::Window*, SfxItemSet const&) cui/source/tabpages/tparea.cxx:319:42 > #4 0x7f4b0471ef8b in SvxAreaTabPage::SelectFillTypeHdl_Impl(Button*) cui/source/tabpages/tparea.cxx:330:41 > #5 0x7f4b047114b3 in SvxAreaTabPage::LinkStubSelectFillTypeHdl_Impl(void*, Button*) cui/source/tabpages/tparea.cxx:323:1 > #6 0x7f4df3eac737 in Link<Button*, void>::Call(Button*) const include/tools/link.hxx:84:45 > #7 0x7f4df3e93bb6 in Button::Click()::$_0::operator()() const vcl/source/control/button.cxx:127:85 Change-Id: I6259b100c535fa81b9f7452db84c22d5b10acb1e
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/tpcolor.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index 71a23a274846..c31f57fce3f8 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -62,7 +62,7 @@ SvxColorTabPage::SvxColorTabPage(vcl::Window* pParent, const SfxItemSet& rInAttr
, pPos( nullptr )
, aXFStyleItem( drawing::FillStyle_SOLID )
, aXFillColorItem( OUString(), Color( COL_BLACK ) )
- , aXFillAttr( static_cast<XOutdevItemPool*>( rInAttrs.GetPool() ))
+ , aXFillAttr( rInAttrs.GetPool() )
, rXFSet( aXFillAttr.GetItemSet() )
, eCM( ColorModel::RGB )
, m_context(comphelper::getProcessComponentContext())