diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-02-19 23:58:52 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-02-28 09:50:11 +0000 |
commit | e7729f458409f7fef2b7dab752205e3b230acb65 (patch) | |
tree | 32b71b7dedfb50b887ce2dd2313bb27d273c419a /sfx2 | |
parent | 6603947329a7b372a173a3c60e013e532d0bc5cf (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>
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 19737c90b22a..ce1e85e0c88b 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -147,7 +147,23 @@ uno::Any SAL_CALL SfxMacroLoader::dispatchWithReturnValue( const util::URL& aURL, const uno::Sequence<beans::PropertyValue>& ) { 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; } |