View | Details | Raw Unified | Return to issue 119956
Collapse All | Expand All

(-)original/inc/document.hxx (+3 lines)
Lines 712-717 Link Here
712
	ScDrawLayer*	GetDrawLayer()				{ return pDrawLayer; }
712
	ScDrawLayer*	GetDrawLayer()				{ return pDrawLayer; }
713
	SfxBroadcaster*	GetDrawBroadcaster();		// zwecks Header-Vermeidung
713
	SfxBroadcaster*	GetDrawBroadcaster();		// zwecks Header-Vermeidung
714
	void			BeginDrawUndo();
714
	void			BeginDrawUndo();
715
	sal_Bool		IsDrawRecording() const;
716
	void			EndDrawUndo();//paired with BeginDrawUndo, clear undo object if GetUndoObj is not called. \
717
        Not necessary if GetUndoObj is called, but call EndDrawUndo paired with BeginDrawUndo is recommended
715
718
716
    void            BeginUnoRefUndo();
719
    void            BeginUnoRefUndo();
717
    bool            HasUnoRefUndo() const       { return ( pUnoRefUndoList != NULL ); }
720
    bool            HasUnoRefUndo() const       { return ( pUnoRefUndoList != NULL ); }
(-)original/source/core/data/documen9.cxx (+11 lines)
Lines 78-83 Link Here
78
		pDrawLayer->BeginCalcUndo();
78
		pDrawLayer->BeginCalcUndo();
79
}
79
}
80
80
81
sal_Bool ScDocument::IsDrawRecording() const
82
{
83
	return pDrawLayer ? pDrawLayer->IsRecording() : sal_False;
84
}
85
86
void ScDocument::EndDrawUndo()
87
{
88
	if( pDrawLayer )
89
		delete pDrawLayer->GetCalcUndo();
90
}
91
81
XColorTable* ScDocument::GetColorTable()
92
XColorTable* ScDocument::GetColorTable()
82
{
93
{
83
	if (pDrawLayer)
94
	if (pDrawLayer)
(-)original/source/ui/view/dbfunc3.cxx (+8 lines)
Lines 614-619 Link Here
614
614
615
		SCTAB nNewTab = nSrcTab+1;
615
		SCTAB nNewTab = nSrcTab+1;
616
616
617
		const bool bDrawUndo = ( bUndo && !pDoc->IsDrawRecording() );
618
619
		if( bDrawUndo )
620
			pDoc->BeginDrawUndo();
621
617
		SCTAB i=1;
622
		SCTAB i=1;
618
		while ( !pDoc->InsertTab( nNewTab, lcl_MakePivotTabName( aName, i ) ) && i <= MAXTAB )
623
		while ( !pDoc->InsertTab( nNewTab, lcl_MakePivotTabName( aName, i ) ) && i <= MAXTAB )
619
			i++;
624
			i++;
Lines 629-634 Link Here
629
		SetTabNo( nNewTab, sal_True );
634
		SetTabNo( nNewTab, sal_True );
630
635
631
		aDestRange = ScRange( 0, 0, nNewTab );
636
		aDestRange = ScRange( 0, 0, nNewTab );
637
638
		if( bDrawUndo )
639
			pDoc->EndDrawUndo();
632
	}
640
	}
633
641
634
	ScDPObject* pDPObj = pDoc->GetDPAtCursor(
642
	ScDPObject* pDPObj = pDoc->GetDPAtCursor(

Return to issue 119956