summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-03-24 16:05:55 +0200
committerNoel Grandin <noel@peralex.com>2015-03-25 08:56:14 +0200
commitabf60c4a0fd111985891e2faa30a1e32799fdf9c (patch)
treeb83b66c7457b8e221a01dfe3808adc918c41e6b9 /sw/source/uibase
parent6cb56b551bc1e30a887d8a333d70567cad23aa9e (diff)
convert EE_CNTRL constants to enum class
there were a couple of lines in SC and SW where the code was using a EV_CNTRL constant. I switched it to used the same-valued constant from EE_CNTRL Change-Id: I027183cc3b6e700bf365d48833e37eddc9b50f04
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx26
-rw-r--r--sw/source/uibase/shells/drwtxtex.cxx6
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx8
-rw-r--r--sw/source/uibase/shells/langhelper.cxx8
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx12
5 files changed, 30 insertions, 30 deletions
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index 60405050f1b6..9b254f5bf4ea 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -418,17 +418,17 @@ void SwSidebarWin::InitControls()
mpVScrollbar->AddEventListener( LINK( this, SwSidebarWin, WindowEventListener ) );
const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
- sal_uLong nCntrl = mpOutliner->GetControlWord();
+ EEControlBits nCntrl = mpOutliner->GetControlWord();
// TODO: crash when AUTOCOMPLETE enabled
- nCntrl |= EE_CNTRL_MARKFIELDS | EE_CNTRL_PASTESPECIAL | EE_CNTRL_AUTOCORRECT | EV_CNTRL_AUTOSCROLL; // | EE_CNTRL_AUTOCOMPLETE;
+ nCntrl |= EEControlBits::MARKFIELDS | EEControlBits::PASTESPECIAL | EEControlBits::AUTOCORRECT | EEControlBits::USECHARATTRIBS; // | EEControlBits::AUTOCOMPLETE;
if (SwViewOption::IsFieldShadings())
- nCntrl |= EE_CNTRL_MARKFIELDS;
+ nCntrl |= EEControlBits::MARKFIELDS;
else
- nCntrl &= ~EE_CNTRL_MARKFIELDS;
+ nCntrl &= ~EEControlBits::MARKFIELDS;
if (pVOpt->IsOnlineSpell())
- nCntrl |= EE_CNTRL_ONLINESPELLING;
+ nCntrl |= EEControlBits::ONLINESPELLING;
else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ nCntrl &= ~EEControlBits::ONLINESPELLING;
mpOutliner->SetControlWord(nCntrl);
sal_uInt16 aIndex = SW_MOD()->InsertRedlineAuthor(GetAuthor());
@@ -930,16 +930,16 @@ void SwSidebarWin::SetLanguage(const SvxLanguageItem& rNewItem)
Engine()->SetModifyHdl( pLink );
const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
- sal_uLong nCntrl = Engine()->GetControlWord();
+ EEControlBits nCntrl = Engine()->GetControlWord();
// turn off
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ nCntrl &= ~EEControlBits::ONLINESPELLING;
Engine()->SetControlWord(nCntrl);
//turn back on
if (pVOpt->IsOnlineSpell())
- nCntrl |= EE_CNTRL_ONLINESPELLING;
+ nCntrl |= EEControlBits::ONLINESPELLING;
else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ nCntrl &= ~EEControlBits::ONLINESPELLING;
Engine()->SetControlWord(nCntrl);
Engine()->CompleteOnlineSpelling();
@@ -1235,11 +1235,11 @@ sal_Int32 SwSidebarWin::GetMinimumSizeWithoutMeta()
void SwSidebarWin::SetSpellChecking()
{
const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
- sal_uLong nCntrl = mpOutliner->GetControlWord();
+ EEControlBits nCntrl = mpOutliner->GetControlWord();
if (pVOpt->IsOnlineSpell())
- nCntrl |= EE_CNTRL_ONLINESPELLING;
+ nCntrl |= EEControlBits::ONLINESPELLING;
else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ nCntrl &= ~EEControlBits::ONLINESPELLING;
mpOutliner->SetControlWord(nCntrl);
mpOutliner->CompleteOnlineSpelling();
diff --git a/sw/source/uibase/shells/drwtxtex.cxx b/sw/source/uibase/shells/drwtxtex.cxx
index 291328d2fae9..f0105c37ff12 100644
--- a/sw/source/uibase/shells/drwtxtex.cxx
+++ b/sw/source/uibase/shells/drwtxtex.cxx
@@ -443,14 +443,14 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
//!! JP 16.03.2001: why?? pSdrView = rSh.GetDrawView();
//!! JP 16.03.2001: why?? pOutliner = pSdrView->GetTextEditOutliner();
SdrOutliner * pOutliner = pSdrView->GetTextEditOutliner();
- sal_uInt32 nCtrl = pOutliner->GetControlWord();
+ EEControlBits nCtrl = pOutliner->GetControlWord();
bool bSet = static_cast<const SfxBoolItem&>(rReq.GetArgs()->Get(
nSlot)).GetValue();
if(bSet)
- nCtrl |= EE_CNTRL_ONLINESPELLING|EE_CNTRL_ALLOWBIGOBJS;
+ nCtrl |= EEControlBits::ONLINESPELLING|EEControlBits::ALLOWBIGOBJS;
else
- nCtrl &= ~EE_CNTRL_ONLINESPELLING;
+ nCtrl &= ~EEControlBits::ONLINESPELLING;
pOutliner->SetControlWord(nCtrl);
rView.ExecuteSlot(rReq);
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index ccadc8f92a06..a2aa744ccb06 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -103,8 +103,8 @@ void SwDrawTextShell::Init()
if( !pOutliner )
return ;
OutlinerView* pOLV = pSdrView->GetTextEditOutlinerView();
- sal_uLong nCtrl = pOutliner->GetControlWord();
- nCtrl |= EE_CNTRL_AUTOCORRECT;
+ EEControlBits nCtrl = pOutliner->GetControlWord();
+ nCtrl |= EEControlBits::AUTOCORRECT;
SetUndoManager(&pOutliner->GetUndoManager());
@@ -113,10 +113,10 @@ void SwDrawTextShell::Init()
const SwViewOption* pVOpt = rSh.GetViewOptions();
if(pVOpt->IsOnlineSpell())
{
- nCtrl |= EE_CNTRL_ONLINESPELLING|EE_CNTRL_ALLOWBIGOBJS;
+ nCtrl |= EEControlBits::ONLINESPELLING|EEControlBits::ALLOWBIGOBJS;
}
else
- nCtrl &= ~(EE_CNTRL_ONLINESPELLING);
+ nCtrl &= ~(EEControlBits::ONLINESPELLING);
pOutliner->SetControlWord(nCtrl);
pOLV->ShowCursor();
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index 866aeb9240d1..cf7bf29952cc 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -193,16 +193,16 @@ namespace SwLangHelper
if (bForSelection)
{
const SwViewOption* pVOpt = rView.GetWrtShellPtr()->GetViewOptions();
- sal_uLong nCntrl = pEditEngine->GetControlWord();
+ EEControlBits nCntrl = pEditEngine->GetControlWord();
// turn off
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ nCntrl &= ~EEControlBits::ONLINESPELLING;
pEditEngine->SetControlWord(nCntrl);
//turn back on
if (pVOpt->IsOnlineSpell())
- nCntrl |= EE_CNTRL_ONLINESPELLING;
+ nCntrl |= EEControlBits::ONLINESPELLING;
else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ nCntrl &= ~EEControlBits::ONLINESPELLING;
pEditEngine->SetControlWord(nCntrl);
pEditEngine->CompleteOnlineSpelling();
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 43037c9c6ea6..249787afa234 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -521,20 +521,20 @@ bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
pOutliner->SetHyphenator( xHyphenator );
pSh->SetCalcFieldValueHdl(pOutliner);
- sal_uInt32 nCntrl = pOutliner->GetControlWord();
- nCntrl |= EE_CNTRL_ALLOWBIGOBJS;
+ EEControlBits nCntrl = pOutliner->GetControlWord();
+ nCntrl |= EEControlBits::ALLOWBIGOBJS;
const SwViewOption *pOpt = pSh->GetViewOptions();
if (SwViewOption::IsFieldShadings())
- nCntrl |= EE_CNTRL_MARKFIELDS;
+ nCntrl |= EEControlBits::MARKFIELDS;
else
- nCntrl &= ~EE_CNTRL_MARKFIELDS;
+ nCntrl &= ~EEControlBits::MARKFIELDS;
if (pOpt->IsOnlineSpell())
- nCntrl |= EE_CNTRL_ONLINESPELLING;
+ nCntrl |= EEControlBits::ONLINESPELLING;
else
- nCntrl &= ~EE_CNTRL_ONLINESPELLING;
+ nCntrl &= ~EEControlBits::ONLINESPELLING;
pOutliner->SetControlWord(nCntrl);
const SfxPoolItem& rItem = pSh->GetDoc()->GetDefault(RES_CHRATR_LANGUAGE);