diff options
author | jp <jp@openoffice.org> | 2001-11-07 12:18:59 +0000 |
---|---|---|
committer | jp <jp@openoffice.org> | 2001-11-07 12:18:59 +0000 |
commit | 02b6953f226737c6ca2947c9d2a620fb4ec15d86 (patch) | |
tree | a7822c908912e42537b3b561501ad69d8d56d6c7 /svx | |
parent | cdf7684de395f11ca0dfcad74a0349261885b055 (diff) |
Bug #94281#: FnCptlSttWrd/FnCptlSttSntnc - check if toUpper/toLower has change something
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/editeng/svxacorr.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/svx/source/editeng/svxacorr.cxx b/svx/source/editeng/svxacorr.cxx index be35d628343f..4b376b4fb6f5 100644 --- a/svx/source/editeng/svxacorr.cxx +++ b/svx/source/editeng/svxacorr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: svxacorr.cxx,v $ * - * $Revision: 1.30 $ + * $Revision: 1.31 $ * - * last change: $Author: jp $ $Date: 2001-11-02 17:06:45 $ + * last change: $Author: jp $ $Date: 2001-11-07 13:18:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -546,7 +546,7 @@ BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt, sal_Unicode cSave = rTxt.GetChar( nSttPos ); String sChar( cSave ); rCC.toLower( sChar ); - if( rDoc.Replace( nSttPos, sChar )) + if( sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar )) { if( SaveWordWrdSttLst & nFlags ) rDoc.SaveCpltSttWord( CptlSttWrd, nSttPos, sWord, cSave ); @@ -911,7 +911,8 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, // gueltiger Trenner -> Ersetze String sChar( *pWordStt ); rCC.toUpper( sChar ); - return rDoc.Replace( xub_StrLen( pWordStt - pStart ), sChar ); + return sChar != *pWordStt && + rDoc.Replace( xub_StrLen( pWordStt - pStart ), sChar ); } aText = *pPrevPara; @@ -1077,7 +1078,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc, nSttPos = pWordStt - rTxt.GetBuffer(); String sChar( cSave ); rCC.toUpper( sChar ); - BOOL bRet = rDoc.Replace( nSttPos, sChar ); + BOOL bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar ); // das Wort will vielleicht jemand haben if( bRet && SaveWordCplSttLst & nFlags ) |