summaryrefslogtreecommitdiff
path: root/svx/source/tbxctrls/formatpaintbrushctrl.cxx
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 /svx/source/tbxctrls/formatpaintbrushctrl.cxx
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 'svx/source/tbxctrls/formatpaintbrushctrl.cxx')
-rw-r--r--svx/source/tbxctrls/formatpaintbrushctrl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/formatpaintbrushctrl.cxx b/svx/source/tbxctrls/formatpaintbrushctrl.cxx
index 27c6c8aa8067..7e5619deeffa 100644
--- a/svx/source/tbxctrls/formatpaintbrushctrl.cxx
+++ b/svx/source/tbxctrls/formatpaintbrushctrl.cxx
@@ -96,7 +96,7 @@ void FormatPaintBrushToolBoxControl::Select(sal_uInt16 /*nSelectModifier*/)
void FormatPaintBrushToolBoxControl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
const SfxPoolItem* pState )
{
- if( eState != SFX_ITEM_SET )
+ if( eState != SFX_ITEM_DEFAULT && eState != SFX_ITEM_SET )
m_bPersistentCopy = false;
SfxToolBoxControl::StateChanged( nSID, eState, pState );
}