summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-11-08 14:48:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-11-09 07:29:53 +0100
commitea4a47d7d442d5d897cfa3a6e9f09ce3f1f233c5 (patch)
tree19406ee5b238215ac83e26c31aef3afb5756f9ff /sfx2/source
parent4be2af1e932a5ad7645af3044f509bc8006da91d (diff)
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 <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/appl/appuno.cxx4
-rw-r--r--sfx2/source/view/viewfrm.cxx4
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)
{