sfx2/source/appl/appuno.cxx | 4 +++- sfx2/source/view/viewfrm.cxx | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-)
New commits: commit ea4a47d7d442d5d897cfa3a6e9f09ce3f1f233c5 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Wed Nov 8 14:48:31 2017 +0200 fix bugs in StateView_Impl and TransformItems where it was only incrementing the pointer once, meaning it was not iterating in pairs Change-Id: I26cc9b4262bc869c72231ef9eabca2d29da0a724 Reviewed-on: https://gerrit.libreoffice.org/44462 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> 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) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits