sw/source/core/unocore/unocrsrhelper.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6a9efc627bd6e24bb56e6cd1e70708eee5af451d
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Fri Oct 8 21:27:29 2021 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Sat Oct 9 08:48:39 2021 +0200

    Declare and initialize variable only when really needed (sw/unocrsrhelper)
    
    Change-Id: If2dafc18b404f39d42df25c5f923eba348eac907
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123293
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/sw/source/core/unocore/unocrsrhelper.cxx 
b/sw/source/core/unocore/unocrsrhelper.cxx
index 6b3db84c0e35..5abffe37e91c 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1336,7 +1336,6 @@ void makeRedline( SwPaM const & rPaM,
 
                 for (size_t i = 0; i < aEntries.size(); ++i)
                 {
-                    SfxItemPropertyMapEntry const*const pEntry = aEntries[i];
                     const uno::Any &rValue = aValues[i];
                     if (i == nNumId)
                     {
@@ -1354,6 +1353,7 @@ void makeRedline( SwPaM const & rPaM,
                     }
                     else
                     {
+                        SfxItemPropertyMapEntry const*const pEntry = 
aEntries[i];
                         rPropSet.setPropertyValue(*pEntry, rValue, aItemSet);
                         if (i == nStyleId)
                             rValue >>= sParaStyleName;

Reply via email to