summaryrefslogtreecommitdiffstats
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-02-02 20:40:40 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-02-02 21:07:54 +0000
commitcc4954c484e71d60a84b41b196a7cde37977a6cb (patch)
tree3c4a308e9d9f810ab857a5951c4349c3b0d8bfcd /sfx2
parentcallcatcher: shave off a few more (diff)
downloadcore-cc4954c484e71d60a84b41b196a7cde37977a6cb.tar.gz
core-cc4954c484e71d60a84b41b196a7cde37977a6cb.zip
seeing as it assumed it was non-null since day 0, so can we
Change-Id: I64632ecaab720c9c8d6be0b597b990b55682f296
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/tplcitem.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index aad39a00fffb..3d07fb25dcc4 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -102,12 +102,8 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
nWaterCanState = 0xff;
else if( eState == SfxItemState::DEFAULT )
{
- const SfxBoolItem *pStateItem = PTR_CAST(SfxBoolItem, pItem);
- assert(pStateItem); //BoolItem expected
- if (pStateItem)
- nWaterCanState = pStateItem->GetValue() ? 1 : 0;
- else
- nWaterCanState = 0xff;
+ const SfxBoolItem& rStateItem = dynamic_cast<const SfxBoolItem&>(*pItem);
+ nWaterCanState = rStateItem.GetValue() ? 1 : 0;
}
//not necessary if the last event is still on the way
if(!nUserEventId)