diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-17 14:38:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-17 14:47:08 +0100 |
commit | 7fff7c6aab15b3a7de3bf6056669ec217d41bb60 (patch) | |
tree | 5468a85a28a84678729b396acc0885c9a41dbfe1 /editeng | |
parent | tweak AddTabPage to use the factory directly (diff) | |
download | core-7fff7c6aab15b3a7de3bf6056669ec217d41bb60.tar.gz core-7fff7c6aab15b3a7de3bf6056669ec217d41bb60.zip |
unfold this god-awful mess, logic unchanged
Change-Id: Ib76617e3c500268dfe423b9947100f6ce7f0eaec
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/misc/svxacorr.cxx | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index f95d921a31ae..dd2a6ec93309 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -832,16 +832,24 @@ sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, } } while( 0 == ( bAtStart = (pStart == pStr)) ); - if( !pWordStt || - rCC.isDigit( - aText, sal::static_int_cast< xub_StrLen >( pStr - pStart ) ) || - IsUpperLetter( + if (!pWordStt) + return sal_False; // no character to be replaced + + + if (rCC.isDigit( aText, sal::static_int_cast< xub_StrLen >( pStr - pStart ) )) + return sal_False; // already ok + + if (IsUpperLetter( rCC.getCharacterType( aText, - sal::static_int_cast< xub_StrLen >( pWordStt - pStart ) ) ) || - INetURLObject::CompareProtocolScheme(rTxt.copy(pWordStt - pStart, pDelim - pWordStt + 1)) != INET_PROT_NOT_VALID || - 0x1 == *pWordStt || 0x2 == *pWordStt ) - return sal_False; // no character to be replaced, or already ok + sal::static_int_cast< xub_StrLen >( pWordStt - pStart ) ) ) ) + return sal_False; // already ok + + if (INetURLObject::CompareProtocolScheme(rTxt.copy(pWordStt - pStart, pDelim - pWordStt + 1)) != INET_PROT_NOT_VALID) + return sal_False; // already ok + + if (0x1 == *pWordStt || 0x2 == *pWordStt) + return sal_False; // already ok if( *pDelim && 2 >= pDelim - pWordStt && lcl_IsInAsciiArr( ".-)>", *pDelim ) ) |