21#include <officecfg/Office/Common.hxx>
24 std::u16string_view _rFormatName,
25 const OUString& _rDefaultExtension,
27 : MessageDialogController(pParent,
"sfx/ui/alienwarndialog.ui",
"AlienWarnDialog",
"ask")
28 , m_xKeepCurrentBtn(m_xBuilder->weld_button(
"save"))
29 , m_xUseDefaultFormatBtn(m_xBuilder->weld_button(
"cancel"))
32 OUString aExtension =
"ODF";
35 OUString sInfoText =
m_xDialog->get_primary_text();
36 sInfoText = sInfoText.replaceAll(
"%FORMATNAME", _rFormatName);
41 sInfoText = sInfoText.replaceAll(
"%FORMATNAME", _rFormatName);
48 m_xDialog->set_secondary_text(OUString());
49 aExtension = _rDefaultExtension.toAsciiUpperCase();
54 sInfoText = sInfoText.replaceAll(
"%DEFAULTEXTENSION", aExtension);
58 m_xWarningOnBox->set_active(officecfg::Office::Common::Save::Document::WarnAlienFormat::get());
67 if (officecfg::Office::Common::Save::Document::WarnAlienFormat::get() != bChecked)
70 officecfg::Office::Common::Save::Document::WarnAlienFormat::set(bChecked, xChanges);
std::unique_ptr< weld::Button > m_xUseDefaultFormatBtn
std::unique_ptr< weld::Button > m_xKeepCurrentBtn
SfxAlienWarningDialog(weld::Window *pParent, std::u16string_view _rFormatName, const OUString &_rDefaultExtension, bool rDefaultIsAlien)
std::unique_ptr< weld::CheckButton > m_xWarningOnBox
virtual ~SfxAlienWarningDialog() override
static std::shared_ptr< ConfigurationChanges > create()
std::unique_ptr< weld::MessageDialog > m_xDialog
std::unique_ptr< weld::CheckButton > m_xWarningOnBox