diff options
-rw-r--r-- | sfx2/source/appl/appuno.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index c1088d275d33..56ad256aa335 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -1085,7 +1085,9 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b const sal_uInt16 *pRanges = rSet.GetRanges(); while ( *pRanges ) { - for(sal_uInt16 nId = *pRanges++; nId <= *pRanges; ++nId) + sal_uInt16 nStartWhich = *pRanges++; + sal_uInt16 nEndWhich = *pRanges++; + for(sal_uInt16 nId = nStartWhich; nId <= nEndWhich; ++nId) { if ( rSet.GetItemState(nId) < SfxItemState::SET ) //??? // not really set diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index be33d0c97d62..de1bee06d486 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -2158,7 +2158,9 @@ void SfxViewFrame::StateView_Impl assert(pRanges && "Set with no Range"); while ( *pRanges ) { - for ( sal_uInt16 nWhich = *pRanges++; nWhich <= *pRanges; ++nWhich ) + sal_uInt16 nStartWhich = *pRanges++; + sal_uInt16 nEndWhich = *pRanges++; + for ( sal_uInt16 nWhich = nStartWhich; nWhich <= nEndWhich; ++nWhich ) { switch(nWhich) { |