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

New commits:
commit 0206a24ba6093e1e83e2d95bc1b18b716c9e3e4c
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 10:38:21 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/+/189979
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 10047fb7ceb2..981dbf1905da 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -713,7 +713,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