diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/misc/acorrcfg.cxx | 22 | ||||
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 5 | ||||
-rw-r--r-- | editeng/source/misc/swafopt.cxx | 1 |
3 files changed, 21 insertions, 7 deletions
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx index d3e9f75b8413..03d238953b10 100644 --- a/editeng/source/misc/acorrcfg.cxx +++ b/editeng/source/misc/acorrcfg.cxx @@ -110,9 +110,10 @@ Sequence<OUString> SvxBaseAutoCorrCfg::GetPropertyNames() "DoubleQuoteAtStart", // 15 "DoubleQuoteAtEnd", // 16 "CorrectAccidentalCapsLock", // 17 - "TransliterateRTL" // 18 + "TransliterateRTL", // 18 + "ChangeAngleQuotes" // 19 }; - const int nCount = 19; + const int nCount = 20; Sequence<OUString> aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) @@ -219,12 +220,16 @@ void SvxBaseAutoCorrCfg::Load(bool bInit) if(*o3tl::doAccess<bool>(pValues[nProp])) nFlags |= ACFlags::TransliterateRTL; break;//"TransliterateRTL" + case 19: + if(*o3tl::doAccess<bool>(pValues[nProp])) + nFlags |= ACFlags::ChgAngleQuotes; + break;//"ChangeAngleQuotes" } } } if( nFlags != ACFlags::NONE ) rParent.pAutoCorrect->SetAutoCorrFlag( nFlags ); - rParent.pAutoCorrect->SetAutoCorrFlag( ( static_cast<ACFlags>(0x7fff) & ~nFlags ), false ); + rParent.pAutoCorrect->SetAutoCorrFlag( ( static_cast<ACFlags>(0xffff) & ~nFlags ), false ); } SvxBaseAutoCorrCfg::SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rPar) : @@ -272,8 +277,11 @@ void SvxBaseAutoCorrCfg::ImplCommit() // "DoubleQuoteAtEnd" css::uno::Any(bool(nFlags & ACFlags::CorrectCapsLock)), // "CorrectAccidentalCapsLock" - css::uno::Any(bool(nFlags & ACFlags::TransliterateRTL))}); + css::uno::Any(bool(nFlags & ACFlags::TransliterateRTL)), // "TransliterateRTL" + css::uno::Any(bool(nFlags & ACFlags::ChgAngleQuotes))}); + // "ChangeAngleQuotes" + } void SvxBaseAutoCorrCfg::Notify( const Sequence<OUString>& /* aPropertyNames */) @@ -332,9 +340,10 @@ Sequence<OUString> SvxSwAutoCorrCfg::GetPropertyNames() "Format/ByInput/ApplyNumbering/SpecialCharacter/FontFamily", //44 "Format/ByInput/ApplyNumbering/SpecialCharacter/FontCharset", //45 "Format/ByInput/ApplyNumbering/SpecialCharacter/FontPitch", //46 - "Format/Option/TransliterateRTL" //47 + "Format/Option/TransliterateRTL", //47 + "Format/Option/ChangeAngleQuotes" //48 }; - const int nCount = 48; + const int nCount = 49; Sequence<OUString> aNames(nCount); OUString* pNames = aNames.getArray(); for(int i = 0; i < nCount; i++) @@ -485,6 +494,7 @@ void SvxSwAutoCorrCfg::Load(bool bInit) } break;// "Format/ByInput/ApplyNumbering/SpecialCharacter/FontPitch", case 47 : rSwFlags.bTransliterateRTL = *o3tl::doAccess<bool>(pValues[nProp]); break; // "Format/Option/TransliterateRTL", + case 48 : rSwFlags.bChgAngleQuotes = *o3tl::doAccess<bool>(pValues[nProp]); break; // "Format/Option/ChangeAngleQuotes", } } } diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 4b271993cd68..4f55ea951167 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -286,6 +286,7 @@ ACFlags SvxAutoCorrect::GetDefaultFlags() | ACFlags::ChgToEnEmDash | ACFlags::AddNonBrkSpace | ACFlags::TransliterateRTL + | ACFlags::ChgAngleQuotes | ACFlags::ChgWeightUnderl | ACFlags::SetINetAttr | ACFlags::ChgQuotes @@ -1380,7 +1381,9 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt, break; } // tdf#133524 change "<<" and ">>" to double angle quotation marks - else if ( IsAutoCorrFlag( ACFlags::ChgQuotes ) && ('<' == cChar || '>' == cChar) && + else if ( IsAutoCorrFlag( ACFlags::ChgQuotes ) && + IsAutoCorrFlag( ACFlags::ChgAngleQuotes ) && + ('<' == cChar || '>' == cChar) && nInsPos > 0 && cChar == rTxt[ nInsPos-1 ] ) { const LanguageType eLang = GetDocLanguage( rDoc, nInsPos ); diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx index f682c690ae32..bd6fbcf45695 100644 --- a/editeng/source/misc/swafopt.cxx +++ b/editeng/source/misc/swafopt.cxx @@ -32,6 +32,7 @@ SvxSwAutoFormatFlags::SvxSwAutoFormatFlags() bAddNonBrkSpace = bChgOrdinalNumber = bTransliterateRTL = + bChgAngleQuotes = bChgToEnEmDash = bChgWeightUnderl = bSetINetAttr = |