sw/source/filter/ascii/ascatr.cxx |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit f03b9c3c7aa323a17097ddd6df6dd2af790690a0
Author:     Manish <mailmessgcn...@proton.me>
AuthorDate: Sun Jul 27 10:58:33 2025 +0530
Commit:     Sahil Gautam <sahil.gau...@collabora.com>
CommitDate: Mon Jul 28 10:51:16 2025 +0200

    tdf#118666 Follow-up with code formatting
    
    Follow up for https://gerrit.libreoffice.org/c/core/+/184290
    
    Change-Id: Icdec82865d090c17a7d61a1aa16d1a73db91a10f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188425
    Tested-by: Jenkins
    Reviewed-by: Sahil Gautam <sahil.gau...@collabora.com>

diff --git a/sw/source/filter/ascii/ascatr.cxx 
b/sw/source/filter/ascii/ascatr.cxx
index 694ff865e037..077134f32465 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -266,13 +266,11 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, 
SwContentNode& rNode )
         OUString level;
         if (!bIsOutlineNumRule)
         {
-            //ensures indentation is not applied to styles such as headings 
aligned at 0.00",in case of pasting as unformatted text.
-            //checks the left margin & the left margin for tab values is set 
to 0 & outline level > 0
-            bool bSkipIndentation = false;
-            if (rNd.GetLeftMarginWithNum() == 0 && rNd.GetAttrOutlineLevel() > 
0 && rNd.GetLeftMarginForTabCalculation() == 0)
-               bSkipIndentation = true;
+            bool bSkipIndentationForHeadings = (rNd.GetLeftMarginWithNum() == 
0)  //ensures the left margin of current node or numbering level is 0
+                                               && (rNd.GetAttrOutlineLevel() > 
0) //all heading styles have outline level > 0
+                                               && 
(rNd.GetLeftMarginForTabCalculation() == 0); //ensures no indentation from tab 
stops is applied (left margin is 0)
 
-            if(!bSkipIndentation)
+            if(!bSkipIndentationForHeadings)
             {
                 // indent each numbering level by 4 spaces
                 for (int i = 0; i <= rNd.GetActualListLevel(); ++i)

Reply via email to