summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-12-09 06:58:39 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-01-29 08:09:18 +0100
commitb03388e415d5fa3cda8bf543fd267776000421a5 (patch)
tree992180f96cac69c162474ccf2b98db5a1ef275f9 /chart2
parent43e4027f3ea7f08c9e733dd8f6828ffd04ac0cf0 (diff)
adding all files would prevent compile errors
Change-Id: I351e0ac179445e45a5cbc767b20159f647ec30cc
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/inc/DummyXShape.hxx42
-rw-r--r--chart2/source/view/inc/OpenglShapeFactory.hxx9
-rw-r--r--chart2/source/view/main/DummyXShape.cxx2
-rw-r--r--chart2/source/view/main/OpenGLRender.cxx4
4 files changed, 24 insertions, 33 deletions
diff --git a/chart2/source/view/inc/DummyXShape.hxx b/chart2/source/view/inc/DummyXShape.hxx
index aed200c5b66d..b41f925df12e 100644
--- a/chart2/source/view/inc/DummyXShape.hxx
+++ b/chart2/source/view/inc/DummyXShape.hxx
@@ -92,12 +92,19 @@
#include <GL/glxext.h>
}
#endif
+//[mod] by gaowei
+
+#include "OpenGLRender.hxx"
+
+//[mod] by gaowei end
+
class SystemWindow;
class SystemChildWindow;
using namespace com::sun::star;
+
namespace chart {
namespace dummy {
@@ -394,7 +401,8 @@ private:
class DummyChart : public DummyXShapes
{
public:
- DummyChart();
+ DummyChart(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > xDrawPage);
+ ~DummyChart();
virtual DummyChart* getRootShape();
virtual void SAL_CALL setPosition( const ::com::sun::star::awt::Point& aPosition ) throw(::com::sun::star::uno::RuntimeException);
@@ -402,42 +410,16 @@ public:
private:
- /// Holds the information of our new child window
- struct GLWindow
- {
-#if defined( _WIN32 )
- HWND hWnd;
- HDC hDC;
- HGLRC hRC;
-#elif defined( MACOSX )
-#elif defined( UNX )
- unx::Display* dpy;
- int screen;
- unx::Window win;
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
- unx::GLXFBConfig fbc;
-#endif
- unx::XVisualInfo* vi;
- unx::GLXContext ctx;
-
- bool HasGLXExtension( const char* name ) { return gluCheckExtension( (const GLubyte*) name, (const GLubyte*) GLXExtensions ); }
- const char* GLXExtensions;
-#endif
- unsigned int bpp;
- unsigned int Width;
- unsigned int Height;
- const GLubyte* GLExtensions;
-
- bool HasGLExtension( const char* name ) { return gluCheckExtension( (const GLubyte*) name, GLExtensions ); }
- } GLWin; /// Holds the information of our new child window
+ GLWindow GLWin; /// Holds the information of our new child window
void createGLContext();
bool initWindow();
bool initOpengl();
-
boost::scoped_ptr<Window> mpWindow;
boost::scoped_ptr<SystemChildWindow> pWindow;
+public:
+ OpenGLRender m_GLRender;
};
class DummyGroup2D : public DummyXShapes
diff --git a/chart2/source/view/inc/OpenglShapeFactory.hxx b/chart2/source/view/inc/OpenglShapeFactory.hxx
index 164ba93bc400..fc9568717269 100644
--- a/chart2/source/view/inc/OpenglShapeFactory.hxx
+++ b/chart2/source/view/inc/OpenglShapeFactory.hxx
@@ -19,6 +19,10 @@ namespace opengl {
class OpenglShapeFactory : public chart::AbstractShapeFactory
{
public:
+ OpenglShapeFactory();
+ OpenglShapeFactory(::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory> xFactory)
+ {m_xShapeFactory = xFactory;}
+
virtual ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
createGroup2D(
const ::com::sun::star::uno::Reference<
@@ -190,6 +194,11 @@ public:
::com::sun::star::drawing::XDrawPage>& xPage );
virtual void setPageSize( com::sun::star::uno::Reference < com::sun::star::drawing::XShapes > xChartShapes, const com::sun::star::awt::Size& rSize );
+private:
+ void *m_pChart;
+ //member:
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>
+ m_xShapeFactory;
};
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index e8cf39094a49..a42571402fe2 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -759,7 +759,7 @@ bool DummyChart::initOpengl()
GLWin.hRC = wglCreateContext(GLWin.hDC);
wglMakeCurrent(GLWin.hDC,GLWin.hRC);
//[Mod] GaoWei
- m_GLRender.InitOpenGL(GLWin.hWnd, GLWin.hDC, GLWin.hRC);
+ m_GLRender.InitOpenGL(GLWin);
//[Mod] GaoWei end
#elif defined( UNX )
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index 0ce94d5f5260..82c6ac6ebf72 100644
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -825,9 +825,9 @@ void OpenGLRender::Release()
#if defined( WNT )
wglMakeCurrent(NULL, NULL);
if (!m_iExternRC)
- wglDeleteContext(m_hRC);
+ wglDeleteContext(glWin.m_hRC);
if (!m_iExternDC)
- ReleaseDC(m_hWnd, m_hDC);
+ ReleaseDC(mglWin._hWnd, mglWin._hDC);
#elif defined( UNX )
glXMakeCurrent(glWin.dpy, None, NULL);