[Libreoffice-commits] core.git: editeng/source include/editeng sc/source sd/source sw/source
Samuel Mehrbrodt
Samuel.Mehrbrodt at cib.de
Thu Oct 1 05:55:34 PDT 2015
editeng/source/editeng/editview.cxx | 6 +++++-
include/editeng/editstat.hxx | 11 ++++++-----
sc/source/ui/view/gridwin.cxx | 2 ++
sd/source/core/drawdoc4.cxx | 7 +++----
sw/source/uibase/uiview/viewdraw.cxx | 2 ++
5 files changed, 18 insertions(+), 10 deletions(-)
New commits:
commit a8a812997f654b47cde547cbf3d97684cd06a9d3
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Thu Oct 1 14:54:13 2015 +0200
tdf#92341 Make Autocorrect entry actually work
Change-Id: I83e028428933e2153b639ca6b34fd69db88fb53f
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index e2b45f8..4e36573 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 46ddd44..3ec7c39 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 c32c9d3..aba40ff 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 3121a1a..84aaae1 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 5001cee..917ec4e 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)
More information about the Libreoffice-commits
mailing list