ofz#887 support avoiding reading config

Change-Id: Ic7e0e65b15c7b6a01a10d6004230ad71a2d439d2
This commit is contained in:
Caolán McNamara
2017-03-17 21:25:56 +00:00
parent b165f0f9cc
commit 376ae93f48
2 changed files with 64 additions and 59 deletions

View File

@@ -29,6 +29,7 @@ $(eval $(call gb_Library_use_libraries,canvasfactory,\
cppu \ cppu \
cppuhelper \ cppuhelper \
sal \ sal \
utl \
vcl \ vcl \
$(gb_UWINAPI) \ $(gb_UWINAPI) \
)) ))

View File

@@ -43,6 +43,7 @@
#if HAVE_FEATURE_OPENGL #if HAVE_FEATURE_OPENGL
#include <vcl/opengl/OpenGLWrapper.hxx> #include <vcl/opengl/OpenGLWrapper.hxx>
#endif #endif
#include <unotools/configmgr.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
@@ -123,6 +124,8 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
m_bCacheHasUseAcceleratedEntry(), m_bCacheHasUseAcceleratedEntry(),
m_bCacheHasUseAAEntry() m_bCacheHasUseAAEntry()
{ {
if (!utl::ConfigManager::IsAvoidConfig())
{
try try
{ {
// read out configuration for preferred services: // read out configuration for preferred services:
@@ -191,8 +194,9 @@ CanvasFactory::CanvasFactory( Reference<XComponentContext> const & xContext ) :
catch (const Exception&) catch (const Exception&)
{ {
} }
}
if( m_aAvailableImplementations.empty() ) if (m_aAvailableImplementations.empty())
{ {
// Ugh. Looks like configuration is borked. Fake minimal // Ugh. Looks like configuration is borked. Fake minimal
// setup. // setup.