summaryrefslogtreecommitdiff
path: root/sw/source/core/access/accfrmobjmap.hxx
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-11-19 22:50:38 +0100
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2014-11-20 18:19:34 +0000
commit833936eb526fed3de821247e42198e068c962607 (patch)
treeec3d2233cc2fb6c8d86ac6dd41b9306946f3dc11 /sw/source/core/access/accfrmobjmap.hxx
parent6759ca10dcf5414f02439d0a544ed50433bb477e (diff)
expand complex cascading conditional operator
Change-Id: I316cd743070261249eef42872ee2b0a05f930b7e Reviewed-on: https://gerrit.libreoffice.org/12995 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw/source/core/access/accfrmobjmap.hxx')
-rw-r--r--sw/source/core/access/accfrmobjmap.hxx19
1 files changed, 14 insertions, 5 deletions
diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx
index ac2331597f6f..bedd811f001a 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...