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

Joren De Cuyper joren.libreoffice at telenet.be
Mon Mar 4 04:34:59 PST 2013


 sw/source/ui/docvw/PostItMgr.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 52db503897de94deae3121e1ce194c88b517f300
Author: Joren De Cuyper <joren.libreoffice at telenet.be>
Date:   Thu Feb 28 00:45:05 2013 +0100

    Delete double condition check
    
    We don't need to check if aNextPostIt != aVisiblePostItList.end()
    again because we only can enter the enclosing if-statement when
    aNextPostIt != aVisiblePostItList.end()
    
    Change-Id: I853ed465e957bd26dae8312d2ce717ea1ca0b4e8
    Reviewed-on: https://gerrit.libreoffice.org/2453
    Reviewed-by: Muthu Subramanian K <muthusuba at gmail.com>
    Tested-by: Muthu Subramanian K <muthusuba at gmail.com>

diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index 6e6f80e..cd94ba0 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -968,7 +968,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
                 SwSidebarWin_iterator aNextPostIt = i;
                 ++aNextPostIt;
 
-                if (aNextPostIt !=aVisiblePostItList.end())
+                if (aNextPostIt != aVisiblePostItList.end())
                 {
                     lTranslatePos = ( (*i)->VirtualPos().Y() + (*i)->VirtualSize().Height()) - (*aNextPostIt)->VirtualPos().Y();
                     if (lTranslatePos > 0) // note windows overlaps the next one
@@ -1020,7 +1020,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
                             }
                         }
                     }
-                    if (aNextPostIt !=aVisiblePostItList.end() && (*aNextPostIt)->IsFollow())
+                    if ( (*aNextPostIt)->IsFollow() )
                         lSpaceUsed += (*i)->VirtualSize().Height() + ANCHORLINE_WIDTH;
                     else
                         lSpaceUsed += (*i)->VirtualSize().Height() + GetSpaceBetween();


More information about the Libreoffice-commits mailing list