diff options
Diffstat (limited to 'sw/source/uibase')
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 26 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 6 |
3 files changed, 19 insertions, 17 deletions
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index a5a91f83f04e..5e509ee18ec3 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -2366,10 +2366,10 @@ KEYINPUT_CHECKTABLE: const bool bIsAutoCorrectChar = SvxAutoCorrect::IsAutoCorrectChar( aCh ); if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || rSh.IsNbspRunNext() ) && pACfg->IsAutoFormatByInput() && - (( pACorr->IsAutoCorrFlag( ChgWeightUnderl ) && + (( pACorr->IsAutoCorrFlag( ACFlags::ChgWeightUnderl ) && ( '*' == aCh || '_' == aCh ) ) || - ( pACorr->IsAutoCorrFlag( ChgQuotes ) && ('\"' == aCh ))|| - ( pACorr->IsAutoCorrFlag( ChgSglQuotes ) && ( '\'' == aCh)))) + ( pACorr->IsAutoCorrFlag( ACFlags::ChgQuotes ) && ('\"' == aCh ))|| + ( pACorr->IsAutoCorrFlag( ACFlags::ChgSglQuotes ) && ( '\'' == aCh)))) { FlushInBuffer(); rSh.AutoCorrect( *pACorr, aCh ); @@ -2378,10 +2378,10 @@ KEYINPUT_CHECKTABLE: } else if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || rSh.IsNbspRunNext() ) && pACfg->IsAutoFormatByInput() && - pACorr->IsAutoCorrFlag( CapitalStartSentence | CapitalStartWord | - ChgOrdinalNumber | AddNonBrkSpace | - ChgToEnEmDash | SetINetAttr | - Autocorrect ) && + pACorr->IsAutoCorrFlag( ACFlags::CapitalStartSentence | ACFlags::CapitalStartWord | + ACFlags::ChgOrdinalNumber | ACFlags::AddNonBrkSpace | + ACFlags::ChgToEnEmDash | ACFlags::SetINetAttr | + ACFlags::Autocorrect ) && '\"' != aCh && '\'' != aCh && '*' != aCh && '_' != aCh ) { @@ -2412,10 +2412,10 @@ KEYINPUT_CHECKTABLE: case SwKeyState::CheckAutoCorrect: { if( pACorr && pACfg->IsAutoFormatByInput() && - pACorr->IsAutoCorrFlag( CapitalStartSentence | CapitalStartWord | - ChgOrdinalNumber | - ChgToEnEmDash | SetINetAttr | - Autocorrect ) && + pACorr->IsAutoCorrFlag( ACFlags::CapitalStartSentence | ACFlags::CapitalStartWord | + ACFlags::ChgOrdinalNumber | + ACFlags::ChgToEnEmDash | ACFlags::SetINetAttr | + ACFlags::Autocorrect ) && !rSh.HasReadonlySel() ) { FlushInBuffer(); @@ -5293,8 +5293,8 @@ void SwEditWin::Command( const CommandEvent& rCEvt ) SvxAutoCorrCfg& rACfg = SvxAutoCorrCfg::Get(); SvxAutoCorrect* pACorr = rACfg.GetAutoCorrect(); if(pACorr && - (( pACorr->IsAutoCorrFlag( ChgQuotes ) && ('\"' == aCh ))|| - ( pACorr->IsAutoCorrFlag( ChgSglQuotes ) && ( '\'' == aCh)))) + (( pACorr->IsAutoCorrFlag( ACFlags::ChgQuotes ) && ('\"' == aCh ))|| + ( pACorr->IsAutoCorrFlag( ACFlags::ChgSglQuotes ) && ( '\'' == aCh)))) { rSh.DelLeft(); rSh.AutoCorrect( *pACorr, aCh ); diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 357d0483184e..b5dc483ebad5 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -161,7 +161,9 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) SvxAutoCorrect* pACorr = rACfg.GetAutoCorrect(); if( pACorr && rACfg.IsAutoFormatByInput() && pACorr->IsAutoCorrFlag( - CapitalStartSentence | CapitalStartWord | AddNonBrkSpace | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect ) ) + ACFlags::CapitalStartSentence | ACFlags::CapitalStartWord | + ACFlags::AddNonBrkSpace | ACFlags::ChgOrdinalNumber | + ACFlags::ChgToEnEmDash | ACFlags::SetINetAttr | ACFlags::Autocorrect ) ) { rSh.AutoCorrect( *pACorr, cIns ); } diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 2ed8db43218f..720308feb756 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -135,9 +135,9 @@ using namespace com::sun::star; static SvxAutoCorrect* lcl_IsAutoCorr() { SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrect(); - if( pACorr && !pACorr->IsAutoCorrFlag( CapitalStartSentence | CapitalStartWord | - AddNonBrkSpace | ChgOrdinalNumber | - ChgToEnEmDash | SetINetAttr | Autocorrect )) + if( pACorr && !pACorr->IsAutoCorrFlag( ACFlags::CapitalStartSentence | ACFlags::CapitalStartWord | + ACFlags::AddNonBrkSpace | ACFlags::ChgOrdinalNumber | + ACFlags::ChgToEnEmDash | ACFlags::SetINetAttr | ACFlags::Autocorrect )) pACorr = nullptr; return pACorr; } |