summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-08-28 13:01:56 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-08-29 08:12:07 +0200
commit927fad8d2407e6ffd34b843549271140c3abd1b2 (patch)
tree02552f753c973799473f07746a616b0e735fcb46 /sd
parent4d2a6906b3545ca3fc661bc7ac45c75d542cb47f (diff)
Assign aPageRange only once, after the loop
c82b891dc9370d4bf72bc07752884603df7d05ac "selecting multiple slides and using 'print...' doesn't set selection as range" had reinstated the lost assignment, but it should suffice to assign the final aBuf value once after the loop. (The guarding if (bool(pPageSelection) && pPageSelection->size() > 1) ensures that the loop body is executed at all (at least twice even), so it can not be the case that the assignment is now done but was not done in the past, if the loop body had not been executed at all.) Change-Id: I54ab430b3f74a7ae3d559b9b47e7c15487e11b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101579 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/DocumentRenderer.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx
index 3c3f44de011d..8d6675e7137e 100644
--- a/sd/source/ui/view/DocumentRenderer.cxx
+++ b/sd/source/ui/view/DocumentRenderer.cxx
@@ -616,8 +616,8 @@ namespace {
else
aBuf.append(',');
aBuf.append(OUString::number(pPage->GetPageNum() / 2 + 1));
- aPageRange = aBuf.getStr();
}
+ aPageRange = aBuf.makeStringAndClear();
nPrintRange = 1;
}
}