diff options
author | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-07 21:01:47 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-05-07 21:23:55 +0200 |
commit | b2dffb1addc0285c6a00ad3efdbfafff734c260c (patch) | |
tree | ad7c6e80bf2523f6ab42cde07573e7dfa9f316cb /sc/source/ui/drawfunc/fuins2.cxx | |
parent | 945ee344830fe22602cf9beb632a1ad58903e9a4 (diff) |
fix crash on exit
Change-Id: I31374684a09f1b056154efcaa5c7dfe73bcc1a61
Diffstat (limited to 'sc/source/ui/drawfunc/fuins2.cxx')
-rw-r--r-- | sc/source/ui/drawfunc/fuins2.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 0c941b25788c..2043ff90e49d 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -82,6 +82,7 @@ using namespace ::com::sun::star; #include "globstr.hrc" #include "drawview.hxx" #include "markdata.hxx" +#include "gridwin.hxx" namespace { @@ -544,11 +545,19 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* ScDocument* pScDoc = pScDocSh->GetDocument(); bool bUndo (pScDoc->IsUndoEnabled()); - OpenGLWindow* pChildWindow = new OpenGLWindow(pData->GetActiveWin()); + Window* pParentWindow = pData->GetActiveWin(); + ScGridWindow* pGridWindow = dynamic_cast<ScGridWindow*>(pParentWindow); + if(pGridWindow) + { + pGridWindow->AddChildWindow(pGridWindow); + } + else + SAL_WARN("sc", "not a grid window. Youare in serious trouble"); + OpenGLWindow* pChildWindow = new OpenGLWindow(pParentWindow); Size aWindowSize = pChildWindow->LogicToPixel( aSize, MapMode( MAP_100TH_MM ) ); pChildWindow->SetSizePixel(aWindowSize); Wallpaper aBackground = pChildWindow->GetBackground(); - aBackground.SetColor(COL_RED); + aBackground.SetColor(COL_BLUE); pChildWindow->SetBackground(aBackground); pChildWindow->Show(); uno::Reference< chart2::X3DChartWindowProvider > x3DWindowProvider( xChartModel, uno::UNO_QUERY_THROW ); |