Kaydet (Commit) 0044fc8a authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Reset auto spell data in the view shell instead of in the doc shell.

It makes more sense that way.

Change-Id: Ib2e2167228b1c2a2a19a750477652e18ae69d105
üst b796e268
...@@ -2010,9 +2010,6 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark, ...@@ -2010,9 +2010,6 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMark,
rDocShell.ErrorMessage(STR_INSERT_FULL); // Spalte/Zeile voll rDocShell.ErrorMessage(STR_INSERT_FULL); // Spalte/Zeile voll
} }
if (pViewSh)
pViewSh->ResetAutoSpell();
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
...@@ -2494,10 +2491,6 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark, ...@@ -2494,10 +2491,6 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMark,
} }
} }
ScTabViewShell* pViewSh = rDocShell.GetBestViewShell();
if (pViewSh)
pViewSh->ResetAutoSpell();
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
......
...@@ -1268,11 +1268,9 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc, ...@@ -1268,11 +1268,9 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
true, false, bIncludeFiltered ); true, false, bIncludeFiltered );
} }
pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nStartRow, nStartTab, pDocSh->UpdatePaintExt( nExtFlags, nStartCol, nStartRow, nStartTab,
nEndCol, nEndRow, nEndTab ); // content after the change nEndCol, nEndRow, nEndTab ); // content after the change
// ggf. Autofilter-Koepfe loeschen // ggf. Autofilter-Koepfe loeschen
if (bCutMode) if (bCutMode)
if (pDoc->RefreshAutoFilter( nClipStartX,nClipStartY, nClipStartX+nClipSizeX, if (pDoc->RefreshAutoFilter( nClipStartX,nClipStartY, nClipStartX+nClipSizeX,
...@@ -1355,6 +1353,7 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc, ...@@ -1355,6 +1353,7 @@ bool ScViewFunc::PasteFromClip( sal_uInt16 nFlags, ScDocument* pClipDoc,
nPaint, nExtFlags); nPaint, nExtFlags);
// AdjustBlockHeight has already been called above // AdjustBlockHeight has already been called above
ResetAutoSpell();
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
PostPasteFromClip(aUserRange, rMark); PostPasteFromClip(aUserRange, rMark);
...@@ -1530,6 +1529,8 @@ bool ScViewFunc::PasteMultiRangesFromClip( ...@@ -1530,6 +1529,8 @@ bool ScViewFunc::PasteMultiRangesFromClip(
pUndoMgr->LeaveListAction(); pUndoMgr->LeaveListAction();
} }
ResetAutoSpell();
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
PostPasteFromClip(aMarkedRange, aMark); PostPasteFromClip(aMarkedRange, aMark);
return true; return true;
...@@ -1686,6 +1687,8 @@ bool ScViewFunc::PasteFromClipToMultiRanges( ...@@ -1686,6 +1687,8 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
pUndoMgr->AddUndoAction(pUndo, false); pUndoMgr->AddUndoAction(pUndo, false);
pUndoMgr->LeaveListAction(); pUndoMgr->LeaveListAction();
} }
ResetAutoSpell();
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
PostPasteFromClip(aRanges, aMark); PostPasteFromClip(aRanges, aMark);
...@@ -1808,6 +1811,7 @@ sal_Bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDest ...@@ -1808,6 +1811,7 @@ sal_Bool ScViewFunc::MoveBlockTo( const ScRange& rSource, const ScAddress& rDest
pDocSh->UpdateOle(GetViewData()); pDocSh->UpdateOle(GetViewData());
SelectionChanged(); SelectionChanged();
ResetAutoSpell();
} }
return bSuccess; return bSuccess;
} }
......
...@@ -1489,6 +1489,7 @@ sal_Bool ScViewFunc::InsertCells( InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bP ...@@ -1489,6 +1489,7 @@ sal_Bool ScViewFunc::InsertCells( InsCellCmd eCmd, sal_Bool bRecord, sal_Bool bP
{ {
pDocSh->UpdateOle(GetViewData()); pDocSh->UpdateOle(GetViewData());
CellContentChanged(); CellContentChanged();
ResetAutoSpell();
// #i97876# Spreadsheet data changes are not notified // #i97876# Spreadsheet data changes are not notified
ScModelObj* pModelObj = ScModelObj::getImplementation( pDocSh->GetModel() ); ScModelObj* pModelObj = ScModelObj::getImplementation( pDocSh->GetModel() );
...@@ -1552,6 +1553,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord ) ...@@ -1552,6 +1553,7 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd, sal_Bool bRecord )
pDocSh->UpdateOle(GetViewData()); pDocSh->UpdateOle(GetViewData());
CellContentChanged(); CellContentChanged();
ResetAutoSpell();
// #i97876# Spreadsheet data changes are not notified // #i97876# Spreadsheet data changes are not notified
ScModelObj* pModelObj = ScModelObj::getImplementation( pDocSh->GetModel() ); ScModelObj* pModelObj = ScModelObj::getImplementation( pDocSh->GetModel() );
...@@ -1750,6 +1752,8 @@ void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord ) ...@@ -1750,6 +1752,8 @@ void ScViewFunc::DeleteMulti( sal_Bool bRows, sal_Bool bRecord )
pDocSh->PostPaint( static_cast<SCCOL>(pRanges[0]),0,nTab, pDocSh->PostPaint( static_cast<SCCOL>(pRanges[0]),0,nTab,
MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_TOP ); MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_TOP );
} }
ResetAutoSpell();
aModificator.SetDocumentModified(); aModificator.SetDocumentModified();
CellContentChanged(); CellContentChanged();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment