diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-08-21 16:00:14 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@collabora.co.uk> | 2014-08-29 17:40:31 +0200 |
commit | 2414270c396929490fe2b1b2afecd25075b21117 (patch) | |
tree | 52231c34a46e297894a6c47470b83abb836d8032 /chart2/source/controller | |
parent | 19cf361efa9dbe636135434b6839d889b66a29dc (diff) |
Don't create an OpenGL window in case of normal charts.
Change-Id: Idb4506712d3902c12aa881a85ddf69a281edff82
Diffstat (limited to 'chart2/source/controller')
-rw-r--r-- | chart2/source/controller/main/ChartWindow.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index 40e69333c4f7..dde5006aa874 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -49,7 +49,7 @@ ChartWindow::ChartWindow( ChartController* pController, Window* pParent, WinBits : Window(pParent, nStyle) , m_pWindowController( pController ) , m_bInPaint(false) - , m_pOpenGLWindow(new OpenGLWindow(this)) + , m_pOpenGLWindow(getenv("CHART_DUMMY_FACTORY") ? new OpenGLWindow(this) : 0) { this->SetHelpId( HID_SCH_WIN_DOCUMENT ); this->SetMapMode( MapMode(MAP_100TH_MM) ); @@ -60,11 +60,14 @@ ChartWindow::ChartWindow( ChartController* pController, Window* pParent, WinBits if( pParent ) pParent->EnableRTL( false );// #i96215# necessary for a correct position of the context menu in rtl mode - m_pOpenGLWindow->Show(); - uno::Reference< chart2::X3DChartWindowProvider > x3DWindowProvider(pController->getModel(), uno::UNO_QUERY_THROW); - sal_uInt64 nWindowPtr = reinterpret_cast<sal_uInt64>(m_pOpenGLWindow); - x3DWindowProvider->setWindow(nWindowPtr); - x3DWindowProvider->update(); + if( m_pOpenGLWindow ) + { + m_pOpenGLWindow->Show(); + uno::Reference< chart2::X3DChartWindowProvider > x3DWindowProvider(pController->getModel(), uno::UNO_QUERY_THROW); + sal_uInt64 nWindowPtr = reinterpret_cast<sal_uInt64>(m_pOpenGLWindow); + x3DWindowProvider->setWindow(nWindowPtr); + x3DWindowProvider->update(); + } } ChartWindow::~ChartWindow() @@ -150,7 +153,8 @@ void ChartWindow::Resize() else Window::Resize(); - m_pOpenGLWindow->SetSizePixel(GetSizePixel()); + if( m_pOpenGLWindow ) + m_pOpenGLWindow->SetSizePixel(GetSizePixel()); } void ChartWindow::Activate() |