From d71dc6f13765c5e799abf954934c1600332dee81 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 29 Jan 2014 09:44:57 +0200 Subject: Adapt for the DISABLE_DYNLOADING case Change-Id: Ifd9ae240277a89162a2a821789b0d41204c1a490 --- chart2/source/view/main/AbstractShapeFactory.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/chart2/source/view/main/AbstractShapeFactory.cxx b/chart2/source/view/main/AbstractShapeFactory.cxx index feb3d694aa69..7bf39584f2f4 100644 --- a/chart2/source/view/main/AbstractShapeFactory.cxx +++ b/chart2/source/view/main/AbstractShapeFactory.cxx @@ -53,6 +53,8 @@ namespace { typedef opengl::OpenglShapeFactory* (*__getOpenglShapeFactory)(void); +#ifndef DISABLE_DYNLOADING + static void SAL_CALL thisModule() {} osl::Module* getOpenGLModule() @@ -70,8 +72,14 @@ osl::Module* getOpenGLModule() return bLoaded ? &aModule : NULL; } +#endif + } +#ifdef DISABLE_DYNLOADING +extern "C" opengl::OpenglShapeFactory* getOpenglShapeFactory(); +#endif + AbstractShapeFactory* AbstractShapeFactory::getOrCreateShapeFactory(uno::Reference< lang::XMultiServiceFactory> xFactory) { static AbstractShapeFactory* pShapeFactory = NULL; @@ -81,6 +89,7 @@ AbstractShapeFactory* AbstractShapeFactory::getOrCreateShapeFactory(uno::Referen if(getenv("CHART_DUMMY_FACTORY") && !Application::IsHeadlessModeEnabled()) { +#ifndef DISABLE_DYNLOADING osl::Module* pModule = getOpenGLModule(); if(pModule) { @@ -92,6 +101,10 @@ AbstractShapeFactory* AbstractShapeFactory::getOrCreateShapeFactory(uno::Referen pShapeFactory->setShapeFactory(xFactory); } } +#else + pShapeFactory = getOpenglShapeFactory(); + pShapeFactory->setShapeFactory(xFactory); +#endif } -- cgit