17#include <officecfg/Office/Common.hxx>
20#include <com/sun/star/task/OfficeRestartManager.hpp>
21#include <com/sun/star/task/XInteractionHandler.hpp>
30 : GenericDialogController(pParent,
"svx/ui/crashreportdlg.ui",
"CrashReportDialog")
31 , mxBtnSend(m_xBuilder->weld_button(
"btn_send"))
32 , mxBtnCancel(m_xBuilder->weld_button(
"btn_cancel"))
33 , mxBtnClose(m_xBuilder->weld_button(
"btn_close"))
34 , mxEditPreUpload(m_xBuilder->weld_label(
"ed_pre"))
35 , mxEditPostUpload(m_xBuilder->weld_label(
"ed_post"))
36 , mxLinkButton(m_xBuilder->weld_link_button(
"linkbutton"))
37 , mxFtBugReport(m_xBuilder->weld_label(
"ed_bugreport"))
38 , mxCBSafeMode(m_xBuilder->weld_check_button(
"check_safemode"))
39 , mxPrivacyPolicyButton(m_xBuilder->weld_link_button(
"btnPrivacyPolicy"))
44 nWidth = std::max(nWidth,
mxCBSafeMode->get_size_request().Width());
53 officecfg::Office::Common::Menus::PrivacyPolicyURL::get()
64 short nRet = GenericDialogController::run();
71 ->requestRestart(css::uno::Reference<css::task::XInteractionHandler>());
78 if (&rBtn == mxBtnSend.get())
81 bool bSuccess = CrashReporter::readSendConfig(response);
83 OUString aCrashID = OUString::createFromAscii(response);
87 OUString aProcessedLink
88 = maLinkTemplate.replaceAll(
"%CRASHID", aCrashID.replaceAll(
"Crash-ID=",
""));
91 mxLinkButton->set_label(aProcessedLink.replaceAll(
"~",
"_"));
92 mxLinkButton->set_uri(aProcessedLink);
96 mxEditPostUpload->set_label(aCrashID);
99 mxLinkButton->set_visible(bSuccess);
102 mxFtBugReport->show();
103 mxEditPostUpload->show();
104 mxBtnSend->set_sensitive(
false);
105 mxBtnCancel->set_sensitive(
false);
106 mxBtnClose->grab_focus();
108 mxEditPreUpload->hide();
114 else if (&rBtn == mxBtnCancel.get())
118 else if (&rBtn == mxBtnClose.get())
Reference< XExecutableDialog > m_xDialog
std::unique_ptr< weld::LinkButton > mxLinkButton
virtual ~CrashReportDialog() override
std::unique_ptr< weld::Button > mxBtnClose
std::unique_ptr< weld::LinkButton > mxPrivacyPolicyButton
std::unique_ptr< weld::CheckButton > mxCBSafeMode
std::unique_ptr< weld::Button > mxBtnCancel
std::unique_ptr< weld::Button > mxBtnSend
std::unique_ptr< weld::Label > mxEditPreUpload
virtual short run() override
CrashReportDialog(weld::Window *pParent)
static OUString getProductVersion()
static OUString getUILocale()
std::shared_ptr< weld::Dialog > m_xDialog
IMPL_STATIC_LINK_NOARG(CrashReportDialog, InstallLOKNotifierHdl, void *, vcl::ILibreOfficeKitNotifier *)
IMPL_LINK(CrashReportDialog, BtnHdl, weld::Button &, rBtn, void)
#define LINK(Instance, Class, Member)
Reference< XComponentContext > getProcessComponentContext()
VCL_DLLPUBLIC Application * GetpApp()