diff options
Diffstat (limited to 'editeng/source/misc/acorrcfg.cxx')
-rw-r--r-- | editeng/source/misc/acorrcfg.cxx | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx index 3bf26ec629..8a8a179dcc 100644 --- a/editeng/source/misc/acorrcfg.cxx +++ b/editeng/source/misc/acorrcfg.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,9 +96,7 @@ void SvxAutoCorrCfg::SetAutoCorrect( SvxAutoCorrect* pNew ) pAutoCorrect = pNew; } } -/*-- 12.10.00 11:44:17--------------------------------------------------- - -----------------------------------------------------------------------*/ Sequence<OUString> SvxBaseAutoCorrCfg::GetPropertyNames() { static const char* aPropNames[] = @@ -118,18 +117,17 @@ Sequence<OUString> SvxBaseAutoCorrCfg::GetPropertyNames() "SingleQuoteAtEnd", // 13 "ReplaceDoubleQuote", // 14 "DoubleQuoteAtStart", // 15 - "DoubleQuoteAtEnd" // 16 + "DoubleQuoteAtEnd", // 16 + "CorrectAccidentalCapsLock" // 17 }; - const int nCount = 17; + const int nCount = 18; Sequence<OUString> aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) pNames[i] = OUString::createFromAscii(aPropNames[i]); return aNames; } -/*-- 12.10.00 11:44:18--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxBaseAutoCorrCfg::Load(sal_Bool bInit) { Sequence<OUString> aNames = GetPropertyNames(); @@ -220,6 +218,10 @@ void SvxBaseAutoCorrCfg::Load(sal_Bool bInit) rParent.pAutoCorrect->SetEndDoubleQuote( sal::static_int_cast< sal_Unicode >( nTemp ) ); break;//"DoubleQuoteAtEnd" + case 17: + if(*(sal_Bool*)pValues[nProp].getValue()) + nFlags |= CorrectCapsLock; + break;//"CorrectAccidentalCapsLock" } } } @@ -229,23 +231,17 @@ void SvxBaseAutoCorrCfg::Load(sal_Bool bInit) } } -/*-- 12.10.00 11:44:19--------------------------------------------------- - -----------------------------------------------------------------------*/ SvxBaseAutoCorrCfg::SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rPar) : utl::ConfigItem(C2U("Office.Common/AutoCorrect")), rParent(rPar) { } -/*-- 12.10.00 11:44:19--------------------------------------------------- - -----------------------------------------------------------------------*/ SvxBaseAutoCorrCfg::~SvxBaseAutoCorrCfg() { } -/*-- 12.10.00 11:44:20--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxBaseAutoCorrCfg::Commit() { Sequence<OUString> aNames( GetPropertyNames() ); @@ -324,20 +320,20 @@ void SvxBaseAutoCorrCfg::Commit() case 16: pValues[nProp] <<= (sal_Int32) rParent.pAutoCorrect->GetEndDoubleQuote(); break;//"DoubleQuoteAtEnd" + case 17: + bVal = 0 != (nFlags & CorrectCapsLock); + pValues[nProp].setValue(&bVal, rType); + break;//"CorrectAccidentalCapsLock" } } PutProperties(aNames, aValues); } -/*-- 12.10.00 11:44:21--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxBaseAutoCorrCfg::Notify( const Sequence<OUString>& /* aPropertyNames */) { Load(sal_False); } -/*-- 12.10.00 11:51:48--------------------------------------------------- - -----------------------------------------------------------------------*/ Sequence<OUString> SvxSwAutoCorrCfg::GetPropertyNames() { static const char* aPropNames[] = @@ -397,9 +393,7 @@ Sequence<OUString> SvxSwAutoCorrCfg::GetPropertyNames() pNames[i] = OUString::createFromAscii(aPropNames[i]); return aNames; } -/*-- 12.10.00 11:51:48--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxSwAutoCorrCfg::Load(sal_Bool bInit) { Sequence<OUString> aNames = GetPropertyNames(); @@ -546,23 +540,17 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit) } } } -/*-- 12.10.00 11:51:48--------------------------------------------------- - -----------------------------------------------------------------------*/ SvxSwAutoCorrCfg::SvxSwAutoCorrCfg(SvxAutoCorrCfg& rPar) : utl::ConfigItem(C2U("Office.Writer/AutoFunction")), rParent(rPar) { } -/*-- 12.10.00 11:51:48--------------------------------------------------- - -----------------------------------------------------------------------*/ SvxSwAutoCorrCfg::~SvxSwAutoCorrCfg() { } -/*-- 12.10.00 11:51:48--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxSwAutoCorrCfg::Commit() { Sequence<OUString> aNames = GetPropertyNames(); @@ -659,9 +647,7 @@ void SvxSwAutoCorrCfg::Commit() } PutProperties(aNames, aValues); } -/*-- 12.10.00 11:51:49--------------------------------------------------- - -----------------------------------------------------------------------*/ void SvxSwAutoCorrCfg::Notify( const Sequence<OUString>& /* aPropertyNames */ ) { Load(sal_False); @@ -673,3 +659,5 @@ SvxAutoCorrCfg* SvxAutoCorrCfg::Get() pAutoCorrCfg = new SvxAutoCorrCfg; return pAutoCorrCfg; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |