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

Jan-Marek Glogowski glogow at fbihome.de
Tue Aug 26 04:55:14 PDT 2014


 sw/source/core/layout/layact.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 7fc5207ebe57a2b88e2ba7ab45e4ce3f6c049df3
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Sun Jul 13 20:18:56 2014 +0200

    Refactor a tiny bit of SwLayAction::IsShortCut
    
    Change-Id: I13d4fbebec02bddaa27e8929188d497dde715730
    Reviewed-on: https://gerrit.libreoffice.org/10980
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index c3c994e..70ecb3f 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1175,15 +1175,13 @@ bool SwLayAction::IsShortCut( SwPageFrm *&prPage )
                 }
                 // #121980# - no shortcut, if at previous page
                 // an anchored object is registered, whose anchor is <pCntnt>.
-                else if ( prPage->GetPrev() &&
-                          static_cast<SwPageFrm*>(prPage->GetPrev())->GetSortedObjs() )
+                else if ( prPage->GetPrev() )
                 {
                     SwSortedObjs* pObjs =
                         static_cast<SwPageFrm*>(prPage->GetPrev())->GetSortedObjs();
                     if ( pObjs )
                     {
-                        sal_uInt32 i = 0;
-                        for ( ; i < pObjs->Count(); ++i )
+                        for ( sal_uInt32 i = 0; i < pObjs->Count(); ++i )
                         {
                             SwAnchoredObject* pObj = (*pObjs)[i];
                             if ( pObj->GetAnchorFrmContainingAnchPos() == pCntnt )


More information about the Libreoffice-commits mailing list