diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-24 16:23:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-25 08:56:15 +0200 |
commit | c7c0723dd97e278edeb7686d350ffe6d8706ed66 (patch) | |
tree | e8c9c9635ddca3ecec98ab05b109922ab7fab861 /editeng | |
parent | abf60c4a0fd111985891e2faa30a1e32799fdf9c (diff) |
convert EV_CNTRL constants to enum class
Change-Id: I0ffc0e222c978ce7c734228f712e88422d3a615f
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/editview.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 32 | ||||
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 4 |
4 files changed, 22 insertions, 22 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index e9ec245c51ea..fa77d3c3c0be 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -593,12 +593,12 @@ void EditView::registerLibreOfficeKitCallback(LibreOfficeKitCallback pCallback, pImpEditView->registerLibreOfficeKitCallback(pCallback, pLibreOfficeKitData); } -void EditView::SetControlWord( sal_uInt32 nWord ) +void EditView::SetControlWord( EVControlBits nWord ) { pImpEditView->nControl = nWord; } -sal_uInt32 EditView::GetControlWord() const +EVControlBits EditView::GetControlWord() const { return pImpEditView->nControl; } diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index 7593b8094c18..0344f54c1ff4 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -90,7 +90,7 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, vcl::Window* pWindo eAnchorMode = ANCHOR_TOP_LEFT; nInvMore = 1; nTravelXPos = TRAVEL_X_DONTKNOW; - nControl = EV_CNTRL_AUTOSCROLL | EV_CNTRL_ENABLEPASTE; + nControl = EVControlBits::AUTOSCROLL | EVControlBits::ENABLEPASTE; bActiveDragAndDropListener = false; aEditSelection.Min() = pEng->GetEditDoc().GetStartPaM(); @@ -1180,7 +1180,7 @@ void ImpEditView::SetInsertMode( bool bInsert ) { if ( bInsert != IsInsertMode() ) { - SetFlags( nControl, EV_CNTRL_OVERWRITE, !bInsert ); + SetFlags( nControl, EVControlBits::OVERWRITE, !bInsert ); ShowCursor( DoAutoScroll(), false ); } } diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index febfd39745f8..dd2f6443883d 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -230,14 +230,14 @@ private: long nInvMore; - sal_uLong nControl; + EVControlBits nControl; sal_uInt32 nTravelXPos; sal_uInt16 nExtraCursorFlags; sal_uInt16 nCursorBidiLevel; sal_uInt16 nScrollDiffX; - bool bReadOnly; - bool bClickedInSelection; - bool bActiveDragAndDropListener; + bool bReadOnly; + bool bClickedInSelection; + bool bActiveDragAndDropListener; Point aAnchorPoint; Rectangle aOutArea; @@ -352,18 +352,18 @@ public: Pair Scroll( long ndX, long ndY, sal_uInt8 nRangeCheck = RGCHK_NEG ); void SetInsertMode( bool bInsert ); - bool IsInsertMode() const { return ( ( nControl & EV_CNTRL_OVERWRITE ) == 0 ); } - - void EnablePaste( bool bEnable ) { SetFlags( nControl, EV_CNTRL_ENABLEPASTE, bEnable ); } - bool IsPasteEnabled() const { return ( ( nControl & EV_CNTRL_ENABLEPASTE ) != 0 ); } - - bool DoSingleLinePaste() const { return ( ( nControl & EV_CNTRL_SINGLELINEPASTE ) != 0 ); } - bool DoAutoScroll() const { return ( ( nControl & EV_CNTRL_AUTOSCROLL ) != 0 ); } - bool DoBigScroll() const { return ( ( nControl & EV_CNTRL_BIGSCROLL ) != 0 ); } - bool DoAutoSize() const { return ( ( nControl & EV_CNTRL_AUTOSIZE ) != 0 ); } - bool DoAutoWidth() const { return ( ( nControl & EV_CNTRL_AUTOSIZEX) != 0 ); } - bool DoAutoHeight() const { return ( ( nControl & EV_CNTRL_AUTOSIZEY) != 0 ); } - bool DoInvalidateMore() const { return ( ( nControl & EV_CNTRL_INVONEMORE ) != 0 ); } + bool IsInsertMode() const { return !( nControl & EVControlBits::OVERWRITE ); } + + void EnablePaste( bool bEnable ) { SetFlags( nControl, EVControlBits::ENABLEPASTE, bEnable ); } + bool IsPasteEnabled() const { return bool( nControl & EVControlBits::ENABLEPASTE ); } + + bool DoSingleLinePaste() const { return bool( nControl & EVControlBits::SINGLELINEPASTE ); } + bool DoAutoScroll() const { return bool( nControl & EVControlBits::AUTOSCROLL ); } + bool DoBigScroll() const { return bool( nControl & EVControlBits::BIGSCROLL ); } + bool DoAutoSize() const { return bool( nControl & EVControlBits::AUTOSIZE ); } + bool DoAutoWidth() const { return bool( nControl & EVControlBits::AUTOSIZEX); } + bool DoAutoHeight() const { return bool( nControl & EVControlBits::AUTOSIZEY); } + bool DoInvalidateMore() const { return bool( nControl & EVControlBits::INVONEMORE ); } void SetBackgroundColor( const Color& rColor ); const Color& GetBackgroundColor() const { diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx index 183aa1860575..09d1341ec691 100644 --- a/editeng/source/outliner/outlvw.cxx +++ b/editeng/source/outliner/outlvw.cxx @@ -1313,12 +1313,12 @@ void OutlinerView::Scroll( long nHorzScroll, long nVertScroll ) pEditView->Scroll( nHorzScroll, nVertScroll ); } -void OutlinerView::SetControlWord( sal_uLong nWord ) +void OutlinerView::SetControlWord( EVControlBits nWord ) { pEditView->SetControlWord( nWord ); } -sal_uLong OutlinerView::GetControlWord() const +EVControlBits OutlinerView::GetControlWord() const { return pEditView->GetControlWord(); } |