sw/source/filter/ww8/docxattributeoutput.cxx |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

New commits:
commit 66465fe341a25652cf0eb06b8e4e24e18ea8ed3c
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Mon Apr 10 11:22:41 2023 -0400
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Fri Apr 21 22:34:26 2023 +0200

    NFC rename: const table::BorderLine2* rStyleProps (is not a reference)
    
    Added with commit ae61569eea0719a882010cfbb260a1a0d690d974
    Author: Jacobo Aragunde Pérez on Thu Apr 3 16:27:37 2014 +0200
        oox: Do not overwrite table style properties
    
    Change-Id: I8140e3a084f3f1e2d304a4ffc62897afa6427c4a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150771
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <jl...@mail.com>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 3b84ee2610d3..2e456a8018fb 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4082,7 +4082,7 @@ void DocxAttributeOutput::ParagraphStyle( sal_uInt16 
nStyle )
 }
 
 static void impl_borderLine( FSHelperPtr const & pSerializer, sal_Int32 
elementToken, const SvxBorderLine* pBorderLine, sal_uInt16 nDist,
-                             bool bWriteShadow, const table::BorderLine2* 
rStyleProps = nullptr )
+                             bool bWriteShadow, const table::BorderLine2* 
pStyleProps = nullptr)
 {
     // Compute val attribute value
     // Can be one of:
@@ -4153,7 +4153,7 @@ static void impl_borderLine( FSHelperPtr const & 
pSerializer, sal_Int32 elementT
                 break;
         }
     }
-    else if ( !rStyleProps || !rStyleProps->LineWidth )
+    else if (!pStyleProps || !pStyleProps->LineWidth)
         // no line, and no line set by the style either:
         // there is no need to write the property
         return;
@@ -4161,11 +4161,14 @@ static void impl_borderLine( FSHelperPtr const & 
pSerializer, sal_Int32 elementT
     // compare the properties with the theme properties before writing them:
     // if they are equal, it means that they were style-defined and there is
     // no need to write them.
-    if( rStyleProps != nullptr && pBorderLine && !pBorderLine->isEmpty() &&
-            pBorderLine->GetBorderLineStyle() == 
static_cast<SvxBorderLineStyle>(rStyleProps->LineStyle) &&
-            pBorderLine->GetColor() == Color(ColorTransparency, 
rStyleProps->Color) &&
-            pBorderLine->GetWidth() == o3tl::toTwips(rStyleProps->LineWidth, 
o3tl::Length::mm100) )
+    if (pStyleProps && pBorderLine && !pBorderLine->isEmpty()
+        && pBorderLine->GetBorderLineStyle()
+               == static_cast<SvxBorderLineStyle>(pStyleProps->LineStyle)
+        && pBorderLine->GetColor() == Color(ColorTransparency, 
pStyleProps->Color)
+        && pBorderLine->GetWidth() == o3tl::toTwips(pStyleProps->LineWidth, 
o3tl::Length::mm100))
+    {
         return;
+    }
 
     rtl::Reference<FastAttributeList> pAttr = 
FastSerializerHelper::createAttrList();
     pAttr->add( FSNS( XML_w, XML_val ), pVal );

Reply via email to