diff options
Diffstat (limited to 'sw/source/uibase/app/swmodule.cxx')
-rw-r--r-- | sw/source/uibase/app/swmodule.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/source/uibase/app/swmodule.cxx b/sw/source/uibase/app/swmodule.cxx index 485bb7a52d41..a1075c03819e 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -175,9 +175,14 @@ OUString SwResId(const char* pId, int nCardinality) uno::Reference< scanner::XScannerManager2 > const & SwModule::GetScannerManager() { - if (!m_xScannerManager.is()) + static bool bTestScannerManager = true; + if (bTestScannerManager && !m_xScannerManager.is()) { - m_xScannerManager = scanner::ScannerManager::create( comphelper::getProcessComponentContext() ); + try { + m_xScannerManager = scanner::ScannerManager::create( comphelper::getProcessComponentContext() ); + } + catch (...) {} + bTestScannerManager = false; } return m_xScannerManager; } |