summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-09-01 14:31:36 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-09-01 14:48:50 -0400
commit0044fc8a722f3e52c8053b10f5032171f82b508f (patch)
tree8af1f0a69d62086b5f2fe88ecfe5b683ca87a0b1 /sc
parentb796e268630dd02f35a312b84867f63b3fa8da2f (diff)
Reset auto spell data in the view shell instead of in the doc shell.
It makes more sense that way. Change-Id: Ib2e2167228b1c2a2a19a750477652e18ae69d105
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx7
-rw-r--r--sc/source/ui/view/viewfun3.cxx8
-rw-r--r--sc/source/ui/view/viewfunc.cxx4
3 files changed, 10 insertions, 9 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index acbee874b274..15355ee1dca3 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2010,9 +2010,6 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
rDocShell.ErrorMessage(STR_INSERT_FULL); // Spalte/Zeile voll
}
- if (pViewSh)
- pViewSh->ResetAutoSpell();
-
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -2494,10 +2491,6 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
}
}
- ScTabViewShell* pViewSh = rDocShell.GetBestViewShell();
- if (pViewSh)
- pViewSh->ResetAutoSpell();
-
aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index ec7497044331..aa4b9e93cdce 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -1268,11 +1268,9 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
true, false, bIncludeFiltered );
}
-
pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nStartRow, nStartTab,
nEndCol, nEndRow, nEndTab ); // content after the change
-
// ggf. Autofilter-Koepfe loeschen
if (bCutMode)
if (pDoc->RefreshAutoFilter( nClipStartX,nClipStartY, nClipStartX+nClipSizeX,
@@ -1355,6 +1353,7 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
nPaint, nExtFlags);
// AdjustBlockHeight has already been called above
+ ResetAutoSpell();
aModificator.SetDocumentModified();
PostPasteFromClip(aUserRange, rMark);
@@ -1530,6 +1529,8 @@ bool ScViewFunc::PasteMultiRangesFromClip(
pUndoMgr->LeaveListAction();
}
+
+ ResetAutoSpell();
aModificator.SetDocumentModified();
PostPasteFromClip(aMarkedRange, aMark);
return true;
@@ -1686,6 +1687,8 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
pUndoMgr->AddUndoAction(pUndo, false);
pUndoMgr->LeaveListAction();
}
+
+ ResetAutoSpell();
aModificator.SetDocumentModified();
PostPasteFromClip(aRanges, aMark);
@@ -1808,6 +1811,7 @@ sal_Bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDest
pDocSh->UpdateOle(GetViewData());
SelectionChanged();
+ ResetAutoSpell();
}
return bSuccess;
}
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 2096db70e562..6e026fb6aa42 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1489,6 +1489,7 @@ sal_Bool ScViewFunc::InsertCells( InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bP
{
pDocSh->UpdateOle(GetViewData());
CellContentChanged();
+ ResetAutoSpell();
// #i97876# Spreadsheet data changes are not notified
ScModelObj* pModelObj = ScModelObj::getImplementation( pDocSh->GetModel() );
@@ -1552,6 +1553,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord )
pDocSh->UpdateOle(GetViewData());
CellContentChanged();
+ ResetAutoSpell();
// #i97876# Spreadsheet data changes are not notified
ScModelObj* pModelObj = ScModelObj::getImplementation( pDocSh->GetModel() );
@@ -1750,6 +1752,8 @@ void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord )
pDocSh->PostPaint( static_cast<SCCOL>(pRanges[0]),0,nTab,
MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_TOP );
}
+
+ ResetAutoSpell();
aModificator.SetDocumentModified();
CellContentChanged();