diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-11-19 11:33:12 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2021-01-04 15:24:12 +0100 |
commit | a1cdde17aa27902ee162d5b40860f05c592c4de8 (patch) | |
tree | d6053b28bb402be6233c2901774d782128a2c3ec /sfx2/source/doc/objserv.cxx | |
parent | 232dac3d7fc0fc8721d4aea2f429568ea29188cf (diff) |
lok: don't log warnings
Change-Id: If0ecee7d01eb0efc8b1096a9097c7d0d7ef0fd27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106129
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108655
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sfx2/source/doc/objserv.cxx')
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index d0af3586b80f..586c63e503ab 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -443,20 +443,23 @@ uno::Reference<security::XCertificate> SfxObjectShell::GetSignPDFCertificate() c static void sendErrorToLOK(ErrCode error) { - boost::property_tree::ptree aTree; - aTree.put("code", error); - aTree.put("kind", ""); - aTree.put("cmd", ""); + if (error.GetClass() != ErrCodeClass::NONE) + { + boost::property_tree::ptree aTree; + aTree.put("code", error); + aTree.put("kind", ""); + aTree.put("cmd", ""); - std::unique_ptr<ErrorInfo> pInfo = ErrorInfo::GetErrorInfo(error); - OUString aErr; - if (ErrorStringFactory::CreateString(pInfo.get(), aErr)) - aTree.put("message", aErr.toUtf8()); + std::unique_ptr<ErrorInfo> pInfo = ErrorInfo::GetErrorInfo(error); + OUString aErr; + if (ErrorStringFactory::CreateString(pInfo.get(), aErr)) + aTree.put("message", aErr.toUtf8()); - std::stringstream aStream; - boost::property_tree::write_json(aStream, aTree); + std::stringstream aStream; + boost::property_tree::write_json(aStream, aTree); - SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_ERROR, aStream.str().c_str()); + SfxViewShell::Current()->libreOfficeKitViewCallback(LOK_CALLBACK_ERROR, aStream.str().c_str()); + } } void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq) |