summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-10-01 14:54:13 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2015-10-01 14:55:05 +0200
commita8a812997f654b47cde547cbf3d97684cd06a9d3 (patch)
tree78cbad7530d94a646bc96007f2c93f9fb60ed7f6
parent0cc41a033f74891ac9b47f0d1c0b291f8341a2a1 (diff)
tdf#92341 Make Autocorrect entry actually work
Change-Id: I83e028428933e2153b639ca6b34fd69db88fb53f
-rw-r--r--editeng/source/editeng/editview.cxx6
-rw-r--r--include/editeng/editstat.hxx11
-rw-r--r--sc/source/ui/view/gridwin.cxx2
-rw-r--r--sd/source/core/drawdoc4.cxx7
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx2
5 files changed, 18 insertions, 10 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index e2b45f8781be..4e365737ec71 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -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;
diff --git a/include/editeng/editstat.hxx b/include/editeng/editstat.hxx
index 46ddd44ad8df..3ec7c39d57a2 100644
--- a/include/editeng/editstat.hxx
+++ b/include/editeng/editstat.hxx
@@ -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
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index c32c9d3401cd..aba40ff66f90 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -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 )
diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 3121a1aa3e2f..84aaae171ed7 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -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
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 5001cee6fcf2..917ec4e2688c 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -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)