diff options
Diffstat (limited to 'sc/source/ui/app/inputhdl.cxx')
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index ac72e1123ad1..a84291d721a5 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2020,7 +2020,8 @@ void ScInputHandler::RemoveRangeFinder() DeleteRangeFinder(); // Deletes the list and the labels on the table } -bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bInputActivated ) +bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bInputActivated, + ScEditEngineDefaulter* pTopEngine ) { bool bNewTable = false; @@ -2141,6 +2142,13 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn } } + if (pTopEngine) + { + // Necessary to sync SvxAutoCorrect behavior. This has to be + // done before InitRangeFinder() below. + MergeLanguageAttributes( *pTopEngine); + } + // UpdateSpellSettings enables online spelling if needed // -> also call if attributes are unchanged UpdateSpellSettings( true ); // uses pLastPattern @@ -2272,7 +2280,7 @@ bool ScInputHandler::DataChanging( sal_Unicode cTyped, bool bFromCommand ) bInOwnChange = true; // disable ModifyHdl (reset in DataChanged) if ( eMode == SC_INPUT_NONE ) - return StartTable( cTyped, bFromCommand, false ); + return StartTable( cTyped, bFromCommand, false, nullptr ); else return false; } @@ -2488,7 +2496,7 @@ void ScInputHandler::InvalidateAttribs() // --------------- public methods -------------------------------------------- -void ScInputHandler::SetMode( ScInputMode eNewMode, const OUString* pInitText ) +void ScInputHandler::SetMode( ScInputMode eNewMode, const OUString* pInitText, ScEditEngineDefaulter* pTopEngine ) { if ( eMode == eNewMode ) return; @@ -2519,7 +2527,7 @@ void ScInputHandler::SetMode( ScInputMode eNewMode, const OUString* pInitText ) { if (eOldMode == SC_INPUT_NONE) // not if switching between modes { - if (StartTable(0, false, eMode == SC_INPUT_TABLE)) + if (StartTable(0, false, eMode == SC_INPUT_TABLE, pTopEngine)) { if (pActiveViewSh) pActiveViewSh->GetViewData().GetDocShell()->PostEditView( mpEditEngine.get(), aCursorPos ); |