include/svx/svdoopengl.hxx | 5 +-- sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx | 6 --- svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx | 5 +-- svx/source/svdraw/svdoopengl.cxx | 25 ++++++++++++---- 4 files changed, 26 insertions(+), 15 deletions(-)
New commits: commit 7a8146e080ef13e066d29e4bff354b732980c2a8 Author: Jan Holesovsky <[email protected]> Date: Wed Apr 16 15:21:30 2014 +0200 non-desktop: Attempt to get rid of glew. Change-Id: I883ff114ebd98234fcc9f41d69de96aadedadf4b diff --git a/include/svx/svdoopengl.hxx b/include/svx/svdoopengl.hxx index 2203443..49eb73d 100644 --- a/include/svx/svdoopengl.hxx +++ b/include/svx/svdoopengl.hxx @@ -26,10 +26,11 @@ class IOpenGLRenderer; class SVX_DLLPUBLIC SdrOpenGLObj : public SdrObject, public IOpenGLInfoProvider { public: + SdrOpenGLObj(); virtual ~SdrOpenGLObj(); virtual sdr::contact::ViewContact* CreateObjectSpecificViewContact() SAL_OVERRIDE; - OpenGLContext& getOpenGLContext(); + OpenGLContext* getOpenGLContext(); virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) SAL_OVERRIDE; @@ -40,7 +41,7 @@ public: private: - OpenGLContext maContext; + OpenGLContext* mpContext; boost::scoped_ptr<IOpenGLRenderer> mpRenderer; }; diff --git a/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx b/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx index a4a8d90..6062ab9 100644 --- a/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofopenglobj.cxx @@ -21,8 +21,9 @@ ViewObjectContactOfOpenGLObj::ViewObjectContactOfOpenGLObj( ObjectContact& rObjectContact, ViewContact& rViewContact ) : ViewObjectContactOfSdrObj( rObjectContact, rViewContact ) { - OpenGLContext& rContext = static_cast<SdrOpenGLObj&>(static_cast<ViewContactOfSdrObj&>(rViewContact).GetSdrObject()).getOpenGLContext(); - rContext.init(getWindow()); + OpenGLContext* pContext = static_cast<SdrOpenGLObj&>(static_cast<ViewContactOfSdrObj&>(rViewContact).GetSdrObject()).getOpenGLContext(); + if (pContext) + pContext->init(getWindow()); } ViewObjectContactOfOpenGLObj::~ViewObjectContactOfOpenGLObj() diff --git a/svx/source/svdraw/svdoopengl.cxx b/svx/source/svdraw/svdoopengl.cxx index 178afcc..59922ac 100644 --- a/svx/source/svdraw/svdoopengl.cxx +++ b/svx/source/svdraw/svdoopengl.cxx @@ -7,13 +7,26 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include <config_features.h> + #include <svx/svdoopengl.hxx> #include <svx/sdr/contact/viewcontactofopenglobj.hxx> #include <vcl/opengl/IOpenGLRenderer.hxx> +SdrOpenGLObj::SdrOpenGLObj() + : SdrObject(), + IOpenGLInfoProvider(), + mpContext(NULL) +{ +#if HAVE_FEATURE_DESKTOP + mpContext = new OpenGLContext; +#endif +} + SdrOpenGLObj::~SdrOpenGLObj() { + delete mpContext; } sdr::contact::ViewContact* SdrOpenGLObj::CreateObjectSpecificViewContact() @@ -21,17 +34,19 @@ sdr::contact::ViewContact* SdrOpenGLObj::CreateObjectSpecificViewContact() return new sdr::contact::ViewContactOfOpenGLObj(*this); } -OpenGLContext& SdrOpenGLObj::getOpenGLContext() +OpenGLContext* SdrOpenGLObj::getOpenGLContext() { - return maContext; + return mpContext; } void SdrOpenGLObj::NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) { SdrObject::NbcResize(rRef, xFact, yFact); - //now pass the information to the OpenGL context - maContext.setWinSize(aOutRect.GetSize()); + // now pass the information to the OpenGL context + if (mpContext) + mpContext->setWinSize(aOutRect.GetSize()); + SAL_WARN("svx.opengl", "resized opengl drawinglayer object"); } @@ -48,7 +63,7 @@ IOpenGLRenderer* SdrOpenGLObj::getRenderer() bool SdrOpenGLObj::isOpenGLInitialized() { - return maContext.isInitialized(); + return mpContext && mpContext->isInitialized(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ commit c553a2fd3d5a33c41fcc0b14b7a89619f50e893f Author: Jan Holesovsky <[email protected]> Date: Tue Apr 15 14:32:44 2014 +0200 This is never defined. Change-Id: If1bbead68fb074cfd01ac045982e20c9c74fe9c2 diff --git a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx index 182080a..3830f5b 100644 --- a/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx +++ b/sd/source/ui/inc/taskpane/ToolPanelViewShell.hxx @@ -65,12 +65,6 @@ public: FrameView* pFrameView); virtual ~ToolPanelViewShell (void); - /** Register the SFX interfaces so that (some of) the controls can be - pushed as SFX shells on the shell stack and process slot calls and - so on. - */ - static void RegisterControls (void); - virtual void GetFocus (void); virtual void LoseFocus (void); virtual void KeyInput (const KeyEvent& rEvent); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
