tdf#92341 Make Autocorrect entry actually work
Change-Id: I83e028428933e2153b639ca6b34fd69db88fb53f
This commit is contained in:
@@ -762,7 +762,6 @@ bool EditView::IsWrongSpelledWordAtPos( const Point& rPosPixel, bool bMarkIfWron
|
||||
|
||||
void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo&,void>* pCallBack )
|
||||
{
|
||||
|
||||
Point aPos ( pImpEditView->GetWindow()->PixelToLogic( rPosPixel ) );
|
||||
aPos = pImpEditView->GetDocPos( aPos );
|
||||
EditPaM aPaM = pImpEditView->pEditEngine->GetPaM(aPos, false);
|
||||
@@ -989,6 +988,11 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
|
||||
pCallBack->Call( aInf );
|
||||
}
|
||||
}
|
||||
else if ( nId == MN_AUTO_CORRECT_DLG && pCallBack)
|
||||
{
|
||||
SpellCallbackInfo aInf( SpellCallbackCommand::AUTOCORRECT_OPTIONS, OUString() );
|
||||
pCallBack->Call( aInf );
|
||||
}
|
||||
else if ( nId >= MN_DICTSTART || nId == MN_INSERT_SINGLE )
|
||||
{
|
||||
OUString aDicName;
|
||||
|
@@ -136,11 +136,12 @@ public:
|
||||
|
||||
enum class SpellCallbackCommand
|
||||
{
|
||||
IGNOREWORD = 0x0001,
|
||||
STARTSPELLDLG = 0x0002,
|
||||
ADDTODICTIONARY = 0x0003,
|
||||
WORDLANGUAGE = 0x0004,
|
||||
PARALANGUAGE = 0x0005,
|
||||
IGNOREWORD = 0x0001,
|
||||
STARTSPELLDLG = 0x0002,
|
||||
ADDTODICTIONARY = 0x0003,
|
||||
WORDLANGUAGE = 0x0004,
|
||||
PARALANGUAGE = 0x0005,
|
||||
AUTOCORRECT_OPTIONS = 0x0006,
|
||||
};
|
||||
|
||||
struct SpellCallbackInfo
|
||||
|
@@ -587,6 +587,8 @@ IMPL_LINK_TYPED( ScGridWindow, PopupSpellingHdl, SpellCallbackInfo&, rInfo, void
|
||||
{
|
||||
if( rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG )
|
||||
pViewData->GetDispatcher().Execute( SID_SPELL_DIALOG, SfxCallMode::ASYNCHRON );
|
||||
else if (rInfo.nCommand == SpellCallbackCommand::AUTOCORRECT_OPTIONS)
|
||||
pViewData->GetDispatcher().Execute( SID_AUTO_CORRECT_DLG, SfxCallMode::ASYNCHRON );
|
||||
}
|
||||
|
||||
void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, bool bHasSelection, const OUString& rStr )
|
||||
|
@@ -988,10 +988,9 @@ void SdDrawDocument::ImpOnlineSpellCallback(SpellCallbackInfo* pInfo, SdrObject*
|
||||
StartOnlineSpelling();
|
||||
}
|
||||
else if (nCommand == SpellCallbackCommand::STARTSPELLDLG)
|
||||
{
|
||||
SfxViewFrame::Current()->GetDispatcher()->Execute( SID_SPELL_DIALOG,
|
||||
SfxCallMode::ASYNCHRON );
|
||||
}
|
||||
SfxViewFrame::Current()->GetDispatcher()->Execute( SID_SPELL_DIALOG, SfxCallMode::ASYNCHRON );
|
||||
else if (nCommand == SpellCallbackCommand::AUTOCORRECT_OPTIONS)
|
||||
SfxViewFrame::Current()->GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SfxCallMode::ASYNCHRON );
|
||||
}
|
||||
|
||||
// Replace the unambiguous names of the default layers by their names in the
|
||||
|
@@ -729,6 +729,8 @@ IMPL_LINK_TYPED(SwView, OnlineSpellCallback, SpellCallbackInfo&, rInfo, void)
|
||||
{
|
||||
if (rInfo.nCommand == SpellCallbackCommand::STARTSPELLDLG)
|
||||
GetViewFrame()->GetDispatcher()->Execute( FN_SPELL_GRAMMAR_DIALOG, SfxCallMode::ASYNCHRON);
|
||||
else if (rInfo.nCommand == SpellCallbackCommand::AUTOCORRECT_OPTIONS)
|
||||
GetViewFrame()->GetDispatcher()->Execute( SID_AUTO_CORRECT_DLG, SfxCallMode::ASYNCHRON );
|
||||
}
|
||||
|
||||
bool SwView::ExecDrwTextSpellPopup(const Point& rPt)
|
||||
|
Reference in New Issue
Block a user