diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-02-19 23:58:52 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-02-28 11:20:36 +0100 |
commit | cf1b71694fc921195b572dd906d71d70b0608044 (patch) | |
tree | 8fc827b59485e9e1b65248d7650e87b5e0d6d7cc /sfx2 | |
parent | 41ed5f82271e61b1d08e3adf42f0995ac4516600 (diff) |
Run macro:// via LOKit
Change-Id: I54d3c734d86d4b44e1dfe1ad7728e2f51cd26d53
Reviewed-on: https://gerrit.libreoffice.org/34538
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit e7729f458409f7fef2b7dab752205e3b230acb65)
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/macroloader.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx index 3ab011f3dac0..1d6c8e0af130 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -154,7 +154,23 @@ uno::Any SAL_CALL SfxMacroLoader::dispatchWithReturnValue( throw (uno::RuntimeException, std::exception) { uno::Any aRet; - loadMacro( aURL.Complete, aRet, GetObjectShell_Impl() ); + ErrCode nErr = loadMacro( aURL.Complete, aRet, GetObjectShell_Impl() ); + + // aRet gets set to a different value only if nErr == ERRCODE_NONE + // Return it in such case to preserve the original behaviour + + // In all other cases (nErr != ERRCODE_NONE), the calling code gets + // the actual error code back + if ( nErr != ERRCODE_NONE ) + { + beans::PropertyValue aErrorCode; + + aErrorCode.Name = "ErrorCode"; + aErrorCode.Value <<= nErr; + + aRet <<= aErrorCode; + } + return aRet; } |