diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-05-26 09:49:42 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-26 12:20:26 +0200 |
commit | 42f0f1397ad6c36410e26f8bbc04372a754b153d (patch) | |
tree | fdf7493fb4999e04990902e8029c513f020aa081 | |
parent | 2cc3adf3a5fa277a6b578bd3cc1cab0d01c897eb (diff) |
Global CptlSttSntnc -> CapitalStartSentence
Change-Id: Id428332201f14b172af1590baed6aa2a67e0557a
-rw-r--r-- | cui/source/tabpages/autocdlg.cxx | 8 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 6 | ||||
-rw-r--r-- | editeng/source/misc/acorrcfg.cxx | 4 | ||||
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 26 | ||||
-rw-r--r-- | include/editeng/svxacorr.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/edit/acorrect.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/edit/autofmt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/acorrect.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/edtwin.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/shells/textsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 2 |
11 files changed, 33 insertions, 33 deletions
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 21678fdca5dc..27efd0f83faa 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -229,7 +229,7 @@ bool OfaAutocorrOptionsPage::FillItemSet( SfxItemSet* ) sal_uLong nPos = 0; pAutoCorrect->SetAutoCorrFlag(Autocorrect, m_pCheckLB->IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(CptlSttWrd, m_pCheckLB->IsChecked(nPos++)); - pAutoCorrect->SetAutoCorrFlag(CptlSttSntnc, m_pCheckLB->IsChecked(nPos++)); + pAutoCorrect->SetAutoCorrFlag(CapitalStartSentence, m_pCheckLB->IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(ChgWeightUnderl, m_pCheckLB->IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(SetINetAttr, m_pCheckLB->IsChecked(nPos++)); pAutoCorrect->SetAutoCorrFlag(ChgToEnEmDash, m_pCheckLB->IsChecked(nPos++)); @@ -271,7 +271,7 @@ void OfaAutocorrOptionsPage::Reset( const SfxItemSet* ) sal_uLong nPos = 0; m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & Autocorrect) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & CptlSttWrd) ); - m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & CptlSttSntnc) ); + m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & CapitalStartSentence) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & ChgWeightUnderl) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & SetINetAttr) ); m_pCheckLB->CheckEntryPos( nPos++, 0 != (nFlags & ChgToEnEmDash) ); @@ -539,7 +539,7 @@ bool OfaSwAutoFmtOptionsPage::FillItemSet( SfxItemSet* ) bCheck = m_pCheckLB->IsChecked(BEGIN_UPPER, CBCOL_FIRST); bModified |= pOpt->bCapitalStartSentence != bCheck; pOpt->bCapitalStartSentence = bCheck; - pAutoCorrect->SetAutoCorrFlag(CptlSttSntnc, + pAutoCorrect->SetAutoCorrFlag(CapitalStartSentence, m_pCheckLB->IsChecked(BEGIN_UPPER, CBCOL_SECOND)); bCheck = m_pCheckLB->IsChecked(BOLD_UNDERLINE, CBCOL_FIRST); @@ -674,7 +674,7 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet* ) m_pCheckLB->CheckEntryPos( CORR_UPPER, CBCOL_FIRST, pOpt->bCptlSttWrd ); m_pCheckLB->CheckEntryPos( CORR_UPPER, CBCOL_SECOND, 0 != (nFlags & CptlSttWrd) ); m_pCheckLB->CheckEntryPos( BEGIN_UPPER, CBCOL_FIRST, pOpt->bCapitalStartSentence ); - m_pCheckLB->CheckEntryPos( BEGIN_UPPER, CBCOL_SECOND, 0 != (nFlags & CptlSttSntnc) ); + m_pCheckLB->CheckEntryPos( BEGIN_UPPER, CBCOL_SECOND, 0 != (nFlags & CapitalStartSentence) ); m_pCheckLB->CheckEntryPos( BOLD_UNDERLINE, CBCOL_FIRST, pOpt->bChgWeightUnderl ); m_pCheckLB->CheckEntryPos( BOLD_UNDERLINE, CBCOL_SECOND, 0 != (nFlags & ChgWeightUnderl) ); m_pCheckLB->CheckEntryPos( IGNORE_DBLSPACE, CBCOL_SECOND, 0 != (nFlags & IgnoreDoubleSpace) ); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 79058932479d..f9d413189e1f 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -2490,7 +2490,7 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, sal_Unicode c, // #i78661 allow application to turn off capitalization of // start sentence explicitly. // (This is done by setting IsFirstWordCapitalization to sal_False.) - bool bOldCptlSttSntnc = pAutoCorrect->IsAutoCorrFlag( CptlSttSntnc ); + bool bOldCapitalStartSentence = pAutoCorrect->IsAutoCorrFlag( CapitalStartSentence ); if (!IsFirstWordCapitalization()) { ESelection aESel( CreateESel(aSel) ); @@ -2521,7 +2521,7 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, sal_Unicode c, aSel.Max().GetIndex() <= aSecondWordSel.Min().GetIndex(); if (bIsFirstWordInFirstPara) - pAutoCorrect->SetAutoCorrFlag( CptlSttSntnc, IsFirstWordCapitalization() ); + pAutoCorrect->SetAutoCorrFlag( CapitalStartSentence, IsFirstWordCapitalization() ); } ContentNode* pNode = aSel.Max().GetNode(); @@ -2535,7 +2535,7 @@ EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, sal_Unicode c, // #i78661 since the SvxAutoCorrect object used here is // shared we need to reset the value to it's original state. - pAutoCorrect->SetAutoCorrFlag( CptlSttSntnc, bOldCptlSttSntnc ); + pAutoCorrect->SetAutoCorrFlag( CapitalStartSentence, bOldCapitalStartSentence ); } return aSel.Max(); } diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx index 31e4fecd80c2..fc746e15fde4 100644 --- a/editeng/source/misc/acorrcfg.cxx +++ b/editeng/source/misc/acorrcfg.cxx @@ -158,7 +158,7 @@ void SvxBaseAutoCorrCfg::Load(bool bInit) break;//"TwoCapitalsAtStart", case 4: if(*static_cast<sal_Bool const *>(pValues[nProp].getValue())) - nFlags |= CptlSttSntnc; + nFlags |= CapitalStartSentence; break;//"CapitalAtStartSentence", case 5: if(*static_cast<sal_Bool const *>(pValues[nProp].getValue())) @@ -267,7 +267,7 @@ void SvxBaseAutoCorrCfg::ImplCommit() pValues[nProp].setValue(&bVal, rType); break;//"TwoCapitalsAtStart", case 4: - bVal = 0 != (nFlags & CptlSttSntnc); + bVal = 0 != (nFlags & CapitalStartSentence); pValues[nProp].setValue(&bVal, rType); break;//"CapitalAtStartSentence", case 5: diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 77816d9233eb..425e68762a3f 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -90,7 +90,7 @@ static const sal_Char /* also at these ends - Brackets and all kinds of begin characters */ sImplEndSkipChars[] = "\"\')]}\x83\x84\x89\x91\x92\x93\x94"; -// These characters are allowed in words: (for FnCptlSttSntnc) +// These characters are allowed in words: (for FnCapitalStartSentence) static const sal_Char sImplWordChars[] = "-'"; OUString EncryptBlockName_Imp(const OUString& rName); @@ -175,7 +175,7 @@ SvxAutoCorrDoc::~SvxAutoCorrDoc() // Called by the functions: // - FnCptlSttWrd -// - FnCptlSttSntnc +// - FnCapitalStartSentence // after the exchange of characters. Then the words, if necessary, can be inserted // into the exception list. void SvxAutoCorrDoc::SaveCpltSttWord( sal_uLong, sal_Int32, const OUString&, @@ -250,7 +250,7 @@ bool SvxAutoCorrect::NeedsHardspaceAutocorr( sal_Unicode cChar ) long SvxAutoCorrect::GetDefaultFlags() { long nRet = Autocorrect - | CptlSttSntnc + | CapitalStartSentence | CptlSttWrd | ChgOrdinalNumber | ChgToEnEmDash @@ -340,7 +340,7 @@ void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, bool bOn ) if( !bOn ) { - if( (nOld & CptlSttSntnc) != (nFlags & CptlSttSntnc) ) + if( (nOld & CapitalStartSentence) != (nFlags & CapitalStartSentence) ) nFlags &= ~CplSttLstLoad; if( (nOld & CptlSttWrd) != (nFlags & CptlSttWrd) ) nFlags &= ~WrdSttLstLoad; @@ -800,7 +800,7 @@ bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const OUString& rT } -bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, +bool SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc, const OUString& rTxt, bool bNormalPos, sal_Int32 nSttPos, sal_Int32 nEndPos, LanguageType eLang ) @@ -1069,7 +1069,7 @@ bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, // Parahaps someone wants to have the word if( bRet && SaveWordCplSttLst & nFlags ) - rDoc.SaveCpltSttWord( CptlSttSntnc, nSttPos, sWord, cSave ); + rDoc.SaveCpltSttWord( CapitalStartSentence, nSttPos, sWord, cSave ); return bRet; } @@ -1335,7 +1335,7 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, if( IsAutoCorrFlag( Autocorrect ) ) { OUString aPara; - OUString* pPara = IsAutoCorrFlag(CptlSttSntnc) ? &aPara : 0; + OUString* pPara = IsAutoCorrFlag(CapitalStartSentence) ? &aPara : 0; // since LibO 4.1, '-' is a word separator // fdo#67742 avoid "--" to be replaced by "–" if next is "-" @@ -1375,10 +1375,10 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, ++nEnd; // Capital letter at beginning of paragraph? - if( IsAutoCorrFlag( CptlSttSntnc ) && - FnCptlSttSntnc( rDoc, aPara, false, + if( IsAutoCorrFlag( CapitalStartSentence ) && + FnCapitalStartSentence( rDoc, aPara, false, nCapLttrPos, nEnd, eLang ) ) - nRet |= CptlSttSntnc; + nRet |= CapitalStartSentence; if( IsAutoCorrFlag( ChgToEnEmDash ) && FnChgToEnEmDash( rDoc, rTxt, nCapLttrPos, nEnd, eLang ) ) @@ -1414,9 +1414,9 @@ SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, // Capital letter at beginning of paragraph ? if( !bUnsupported && - IsAutoCorrFlag( CptlSttSntnc ) && - FnCptlSttSntnc( rDoc, rTxt, true, nCapLttrPos, nInsPos, eLang ) ) - nRet |= CptlSttSntnc; + IsAutoCorrFlag( CapitalStartSentence ) && + FnCapitalStartSentence( rDoc, rTxt, true, nCapLttrPos, nInsPos, eLang ) ) + nRet |= CapitalStartSentence; // Two capital letters at beginning of word ?? if( !bUnsupported && diff --git a/include/editeng/svxacorr.hxx b/include/editeng/svxacorr.hxx index 18fb82a31315..3070d1aaf722 100644 --- a/include/editeng/svxacorr.hxx +++ b/include/editeng/svxacorr.hxx @@ -55,7 +55,7 @@ class SvStringsISortDtor }; // Auto correct flags -const long CptlSttSntnc = 0x00000001; // Capital letters at the beginning of a sentence +const long CapitalStartSentence = 0x00000001; // Capital letters at the beginning of a sentence const long CptlSttWrd = 0x00000002; // not two Capital letters at the beginning of a word const long AddNonBrkSpace = 0x00000004; // Add non breaking space before :;?!% const long ChgOrdinalNumber = 0x00000008; // Ordinal-Number 1st, 2nd,.. @@ -106,7 +106,7 @@ public: OUString* pPara ) = 0; // Is called after the change of the signs by the functions // - FnCptlSttWrd - // - FnCptlSttSntnc + // - FnCapitalStartSentence // As an option, the words can then be inserted into the exception lists. virtual void SaveCpltSttWord( sal_uLong nFlag, sal_Int32 nPos, const OUString& rExceptWord, @@ -405,7 +405,7 @@ public: bool FnChgWeightUnderl( SvxAutoCorrDoc&, const OUString&, sal_Int32 nSttPos, sal_Int32 nEndPos, LanguageType eLang = LANGUAGE_SYSTEM ); - bool FnCptlSttSntnc( SvxAutoCorrDoc&, const OUString&, bool bNormalPos, + bool FnCapitalStartSentence( SvxAutoCorrDoc&, const OUString&, bool bNormalPos, sal_Int32 nSttPos, sal_Int32 nEndPos, LanguageType eLang = LANGUAGE_SYSTEM); bool FnCorrectCapsLock( SvxAutoCorrDoc&, const OUString&, diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx index 82255be8a8da..28cb79689b47 100644 --- a/sw/source/core/edit/acorrect.cxx +++ b/sw/source/core/edit/acorrect.cxx @@ -403,7 +403,7 @@ bool SwAutoCorrDoc::ChgAutoCorrWord( sal_Int32& rSttPos, sal_Int32 nEndPos, // Called by the functions: // - FnCptlSttWrd -// - FnCptlSttSntnc +// - FnCapitalStartSentence // after the exchange of characters. Then the words, if necessary, can be inserted // into the exception list. void SwAutoCorrDoc::SaveCpltSttWord( sal_uLong nFlag, sal_Int32 nPos, @@ -443,7 +443,7 @@ void SwAutoCorrExceptWord::CheckChar( const SwPosition& rPos, sal_Unicode cChr ) // then add to the list: if (CptlSttWrd & m_nFlags) pACorr->AddWrtSttException(m_sWord, m_eLanguage); - else if (CptlSttSntnc & m_nFlags) + else if (CapitalStartSentence & m_nFlags) pACorr->AddCplSttException(m_sWord, m_eLanguage); } } diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 75cb288847c6..f7013a9e7870 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -2049,7 +2049,7 @@ void SwAutoFormat::AutoCorrect( sal_Int32 nPos ) if( m_aFlags.bCapitalStartSentence && bFirst ) { SetRedlineText( STR_AUTOFMTREDL_CPTL_STT_SENT ); - pATst->FnCptlSttSntnc( aACorrDoc, *pText, true, nSttPos, nPos, eLang); + pATst->FnCapitalStartSentence( aACorrDoc, *pText, true, nSttPos, nPos, eLang); } bFirst = bFirstSent; diff --git a/sw/source/core/inc/acorrect.hxx b/sw/source/core/inc/acorrect.hxx index 1f6001822e7f..4a833abf00e1 100644 --- a/sw/source/core/inc/acorrect.hxx +++ b/sw/source/core/inc/acorrect.hxx @@ -80,7 +80,7 @@ public: // Will be called after swapping characters by the functions // - FnCptlSttWrd and - // - FnCptlSttSntnc. + // - FnCapitalStartSentence. // Afterwards the words can be added into exception list if needed. virtual void SaveCpltSttWord( sal_uLong nFlag, sal_Int32 nPos, const OUString& rExceptWord, sal_Unicode cChar ) SAL_OVERRIDE; diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 995c2900b6a7..3db93d423e6c 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -2393,7 +2393,7 @@ KEYINPUT_CHECKTABLE_INSDEL: } else if( !aKeyEvent.GetRepeat() && pACorr && ( bIsAutoCorrectChar || bRunNext ) && pACfg->IsAutoFormatByInput() && - pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | + pACorr->IsAutoCorrFlag( CapitalStartSentence | CptlSttWrd | ChgOrdinalNumber | AddNonBrkSpace | ChgToEnEmDash | SetINetAttr | Autocorrect ) && @@ -2427,7 +2427,7 @@ KEYINPUT_CHECKTABLE_INSDEL: case KS_CheckAutoCorrect: { if( pACorr && pACfg->IsAutoFormatByInput() && - pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | + pACorr->IsAutoCorrFlag( CapitalStartSentence | CptlSttWrd | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect ) && diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx index 2cf10fea72b8..3261a8529256 100644 --- a/sw/source/uibase/shells/textsh.cxx +++ b/sw/source/uibase/shells/textsh.cxx @@ -169,7 +169,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq) SvxAutoCorrect* pACorr = rACfg.GetAutoCorrect(); if( pACorr && rACfg.IsAutoFormatByInput() && pACorr->IsAutoCorrFlag( - CptlSttSntnc | CptlSttWrd | AddNonBrkSpace | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect ) ) + CapitalStartSentence | CptlSttWrd | AddNonBrkSpace | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect ) ) { rSh.AutoCorrect( *pACorr, cIns ); } diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 08422c796ab2..5d1c0d7afaa4 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -137,7 +137,7 @@ using namespace com::sun::star; static SvxAutoCorrect* lcl_IsAutoCorr() { SvxAutoCorrect* pACorr = SvxAutoCorrCfg::Get().GetAutoCorrect(); - if( pACorr && !pACorr->IsAutoCorrFlag( CptlSttSntnc | CptlSttWrd | + if( pACorr && !pACorr->IsAutoCorrFlag( CapitalStartSentence | CptlSttWrd | AddNonBrkSpace | ChgOrdinalNumber | ChgToEnEmDash | SetINetAttr | Autocorrect )) pACorr = 0; |