[Libreoffice-commits] core.git: sd/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Sat Aug 29 06:12:50 UTC 2020


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

New commits:
commit 927fad8d2407e6ffd34b843549271140c3abd1b2
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Aug 28 13:01:56 2020 +0200
Commit:     Stephan Bergmann <sbergman at 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 <caolanm at redhat.com>
    Reviewed-by: Stephan Bergmann <sbergman at 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;
                 }
             }


More information about the Libreoffice-commits mailing list