sc/source/ui/drawfunc/fuins2.cxx | 19 ++++++++----------- sc/source/ui/inc/gridwin.hxx | 1 + sc/source/ui/view/gridwin5.cxx | 13 +++++++++++++ vcl/source/opengl/OpenGLContext.cxx | 3 ++- 4 files changed, 24 insertions(+), 12 deletions(-)
New commits: commit 7ee5bd5b98c00e346a4954b03ebf5bd2fbaaec90 Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Thu May 8 03:05:49 2014 +0200 we only want a fb that allows window rendering Change-Id: I13d58c941e6a2411c3840b9efd341a4b827afc93 diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 89484c7..916d208 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -712,6 +712,7 @@ SystemWindowData OpenGLContext::generateWinData(Window* pParent) static int visual_attribs[] = { GLX_DOUBLEBUFFER, True, + GLX_X_RENDERABLE, True, GLX_RED_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, commit cdcdeb933448e3519f1b3245f9f8428c941380b7 Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Thu May 8 03:03:19 2014 +0200 fix another crash on exit Change-Id: I580d17b16760516b73ac9f882fd8f9707ce6337b diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 4a4a0ac..1505b28 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -730,7 +730,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* sal_Int16 nDialogRet = xDialog->execute(); if( nDialogRet == ui::dialogs::ExecutableDialogResults::CANCEL ) { - delete pChildWindow; + pGridWindow->DeleteChildWindow(pChildWindow); // leave OLE inplace mode and unmark OSL_ASSERT( pViewShell ); OSL_ASSERT( pView ); diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx index 5170e25..0a01935 100644 --- a/sc/source/ui/inc/gridwin.hxx +++ b/sc/source/ui/inc/gridwin.hxx @@ -415,6 +415,7 @@ public: * Takes ownership of the window */ void AddChildWindow(Window* pChildWindow); + void DeleteChildWindow(Window* pChildWindow); protected: // #114409# diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index 798d34a..a85a549 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -479,4 +479,17 @@ void ScGridWindow::AddChildWindow(Window* pWindow) maChildWindows.push_back(pWindow); } +void ScGridWindow::DeleteChildWindow(Window* pWindow) +{ + for(boost::ptr_vector<Window>::iterator itr = maChildWindows.begin(), + itrEnd = maChildWindows.end(); itr != itrEnd; ++itr) + { + if(&(*itr) == pWindow) + { + maChildWindows.erase(itr); + return; + } + } +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit 702953442ad26802ec47c0f6e1f446c0f1082de8 Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Thu May 8 03:02:12 2014 +0200 don't put the parent window as child into itself Change-Id: I961b92d47c35d63fa852bab2b478b93314e9add7 diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index 2043ff9..4a4a0ac 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -546,23 +546,20 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, Window* pWin, ScDrawView* bool bUndo (pScDoc->IsUndoEnabled()); 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_BLUE); - pChildWindow->SetBackground(aBackground); pChildWindow->Show(); uno::Reference< chart2::X3DChartWindowProvider > x3DWindowProvider( xChartModel, uno::UNO_QUERY_THROW ); sal_uInt64 nWindowPtr = reinterpret_cast<sal_uInt64>(pChildWindow); x3DWindowProvider->setWindow(nWindowPtr); + ScGridWindow* pGridWindow = dynamic_cast<ScGridWindow*>(pParentWindow); + if(pGridWindow) + { + pGridWindow->AddChildWindow(pChildWindow); + } + else + SAL_WARN("sc", "not a grid window. You are in serious trouble"); if( pReqArgs ) { commit 720515987ca95416b80981969eb81844d971a92f Author: Markus Mohrhard <markus.mohrh...@collabora.co.uk> Date: Thu May 8 03:01:05 2014 +0200 correct check for double buffered rendering Change-Id: I52972cb477c77a86fa04aa876717db9740cc0113 diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 9db458c..89484c7 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -711,7 +711,7 @@ SystemWindowData OpenGLContext::generateWinData(Window* pParent) static int visual_attribs[] = { - GLX_DOUBLEBUFFER, + GLX_DOUBLEBUFFER, True, GLX_RED_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits