diff options
Diffstat (limited to 'sw')
-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 51052b8f82b6..f564a36d0ed0 100644 --- a/sw/source/uibase/app/swmodule.cxx +++ b/sw/source/uibase/app/swmodule.cxx @@ -175,9 +175,14 @@ OUString SwResId(TranslateNId aContextSingularPlural, 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; } |