[Libreoffice-commits] core.git: sw/source

Caolán McNamara caolanm at redhat.com
Fri Nov 24 15:38:52 UTC 2017


 sw/source/filter/ww8/ww8par2.cxx |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit 8453f51fc69c72ef439bfa33b5fdd6dae793a47b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Nov 24 15:25:18 2017 +0000

    improve scoping and use a ref instead of a pointer
    
    Change-Id: I9b2d7e57495b26c748edfe6bf5d9d04e0c8a388f
    Reviewed-on: https://gerrit.libreoffice.org/45239
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index e46878c0a5db..c2eb4fed9f20 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2311,14 +2311,13 @@ void WW8TabDesc::CalcDefaults()
         }
         for (int k = 0; k < pR->nWwCols; ++k)
         {
-            WW8_TCell* pT = &pR->pTCs[k];
-            int i, j;
-            for( i = 0; i < 4; i ++ )
+            WW8_TCell& rT = pR->pTCs[k];
+            for (int i = 0; i < 4; ++i)
             {
-                if (pT->rgbrc[i].brcType()==0)
+                if (rT.rgbrc[i].brcType()==0)
                 {
                     // if shadow is set, its invalid
-                    j = i;
+                    int j = i;
                     switch( i )
                     {
                     case 0:
@@ -2339,7 +2338,7 @@ void WW8TabDesc::CalcDefaults()
                         break;
                     }
                     // merge with above defaults
-                    pT->rgbrc[i] = pR->aDefBrcs[j];
+                    rT.rgbrc[i] = pR->aDefBrcs[j];
                 }
             }
         }


More information about the Libreoffice-commits mailing list