Kaydet (Commit) 7cc8555e authored tarafından Jochen Nitschke's avatar Jochen Nitschke

convert EESelectionMode to scoped enum

Change-Id: I4da22d40d5b14878b5efac1f3e4a5c76adec37b3
Reviewed-on: https://gerrit.libreoffice.org/37341Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJochen Nitschke <j.nitschke+logerrit@ok.de>
üst fa19a1f0
...@@ -88,7 +88,7 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, vcl::Window* pWindo ...@@ -88,7 +88,7 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, vcl::Window* pWindo
pDragAndDropInfo = nullptr; pDragAndDropInfo = nullptr;
bReadOnly = false; bReadOnly = false;
bClickedInSelection = false; bClickedInSelection = false;
eSelectionMode = EE_SELMODE_TXTONLY; eSelectionMode = EESelectionMode::TxtOnly;
eAnchorMode = EEAnchorMode::TopLeft; eAnchorMode = EEAnchorMode::TopLeft;
nInvMore = 1; nInvMore = 1;
nTravelXPos = TRAVEL_X_DONTKNOW; nTravelXPos = TRAVEL_X_DONTKNOW;
...@@ -196,7 +196,7 @@ void lcl_translateTwips(vcl::Window& rParent, vcl::Window& rChild) ...@@ -196,7 +196,7 @@ void lcl_translateTwips(vcl::Window& rParent, vcl::Window& rChild)
void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, OutputDevice* pTargetDevice ) void ImpEditView::DrawSelection( EditSelection aTmpSel, vcl::Region* pRegion, OutputDevice* pTargetDevice )
{ {
if ( eSelectionMode == EE_SELMODE_HIDDEN ) if ( eSelectionMode == EESelectionMode::Hidden )
return; return;
// It must be ensured before rendering the selection, that the contents of // It must be ensured before rendering the selection, that the contents of
......
...@@ -54,7 +54,7 @@ OutlinerView::OutlinerView( Outliner* pOut, vcl::Window* pWin ) ...@@ -54,7 +54,7 @@ OutlinerView::OutlinerView( Outliner* pOut, vcl::Window* pWin )
pOwner = pOut; pOwner = pOut;
pEditView.reset( new EditView( pOut->pEditEngine, pWin ) ); pEditView.reset( new EditView( pOut->pEditEngine, pWin ) );
pEditView->SetSelectionMode( EE_SELMODE_TXTONLY ); pEditView->SetSelectionMode( EESelectionMode::TxtOnly );
} }
OutlinerView::~OutlinerView() OutlinerView::~OutlinerView()
......
...@@ -45,7 +45,7 @@ namespace frm ...@@ -45,7 +45,7 @@ namespace frm
Control::GetFocus(); Control::GetFocus();
if (m_pView) if (m_pView)
{ {
m_pView->SetSelectionMode( EE_SELMODE_STD ); m_pView->SetSelectionMode( EESelectionMode::Std );
m_pView->ShowCursor(); m_pView->ShowCursor();
} }
} }
...@@ -55,7 +55,7 @@ namespace frm ...@@ -55,7 +55,7 @@ namespace frm
if (m_pView) if (m_pView)
{ {
m_pView->HideCursor(); m_pView->HideCursor();
m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD ); m_pView->SetSelectionMode( m_bHideInactiveSelection ? EESelectionMode::Hidden : EESelectionMode::Std );
} }
Control::LoseFocus(); Control::LoseFocus();
} }
...@@ -94,7 +94,7 @@ namespace frm ...@@ -94,7 +94,7 @@ namespace frm
return; return;
m_bHideInactiveSelection = _bHide; m_bHideInactiveSelection = _bHide;
if ( !HasFocus() ) if ( !HasFocus() )
m_pView->SetSelectionMode( m_bHideInactiveSelection ? EE_SELMODE_HIDDEN : EE_SELMODE_STD ); m_pView->SetSelectionMode( m_bHideInactiveSelection ? EESelectionMode::Hidden : EESelectionMode::Std );
} }
} // namespace frm } // namespace frm
......
...@@ -34,7 +34,7 @@ enum class HtmlTokenId : sal_Int16; ...@@ -34,7 +34,7 @@ enum class HtmlTokenId : sal_Int16;
enum EETextFormat { EE_FORMAT_TEXT = 0x20, EE_FORMAT_RTF, EE_FORMAT_BIN = 0x31, EE_FORMAT_HTML, EE_FORMAT_XML }; enum EETextFormat { EE_FORMAT_TEXT = 0x20, EE_FORMAT_RTF, EE_FORMAT_BIN = 0x31, EE_FORMAT_HTML, EE_FORMAT_XML };
enum EEHorizontalTextDirection { EE_HTEXTDIR_DEFAULT, EE_HTEXTDIR_L2R, EE_HTEXTDIR_R2L }; enum EEHorizontalTextDirection { EE_HTEXTDIR_DEFAULT, EE_HTEXTDIR_L2R, EE_HTEXTDIR_R2L };
enum EESelectionMode { EE_SELMODE_STD, EE_SELMODE_TXTONLY, EE_SELMODE_HIDDEN }; enum class EESelectionMode { Std, TxtOnly, Hidden };
// EE_SELMODE_HIDDEN can be used to completely hide the selection. This is useful e.g. when you want show the selection // EE_SELMODE_HIDDEN can be used to completely hide the selection. This is useful e.g. when you want show the selection
// only as long as your window (which the edit view works on) has the focus // only as long as your window (which the edit view works on) has the focus
enum class EESpellState { Ok, LanguageNotInstalled, NoSpeller, ErrorFound }; enum class EESpellState { Ok, LanguageNotInstalled, NoSpeller, ErrorFound };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment