Index: source/ui/inc/inputhdl.hxx =================================================================== RCS file: /cvs/sc/sc/source/ui/inc/inputhdl.hxx,v retrieving revision 1.14 diff -u -r1.14 inputhdl.hxx --- openoffice.org.orig/sc/source/ui/inc/inputhdl.hxx 13 Jan 2006 17:04:03 -0000 1.14 +++ openoffice.org/sc/source/ui/inc/inputhdl.hxx 3 Oct 2006 11:56:14 -0000 @@ -253,6 +253,8 @@ const ESelection& rSel ); void ForgetLastPattern(); + bool NeedReplaceLastPattern( + const ScPatternAttr *pOldPat, const ScPatternAttr *pNewPat); void UpdateSpellSettings( BOOL bFromStartTab = FALSE ); Index: source/ui/view/viewfunc.cxx =================================================================== RCS file: /cvs/sc/sc/source/ui/view/viewfunc.cxx,v retrieving revision 1.33 diff -u -r1.33 viewfunc.cxx --- openoffice.org.orig/sc/source/ui/view/viewfunc.cxx 21 Jul 2006 15:26:39 -0000 1.33 +++ openoffice.org/sc/source/ui/view/viewfunc.cxx 3 Oct 2006 11:57:49 -0000 @@ -1290,11 +1291,19 @@ SCCOL nCol = pViewData->GetCurX(); SCROW nRow = pViewData->GetCurY(); SCTAB nTab = pViewData->GetTabNo(); - ScPatternAttr* pOldPat = new ScPatternAttr(*pDoc->GetPattern( nCol, nRow, nTab )); + const ScPatternAttr* pTrueOldPat = pDoc->GetPattern( nCol, nRow, nTab ); + ScPatternAttr* pOldPat = new ScPatternAttr(*pTrueOldPat); pDoc->ApplyPattern( nCol, nRow, nTab, rAttr ); const ScPatternAttr* pNewPat = pDoc->GetPattern( nCol, nRow, nTab ); + + if (pNewPat != pTrueOldPat) + { + ScInputHandler* pHdl = SC_MOD()->GetInputHdl(); + if (pHdl) + pHdl->NeedReplaceLastPattern(pTrueOldPat, pNewPat); + } if (bRecord) {