LibreOffice Module cui (master) 1
fileextcheckdlg.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <sal/config.h>
21
22#include <officecfg/Office/Common.hxx>
24
25#include <fileextcheckdlg.hxx>
26
28 const OUString& sMsg)
29 : GenericDialogController(pParent, "cui/ui/fileextcheckdialog.ui", "FileExtCheckDialog")
30 , m_pText(m_xBuilder->weld_label("lbText"))
31 , m_pPerformCheck(m_xBuilder->weld_check_button("cbPerformCheck"))
32 , m_pOk(m_xBuilder->weld_button("btnOk"))
33{
34 m_pPerformCheck->set_active(true);
35 m_pOk->connect_clicked(LINK(this, FileExtCheckDialog, OnOkClick));
36 m_xDialog->set_title(sTitle);
37 m_pText->set_label(sMsg);
38}
39
41{
42 std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
44 officecfg::Office::Common::Misc::PerformFileExtCheck::set(m_pPerformCheck->get_active(),
45 xChanges);
46 xChanges->commit();
47}
48
50{
53}
54
55/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
virtual ~FileExtCheckDialog() override
std::unique_ptr< weld::CheckButton > m_pPerformCheck
std::unique_ptr< weld::Label > m_pText
std::unique_ptr< weld::Button > m_pOk
FileExtCheckDialog(weld::Window *pWindow, const OUString &sTitle, const OUString &sMsg)
static std::shared_ptr< ConfigurationChanges > create()
void response(int nResponse)
std::shared_ptr< weld::Dialog > m_xDialog
IMPL_LINK_NOARG(FileExtCheckDialog, OnOkClick, weld::Button &, void)
VCL_DLLPUBLIC void LaunchRegistrationUI()
RET_OK