diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-04-24 21:58:59 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-05-31 15:29:44 +0300 |
commit | 5cc28c5e9455a7923153f82dcf18e76570e36717 (patch) | |
tree | b60b3c4d3b559b48a4d7ae2451a59a0ef6a5d232 /vbahelper | |
parent | e4a99a3c502c0285b6fb542d84a9bffde045e526 (diff) |
Decrease fragility in odd use cases with no current document (yet)
Especially, this happens when an Automation client wants to open a
Calc document. Equivalent to the code for the same situation in
getCurrentWordDoc().
Change-Id: I209a72dcae49f18cd265e0c6c2790618e1ebb4a1
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/source/vbahelper/vbahelper.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 55c613341bcd..c34559b769f6 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -262,7 +262,13 @@ getCurrentExcelDoc( const uno::Reference< uno::XComponentContext >& xContext ) } catch (const uno::Exception&) { - xModel = getThisExcelDoc( xContext ); + try + { + xModel = getThisExcelDoc( xContext ); + } + catch (const uno::Exception&) + { + } } return xModel; } |