summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-11-19 11:33:12 +0100
committerAndras Timar <andras.timar@collabora.com>2020-11-19 20:55:28 +0100
commit61abda685e2bc1ec4b108614799b8bc1c01183ec (patch)
treef80709ac7b9e2a790f93b02a217d8254111b18c9
parent6ebd3d7ec29fc5359df8a6206a82b9dc49322c77 (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>
-rw-r--r--sfx2/source/doc/objserv.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 3ebb1feb5f70..b7e8abdc823e 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -458,20 +458,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)