summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/conditio.cxx2
-rw-r--r--sc/source/core/data/documen3.cxx3
-rw-r--r--sc/source/core/data/documen8.cxx11
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/drwlayer.cxx0
-rw-r--r--[-rwxr-xr-x]sc/source/core/data/makefile.mk1
-rw-r--r--sc/source/core/data/postit.cxx7
-rw-r--r--sc/source/core/data/stlsheet.cxx7
-rw-r--r--sc/source/core/data/table1.cxx6
8 files changed, 27 insertions, 10 deletions
diff --git a/sc/source/core/data/conditio.cxx b/sc/source/core/data/conditio.cxx
index b08838198477..3fff9faf2105 100644
--- a/sc/source/core/data/conditio.cxx
+++ b/sc/source/core/data/conditio.cxx
@@ -1432,7 +1432,7 @@ void ScConditionalFormat::DoRepaint( const ScRange* pModified )
}
}
- pSh->Broadcast( ScPaintHint( aRange, PAINT_GRID ) );
+ pDoc->RepaintRange( aRange );
}
}
}
diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx
index f3b3f1ab32c6..b64babdf2dd7 100644
--- a/sc/source/core/data/documen3.cxx
+++ b/sc/source/core/data/documen3.cxx
@@ -169,8 +169,7 @@ void ScDocument::SetDBCollection( ScDBCollection* pNewDBCollection, BOOL bRemove
RemoveFlagsTab( aOldRange.aStart.Col(), aOldRange.aStart.Row(),
aOldRange.aEnd.Col(), aOldRange.aEnd.Row(),
aOldRange.aStart.Tab(), SC_MF_AUTO );
- if (pShell)
- pShell->Broadcast( ScPaintHint( aOldRange, PAINT_GRID ) );
+ RepaintRange( aOldRange );
}
}
}
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index e3c9d251fab7..9eb4bad7466d 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -94,6 +94,7 @@
#include "sc.hrc"
#include "charthelper.hxx"
#include "dpobject.hxx"
+#include "docuno.hxx"
#define GET_SCALEVALUE(set,id) ((const SfxUInt16Item&)(set.Get( id ))).GetValue()
@@ -902,6 +903,16 @@ void ScDocument::RemoveAutoSpellObj()
pTab[nTab]->RemoveAutoSpellObj();
}
+void ScDocument::RepaintRange( const ScRange& rRange )
+{
+ if ( bIsVisible && pShell )
+ {
+ ScModelObj* pModel = ScModelObj::getImplementation( pShell->GetModel() );
+ if ( pModel )
+ pModel->RepaintRange( rRange ); // locked repaints are checked there
+ }
+}
+
//------------------------------------------------------------------------
BOOL ScDocument::IdleCheckLinks() // TRUE = demnaechst wieder versuchen
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 4df709768279..4df709768279 100755..100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
diff --git a/sc/source/core/data/makefile.mk b/sc/source/core/data/makefile.mk
index 95ce6bcec179..51c01febcd36 100755..100644
--- a/sc/source/core/data/makefile.mk
+++ b/sc/source/core/data/makefile.mk
@@ -140,6 +140,7 @@ EXCEPTIONSFILES= \
$(SLO)$/documen3.obj \
$(SLO)$/documen5.obj \
$(SLO)$/documen6.obj \
+ $(SLO)$/documen8.obj \
$(SLO)$/documen9.obj \
$(SLO)$/dpcachetable.obj \
$(SLO)$/dptablecache.obj \
diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx
index a4bc9a473768..999a3194eaa6 100644
--- a/sc/source/core/data/postit.cxx
+++ b/sc/source/core/data/postit.cxx
@@ -762,10 +762,13 @@ void ScPostIt::RemoveCaption()
{
pDrawPage->RecalcObjOrdNums();
// create drawing undo action (before removing the object to have valid draw page in undo action)
- if( pDrawLayer && pDrawLayer->IsRecording() )
+ bool bRecording = ( pDrawLayer && pDrawLayer->IsRecording() );
+ if( bRecording )
pDrawLayer->AddCalcUndo( pDrawLayer->GetSdrUndoFactory().CreateUndoDeleteObject( *maNoteData.mpCaption ) );
// remove the object from the drawing page, delete if undo is disabled
- pDrawPage->RemoveObject( maNoteData.mpCaption->GetOrdNum() );
+ SdrObject* pObj = pDrawPage->RemoveObject( maNoteData.mpCaption->GetOrdNum() );
+ if( !bRecording )
+ SdrObject::Free( pObj );
}
}
maNoteData.mpCaption = 0;
diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx
index a3319eafd3fd..bfe3fa04a398 100644
--- a/sc/source/core/data/stlsheet.cxx
+++ b/sc/source/core/data/stlsheet.cxx
@@ -136,6 +136,13 @@ BOOL __EXPORT ScStyleSheet::SetParent( const String& rParentName )
{
SfxItemSet& rParentSet = pStyle->GetItemSet();
GetItemSet().SetParent( &rParentSet );
+
+ // #i113491# Drag&Drop in the stylist's hierarchical view doesn't execute a slot,
+ // so the repaint has to come from here (after modifying the ItemSet).
+ // RepaintRange checks the document's IsVisible flag and locked repaints.
+ ScDocument* pDoc = static_cast<ScStyleSheetPool&>(GetPool()).GetDocument();
+ if (pDoc)
+ pDoc->RepaintRange( ScRange( 0,0,0, MAXCOL,MAXROW,MAXTAB ) );
}
}
diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx
index e534bb9dfb78..151478324ef7 100644
--- a/sc/source/core/data/table1.cxx
+++ b/sc/source/core/data/table1.cxx
@@ -1267,11 +1267,7 @@ void ScTable::UpdateReference( UpdateRefMode eUpdateRefMode, SCCOL nCol1, SCROW
{
UpdatePageBreaks(NULL);
- SfxObjectShell* pDocSh = pDocument->GetDocumentShell();
- if (pDocSh)
- pDocSh->Broadcast( ScPaintHint(
- ScRange(0,0,nTab,MAXCOL,MAXROW,nTab),
- PAINT_GRID ) );
+ pDocument->RepaintRange( ScRange(0,0,nTab,MAXCOL,MAXROW,nTab) );
}
}
}