summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-09-10 14:20:18 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-09-10 17:54:35 +0200
commitd92602c5b13d0a60439d86c5a033d124178726ca (patch)
treeb8f352df0a81b4eb2371eff4e87aac21dadbaca3 /chart2
parentd707d025b6c3773538abd2eedc6dc4c6d869aa86 (diff)
more fixes for SfxItemState
In commit 88a874fc "convert SfxItemState constants to a proper enum" I made some mistakes in converting bitwise logic to boolean logic. I fixed one of those places in commit 7ad83656 "fix bitwise->logic conversion in SfxItemState commit" This commit fixes the other places where I converted bitwise to normal boolean logic. I also validated that none of the existing code tries to uses combinations of these enum values. This commit also introduces an exception-throwing check in the one place where the enum is explicitly cast to make sure that no combinations sneak in. Change-Id: I545f7d17b76c4fd999078867caec314e83ffe165 Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/dialogs/tp_AxisLabel.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
index 35676394c983..5163ebb27ead 100644
--- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx
@@ -153,7 +153,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
m_pCbShowDescription->Check( bCheck );
- if( aState != SFX_ITEM_DEFAULT && aState != SFX_ITEM_SET)
+ if( aState != SFX_ITEM_DEFAULT && aState != SFX_ITEM_SET )
m_pCbShowDescription->Hide();
}
@@ -201,7 +201,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
m_pCbTextOverlap->Check( bCheck );
- if( aState != SFX_ITEM_DEFAULT )
+ if( aState != SFX_ITEM_DEFAULT && aState != SFX_ITEM_SET )
m_pCbTextOverlap->Hide();
}
@@ -220,7 +220,7 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet* rInAttrs )
bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue();
m_pCbTextBreak->Check( bCheck );
- if( aState != SFX_ITEM_DEFAULT )
+ if( aState != SFX_ITEM_DEFAULT && aState != SFX_ITEM_SET )
{
m_pCbTextBreak->Hide();
if( ! m_pCbTextOverlap->IsVisible() )