diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-17 14:09:46 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-17 14:11:45 +0200 |
commit | 466d0f2cb2b2bb7fba306ab089be7f648578474e (patch) | |
tree | 7ca950afa64977fc04e74a4258411c09f4a48e1d /cui | |
parent | 0bdfe0f946042cdd59468d96a756f28db7cac7fe (diff) |
Clean up conversion from TriState to bool
to witness, in Draw select multiple rectangles, with and without shadows, then
"Format - Area... - Shadow"
Change-Id: Ia1d042f0e3e99bb55228c558568c96b113edfe00
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/tpshadow.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index b163ceb16d05..fe94d0e97481 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -257,10 +257,14 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) { const SfxPoolItem* pOld = NULL; - TriState eState = m_pTsbShowShadow->GetState(); if( m_pTsbShowShadow->IsValueChangedFromSaved() ) { - SdrOnOffItem aItem( makeSdrShadowItem(sal::static_int_cast< sal_Bool >( eState )) ); + TriState eState = m_pTsbShowShadow->GetState(); + assert(eState != TRISTATE_INDET); + // given how m_pTsbShowShadow is set up and saved in Reset(), + // eState == TRISTATE_INDET would imply + // !IsValueChangedFromSaved() + SdrOnOffItem aItem( makeSdrShadowItem(eState == TRISTATE_TRUE) ); pOld = GetOldItem( *rAttrs, SDRATTR_SHADOW ); if ( !pOld || !( *static_cast<const SdrOnOffItem*>(pOld) == aItem ) ) { |