diff options
author | Tor Lillqvist <tml@collabora.com> | 2019-02-06 12:32:35 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2019-02-06 13:51:37 +0200 |
commit | e9f87f7b8e33352b66d52b37c459a52a6737eb80 (patch) | |
tree | dae2913723c22a7b80273600bb4515dfc11a6ee7 | |
parent | c06a3f33d0de59f9cbfddef353f9018a6583df4a (diff) |
Ignore RuntimeException in Application.WindowState setter
Probably helps VB6 clients.
Change-Id: I3a1072e6ededbd0322c4b0dcd0ef4b16ace215d1
-rw-r--r-- | sw/source/ui/vba/vbaapplication.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sw/source/ui/vba/vbaapplication.cxx b/sw/source/ui/vba/vbaapplication.cxx index 4b7b83bf3f62..222524f4207a 100644 --- a/sw/source/ui/vba/vbaapplication.cxx +++ b/sw/source/ui/vba/vbaapplication.cxx @@ -290,12 +290,18 @@ sal_Int32 SAL_CALL SwVbaApplication::getWindowState() void SAL_CALL SwVbaApplication::setWindowState( sal_Int32 _windowstate ) { - auto xWindow = getActiveWindow(); - if (xWindow.is()) + try + { + auto xWindow = getActiveWindow(); + if (xWindow.is()) + { + uno::Any aState; + aState <<= _windowstate; + xWindow->setWindowState( aState ); + } + } + catch (const uno::RuntimeException&) { - uno::Any aState; - aState <<= _windowstate; - xWindow->setWindowState( aState ); } } |