[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - vcl/qt5

Jan-Marek Glogowski (via logerrit) logerrit at kemper.freedesktop.org
Wed Oct 28 06:02:41 UTC 2020


 vcl/qt5/Qt5Graphics_Text.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit dc44470620857fae533246f4cb1038b3e9d2b2bd
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Oct 27 16:41:30 2020 +0100
Commit:     Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Wed Oct 28 07:01:59 2020 +0100

    tdf#137804 Qt5 don't paint empty strings
    
    For a test I added a SAL_WARN, but that created many more debug
    messages then expected, just when opening the print dialog. So
    this just handles the crash like the CairoTextRender variant of
    DrawTextLayout does, by returning early.
    
    Change-Id: Ie5b58ebbba02dace0e777b60fcbc3b9f46ea9d66
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104893
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
    (cherry picked from commit feb5985b463974476985dee83376067941d77da0)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104845
    Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>

diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx
index 4ba009106d26..ded886efd648 100644
--- a/vcl/qt5/Qt5Graphics_Text.cxx
+++ b/vcl/qt5/Qt5Graphics_Text.cxx
@@ -197,6 +197,10 @@ void Qt5Graphics::DrawTextLayout(const GenericSalLayout& rLayout)
         positions.push_back(QPointF(aPos.X(), aPos.Y()));
     }
 
+    // seems to be common to try to layout an empty string...
+    if (positions.empty())
+        return;
+
     if (nOrientation)
         pQt5Layout->SetOrientation(nOrientation);
 


More information about the Libreoffice-commits mailing list