Kaydet (Commit) 3b9e7f49 authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

Ignore exception when service ScannerManager is unavailable

Exception from an unavailable service ScannerManager propagated to
the top. This caused that presentations in android crashed
(DrawViewShell wasn't initialized).

Change-Id: I485d0cdad05e4d2d6096042e5762c0350a8339a9
üst 8da923df
......@@ -362,11 +362,20 @@ void DrawViewShell::Construct(DrawDocShell* pDocSh, PageKind eInitialPageKind)
uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
mxScannerManager = scanner::ScannerManager::create( xContext );
try
{
mxScannerManager = scanner::ScannerManager::create( xContext );
mxScannerListener = uno::Reference< lang::XEventListener >(
static_cast< ::cppu::OWeakObject* >( new ScannerEventListener( this ) ),
uno::UNO_QUERY );
mxScannerListener = uno::Reference< lang::XEventListener >(
static_cast< ::cppu::OWeakObject* >( new ScannerEventListener( this ) ),
uno::UNO_QUERY );
}
catch (Exception& exception)
{
// Eat the exception and log it
// We can still continue if scanner manager is not available.
SAL_WARN("sd", "Scanner manager exception: " << exception.Message);
}
mpAnnotationManager.reset( new AnnotationManager( GetViewShellBase() ) );
mpViewOverlayManager.reset( new ViewOverlayManager( GetViewShellBase() ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment