[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sfx2/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 19 19:56:01 UTC 2020
sfx2/source/doc/objserv.cxx | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
New commits:
commit 61abda685e2bc1ec4b108614799b8bc1c01183ec
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Nov 19 11:33:12 2020 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Nov 19 20:55:28 2020 +0100
lok: don't log warnings
Change-Id: If0ecee7d01eb0efc8b1096a9097c7d0d7ef0fd27
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106129
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Andras Timar <andras.timar at collabora.com>
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)
More information about the Libreoffice-commits
mailing list