sd/source/ui/view/DocumentRenderer.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 927fad8d2407e6ffd34b843549271140c3abd1b2
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Fri Aug 28 13:01:56 2020 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Sat Aug 29 08:12:07 2020 +0200

    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 <caol...@redhat.com>
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>
    Tested-by: Jenkins

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;
                 }
             }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to