From 2f3859b83ef6c8d26e705ca519f1250a7973de3d Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Mon, 19 Oct 2009 11:45:37 +0000 Subject: #i105960# SID_UNDO and friends are no longer volatile --- sc/source/ui/docshell/docsh.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'sc/source/ui/docshell') diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index f7d1e2ccae2f..3d1226ae576d 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -2390,9 +2390,9 @@ void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ ) SetModified( bIsModified ); + SfxBindings* pBindings = GetViewBindings(); if (bUpdate) { - SfxBindings* pBindings = GetViewBindings(); if (pBindings) { pBindings->Invalidate( SID_SAVEDOC ); @@ -2402,6 +2402,16 @@ void ScDocShell::SetDrawModified( BOOL bIsModified /* = TRUE */ ) if (bIsModified) { + if (pBindings) + { + // #i105960# Undo etc used to be volatile. + // They always have to be invalidated, including drawing layer or row height changes + // (but not while pPaintLockData is set). + pBindings->Invalidate( SID_UNDO ); + pBindings->Invalidate( SID_REDO ); + pBindings->Invalidate( SID_REPEAT ); + } + if ( aDocument.IsChartListenerCollectionNeedsUpdate() ) { aDocument.UpdateChartListenerCollection(); -- cgit From 9634b3fc0d9343ef1876be00fb29db78a0d7fed3 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Wed, 21 Oct 2009 08:34:25 +0000 Subject: #i106045# invalidate stream positions for sheet operations, better handling of loaded formula results --- sc/source/ui/docshell/arealink.cxx | 4 ++++ sc/source/ui/docshell/docfunc.cxx | 6 ++++++ sc/source/ui/docshell/olinefun.cxx | 12 ++++++++++++ 3 files changed, 22 insertions(+) (limited to 'sc/source/ui/docshell') diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx index fd3a562ecb42..fa00559b4f27 100644 --- a/sc/source/ui/docshell/arealink.cxx +++ b/sc/source/ui/docshell/arealink.cxx @@ -172,6 +172,10 @@ void __EXPORT ScAreaLink::Closed() bAddUndo = FALSE; // nur einmal } + SCTAB nDestTab = aDestArea.aStart.Tab(); + if (pDoc->IsStreamValid(nDestTab)) + pDoc->SetStreamValid(nDestTab, FALSE); + SvBaseLink::Closed(); } diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index cb5d2ead509f..f9039a88f658 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -3079,6 +3079,9 @@ BOOL ScDocFunc::InsertPageBreak( BOOL bColumn, const ScAddress& rPos, pDoc->SetRowFlags( static_cast(nPos), nTab, nFlags ); pDoc->UpdatePageBreaks( nTab ); + if (pDoc->IsStreamValid(nTab)) + pDoc->SetStreamValid(nTab, FALSE); + if (bColumn) { rDocShell.PostPaint( static_cast(nPos)-1, 0, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID ); @@ -3135,6 +3138,9 @@ BOOL ScDocFunc::RemovePageBreak( BOOL bColumn, const ScAddress& rPos, pDoc->SetRowFlags( static_cast(nPos), nTab, nFlags ); pDoc->UpdatePageBreaks( nTab ); + if (pDoc->IsStreamValid(nTab)) + pDoc->SetStreamValid(nTab, FALSE); + if (bColumn) { rDocShell.PostPaint( static_cast(nPos)-1, 0, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID ); diff --git a/sc/source/ui/docshell/olinefun.cxx b/sc/source/ui/docshell/olinefun.cxx index 1da178aaa0c2..20ffb63f43fd 100644 --- a/sc/source/ui/docshell/olinefun.cxx +++ b/sc/source/ui/docshell/olinefun.cxx @@ -137,6 +137,9 @@ BOOL ScOutlineDocFunc::MakeOutline( const ScRange& rRange, BOOL bColumns, BOOL b pUndoTab, bColumns, TRUE ) ); } + if (pDoc->IsStreamValid(nTab)) + pDoc->SetStreamValid(nTab, FALSE); + USHORT nParts = 0; // Datenbereich nicht geaendert if ( bColumns ) nParts |= PAINT_TOP; @@ -200,6 +203,9 @@ BOOL ScOutlineDocFunc::RemoveOutline( const ScRange& rRange, BOOL bColumns, BOOL pUndoTab, bColumns, FALSE ) ); } + if (pDoc->IsStreamValid(nTab)) + pDoc->SetStreamValid(nTab, FALSE); + USHORT nParts = 0; // Datenbereich nicht geaendert if ( bColumns ) nParts |= PAINT_TOP; @@ -265,6 +271,9 @@ BOOL ScOutlineDocFunc::RemoveAllOutlines( SCTAB nTab, BOOL bRecord, BOOL bApi ) pDoc->UpdatePageBreaks( nTab ); + if (pDoc->IsStreamValid(nTab)) + pDoc->SetStreamValid(nTab, FALSE); + rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID | PAINT_LEFT | PAINT_TOP | PAINT_SIZE ); rDocShell.SetDocumentModified(); @@ -333,6 +342,9 @@ BOOL ScOutlineDocFunc::AutoOutline( const ScRange& rRange, BOOL bRecord, BOOL bA pUndoDoc, pUndoTab ) ); } + if (pDoc->IsStreamValid(nTab)) + pDoc->SetStreamValid(nTab, FALSE); + rDocShell.PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_LEFT | PAINT_TOP | PAINT_SIZE ); rDocShell.SetDocumentModified(); lcl_InvalidateOutliner( rDocShell.GetViewBindings() ); -- cgit From 6cf356acf508fe17019a3b90e33a1436e0d89c6e Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Fri, 23 Oct 2009 12:55:31 +0000 Subject: #i101139# MoveTable: nDestTab must be target position, not APPEND --- sc/source/ui/docshell/docsh5.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sc/source/ui/docshell') diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx index b7c726deeb71..5b2da76475df 100644 --- a/sc/source/ui/docshell/docsh5.cxx +++ b/sc/source/ui/docshell/docsh5.cxx @@ -840,8 +840,9 @@ BOOL ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, BOOL bCopy, BOOL bRec ScDocShellModificator aModificator( *this ); // #i92477# be consistent with ScDocFunc::InsertTable: any index past the last sheet means "append" + // #i101139# nDestTab must be the target position, not APPEND (for CopyTabProtection etc.) if ( nDestTab >= aDocument.GetTableCount() ) - nDestTab = SC_TAB_APPEND; + nDestTab = aDocument.GetTableCount(); if (bCopy) { -- cgit