summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviewsf.cxx
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-02-04 11:44:27 +0100
committerJochen Nitschke <j.nitschke+logerrit@ok.de>2017-02-04 11:37:42 +0000
commitd584e2dcc0454e66151d888fb45c23ccb1634aa6 (patch)
tree784c067bdb12093e0f0b889490f92b23dd344ef9 /sd/source/ui/view/drviewsf.cxx
parentf52eb759f61e1806014972cb736e07479f157aa6 (diff)
simplify SfxWhichIter
only one of 164 calls used the ctor with a restricting range. handle this special case. remove nFrom and nTo members. use operator[] on range pointer to highlight we access lower [0] and upper [1] range bound. remove dtor. Change-Id: I87b28502515e45bb190425eb88aa187ac0b5b2d2 Reviewed-on: https://gerrit.libreoffice.org/33911 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Diffstat (limited to 'sd/source/ui/view/drviewsf.cxx')
-rw-r--r--sd/source/ui/view/drviewsf.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index e6fe654eeece..0a7c7e0a6124 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -690,11 +690,12 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
// changed from SfxItemState::DEFAULT (_ON) to SfxItemState::DISABLED
if( mpDrawView->AreObjectsMarked() )
{
- SfxWhichIter aNewIter( *pSet, XATTR_LINE_FIRST, XATTR_FILL_LAST );
+ SfxWhichIter aNewIter( *pSet );
nWhich = aNewIter.FirstWhich();
while( nWhich )
{
- if( SfxItemState::DEFAULT == pSet->GetItemState( nWhich ) )
+ if (nWhich >= XATTR_LINE_FIRST && nWhich <= XATTR_LINE_LAST
+ && SfxItemState::DEFAULT == pSet->GetItemState(nWhich) )
{
rSet.ClearItem( nWhich );
rSet.DisableItem( nWhich );