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

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Wed Oct 16 07:41:46 UTC 2019


 filter/source/pdf/pdfexport.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 170e664543453b33a2a15bbc908953c3ebf7cdaa
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Wed Oct 16 08:56:59 2019 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Wed Oct 16 09:41:06 2019 +0200

    Simplify insertion into string
    
    Change-Id: I326422f09d59590533966a2956f5442e1ec694b5
    Reviewed-on: https://gerrit.libreoffice.org/80864
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 199bcf10cb14..6e24495c610e 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -1178,9 +1178,7 @@ void PDFExport::ImplWriteTiledWatermark( vcl::PDFWriter& rWriter, const Size& rP
 
     while(lnCount)
     {
-        watermark = watermark.copy(0, lnIndex) +
-            "\n" +
-            watermark.copy(lnIndex);
+        watermark = watermark.replaceAt(lnIndex, 0, "\n");
         lnIndex += lineLength;
         lnCount--;
     }


More information about the Libreoffice-commits mailing list