summaryrefslogtreecommitdiffstats
path: root/editeng
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-05-27 20:46:20 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-27 20:46:20 +0200
commit9df8682ced86258da76a730ecf354c788fffc1f2 (patch)
tree590af31bfe3d5cfd0d4de4812a0bd696b9415d2b /editeng
parentfdo#37001 - updated license information (diff)
parentvbahelper builds after the m106 merge. (diff)
downloadcore-9df8682ced86258da76a730ecf354c788fffc1f2.tar.gz
core-9df8682ced86258da76a730ecf354c788fffc1f2.zip
Merge remote-tracking branch 'origin/integration/dev300_m106'
Conflicts: basic/source/classes/sbunoobj.cxx basic/source/inc/runtime.hxx basic/source/runtime/step1.cxx desktop/source/deployment/dp_services.cxx drawinglayer/prj/d.lst drawinglayer/source/primitive2d/makefile.mk sfx2/source/appl/appinit.cxx sfx2/source/appl/appquit.cxx sfx2/source/inc/appdata.hxx sfx2/source/view/viewfrm.cxx svx/source/fmcomp/gridctrl.cxx vbahelper/source/vbahelper/vbahelper.cxx
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/impedit2.cxx22
1 files changed, 15 insertions, 7 deletions
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 4433f8034c08..df8d6d5e810d 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -2698,7 +2698,10 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
// get word boundaries in order to clear possible WrongList entries
// and invalidate all the necessary text (everything after and including the
// start of the word)
- EditSelection aCurWord( SelectWord( aCurPaM, i18n::WordType::DICTIONARY_WORD ) );
+ // #i107201# do the expensive SelectWord call only if online spelling is active
+ EditSelection aCurWord;
+ if ( GetStatus().DoOnlineSpelling() )
+ aCurWord = SelectWord( aCurPaM, i18n::WordType::DICTIONARY_WORD );
XubString aText( rStr );
aText.ConvertLineEnd( LINEEND_LF );
@@ -2752,12 +2755,17 @@ EditPaM ImpEditEngine::ImpInsertText( EditSelection aCurSel, const XubString& rS
ParaPortion* pPortion = FindParaPortion( aPaM.GetNode() );
OSL_ENSURE( pPortion, "Blind Portion in InsertText" );
- // now remove the Wrongs (red spell check marks) from both words...
- WrongList *pWrongs = aCurPaM.GetNode()->GetWrongList();
- if (pWrongs && pWrongs->HasWrongs())
- pWrongs->ClearWrongs( aCurWord.Min().GetIndex(), aPaM.GetIndex(), aPaM.GetNode() );
- // ... and mark both words as 'to be checked again'
- pPortion->MarkInvalid( aCurWord.Min().GetIndex(), aLine.Len() );
+ if ( GetStatus().DoOnlineSpelling() )
+ {
+ // now remove the Wrongs (red spell check marks) from both words...
+ WrongList *pWrongs = aCurPaM.GetNode()->GetWrongList();
+ if (pWrongs && pWrongs->HasWrongs())
+ pWrongs->ClearWrongs( aCurWord.Min().GetIndex(), aPaM.GetIndex(), aPaM.GetNode() );
+ // ... and mark both words as 'to be checked again'
+ pPortion->MarkInvalid( aCurWord.Min().GetIndex(), aLine.Len() );
+ }
+ else
+ pPortion->MarkInvalid( aCurPaM.GetIndex(), aLine.Len() );
}
if ( nEnd < aText.Len() )
aPaM = ImpInsertParaBreak( aPaM );