diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-10 15:21:17 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-11 06:58:40 +0000 |
commit | dc29492cd77a10163f004836afffdf8bd3c381d1 (patch) | |
tree | 770ad630e5129898a8a4fc90ef194c046c0e97fd /svx/source/dialog/svxruler.cxx | |
parent | f09ab2ccb8bbbcf9b9db3cec94ce9b59f901a1c6 (diff) |
Convert RULER_DRAGSIZE to scoped enum
Change-Id: Iddf7562273072eb4d5d60efc730d5c40bfc79f46
Reviewed-on: https://gerrit.libreoffice.org/24852
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svx/source/dialog/svxruler.cxx')
-rw-r--r-- | svx/source/dialog/svxruler.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx index 1dc71e8b5e80..5695a3c10022 100644 --- a/svx/source/dialog/svxruler.cxx +++ b/svx/source/dialog/svxruler.cxx @@ -1755,7 +1755,7 @@ void SvxRuler::DragBorders() nIndex = 0; } - sal_uInt16 nDragSize = GetDragSize(); + RulerDragSize nDragSize = GetDragSize(); long lDiff = 0; // the drag position has to be corrected to be able to prevent borders from passing each other @@ -1763,7 +1763,7 @@ void SvxRuler::DragBorders() switch(nDragSize) { - case RULER_DRAGSIZE_MOVE: + case RulerDragSize::Move: { ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin)) if(GetDragType() == RULER_TYPE_BORDER) @@ -1925,14 +1925,14 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin)) mpBorders[nIndex].nPos += lDiff; break; } - case RULER_DRAGSIZE_1: + case RulerDragSize::N1: { lDiff = lPos - mpBorders[nIndex].nPos; mpBorders[nIndex].nWidth += mpBorders[nIndex].nPos - lPos; mpBorders[nIndex].nPos = lPos; break; } - case RULER_DRAGSIZE_2: + case RulerDragSize::N2: { const long nOld = mpBorders[nIndex].nWidth; mpBorders[nIndex].nWidth = lPos - mpBorders[nIndex].nPos; @@ -1942,7 +1942,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin)) } if(!bRightIndentsCorrected && GetActRightColumn() == nIndex && - nDragSize != RULER_DRAGSIZE_2 && + nDragSize != RulerDragSize::N2 && !mpIndents.empty() && !mxRulerImpl->bIsTableRows) { @@ -1950,7 +1950,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin)) } else if(!bLeftIndentsCorrected && GetActLeftColumn() == nIndex && - nDragSize != RULER_DRAGSIZE_1 && + nDragSize != RulerDragSize::N1 && !mpIndents.empty()) { UpdateParaContents_Impl(lDiff, MOVE_LEFT); @@ -1961,7 +1961,7 @@ ADD_DEBUG_TEXT("lLastLMargin: ", OUString::number(mxRulerImpl->lLastLMargin)) void SvxRuler::DragObjectBorder() { /* Dragging of object edges */ - if(RULER_DRAGSIZE_MOVE == GetDragSize()) + if(RulerDragSize::Move == GetDragSize()) { const long lPosition = MakePositionSticky(GetCorrectedDragPos(), GetLeftFrameMargin()); @@ -2770,7 +2770,7 @@ void SvxRuler::CalcMinMax() const sal_uInt16 nIdx = GetDragAryPos(); switch(GetDragSize()) { - case RULER_DRAGSIZE_1 : + case RulerDragSize::N1 : { nMaxRight = mpBorders[nIdx].nPos + mpBorders[nIdx].nWidth + lNullPix; @@ -2801,7 +2801,7 @@ void SvxRuler::CalcMinMax() nMaxLeft += nDragOffset; break; } - case RULER_DRAGSIZE_MOVE: + case RulerDragSize::Move: { if(mxColumnItem.get()) { @@ -2982,7 +2982,7 @@ void SvxRuler::CalcMinMax() } break; } - case RULER_DRAGSIZE_2: + case RulerDragSize::N2: { nMaxLeft = lNullPix + mpBorders[nIdx].nPos; if(nIdx == mxColumnItem->Count()-2) { // last column |