diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-01-29 09:44:57 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-01-29 10:33:23 +0200 |
commit | d71dc6f13765c5e799abf954934c1600332dee81 (patch) | |
tree | 3757e54840d973a4484a6717e911b7fb43f74daa /chart2 | |
parent | 2f84b420e0428693fb2d45b68afdc9023dfc08bc (diff) |
Adapt for the DISABLE_DYNLOADING case
Change-Id: Ifd9ae240277a89162a2a821789b0d41204c1a490
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/main/AbstractShapeFactory.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
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 } |