sc/source/ui/view/output.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 9e3cebf6c017b01ec917c818988db45aa9ac0b1d
Author:     Balazs Varga <balazs.va...@collabora.com>
AuthorDate: Wed Aug 20 11:39:51 2025 +0200
Commit:     Balazs Varga <balazs.va...@collabora.com>
CommitDate: Thu Aug 21 08:13:57 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

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index d49918ec9f27..1b0f0a239ba6 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));

Reply via email to