summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-04-24 21:58:59 +0300
committerTor Lillqvist <tml@collabora.com>2018-05-31 21:55:49 +0300
commit378921f0f69539fe500214b467059451e0d77830 (patch)
treec391bb7e64edfb8def46422f5dc1a4d6e21ab805 /vbahelper
parent2bd57f0c8a1941708527827655a07a33da9e3e55 (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 (cherry picked from commit 5cc28c5e9455a7923153f82dcf18e76570e36717)
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbahelper.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index 0b07f2a57ba1..d6be56bd8bd9 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;
}