1 --- svx/inc/svx/editeng.hxx.old 2009-04-02 11:03:40.000000000 +0000
2 +++ svx/inc/svx/editeng.hxx 2009-04-06 16:42:14.000000000 +0000
3 @@ -56,6 +56,7 @@ class Rectangle;
10 class SvxNumBulletItem;
11 @@ -127,7 +128,7 @@ private:
12 SVX_DLLPRIVATE EditEngine& operator=( const EditEngine& );
14 //#if 0 // _SOLAR__PRIVATE
15 - SVX_DLLPRIVATE BOOL PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView );
16 + SVX_DLLPRIVATE BOOL PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pView, Window* pFrameWin = NULL );
20 --- svx/inc/svx/editview.hxx.old 2009-04-02 11:03:40.000000000 +0000
21 +++ svx/inc/svx/editview.hxx 2009-04-06 16:42:14.000000000 +0000
22 @@ -145,7 +145,7 @@ public:
24 void InsertText( const String& rNew, BOOL bSelect = FALSE );
26 - BOOL PostKeyEvent( const KeyEvent& rKeyEvent );
27 + BOOL PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL );
29 BOOL MouseButtonUp( const MouseEvent& rMouseEvent );
30 BOOL MouseButtonDown( const MouseEvent& rMouseEvent );
31 @@ -208,7 +208,7 @@ public:
35 - void CompleteAutoCorrect();
36 + void CompleteAutoCorrect( Window* pFrameWin = NULL );
38 EESpellState StartSpeller( BOOL bMultipleDoc = FALSE );
39 EESpellState StartThesaurus();
40 --- svx/inc/svx/outliner.hxx.old 2009-04-02 11:03:40.000000000 +0000
41 +++ svx/inc/svx/outliner.hxx 2009-04-06 16:42:14.000000000 +0000
42 @@ -265,7 +265,7 @@ public:
43 void Scroll( long nHorzScroll, long nVertScroll );
45 void Paint( const Rectangle& rRect );
46 - BOOL PostKeyEvent( const KeyEvent& rKEvt );
47 + BOOL PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin = NULL );
48 BOOL MouseButtonDown( const MouseEvent& );
49 BOOL MouseButtonUp( const MouseEvent& );
50 BOOL MouseMove( const MouseEvent& );
51 --- svx/inc/svx/svxacorr.hxx.old 2009-04-02 11:03:40.000000000 +0000
52 +++ svx/inc/svx/svxacorr.hxx 2009-04-06 16:42:14.000000000 +0000
53 @@ -50,6 +50,7 @@ class SvxAutoCorrLanguageTable_Impl;
54 class SvxAutoCorrLastFileAskTable_Impl;
59 // Flags fuer die AutoKorrekt-Flags
60 const long CptlSttSntnc = 0x00000001; // Gross-Buchstaben am SatzAnfang
61 @@ -65,6 +66,7 @@ const long SaveWordCplSttLst= 0x00000200
62 const long SaveWordWrdSttLst= 0x00000400; // 2 GrB. am WortAnf. auto. aufnehmen
63 const long IngnoreDoubleSpace= 0x00000800; // 2 Spaces ignorieren
64 const long ChgSglQuotes = 0x00001000; // einfache Quotes ersetzen
65 +const long CorrectCapsLock = 0x00002000; // Correct accidental use of cAPS LOCK key
67 const long ChgWordLstLoad = 0x20000000; // Ersetzungsliste geladen
68 const long CplSttLstLoad = 0x40000000; // Exceptionlist fuer CplStart geladen
69 @@ -252,7 +254,7 @@ public:
70 // fuehre eine AutoKorrektur aus.
71 // returnt was ausgefuehrt wurde; entsprechend den obigen Flags
72 ULONG AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
73 - xub_StrLen nPos, sal_Unicode cInsChar, BOOL bInsert );
74 + xub_StrLen nPos, sal_Unicode cInsChar, BOOL bInsert, Window* pFrameWin = NULL );
76 // return fuer die Autotext Expandierung das vorherige Wort, was dem
77 // AutoCorrect - Algorythmus entspricht.
78 @@ -377,6 +379,10 @@ public:
79 xub_StrLen nSttPos, xub_StrLen nEndPos,
80 LanguageType eLang = LANGUAGE_SYSTEM);
82 + bool FnCorrectCapsLock( SvxAutoCorrDoc&, const String&,
83 + xub_StrLen nSttPos, xub_StrLen nEndPos,
84 + LanguageType eLang = LANGUAGE_SYSTEM );
86 static long GetDefaultFlags();
88 // returns TRUE for charcters where the function
89 --- svx/source/cui/autocdlg.cxx
90 +++ svx/source/cui/autocdlg.cxx
91 @@ -233,7 +233,8 @@ OfaAutocorrOptionsPage::OfaAutocorrOptio
92 sNoDblSpaces (SVX_RES(STR_NO_DBL_SPACES )),
93 sHalf (SVX_RES(ST_FRACTION )),
94 sDash (SVX_RES(ST_DASH )),
95 - sFirst (SVX_RES(ST_ORDINAL ))
96 + sFirst (SVX_RES(ST_ORDINAL )),
97 + sAccidentalCaps (SVX_RES(ST_CORRECT_ACCIDENTAL_CAPS_LOCK))
101 @@ -279,6 +280,7 @@ BOOL OfaAutocorrOptionsPage::FillItemSet
102 pAutoCorrect->SetAutoCorrFlag(ChgFractionSymbol, aCheckLB.IsChecked(nPos++));
103 pAutoCorrect->SetAutoCorrFlag(ChgToEnEmDash, aCheckLB.IsChecked(nPos++));
104 pAutoCorrect->SetAutoCorrFlag(IngnoreDoubleSpace, aCheckLB.IsChecked(nPos++));
105 + pAutoCorrect->SetAutoCorrFlag(CorrectCapsLock, aCheckLB.IsChecked(nPos++));
107 BOOL bReturn = nFlags != pAutoCorrect->GetFlags();
109 @@ -320,6 +322,7 @@ void OfaAutocorrOptionsPage::Reset( cons
110 aCheckLB.InsertEntry(sHalf);
111 aCheckLB.InsertEntry(sDash);
112 aCheckLB.InsertEntry(sNoDblSpaces);
113 + aCheckLB.InsertEntry(sAccidentalCaps);
116 aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & Autocorrect) );
117 @@ -331,6 +334,7 @@ void OfaAutocorrOptionsPage::Reset( cons
118 aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & ChgFractionSymbol) );
119 aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & ChgToEnEmDash) );
120 aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & IngnoreDoubleSpace) );
121 + aCheckLB.CheckEntryPos( nPos++, 0 != (nFlags & CorrectCapsLock) );
123 aCheckLB.SetUpdateMode(TRUE);
125 @@ -463,6 +467,7 @@ enum OfaAutoFmtOptions
126 DEL_SPACES_AT_STT_END,
127 DEL_SPACES_BETWEEN_LINES,
133 @@ -492,6 +497,7 @@ OfaSwAutoFmtOptionsPage::OfaSwAutoFmtOpt
134 sBullet (SVX_RES( ST_BULLET )),
135 sBoldUnder (SVX_RES( ST_BOLD_UNDER )),
136 sNoDblSpaces (SVX_RES( STR_NO_DBL_SPACES)),
137 + sCorrectCapsLock (SVX_RES( ST_CORRECT_ACCIDENTAL_CAPS_LOCK)),
138 sFraction (SVX_RES( ST_FRACTION )),
139 sDetectURL (SVX_RES( ST_DETECT_URL )),
140 sDash (SVX_RES( ST_DASH )),
141 @@ -632,6 +638,9 @@ BOOL OfaSwAutoFmtOptionsPage::FillItemSe
142 pAutoCorrect->SetAutoCorrFlag(IngnoreDoubleSpace,
143 aCheckLB.IsChecked(IGNORE_DBLSPACE, CBCOL_SECOND));
145 + pAutoCorrect->SetAutoCorrFlag(CorrectCapsLock,
146 + aCheckLB.IsChecked(CORRECT_CAPS_LOCK, CBCOL_SECOND));
148 bCheck = aCheckLB.IsChecked(DETECT_URL, CBCOL_FIRST);
149 bModified |= pOpt->bSetINetAttr != bCheck;
150 pOpt->bSetINetAttr = bCheck;
151 @@ -763,6 +772,7 @@ void OfaSwAutoFmtOptionsPage::Reset( con
152 aCheckLB.GetModel()->Insert(CreateEntry(sDelSpaceBetweenLines, CBCOL_BOTH ));
154 aCheckLB.GetModel()->Insert(CreateEntry(sNoDblSpaces, CBCOL_SECOND));
155 + aCheckLB.GetModel()->Insert(CreateEntry(sCorrectCapsLock, CBCOL_SECOND));
156 aCheckLB.GetModel()->Insert(CreateEntry(sNum, CBCOL_SECOND));
157 aCheckLB.GetModel()->Insert(CreateEntry(sBorder, CBCOL_SECOND));
158 aCheckLB.GetModel()->Insert(CreateEntry(sTable, CBCOL_SECOND));
159 @@ -782,6 +792,7 @@ void OfaSwAutoFmtOptionsPage::Reset( con
160 aCheckLB.CheckEntryPos( BOLD_UNDERLINE, CBCOL_FIRST, pOpt->bChgWeightUnderl );
161 aCheckLB.CheckEntryPos( BOLD_UNDERLINE, CBCOL_SECOND, 0 != (nFlags & ChgWeightUnderl) );
162 aCheckLB.CheckEntryPos( IGNORE_DBLSPACE, CBCOL_SECOND, 0 != (nFlags & IngnoreDoubleSpace) );
163 + aCheckLB.CheckEntryPos( CORRECT_CAPS_LOCK, CBCOL_SECOND, 0 != (nFlags & CorrectCapsLock) );
164 aCheckLB.CheckEntryPos( DETECT_URL, CBCOL_FIRST, pOpt->bSetINetAttr );
165 aCheckLB.CheckEntryPos( DETECT_URL, CBCOL_SECOND, 0 != (nFlags & SetINetAttr) );
166 aCheckLB.CheckEntryPos( REPLACE_1ST, CBCOL_FIRST, pOpt->bChgOrdinalNumber );
167 --- svx/source/cui/autocdlg.hrc
168 +++ svx/source/cui/autocdlg.hrc
173 +#define ST_CORRECT_ACCIDENTAL_CAPS_LOCK 211
175 #define CB_SMARTTAGS 220
176 #define FT_SMARTTAGS 221
177 --- svx/source/cui/autocdlg.hxx
178 +++ svx/source/cui/autocdlg.hxx
179 @@ -119,6 +119,7 @@ private:
183 + String sAccidentalCaps;
186 OfaAutocorrOptionsPage( Window* pParent, const SfxItemSet& rSet );
187 @@ -157,6 +158,7 @@ class OfaSwAutoFmtOptionsPage : public S
188 String sByInputBullet;
191 + String sCorrectCapsLock;
195 --- svx/source/cui/autocdlg.src
196 +++ svx/source/cui/autocdlg.src
197 @@ -140,7 +140,11 @@ TabDialog RID_OFA_AUTOCORR_DLG
200 Text [ en-US ] = "Replace dashes" ; \
203 + String ST_CORRECT_ACCIDENTAL_CAPS_LOCK \
205 + Text [ en-US ] = "Correct accidental use of cAPS LOCK key" ; \
208 /**************************************************************************/
210 --- svx/source/editeng/acorrcfg.cxx.old 2009-04-02 11:03:02.000000000 +0000
211 +++ svx/source/editeng/acorrcfg.cxx 2009-04-06 16:42:14.000000000 +0000
212 @@ -127,9 +127,10 @@ Sequence<OUString> SvxBaseAutoCorrCfg::
213 "SingleQuoteAtEnd", // 13
214 "ReplaceDoubleQuote", // 14
215 "DoubleQuoteAtStart", // 15
216 - "DoubleQuoteAtEnd" // 16
217 + "DoubleQuoteAtEnd", // 16
218 + "CorrectAccidentalCapsLock" // 17
220 - const int nCount = 17;
221 + const int nCount = 18;
222 Sequence<OUString> aNames(nCount);
223 OUString* pNames = aNames.getArray();
224 for(int i = 0; i < nCount; i++)
225 @@ -229,6 +230,10 @@ void SvxBaseAutoCorrCfg::Load(sal_Bool b
226 rParent.pAutoCorrect->SetEndDoubleQuote(
227 sal::static_int_cast< sal_Unicode >( nTemp ) );
228 break;//"DoubleQuoteAtEnd"
230 + if(*(sal_Bool*)pValues[nProp].getValue())
231 + nFlags |= CorrectCapsLock;
232 + break;//"CorrectAccidentalCapsLock"
236 @@ -333,6 +338,10 @@ void SvxBaseAutoCorrCfg::Commit()
238 pValues[nProp] <<= (sal_Int32) rParent.pAutoCorrect->GetEndDoubleQuote();
239 break;//"DoubleQuoteAtEnd"
241 + bVal = 0 != (nFlags & CorrectCapsLock);
242 + pValues[nProp].setValue(&bVal, rType);
243 + break;//"CorrectAccidentalCapsLock"
246 PutProperties(aNames, aValues);
247 --- svx/source/editeng/editeng.cxx.old 2009-04-02 11:03:02.000000000 +0000
248 +++ svx/source/editeng/editeng.cxx 2009-04-06 16:42:14.000000000 +0000
249 @@ -802,7 +802,7 @@ ESelection EditEngine::CursorRight( cons
250 return pE->pImpEditEngine->CreateESel( aSel );
253 -sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView )
254 +sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditView, Window* pFrameWin )
256 DBG_CHKTHIS( EditEngine, 0 );
257 DBG_CHKOBJ( pEditView, EditView, 0 );
258 @@ -1062,7 +1062,7 @@ sal_Bool EditEngine::PostKeyEvent( const
260 pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
261 if ( pImpEditEngine->GetStatus().DoAutoCorrect() )
262 - aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode() );
263 + aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), pFrameWin );
264 aCurSel = pImpEditEngine->InsertTab( aCurSel );
266 pImpEditEngine->UndoActionEnd( EDITUNDO_INSERT );
267 @@ -1083,7 +1083,7 @@ sal_Bool EditEngine::PostKeyEvent( const
268 pImpEditEngine->UndoActionStart( EDITUNDO_INSERT );
269 if ( rKeyEvent.GetKeyCode().IsShift() )
271 - aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode() );
272 + aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), pFrameWin );
273 aCurSel = pImpEditEngine->InsertLineBreak( aCurSel );
276 @@ -1091,7 +1091,7 @@ sal_Bool EditEngine::PostKeyEvent( const
277 if ( !aAutoText.Len() )
279 if ( pImpEditEngine->GetStatus().DoAutoCorrect() )
280 - aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode() );
281 + aCurSel = pImpEditEngine->AutoCorrect( aCurSel, 0, !pEditView->IsInsertMode(), pFrameWin );
282 aCurSel = pImpEditEngine->InsertParaBreak( aCurSel );
285 @@ -1139,7 +1139,8 @@ sal_Bool EditEngine::PostKeyEvent( const
286 ( nCharCode == '\"' ) || ( nCharCode == '\'' ) ||
287 ( nCharCode == '_' ) ))
289 - aCurSel = pImpEditEngine->AutoCorrect( aCurSel, nCharCode, !pEditView->IsInsertMode() );
290 + aCurSel = pImpEditEngine->AutoCorrect(
291 + aCurSel, nCharCode, !pEditView->IsInsertMode(), pFrameWin );
295 --- svx/source/editeng/editview.cxx.old 2009-04-02 11:03:02.000000000 +0000
296 +++ svx/source/editeng/editview.cxx 2009-04-06 16:42:14.000000000 +0000
298 #include <helpid.hrc>
299 #include <i18npool/lang.h>
300 #include <vcl/menu.hxx>
301 +#include <vcl/window.hxx>
302 #include <acorrcfg.hxx>
303 #include <unolingu.hxx>
304 #include <fontitem.hxx>
305 @@ -418,11 +419,11 @@ void EditView::InsertText( const XubStri
306 pImpEE->FormatAndUpdate( this );
309 -sal_Bool EditView::PostKeyEvent( const KeyEvent& rKeyEvent )
310 +sal_Bool EditView::PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin )
312 DBG_CHKTHIS( EditView, 0 );
313 DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
314 - return pImpEditView->PostKeyEvent( rKeyEvent );
315 + return pImpEditView->PostKeyEvent( rKeyEvent, pFrameWin );
318 sal_Bool EditView::MouseButtonUp( const MouseEvent& rMouseEvent )
319 @@ -919,7 +920,7 @@ sal_Bool EditView::MatchGroup()
323 -void EditView::CompleteAutoCorrect()
324 +void EditView::CompleteAutoCorrect( Window* pFrameWin )
326 DBG_CHKTHIS( EditView, 0 );
327 DBG_CHKOBJ( pImpEditView->pEditEngine, EditEngine, 0 );
328 @@ -929,7 +930,7 @@ void EditView::CompleteAutoCorrect()
329 EditSelection aSel = pImpEditView->GetEditSelection();
330 aSel = PIMPEE->EndOfWord( aSel.Max() );
331 // MT 06/00: Why pass EditSelection to AutoCorrect, not EditPaM?!
332 - aSel = PIMPEE->AutoCorrect( aSel, 0, !IsInsertMode() );
333 + aSel = PIMPEE->AutoCorrect( aSel, 0, !IsInsertMode(), pFrameWin );
334 pImpEditView->SetEditSelection( aSel );
335 if ( PIMPEE->IsModified() )
336 PIMPEE->FormatAndUpdate( this );
337 --- svx/source/editeng/impedit2.cxx.old 2009-04-02 11:03:02.000000000 +0000
338 +++ svx/source/editeng/impedit2.cxx 2009-04-06 16:42:14.000000000 +0000
339 @@ -2540,7 +2540,8 @@ void ImpEditEngine::ImpRemoveParagraph(
343 -EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c, BOOL bOverwrite )
344 +EditPaM ImpEditEngine::AutoCorrect( const EditSelection& rCurSel, xub_Unicode c,
345 + bool bOverwrite, Window* pFrameWin )
347 EditSelection aSel( rCurSel );
349 @@ -2590,7 +2591,7 @@ EditPaM ImpEditEngine::AutoCorrect( cons
350 ContentNode* pNode = aSel.Max().GetNode();
351 USHORT nIndex = aSel.Max().GetIndex();
352 EdtAutoCorrDoc aAuto( this, pNode, nIndex, c );
353 - pAutoCorrect->AutoCorrect( aAuto, *pNode, nIndex, c, !bOverwrite );
354 + pAutoCorrect->AutoCorrect( aAuto, *pNode, nIndex, c, !bOverwrite, pFrameWin );
355 aSel.Max().SetIndex( aAuto.GetCursor() );
357 // #i78661 since the SvxAutoCorrect object used here is
358 --- svx/source/editeng/impedit.cxx.old 2009-04-02 11:03:02.000000000 +0000
359 +++ svx/source/editeng/impedit.cxx 2009-04-06 16:42:14.000000000 +0000
360 @@ -1001,7 +1001,7 @@ Pair ImpEditView::Scroll( long ndX, long
361 return Pair( nRealDiffX, nRealDiffY );
364 -sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent )
365 +sal_Bool ImpEditView::PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin )
369 @@ -1045,7 +1045,7 @@ sal_Bool ImpEditView::PostKeyEvent( cons
373 - bDone = pEditEngine->PostKeyEvent( rKeyEvent, GetEditViewPtr() );
374 + bDone = pEditEngine->PostKeyEvent( rKeyEvent, GetEditViewPtr(), pFrameWin );
378 --- svx/source/editeng/impedit.hxx.old 2009-04-02 11:03:02.000000000 +0000
379 +++ svx/source/editeng/impedit.hxx 2009-04-06 16:42:14.000000000 +0000
380 @@ -101,6 +101,8 @@ class TextRanger;
381 class SvKeyValueIterator;
382 class SvxForbiddenCharactersTable;
386 #include <svx/SpellPortions.hxx>
388 #include <svx/eedata.hxx>
389 @@ -297,7 +299,7 @@ public:
391 BOOL IsVertical() const;
393 - BOOL PostKeyEvent( const KeyEvent& rKeyEvent );
394 + BOOL PostKeyEvent( const KeyEvent& rKeyEvent, Window* pFrameWin = NULL );
396 BOOL MouseButtonUp( const MouseEvent& rMouseEvent );
397 BOOL MouseButtonDown( const MouseEvent& rMouseEvent );
398 @@ -787,7 +789,7 @@ public:
399 EditPaM DeleteSelected( EditSelection aEditSelection);
400 EditPaM InsertText( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite, sal_Bool bIsUserInput = sal_False );
401 EditPaM InsertText( EditSelection aCurEditSelection, const String& rStr );
402 - EditPaM AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, sal_Bool bOverwrite );
403 + EditPaM AutoCorrect( const EditSelection& rCurEditSelection, sal_Unicode c, bool bOverwrite, Window* pFrameWin = NULL );
404 EditPaM DeleteLeftOrRight( const EditSelection& rEditSelection, BYTE nMode, BYTE nDelMode = DELMODE_SIMPLE );
405 EditPaM InsertParaBreak( EditSelection aEditSelection );
406 EditPaM InsertLineBreak( EditSelection aEditSelection );
407 --- svx/source/editeng/svxacorr.cxx.old 2009-04-02 11:03:02.000000000 +0000
408 +++ svx/source/editeng/svxacorr.cxx 2009-04-06 16:42:14.000000000 +0000
410 #include <svx/escpitem.hxx>
411 #include <svx/svxacorr.hxx>
412 #include "unolingu.hxx"
413 +#include "vcl/window.hxx"
415 #ifndef _SVX_HELPID_HRC
416 #include <helpid.hrc>
417 @@ -351,7 +352,8 @@ long SvxAutoCorrect::GetDefaultFlags()
421 - | SaveWordWrdSttLst;
422 + | SaveWordWrdSttLst
424 LanguageType eLang = GetAppLang();
427 @@ -1052,6 +1054,49 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( Svx
432 +bool SvxAutoCorrect::FnCorrectCapsLock( SvxAutoCorrDoc& rDoc, const String& rTxt,
433 + xub_StrLen nSttPos, xub_StrLen nEndPos,
434 + LanguageType eLang )
436 + if (nEndPos - nSttPos < 2)
437 + // string must be at least 2-character long.
440 + CharClass& rCC = GetCharClass( eLang );
442 + // Check the first 2 letters.
443 + if ( !IsLowerLetter(rCC.getCharacterType(rTxt, nSttPos)) )
446 + if ( !IsUpperLetter(rCC.getCharacterType(rTxt, nSttPos+1)) )
450 + aConverted.Append( rCC.upper(rTxt.GetChar(nSttPos)) );
451 + aConverted.Append( rCC.lower(rTxt.GetChar(nSttPos+1)) );
453 + for (xub_StrLen i = nSttPos+2; i < nEndPos; ++i)
455 + if ( IsLowerLetter(rCC.getCharacterType(rTxt, i)) )
456 + // A lowercase letter disqualifies the whole text.
459 + if ( IsUpperLetter(rCC.getCharacterType(rTxt, i)) )
460 + // Another uppercase letter. Convert it.
461 + aConverted.Append( rCC.lower(rTxt.GetChar(i)) );
463 + // This is not an alphabetic letter. Leave it as-is.
464 + aConverted.Append(rTxt.GetChar(i));
467 + // Replace the word.
468 + rDoc.Delete(nSttPos, nEndPos);
469 + rDoc.Insert(nSttPos, aConverted);
474 //The method below is renamed from _GetQuote to GetQuote by BerryJia for Bug95846 Time:2002-8-13 15:50
475 sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, BOOL bSttQuote,
476 LanguageType eLang ) const
477 @@ -1165,7 +1210,7 @@ String SvxAutoCorrect::GetQuote( SvxAuto
479 ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
480 xub_StrLen nInsPos, sal_Unicode cChar,
482 + BOOL bInsert, Window* pFrameWin )
485 do{ // only for middle check loop !!
486 @@ -1308,7 +1353,19 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAu
490 + bool bLockKeyOn = pFrameWin && (pFrameWin->GetIndicatorState() & INDICATOR_CAPSLOCK);
493 + if ( bLockKeyOn && IsAutoCorrFlag( CorrectCapsLock ) &&
494 + FnCorrectCapsLock( rDoc, rTxt, nCapLttrPos, nInsPos, eLang ) )
496 + // Correct accidental use of cAPS LOCK key (do this only when
497 + // the caps or shift lock key is pressed). Turn off the caps
498 + // lock afterwords.
499 + nRet |= CorrectCapsLock;
500 + pFrameWin->SimulateKeyPress( KEY_CAPSLOCK );
503 // Grossbuchstabe am Satz-Anfang ??
504 if( IsAutoCorrFlag( CptlSttSntnc ) &&
505 FnCptlSttSntnc( rDoc, rTxt, TRUE, nCapLttrPos, nInsPos, eLang ) )
506 --- svx/source/outliner/outlvw.cxx.old 2009-04-02 11:02:55.000000000 +0000
507 +++ svx/source/outliner/outlvw.cxx 2009-04-06 16:42:14.000000000 +0000
508 @@ -92,7 +92,7 @@ void OutlinerView::Paint( const Rectangl
509 pEditView->Paint( rRect );
512 -BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt )
513 +BOOL OutlinerView::PostKeyEvent( const KeyEvent& rKEvt, Window* pFrameWin )
515 DBG_CHKTHIS( OutlinerView, 0 );
517 @@ -257,7 +257,7 @@ BOOL OutlinerView::PostKeyEvent( const K
521 - return bKeyProcessed ? TRUE : pEditView->PostKeyEvent( rKEvt );
522 + return bKeyProcessed ? TRUE : pEditView->PostKeyEvent( rKEvt, pFrameWin );
526 --- svx/source/svdraw/svdedxv.cxx.old 2009-04-02 11:03:00.000000000 +0000
527 +++ svx/source/svdraw/svdedxv.cxx 2009-04-06 16:42:14.000000000 +0000
528 @@ -1178,7 +1178,7 @@ BOOL SdrObjEditView::KeyInput(const KeyE
532 - if (pTextEditOutlinerView->PostKeyEvent(rKEvt))
533 + if (pTextEditOutlinerView->PostKeyEvent(rKEvt, pWin))
535 if( pMod && !pMod->IsChanged() )