[Libreoffice-commits] core.git: 2 commits - chart2/source vcl/source
chart2/source/controller/main/ChartWindow.cxx |1 + vcl/source/uitest/uiobject.cxx| 13 - 2 files changed, 13 insertions(+), 1 deletion(-) New commits: commit bf748bb20fd949cc67661de20e6f53a842089f60 Author: Markus Mohrhard Date: Mon Jun 20 02:56:10 2016 +0200 support typing into the spin field Change-Id: I2cae24d36d1eebf48f52646d84e7f6d291c8e473 Reviewed-on: https://gerrit.libreoffice.org/26492 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index 0f399f1..27c7af5 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -829,7 +829,7 @@ SpinFieldUIObject::~SpinFieldUIObject() } void SpinFieldUIObject::execute(const OUString& rAction, -const StringMap& /*rParameters*/) +const StringMap& rParameters) { if (rAction == "UP") { @@ -839,6 +839,17 @@ void SpinFieldUIObject::execute(const OUString& rAction, { mxSpinField->Down(); } +else if (rAction == "TYPE") +{ +if (mxSpinField->GetSubEdit()) +{ +Edit* pSubEdit = mxSpinField->GetSubEdit(); +EditUIObject aSubObject(pSubEdit); +aSubObject.execute(rAction, rParameters); +} +} +else +EditUIObject::execute(rAction, rParameters); } StringMap SpinFieldUIObject::get_state() commit c4a6f300f5d529f2853930b1674bd63a4c953584 Author: Markus Mohrhard Date: Mon Jun 20 03:06:05 2016 +0200 uitest: set id for chart window Change-Id: I443dcccf6d560c252da38a0f0c63cc48a212c127 Reviewed-on: https://gerrit.libreoffice.org/26494 Tested-by: Jenkins Reviewed-by: Markus Mohrhard diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index 3d3b849..2372119 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -55,6 +55,7 @@ ChartWindow::ChartWindow( ChartController* pController, vcl::Window* pParent, Wi , m_pOpenGLWindow(nullptr) #endif { +set_id("chart_window"); this->SetHelpId( HID_SCH_WIN_DOCUMENT ); this->SetMapMode( MapMode(MAP_100TH_MM) ); adjustHighContrastMode(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - chart2/source vcl/source
chart2/source/view/inc/AbstractShapeFactory.hxx |4 ++-- chart2/source/view/inc/OpenglShapeFactory.hxx |4 ++-- chart2/source/view/inc/ShapeFactory.hxx |4 ++-- chart2/source/view/main/ChartView.cxx |4 ++-- chart2/source/view/main/OpenglShapeFactory.cxx |6 ++ vcl/source/window/openglwin.cxx | 12 6 files changed, 18 insertions(+), 16 deletions(-) New commits: commit e7da55b6ed9ac288eb8075ce169a9c1e305f7d99 Author: Markus Mohrhard Date: Sun Jun 1 17:12:32 2014 +0200 make the OpenglShapeFactory work with the new OpenGLWindow impl Change-Id: Id97a61c67b55d6ef85b9752f7f4ac2c93aa5bf32 diff --git a/chart2/source/view/inc/AbstractShapeFactory.hxx b/chart2/source/view/inc/AbstractShapeFactory.hxx index 8d5fdc6..d95b906 100644 --- a/chart2/source/view/inc/AbstractShapeFactory.hxx +++ b/chart2/source/view/inc/AbstractShapeFactory.hxx @@ -239,12 +239,12 @@ 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 bool preRender(OpenGLWindow* pWindow) = 0; virtual void postRender(OpenGLWindow* pWindow) = 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 97f1955..63fc02b 100644 --- a/chart2/source/view/inc/OpenglShapeFactory.hxx +++ b/chart2/source/view/inc/OpenglShapeFactory.hxx @@ -184,12 +184,12 @@ 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 > xDrawPage) SAL_OVERRIDE; virtual bool preRender(OpenGLWindow* pWindow) SAL_OVERRIDE; virtual void postRender(OpenGLWindow* pWindow) 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 > xDrawPage) SAL_OVERRIDE; }; } diff --git a/chart2/source/view/inc/ShapeFactory.hxx b/chart2/source/view/inc/ShapeFactory.hxx index c427c38..171daad 100644 --- a/chart2/source/view/inc/ShapeFactory.hxx +++ b/chart2/source/view/inc/ShapeFactory.hxx @@ -197,12 +197,12 @@ 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 bool preRender(OpenGLWindow*) SAL_OVERRIDE { return true; } virtual void postRender(OpenGLWindow*) 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 7b71206..a2355df 100644 --- a/chart2/source/view/main/ChartView.cxx +++ b/chart2/source/view/main/ChartView.cxx @@ -2451,7 +2451,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()) @@ -2619,7 +2619,7 @@ void ChartView::createShapes() bool bRender = pShapeFactory->preRender(pWindow); if(bRender) { -pShapeFactory->render(m_xDrawPage); +pShapeFactory->render(mxRootShape); pShapeFactory->postRender(pWindow); } diff --git a/chart2/source/view/main/OpenglShapeFactory.cxx b/chart2/source/view/main/OpenglShapeFactory.cxx index 7616cd0..ae3223e 100644 --- a/chart2/source/view/main/OpenglShapeFactory.cxx +++ b/chart2/source/view/main/OpenglShapeFactory.cxx @@ -447,9 +447,8 @@ uno::Reference< drawing::XShape > return pText; } -void OpenglShapeFactory::render(uno::Reference< drawing::XDrawPage > xDrawPage) +void OpenglShap
[Libreoffice-commits] core.git: 2 commits - chart2/source vcl/source
chart2/source/view/charttypes/GL3DBarChart.cxx |2 ++ vcl/source/opengl/OpenGLContext.cxx|2 ++ 2 files changed, 4 insertions(+) New commits: commit bc5c5365599672c7e5b57e31fe1c0b62764d24b2 Author: Markus Mohrhard Date: Sat May 17 07:39:46 2014 +0200 add missing OpenGL type error string Change-Id: I53a7eba4a4f8b1bd61381283b20190cfc05a138a diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 1700488..6bb7c10 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -307,6 +307,8 @@ const char* getTypeString(GLenum type) return "pop group"; case GL_DEBUG_TYPE_OTHER: return "other"; +case GL_DEBUG_TYPE_ERROR: +return "error"; default: ; } commit f5376d87d7f44d146134fa104baeb1cda168ed56 Author: Markus Mohrhard Date: Sat May 17 07:09:50 2014 +0200 prevent access to uninitialized variables Change-Id: I1a12e2453ec935dc642135c30a36e1a97fc3d0f9 diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index 9921d96..1653668 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -31,6 +31,8 @@ GL3DBarChart::GL3DBarChart( mrWindow(rWindow), mpCamera(NULL) { +Size aSize = mrWindow.GetSizePixel(); +mpRenderer->SetSize(aSize); mrWindow.setRenderer(this); mpRenderer->init(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - chart2/source vcl/source
chart2/source/view/inc/GL3DRenderer.hxx |4 +--- chart2/source/view/main/GL3DRenderer.cxx | 10 +- vcl/source/opengl/OpenGLContext.cxx |1 + 3 files changed, 3 insertions(+), 12 deletions(-) New commits: commit 657004ae5c9f4a07b2cdafbb21bc8657842d4d74 Author: Markus Mohrhard Date: Thu May 8 02:25:18 2014 +0200 we only want fb configs that support double buffered rendering Change-Id: I808e36ccd2a0d1ad89af2449d709d24a92ecff4f diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 33e2ffb..9db458c 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -711,6 +711,7 @@ SystemWindowData OpenGLContext::generateWinData(Window* pParent) static int visual_attribs[] = { +GLX_DOUBLEBUFFER, GLX_RED_SIZE, 8, GLX_GREEN_SIZE, 8, GLX_BLUE_SIZE, 8, commit cfcb4a7cefebda88a70336afe15129304f202f6b Author: Markus Mohrhard Date: Thu May 8 01:30:30 2014 +0200 this inheritance is no longer needed Change-Id: I039dd767bcfd0c1343f4230d3fe8e52ab5a6e4fd diff --git a/chart2/source/view/inc/GL3DRenderer.hxx b/chart2/source/view/inc/GL3DRenderer.hxx index 81c9315..1d103529 100644 --- a/chart2/source/view/inc/GL3DRenderer.hxx +++ b/chart2/source/view/inc/GL3DRenderer.hxx @@ -164,7 +164,7 @@ typedef struct SceneBox }SceneBox; -class OpenGL3DRenderer : public IOpenGLInfoProvider +class OpenGL3DRenderer { public: OpenGL3DRenderer(); @@ -174,7 +174,6 @@ public: void CreateRenderObj(int, int); void LoadShaders(); void init(); -virtual bool isOpenGLInitialized() SAL_OVERRIDE; void Set3DSenceInfo(sal_Int32 color = 255, bool twoSidesLighting = true); void SetLightInfo(bool lightOn, sal_Int32 color, const glm::vec4& direction); void AddShapePolygon3DObject(sal_Int32 color, bool lineOnly, sal_Int32 lineColor, @@ -244,7 +243,6 @@ private: glm::mat4 m_Model; // Our ModelViewProjection : multiplication of our 3 matrices glm::mat4 m_MVP; -bool m_IsOpenglInit; #if 0 double m_dFreq; #endif diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx index 54f5e3d..40a3885 100644 --- a/chart2/source/view/main/GL3DRenderer.cxx +++ b/chart2/source/view/main/GL3DRenderer.cxx @@ -56,8 +56,7 @@ int static checkGLError(const char *file, int line) } OpenGL3DRenderer::OpenGL3DRenderer(): -m_IsOpenglInit(false) -, m_TranslationMatrix(glm::translate(m_Model, glm::vec3(0.0f, 0.0f, 0.0f))) +m_TranslationMatrix(glm::translate(m_Model, glm::vec3(0.0f, 0.0f, 0.0f))) , m_TextProID(0) , m_TextMatrixID(0) , m_TextVertexID(0) @@ -253,7 +252,6 @@ void OpenGL3DRenderer::init() glBindBuffer(GL_ARRAY_BUFFER, 0); CHECK_GL_ERROR(); Init3DUniformBlock(); -m_IsOpenglInit = true; } void OpenGL3DRenderer::SetSize(const Size& rSize) @@ -262,12 +260,6 @@ void OpenGL3DRenderer::SetSize(const Size& rSize) m_iHeight = rSize.Height(); } -bool OpenGL3DRenderer::isOpenGLInitialized() -{ -return m_IsOpenglInit; -} - - void OpenGL3DRenderer::AddVertexData(GLuint vertexBuf) { glBindBuffer(GL_ARRAY_BUFFER, vertexBuf); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: 2 commits - chart2/source vcl/source
chart2/source/view/inc/3DChartObjects.hxx |3 ++- vcl/source/window/window.cxx | 30 -- 2 files changed, 22 insertions(+), 11 deletions(-) New commits: commit d06269447f8de52fd35e4e97d127279cc3f84025 Author: Jan Holesovsky Date: Tue Apr 8 12:58:51 2014 +0200 fdo#77059, hidpi: Increase the threshold of what DPI we consider hi-dpi. Change-Id: I79802df4c11b3543140672419d78b697848b7c36 diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 0596e0c..ef6e2bb 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -854,6 +854,23 @@ static bool ImplDoTiledRendering() #endif } +static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI) +{ +sal_Int32 nResult = 1; + +#ifndef MACOSX +// Setting of HiDPI is unfortunately all only a heuristic; and to add +// insult to an injury, the system is constantly lying to us about +// the DPI and whatnot +// eg. fdo#77059 - set the value from which we do consider the +// screen hi-dpi to greater than 168 +if (nDPI > 168) +nResult = std::max(sal_Int32(1), (nDPI) / 96); +#endif + +return nResult; +} + void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData ) { DBG_ASSERT( mpWindowImpl->mbFrame || pParent, "Window::Window(): pParent == NULL" ); @@ -1108,11 +1125,8 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste } // setup the scale factor for Hi-DPI displays -#ifdef MACOSX -mnDPIScaleFactor = 1; -#else -mnDPIScaleFactor = std::max((sal_Int32)1, (mpWindowImpl->mpFrameData->mnDPIY + 48) / 96); -#endif +mnDPIScaleFactor = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY); + const StyleSettings& rStyleSettings = mxSettings->GetStyleSettings(); sal_uInt16 nScreenZoom = rStyleSettings.GetScreenZoom(); mnDPIX = (mpWindowImpl->mpFrameData->mnDPIX*nScreenZoom)/100; @@ -1810,11 +1824,7 @@ void Window::ImplInitResolutionSettings() mnDPIY = (mpWindowImpl->mpFrameData->mnDPIY*nScreenZoom)/100; // setup the scale factor for Hi-DPI displays -#ifdef MACOSX -mnDPIScaleFactor = 1; -#else -mnDPIScaleFactor = std::max((sal_Int32)1, (mpWindowImpl->mpFrameData->mnDPIY + 48) / 96); -#endif +mnDPIScaleFactor = CountDPIScaleFactor(mpWindowImpl->mpFrameData->mnDPIY); SetPointFont( rStyleSettings.GetAppFont() ); } else if ( mpWindowImpl->mpParent ) commit f6406c910a60c075ca3c4928c7f451eae3ab751f Author: Jan Holesovsky Date: Tue Apr 8 08:58:18 2014 +0200 Need 3 points to define a rectangle in 3D. Change-Id: I47e212f922b67ced6c6cd63bf90133c024cf0af4 diff --git a/chart2/source/view/inc/3DChartObjects.hxx b/chart2/source/view/inc/3DChartObjects.hxx index e4e3709..06121f4 100644 --- a/chart2/source/view/inc/3DChartObjects.hxx +++ b/chart2/source/view/inc/3DChartObjects.hxx @@ -49,6 +49,7 @@ class Text : public Renderable3DObject private: BitmapEx maText; glm::vec3 maTopLeft; +glm::vec3 maTopRight; glm::vec3 maBottomRight; }; @@ -56,6 +57,7 @@ class Rectangle : public Renderable3DObject { private: glm::vec3 maTopLeft; +glm::vec3 maTopRight; glm::vec3 maBottomRight; Color maColor; // RGBA fill color Color maLineColor; // RGBA line color @@ -66,7 +68,6 @@ class Camera : public Renderable3DObject public: Camera(); private: - glm::vec3 maPos; glm::vec3 maDirection; }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits