summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-06-15 22:24:46 +0200
committerMichael Meeks <michael.meeks@collabora.com>2014-07-07 12:54:09 +0000
commitcd3e7bd7acaa29d19a57326f6080926321b78c23 (patch)
tree830bb2752cfdfbe28431e6ca47a0cb07657d040e
parent2a356a1a3fb89fb737ad02d7f864e521cb954a8a (diff)
Make OpenGL 2D rendering working again.
Change-Id: I29101aee77ac37f5a8e1b929793d7554bc425b26 Reviewed-on: https://gerrit.libreoffice.org/10075 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us> (cherry picked from commit d72d80aa8393c9416423602779cb63b22141033a) Reviewed-on: https://gerrit.libreoffice.org/10089 Reviewed-by: Muthu Subramanian K <muthusuba@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
-rw-r--r--chart2/source/view/inc/AbstractShapeFactory.hxx4
-rw-r--r--chart2/source/view/inc/OpenglShapeFactory.hxx4
-rw-r--r--chart2/source/view/inc/ShapeFactory.hxx4
-rw-r--r--chart2/source/view/main/ChartView.cxx4
-rw-r--r--chart2/source/view/main/OpenglShapeFactory.cxx85
-rw-r--r--drawinglayer/Library_drawinglayer.mk3
-rw-r--r--drawinglayer/source/primitive2d/baseprimitive2d.cxx1
-rw-r--r--drawinglayer/source/primitive2d/openglprimitive2d.cxx32
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx6
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.cxx10
-rw-r--r--drawinglayer/source/processor2d/vclprocessor2d.hxx3
-rw-r--r--include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx3
-rw-r--r--include/drawinglayer/primitive2d/openglprimitive2d.hxx41
-rw-r--r--include/svx/svdobj.hxx1
-rw-r--r--include/svx/unoshape.hxx10
-rw-r--r--include/vcl/opengl/IOpenGLRenderer.hxx28
-rw-r--r--include/vcl/opengl/OpenGLContext.hxx1
-rw-r--r--svx/Library_svxcore.mk1
-rw-r--r--svx/inc/svdoopengl.hxx4
-rw-r--r--svx/source/svdraw/svdobj.cxx2
-rw-r--r--svx/source/svdraw/svdoopengl.cxx9
-rw-r--r--svx/source/unodraw/unomod.cxx4
-rw-r--r--svx/source/unodraw/unopage.cxx3
-rw-r--r--svx/source/unodraw/unoprov.cxx1
-rw-r--r--svx/source/unodraw/unoshap4.cxx10
25 files changed, 29 insertions, 245 deletions
diff --git a/chart2/source/view/inc/AbstractShapeFactory.hxx b/chart2/source/view/inc/AbstractShapeFactory.hxx
index b9b247f7e18c..015d524abe78 100644
--- a/chart2/source/view/inc/AbstractShapeFactory.hxx
+++ b/chart2/source/view/inc/AbstractShapeFactory.hxx
@@ -237,9 +237,9 @@ public:
/**
* Only necessary for stateless implementations
*/
- virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > xDrawPage) = 0;
+ virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xRootShape) = 0;
- virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > xDrawPage) = 0;
+ virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xRootShape) = 0;
static ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >
getChartRootShape( const ::com::sun::star::uno::Reference<
diff --git a/chart2/source/view/inc/OpenglShapeFactory.hxx b/chart2/source/view/inc/OpenglShapeFactory.hxx
index c93199f9b802..e9b2614131fa 100644
--- a/chart2/source/view/inc/OpenglShapeFactory.hxx
+++ b/chart2/source/view/inc/OpenglShapeFactory.hxx
@@ -184,9 +184,9 @@ public:
virtual void setPageSize( com::sun::star::uno::Reference < com::sun::star::drawing::XShapes > xChartShapes, const com::sun::star::awt::Size& rSize ) SAL_OVERRIDE;
- virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > xDrawPage) SAL_OVERRIDE;
+ virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xRootShape) SAL_OVERRIDE;
- virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > xDrawPage) SAL_OVERRIDE;
+ virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > xRootShape) SAL_OVERRIDE;
};
}
diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx
index 87a4387a3a47..74a4d3825d0e 100644
--- a/chart2/source/view/inc/ShapeFactory.hxx
+++ b/chart2/source/view/inc/ShapeFactory.hxx
@@ -197,9 +197,9 @@ public:
/**
* not necessary right now
*/
- virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > ) SAL_OVERRIDE {}
+ virtual void render(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > ) SAL_OVERRIDE {}
- virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XDrawPage > ) SAL_OVERRIDE {}
+ virtual void clearPage(com::sun::star::uno::Reference< com::sun::star::drawing::XShapes > ) SAL_OVERRIDE {}
private:
ShapeFactory();
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index c0bd90096cb0..e1f9561ba224 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2463,7 +2463,7 @@ void ChartView::createShapes()
OSL_FAIL("could not set page size correctly");
}
pShapeFactory->setPageSize(mxRootShape, aPageSize);
- pShapeFactory->clearPage(m_xDrawPage);
+ pShapeFactory->clearPage(mxRootShape);
#if HAVE_FEATURE_DESKTOP
if(isReal3DChart())
@@ -2627,7 +2627,7 @@ void ChartView::createShapes()
//cleanup: remove all empty group shapes to avoid grey border lines:
lcl_removeEmptyGroupShapes( mxRootShape );
- pShapeFactory->render( m_xDrawPage );
+ pShapeFactory->render( mxRootShape );
if(maTimeBased.bTimeBased && maTimeBased.nFrame % 60 == 0)
{
diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx
index 56beb5e163d9..ba613bb36fe1 100644
--- a/chart2/source/view/main/OpenglShapeFactory.cxx
+++ b/chart2/source/view/main/OpenglShapeFactory.cxx
@@ -47,7 +47,6 @@
#include <rtl/math.hxx>
#include <svx/svdocirc.hxx>
#include <svx/svdopath.hxx>
-#include <vcl/opengl/IOpenGLRenderer.hxx>
#include <basegfx/point/b2dpoint.hxx>
#include <basegfx/matrix/b3dhommatrix.hxx>
@@ -64,24 +63,6 @@ extern "C" {
{ return new opengl::OpenglShapeFactory();}
}
-class OpenGLChartAdapter : public IOpenGLRenderer
-{
-public:
- OpenGLChartAdapter(uno::Reference<drawing::XShapes> xShapes):
- mxShapes(xShapes) {}
-
- virtual ~OpenGLChartAdapter() {}
-
- uno::Reference<drawing::XShapes> getShapes()
- {
- return mxShapes;
- }
-
-private:
- uno::Reference<drawing::XShapes> mxShapes; // here to fix lifetime
-};
-
-
using dummy::DummyXShape;
using dummy::DummyXShapes;
using dummy::DummyCylinder;
@@ -93,8 +74,10 @@ namespace opengl {
namespace {
-IOpenGLRenderer* getRenderer(const uno::Reference< drawing::XDrawPage>& xDrawPage )
+uno::Reference< drawing::XShapes > getChartShape(
+ const uno::Reference< drawing::XDrawPage>& xDrawPage )
{
+ uno::Reference< drawing::XShapes > xRet;
uno::Reference< drawing::XShapes > xShapes( xDrawPage, uno::UNO_QUERY );
if( xShapes.is() )
{
@@ -104,33 +87,20 @@ IOpenGLRenderer* getRenderer(const uno::Reference< drawing::XDrawPage>& xDrawPag
{
if( xShapes->getByIndex( nN ) >>= xShape )
{
+
OUString aRet;
uno::Reference< beans::XPropertySet > xProp( xShape, uno::UNO_QUERY );
xProp->getPropertyValue( UNO_NAME_MISC_OBJ_NAME ) >>= aRet;
if( aRet.equals("com.sun.star.chart2.shapes") )
{
- SvxOpenGLObject* pGLObj = dynamic_cast<SvxOpenGLObject*>(xShape.get());
- IOpenGLRenderer* pRenderer = pGLObj ? pGLObj->getRenderer() : NULL;
- if (pRenderer)
- return pRenderer;
+ xRet = dynamic_cast<SvxDummyShapeContainer*>(xShape.get())->getWrappedShape();
+ break;
}
}
}
}
-
- return NULL;
-}
-
-uno::Reference< drawing::XShapes > getChartShape(
- const uno::Reference< drawing::XDrawPage>& xDrawPage )
-{
- IOpenGLRenderer* pRenderer = getRenderer(xDrawPage);
- OpenGLChartAdapter* pAdapter = dynamic_cast<OpenGLChartAdapter*>(pRenderer);
- if(pAdapter)
- return pAdapter->getShapes();
-
- return uno::Reference< drawing::XShapes> ();
+ return xRet;
}
}
@@ -145,19 +115,13 @@ uno::Reference< drawing::XShapes > OpenglShapeFactory::getOrCreateChartRootShape
SAL_WARN("chart2.opengl", "getOrCreateChartRootShape");
uno::Reference< drawing::XShape > xTarget (m_xShapeFactory->createInstance(
- "com.sun.star.drawing.OpenGLObject" ), uno::UNO_QUERY );
- uno::Reference<drawing::XShapes> xChart(new dummy::DummyChart(xTarget));
+ "com.sun.star.drawing.GraphicObjectShape" ), uno::UNO_QUERY );
+ dummy::DummyChart *pChart = new dummy::DummyChart(xTarget);
+ SvxDummyShapeContainer* pContainer = new SvxDummyShapeContainer(pChart);
+ pContainer->setSize(awt::Size(0,0));
+ xRet = pChart;
xDrawPage->add(xTarget);
- uno::Any aName;
- aName <<= OUString("com.sun.star.chart2.shapes");
- uno::Reference<beans::XPropertySet> xPropSet( xTarget, uno::UNO_QUERY_THROW );
- xPropSet->setPropertyValue( UNO_NAME_MISC_OBJ_NAME, aName );
-
- SvxOpenGLObject* pObj = dynamic_cast<SvxOpenGLObject*>(xTarget.get());
- if (pObj)
- pObj->setRenderer(new OpenGLChartAdapter(xChart));
-
- xRet = getChartShape( xDrawPage );
+ xDrawPage->add(pContainer);
}
return xRet;
}
@@ -484,34 +448,15 @@ uno::Reference< drawing::XShape >
return pText;
}
-void OpenglShapeFactory::render(uno::Reference< drawing::XDrawPage > xDrawPage)
+void OpenglShapeFactory::render(uno::Reference< drawing::XShapes > xRootShape)
{
- IOpenGLRenderer* pRenderer = getRenderer(xDrawPage);
- if(!pRenderer)
- return;
-
- if(!pRenderer->isOpenGLInitialized())
- return;
-
- OpenGLChartAdapter* pAdapter = dynamic_cast<OpenGLChartAdapter*>(pRenderer);
- if(!pAdapter)
- return;
-
- uno::Reference< drawing::XShapes > xRootShape = pAdapter->getShapes();
dummy::DummyChart* pChart = dynamic_cast<dummy::DummyChart*>(xRootShape.get());
assert(pChart);
pChart->render();
}
-void OpenglShapeFactory::clearPage(uno::Reference< drawing::XDrawPage > xDrawPage)
+void OpenglShapeFactory::clearPage(uno::Reference< drawing::XShapes > xRootShape)
{
- IOpenGLRenderer* pRenderer = getRenderer(xDrawPage);
-
- OpenGLChartAdapter* pAdapter = dynamic_cast<OpenGLChartAdapter*>(pRenderer);
- if(!pAdapter)
- return;
-
- uno::Reference< drawing::XShapes > xRootShape = pAdapter->getShapes();
dummy::DummyChart* pChart = dynamic_cast<dummy::DummyChart*>(xRootShape.get());
assert(pChart);
pChart->clear();
diff --git a/drawinglayer/Library_drawinglayer.mk b/drawinglayer/Library_drawinglayer.mk
index a4ef767f78e2..21242a6e48dc 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -38,7 +38,7 @@ $(eval $(call gb_Library_use_libraries,drawinglayer,\
tk \
tl \
vcl \
- $(gb_UWINAPI) \
+ $(gb_UWINAPI) \
))
$(eval $(call gb_Library_add_exception_objects,drawinglayer,\
@@ -91,7 +91,6 @@ $(eval $(call gb_Library_add_exception_objects,drawinglayer,\
drawinglayer/source/primitive2d/metafileprimitive2d \
drawinglayer/source/primitive2d/modifiedcolorprimitive2d \
drawinglayer/source/primitive2d/objectinfoprimitive2d \
- drawinglayer/source/primitive2d/openglprimitive2d \
drawinglayer/source/primitive2d/pagepreviewprimitive2d \
drawinglayer/source/primitive2d/patternfillprimitive2d \
drawinglayer/source/primitive2d/pointarrayprimitive2d \
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
index 89f8ef19e6f6..83c8108df8b6 100644
--- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
@@ -357,7 +357,6 @@ namespace drawinglayer
case PRIMITIVE2D_ID_OBJECTINFOPRIMITIVE2D: return OUString("OBJECTINFO");
case PRIMITIVE2D_ID_POLYPOLYGONSELECTIONPRIMITIVE2D: return OUString("POLYPOLYGONSELECTION");
case PRIMITIVE2D_ID_CLIPPEDBORDERLINEPRIMITIVE2D: return OUString("CLIPPEDBORDERLINE");
- case PRIMITIVE2D_ID_OPENGLPRIMITIVE2D: return OUString("OPENGL");
default: return OUString::number((nId >> 16) & 0xFF) + "|" + OUString::number(nId & 0xFF);
}
}
diff --git a/drawinglayer/source/primitive2d/openglprimitive2d.cxx b/drawinglayer/source/primitive2d/openglprimitive2d.cxx
deleted file mode 100644
index 3ed333b830a5..000000000000
--- a/drawinglayer/source/primitive2d/openglprimitive2d.cxx
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#include <drawinglayer/primitive2d/openglprimitive2d.hxx>
-#include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx>
-
-using namespace drawinglayer::primitive2d;
-
-OpenGLPrimitive2D::OpenGLPrimitive2D(const Point& rPos)
- : m_aPos(rPos)
-{
-}
-
-bool OpenGLPrimitive2D::operator==( const BasePrimitive2D& rPrimitive ) const
-{
- if(BasePrimitive2D::operator==(rPrimitive))
- {
- const OpenGLPrimitive2D& rCompare = static_cast< const OpenGLPrimitive2D& >(rPrimitive);
- return m_aPos == rCompare.getPos();
- }
- return false;
-}
-
-ImplPrimitive2DIDBlock(OpenGLPrimitive2D, PRIMITIVE2D_ID_OPENGLPRIMITIVE2D)
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 4ea56e581c59..d17d0ec250cc 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -44,7 +44,6 @@
#include <vcl/metaact.hxx>
#include <drawinglayer/primitive2d/texthierarchyprimitive2d.hxx>
#include <drawinglayer/primitive2d/textdecoratedprimitive2d.hxx>
-#include <drawinglayer/primitive2d/openglprimitive2d.hxx>
#include <comphelper/processfactory.hxx>
#include <rtl/ustring.hxx>
#include <com/sun/star/i18n/BreakIterator.hpp>
@@ -2142,11 +2141,6 @@ namespace drawinglayer
RenderEpsPrimitive2D(static_cast< const primitive2d::EpsPrimitive2D& >(rCandidate));
break;
}
- case PRIMITIVE2D_ID_OPENGLPRIMITIVE2D:
- {
- RenderOpenGLPrimitive2D(static_cast< const primitive2d::OpenGLPrimitive2D& >(rCandidate));
- break;
- }
default :
{
// process recursively
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 7c538ed67bb2..97e088c54a06 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -66,8 +66,6 @@
#include <basegfx/polygon/b2dtrapezoid.hxx>
// <- for test
-#include <drawinglayer/primitive2d/openglprimitive2d.hxx>
-
using namespace com::sun::star;
namespace
@@ -1588,14 +1586,6 @@ namespace drawinglayer
}
}
- void VclProcessor2D::RenderOpenGLPrimitive2D(const primitive2d::OpenGLPrimitive2D& rCandidate)
- {
- // Just draw a dummy rect to see primitive rendering is working.
- mpOutputDevice->SetLineColor(COL_BLACK);
- mpOutputDevice->SetFillColor(COL_RED);
- mpOutputDevice->DrawRect(Rectangle(rCandidate.getPos(),Size(2000,2000)));
- }
-
// process support
VclProcessor2D::VclProcessor2D(
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.hxx b/drawinglayer/source/processor2d/vclprocessor2d.hxx
index 70de6a19aca1..7c822a55cb4d 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.hxx
@@ -52,7 +52,6 @@ namespace drawinglayer { namespace primitive2d {
class EpsPrimitive2D;
class SvgLinearAtomPrimitive2D;
class SvgRadialAtomPrimitive2D;
- class OpenGLPrimitive2D;
}}
@@ -108,7 +107,7 @@ namespace drawinglayer
void RenderSvgLinearAtomPrimitive2D(const primitive2d::SvgLinearAtomPrimitive2D& rCandidate);
void RenderSvgRadialAtomPrimitive2D(const primitive2d::SvgRadialAtomPrimitive2D& rCandidate);
void RenderMetafilePrimitive2D(const primitive2d::MetafilePrimitive2D& rPolygonCandidate);
- void RenderOpenGLPrimitive2D(const primitive2d::OpenGLPrimitive2D& rCandidate);
+
// DrawMode adaption support
void adaptLineToFillDrawMode() const;
diff --git a/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx b/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
index 3c4afe5e0bd5..3cb208baef00 100644
--- a/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
+++ b/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
@@ -103,9 +103,6 @@
#define PRIMITIVE2D_ID_OBJECTINFOPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 68)
#define PRIMITIVE2D_ID_POLYPOLYGONSELECTIONPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 69)
#define PRIMITIVE2D_ID_CLIPPEDBORDERLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 70)
-#define PRIMITIVE2D_ID_OPENGLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 71)
-// When you add a new primitive, please update the drawinglayer::primitive2d::idToString() function
-// in drawinglayer/source/primitive2d/baseprimitive2d.cxx.
#endif // INCLUDED_DRAWINGLAYER_PRIMITIVE2D_DRAWINGLAYER_PRIMITIVETYPES2D_HXX
diff --git a/include/drawinglayer/primitive2d/openglprimitive2d.hxx b/include/drawinglayer/primitive2d/openglprimitive2d.hxx
deleted file mode 100644
index 2086bcf487f1..000000000000
--- a/include/drawinglayer/primitive2d/openglprimitive2d.hxx
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
-#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_OPENGLPRIMITIVE2D_HXX
-#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_OPENGLPRIMITIVE2D_HXX
-
-#include <tools/gen.hxx>
-#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
-
-namespace drawinglayer {
-namespace primitive2d {
-
-/// Primitive to hold data necessary for openGL objects
-class DRAWINGLAYER_DLLPUBLIC OpenGLPrimitive2D : public BasePrimitive2D
-{
-public:
- explicit OpenGLPrimitive2D(const Point& rPos);
-
- const Point& getPos() const { return m_aPos; }
-
- virtual bool operator==( const BasePrimitive2D& rPrimitive ) const SAL_OVERRIDE;
-
- /// provide unique ID
- DeclPrimitive2DIDBlock()
-
-private:
- Point m_aPos;
-};
-
-} // namespace primitive2d
-} // namespace drawinglayer
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index d93decd9f01c..c81e9b7029e8 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -134,7 +134,6 @@ enum SdrObjKind {OBJ_NONE = 0, // abstract object (SdrObject)
OBJ_CUSTOMSHAPE=33, // custom shape
OBJ_MEDIA =34, // media shape
OBJ_TABLE =35, // table
- OBJ_OPENGL =36, // opengl graphic
OBJ_MAXI};
enum SdrUserCallType {SDRUSERCALL_MOVEONLY, // only moved, size unchanged
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index 54caa3364eac..df86d5c9900a 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -879,16 +879,6 @@ private:
OUString referer_;
};
-class SVX_DLLPUBLIC SvxOpenGLObject : public SvxShape
-{
-public:
- SvxOpenGLObject( SdrObject* pObj ) throw() : SvxShape(pObj){}
- virtual ~SvxOpenGLObject() throw() {}
-
- void setRenderer(IOpenGLRenderer* pRenderer);
- IOpenGLRenderer* getRenderer();
-};
-
/*
* This is a really ugly hack for the chart2 OpenGL backend
* SvxShapeGroup::add only accepts objects derived from SvxShape and silently drops
diff --git a/include/vcl/opengl/IOpenGLRenderer.hxx b/include/vcl/opengl/IOpenGLRenderer.hxx
index f8c0116d6c98..9514187b9c5f 100644
--- a/include/vcl/opengl/IOpenGLRenderer.hxx
+++ b/include/vcl/opengl/IOpenGLRenderer.hxx
@@ -10,36 +10,12 @@
#ifndef INCLUDED_VCL_OPENGL_IOPENGLRENDERER_HXX
#define INCLUDED_VCL_OPENGL_IOPENGLRENDERER_HXX
-class IOpenGLInfoProvider
-{
-public:
- virtual ~IOpenGLInfoProvider() {}
-
- virtual bool isOpenGLInitialized() = 0;
-};
-
class IOpenGLRenderer
{
public:
- IOpenGLRenderer():
- mpInfoProvider(NULL) {}
- virtual ~IOpenGLRenderer() {}
-
- bool isOpenGLInitialized()
- {
- if(mpInfoProvider)
- return mpInfoProvider->isOpenGLInitialized();
-
- return false;
- }
-
- void setInfoProvider(IOpenGLInfoProvider* pInfo)
- {
- mpInfoProvider = pInfo;
- }
+ virtual ~IOpenGLRenderer() {};
+ virtual void operator()() = 0;
-private:
- IOpenGLInfoProvider* mpInfoProvider;
};
#endif
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index 608c9cb2ef19..8a7eb5597da7 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -167,7 +167,6 @@ public:
}
static SystemWindowData generateWinData(Window* pParent);
-
private:
SAL_DLLPRIVATE bool initWindow();
SAL_DLLPRIVATE bool ImplInit();
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 7ed776f80eac..b1cbc0215531 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -162,7 +162,6 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
svx/source/sdr/contact/viewobjectcontactofpageobj \
svx/source/sdr/contact/viewobjectcontactofe3dscene \
svx/source/sdr/contact/viewcontactofgraphic \
- svx/source/sdr/contact/viewcontactofopenglobj \
svx/source/sdr/contact/viewobjectcontactredirector \
svx/source/sdr/contact/viewcontactofsdrcircobj \
svx/source/sdr/contact/viewcontactofgroup \
diff --git a/svx/inc/svdoopengl.hxx b/svx/inc/svdoopengl.hxx
index 258fcdd72246..5d711e97edde 100644
--- a/svx/inc/svdoopengl.hxx
+++ b/svx/inc/svdoopengl.hxx
@@ -23,7 +23,7 @@ namespace sdr { namespace contact {
class IOpenGLRenderer;
-class SVX_DLLPUBLIC SdrOpenGLObj : public SdrObject, public IOpenGLInfoProvider
+class SVX_DLLPUBLIC SdrOpenGLObj : public SdrObject
{
public:
SdrOpenGLObj();
@@ -37,8 +37,6 @@ public:
void setRenderer(IOpenGLRenderer* pRenderer);
IOpenGLRenderer* getRenderer();
- virtual bool isOpenGLInitialized() SAL_OVERRIDE;
-
private:
OpenGLContext* mpContext;
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 96db7302698f..8d299e33203a 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -128,7 +128,6 @@
#include <svx/xlnwtit.hxx>
#include <svx/xpoly.hxx>
#include <rtl/strbuf.hxx>
-#include <svdoopengl.hxx>
using namespace ::com::sun::star;
@@ -3405,7 +3404,6 @@ SdrObject* SdrObjFactory::MakeNewObject(sal_uInt32 nInvent, sal_uInt16 nIdent, S
case sal_uInt16(OBJ_MEDIA ): pObj=new SdrMediaObj(); break;
#endif
case sal_uInt16(OBJ_TABLE ): pObj=new ::sdr::table::SdrTableObj(pModel); break;
- case sal_uInt16(OBJ_OPENGL ): pObj=new SdrOpenGLObj; break;
}
}
diff --git a/svx/source/svdraw/svdoopengl.cxx b/svx/source/svdraw/svdoopengl.cxx
index f1e8398cf057..3139780bbb7c 100644
--- a/svx/source/svdraw/svdoopengl.cxx
+++ b/svx/source/svdraw/svdoopengl.cxx
@@ -16,7 +16,6 @@
SdrOpenGLObj::SdrOpenGLObj()
: SdrObject(),
- IOpenGLInfoProvider(),
mpContext(NULL)
{
#if HAVE_FEATURE_DESKTOP
@@ -31,7 +30,7 @@ SdrOpenGLObj::~SdrOpenGLObj()
sdr::contact::ViewContact* SdrOpenGLObj::CreateObjectSpecificViewContact()
{
- return new sdr::contact::ViewContactOfOpenGLObj(*this);
+ return NULL;
}
OpenGLContext* SdrOpenGLObj::getOpenGLContext()
@@ -53,7 +52,6 @@ void SdrOpenGLObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fra
void SdrOpenGLObj::setRenderer(IOpenGLRenderer* pRenderer)
{
mpRenderer.reset(pRenderer);
- mpRenderer->setInfoProvider(this);
}
IOpenGLRenderer* SdrOpenGLObj::getRenderer()
@@ -61,9 +59,4 @@ IOpenGLRenderer* SdrOpenGLObj::getRenderer()
return mpRenderer.get();
}
-bool SdrOpenGLObj::isOpenGLInitialized()
-{
- return mpContext && mpContext->isInitialized();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 223b73a3b152..b710a2e02d8c 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -489,10 +489,6 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c
{
nType = OBJ_TABLE;
}
- else if( aTypeName.startsWith( "OpenGLObject" ) )
- {
- nType = OBJ_OPENGL;
- }
else
{
throw lang::ServiceNotRegisteredException();
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index ecca282afbd3..d061fd94355e 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -788,9 +788,6 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3
case OBJ_TABLE:
pRet = new SvxTableShape( pObj );
break;
- case OBJ_OPENGL:
- pRet = new SvxOpenGLObject( pObj );
- break;
default: // unbekanntes 2D-Objekt auf der Page
OSL_FAIL("Nicht implementierter Starone-Shape erzeugt! [CL]");
pRet = new SvxShapeText( pObj );
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index b3bdd2c176a3..1beea0386ea4 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -847,7 +847,6 @@ namespace {
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DLatheObject"), E3D_LATHEOBJ_ID | E3D_INVENTOR_FLAG },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DExtrudeObject"), E3D_EXTRUDEOBJ_ID | E3D_INVENTOR_FLAG },
{ RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.Shape3DPolygonObject"), E3D_POLYGONOBJ_ID | E3D_INVENTOR_FLAG },
- { RTL_CONSTASCII_STRINGPARAM("com.sun.star.drawing.OpenGLObject"), OBJ_OPENGL },
};
for (sal_uInt32 i = 0; i < sizeof(aInit)/sizeof(aInit[0]); i++)
aImpl[OUString( aInit[i].name, aInit[i].length, RTL_TEXTENCODING_ASCII_US ) ] = aInit[i].id;
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 16c032908f43..a926ab3208cc 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -975,14 +975,4 @@ SvxDummyShapeContainer::~SvxDummyShapeContainer() throw()
{
}
-void SvxOpenGLObject::setRenderer(IOpenGLRenderer* pRenderer)
-{
- static_cast<SdrOpenGLObj*>(GetSdrObject())->setRenderer(pRenderer);
-}
-
-IOpenGLRenderer* SvxOpenGLObject::getRenderer()
-{
- return static_cast<SdrOpenGLObj*>(GetSdrObject())->getRenderer();
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */