[Libreoffice-commits] core.git: sfx2/source
Szymon KÅos (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jan 4 14:24:55 UTC 2021
sfx2/source/doc/objserv.cxx | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
New commits:
commit a1cdde17aa27902ee162d5b40860f05c592c4de8
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Nov 19 11:33:12 2020 +0100
Commit: Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Jan 4 15:24:12 2021 +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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108655
Tested-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
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)
More information about the Libreoffice-commits
mailing list