external/cairo/UnpackedTarball_cairo.mk     |    1 +
 external/cairo/cairo/shm-null-deref.patch.1 |   14 ++++++++++++++
 sc/source/ui/view/output.cxx                |    3 ++-
 3 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit d7282fff1cac8057ca9ec86f45bd8114bcbbaf3e
Author:     Balazs Varga <balazs.va...@collabora.com>
AuthorDate: Wed Aug 20 11:39:51 2025 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Aug 21 17:35:00 2025 +0200

    tdf#168023 sc view: fix empty cell be not rotated with Text Orientation
    
    We should only do text rotation if we have text content in the cell.
    To test just open bugdoc in check if F1 cell borders are rotated or not.
    
    TODO: unit test
    
    Change-Id: Ie7a5dda8b81e3793300e6bc358540fa363568b91
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189963
    Reviewed-by: Balazs Varga <balazs.va...@collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit 9e3cebf6c017b01ec917c818988db45aa9ac0b1d)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189987
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 062a3d71cdf9..1028842c0f1d 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -704,7 +704,8 @@ void ScOutputData::SetCellRotations()
 
                         // Check for values - below in SetCellRotation these 
will
                         // be converted to size_t and thus may not be negative
-                        if(nTargetX >= 0 && nTargetY >= 0)
+                        // tdf#168023: also do not rotate if the cell is empty
+                        if(nTargetX >= 0 && nTargetY >= 0 && 
!pInfo->maCell.hasEmptyValue())
                         {
                             // add rotation info to Array information
                             const Degree100 
nAttrRotate(pPattern->GetRotateVal(pCondSet));
commit b81b31964a0d8e8a7f8765d696931db3bd2d32fb
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Aug 21 09:44:03 2025 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Aug 21 17:34:51 2025 +0200

    fix cairo null pointer deref
    
    when running with internal cairo and the gen backend
    
    Change-Id: Iec847b5f9fe97faefc1304e0e153ed81f8e1c9b1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189983
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins
    (cherry picked from commit 1f9fa0dd5b7fdf7aa5599bec6bcfa304e8654300)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189996
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/external/cairo/UnpackedTarball_cairo.mk 
b/external/cairo/UnpackedTarball_cairo.mk
index 0fdc451a205d..a4dff6c9b9d5 100644
--- a/external/cairo/UnpackedTarball_cairo.mk
+++ b/external/cairo/UnpackedTarball_cairo.mk
@@ -33,6 +33,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cairo,\
        external/cairo/cairo/libcairo-bundled-soname.patch.0 \
        external/cairo/cairo/cairo-fd-hack.patch.0 \
        external/cairo/cairo/cairo.ofz57493-Timeout.patch.1 \
+       external/cairo/cairo/shm-null-deref.patch.1 \
 ))
 
 ifeq ($(OS),iOS)
diff --git a/external/cairo/cairo/shm-null-deref.patch.1 
b/external/cairo/cairo/shm-null-deref.patch.1
new file mode 100644
index 000000000000..b779c19b56bf
--- /dev/null
+++ b/external/cairo/cairo/shm-null-deref.patch.1
@@ -0,0 +1,14 @@
+diff -ur cairo.org/src/cairo-xlib-render-compositor.c 
cairo/src/cairo-xlib-render-compositor.c
+--- cairo.org/src/cairo-xlib-render-compositor.c       2025-08-21 
09:40:19.517297288 +0200
++++ cairo/src/cairo-xlib-render-compositor.c   2025-08-21 09:41:29.360415588 
+0200
+@@ -377,7 +377,8 @@
+     }
+ 
+ out:
+-    cairo_surface_destroy (&shm->base);
++    if (shm)
++        cairo_surface_destroy (&shm->base);
+     return status;
+ }
+ 
+

Reply via email to