diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-22 17:43:07 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-03-24 23:22:08 +0100 |
commit | c373dc5d6c45cf9d04b079dfbc26820547031d57 (patch) | |
tree | 61c1e8cf0469d13a0e175693b70060064b0e5296 /sw | |
parent | 0dcd33cf92585af85e3a73e75c4a9988dd3c395a (diff) |
Group common expression
Change-Id: Id286b57ccba1edb35490c374740a58128ce7f0c4
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/misc/num.cxx | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index ab6df7ea0147..5079ed9140ce 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -209,15 +209,13 @@ void SwNumPositionTabPage::InitControls() { if(bRelative) { - if(nFirstBorderTextRelative == -1) - nFirstBorderTextRelative = - (aNumFmtArr[i]->GetAbsLSpace() + aNumFmtArr[i]->GetFirstLineOffset() - - aNumFmtArr[i - 1]->GetAbsLSpace() + aNumFmtArr[i - 1]->GetFirstLineOffset()); + const long nBorderTextRelative = + aNumFmtArr[i]->GetAbsLSpace() + aNumFmtArr[i]->GetFirstLineOffset() - + aNumFmtArr[i - 1]->GetAbsLSpace() + aNumFmtArr[i - 1]->GetFirstLineOffset(); + if (nFirstBorderTextRelative == -1) + nFirstBorderTextRelative = nBorderTextRelative; else - bSameDistBorderNum &= nFirstBorderTextRelative == - (aNumFmtArr[i]->GetAbsLSpace() + aNumFmtArr[i]->GetFirstLineOffset() - - aNumFmtArr[i - 1]->GetAbsLSpace() + aNumFmtArr[i - 1]->GetFirstLineOffset()); - + bSameDistBorderNum &= nFirstBorderTextRelative == nBorderTextRelative; } else { |