sc/source/ui/view/viewfun2.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
New commits: commit 4dd59855872736864c24947ca9886af9472e0980 Author: Kohei Yoshida <kohei.yosh...@suse.com> Date: Thu Jan 19 17:21:31 2012 -0500 Fix a crash when copying a sheet with drawing obj to a new document. diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index e2c950c..794db51 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -47,6 +47,7 @@ #include <svl/stritem.hxx> #include <svl/zforlist.hxx> #include <svl/svstdarr.hxx> +#include <svx/svdview.hxx> #include <vcl/msgbox.hxx> #include <vcl/sound.hxx> #include <vcl/waitobj.hxx> @@ -2466,7 +2467,7 @@ void ScViewFunc::MoveTable( sal_Bool bUndo (pDoc->IsUndoEnabled()); bool bRename = pNewTabName && !pNewTabName->isEmpty(); - sal_Bool bNewDoc = ( nDestDocNo == SC_DOC_NEW ); + bool bNewDoc = (nDestDocNo == SC_DOC_NEW); if ( bNewDoc ) { nDestTab = 0; // firstly insert @@ -2646,7 +2647,16 @@ void ScViewFunc::MoveTable( pDestDoc->DeleteTab(static_cast<SCTAB>(TheTabs.size())); // old first table if (pDestViewSh) + { + // Make sure to clear the cached page view after sheet + // deletion, which still points to the sdr page belonging to + // the deleted sheet. + SdrView* pSdrView = pDestViewSh->GetSdrView(); + if (pSdrView) + pSdrView->ClearPageView(); + pDestViewSh->TabChanged(); // Pages auf dem Drawing-Layer + } pDestShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID | PAINT_TOP | PAINT_LEFT | PAINT_EXTRAS | PAINT_SIZE ); _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits