Kaydet (Commit) 466d0f2c authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst 0bdfe0f9
...@@ -257,10 +257,14 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs ) ...@@ -257,10 +257,14 @@ bool SvxShadowTabPage::FillItemSet( SfxItemSet* rAttrs )
{ {
const SfxPoolItem* pOld = NULL; const SfxPoolItem* pOld = NULL;
TriState eState = m_pTsbShowShadow->GetState();
if( m_pTsbShowShadow->IsValueChangedFromSaved() ) 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 ); pOld = GetOldItem( *rAttrs, SDRATTR_SHADOW );
if ( !pOld || !( *static_cast<const SdrOnOffItem*>(pOld) == aItem ) ) if ( !pOld || !( *static_cast<const SdrOnOffItem*>(pOld) == aItem ) )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment