summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-04-02 04:09:43 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-04-08 04:38:21 +0200
commitf5a86d3ba079b32e063300c68071f105f5021ee8 (patch)
treec2eed4b9e769538104158f495ee3c75023c49fde /svx
parent6948bf58ce181b17f60ef81f10205ef4dac50cc6 (diff)
initial work on allowing to resize the OpenGL object
Change-Id: I29799522d32e31b4ffbba9d931fda352ee080e2d
Diffstat (limited to 'svx')
-rw-r--r--svx/Library_svxcore.mk1
-rw-r--r--svx/source/svdraw/svdoopengl.cxx33
2 files changed, 34 insertions, 0 deletions
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index b3c35215d878..8826d9f879d5 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -297,6 +297,7 @@ $(eval $(call gb_Library_add_exception_objects,svxcore,\
svx/source/svdraw/svdomeas \
svx/source/svdraw/svdomedia \
svx/source/svdraw/svdoole2 \
+ svx/source/svdraw/svdoopengl \
svx/source/svdraw/svdopage \
svx/source/svdraw/svdopath \
svx/source/svdraw/svdorect \
diff --git a/svx/source/svdraw/svdoopengl.cxx b/svx/source/svdraw/svdoopengl.cxx
new file mode 100644
index 000000000000..45d23ae4734e
--- /dev/null
+++ b/svx/source/svdraw/svdoopengl.cxx
@@ -0,0 +1,33 @@
+/* -*- 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 <svx/svdoopengl.hxx>
+#include <svx/sdr/contact/viewcontactofopenglobj.hxx>
+
+sdr::contact::ViewContact* SdrOpenGLObj::CreateObjectSpecificViewContact()
+{
+ return new sdr::contact::ViewContactOfOpenGLObj(*this);
+}
+
+OpenGLContext& SdrOpenGLObj::getOpenGLContext()
+{
+ return maContext;
+}
+
+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());
+ SAL_WARN("svx.opengl", "resized opengl drawinglayer object");
+}
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */