20#include <osl/file.hxx>
22#include <officecfg/Office/Common.hxx>
25 : MessageDialogController(pParent,
"svx/ui/linkwarndialog.ui",
"LinkWarnDialog",
"ask")
29 OUString sInfoText =
m_xDialog->get_primary_text();
31 if (osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL(_rFileName, aPath))
33 sInfoText = sInfoText.replaceAll(
"%FILENAME", aPath);
37 m_xWarningOnBox->set_active(officecfg::Office::Common::Misc::ShowLinkWarningDialog::get());
39 !officecfg::Office::Common::Misc::ShowLinkWarningDialog::isReadOnly());
48 if (officecfg::Office::Common::Misc::ShowLinkWarningDialog::get() != bChecked)
50 std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
52 officecfg::Office::Common::Misc::ShowLinkWarningDialog::set(bChecked, xChanges);
std::unique_ptr< weld::CheckButton > m_xWarningOnBox
virtual ~SvxLinkWarningDialog() override
SvxLinkWarningDialog(weld::Widget *pParent, const OUString &_rFileName)
static std::shared_ptr< ConfigurationChanges > create()
std::unique_ptr< weld::MessageDialog > m_xDialog
std::unique_ptr< weld::CheckButton > m_xWarningOnBox