[Libreoffice-commits] core.git: sw/source
Bjoern Michaelsen
bjoern.michaelsen at canonical.com
Thu Nov 20 10:20:00 PST 2014
sw/source/core/access/accfrmobjmap.hxx | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
New commits:
commit 833936eb526fed3de821247e42198e068c962607
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Wed Nov 19 22:50:38 2014 +0100
expand complex cascading conditional operator
Change-Id: I316cd743070261249eef42872ee2b0a05f930b7e
Reviewed-on: https://gerrit.libreoffice.org/12995
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx
index ac23315..bedd811 100644
--- a/sw/source/core/access/accfrmobjmap.hxx
+++ b/sw/source/core/access/accfrmobjmap.hxx
@@ -56,11 +56,20 @@ public:
bool operator()( const SwAccessibleChildMapKey& r1,
const SwAccessibleChildMapKey& r2 ) const
{
- return (r1.eLayerId == r2.eLayerId) ?
- ( (r1.nPosNum == r2.nPosNum) ?(r1.nOrdNum < r2.nOrdNum) :
- (r1.nPosNum.getY() == r2.nPosNum.getY()? r1.nPosNum.getX() < r2.nPosNum.getX() :
- r1.nPosNum.getY() < r2.nPosNum.getY()) ) :
- (r1.eLayerId < r2.eLayerId);
+ if(r1.eLayerId == r2.eLayerId)
+ {
+ if(r1.nPosNum == r2.nPosNum)
+ return r1.nOrdNum < r2.nOrdNum;
+ else
+ {
+ if(r1.nPosNum.getY() == r2.nPosNum.getY())
+ return r1.nPosNum.getX() < r2.nPosNum.getX();
+ else
+ return r1.nPosNum.getY() < r2.nPosNum.getY();
+ }
+ }
+ else
+ return r1.eLayerId < r2.eLayerId;
}
/* MT: Need to get this position parameter stuff in dev300 somehow...
More information about the Libreoffice-commits
mailing list