1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
10 #include <dlg_InsertDataTable.hxx>
14 InsertDataTableDialog::InsertDataTableDialog(weld::Window
* pWindow
)
15 : GenericDialogController(pWindow
, "modules/schart/ui/dlg_InsertDataTable.ui",
16 "InsertDataTableDialog")
17 , m_aDataTablePropertiesResources(*m_xBuilder
)
18 , m_xCbShowDataTable(m_xBuilder
->weld_check_button("showDataTable"))
20 m_xCbShowDataTable
->connect_toggled(LINK(this, InsertDataTableDialog
, ShowDataTableToggle
));
24 IMPL_LINK_NOARG(InsertDataTableDialog
, ShowDataTableToggle
, weld::Toggleable
&, void)
29 void InsertDataTableDialog::changeEnabled()
31 bool bEnable
= m_xCbShowDataTable
->get_active();
32 m_aDataTablePropertiesResources
.setChecksSensitive(bEnable
);
33 m_aData
.mbShow
= bEnable
;
36 void InsertDataTableDialog::init(DataTableDialogData
const& rData
)
39 m_aDataTablePropertiesResources
.setHorizontalBorder(m_aData
.mbHorizontalBorders
);
40 m_aDataTablePropertiesResources
.setVerticalBorder(m_aData
.mbVerticalBorders
);
41 m_aDataTablePropertiesResources
.setOutline(m_aData
.mbOutline
);
42 m_aDataTablePropertiesResources
.setKeys(m_aData
.mbKeys
);
43 m_xCbShowDataTable
->set_active(m_aData
.mbShow
);
47 DataTableDialogData
& InsertDataTableDialog::getDataTableDialogData()
49 m_aData
.mbShow
= m_xCbShowDataTable
->get_active();
51 m_aData
.mbHorizontalBorders
= m_aDataTablePropertiesResources
.getHorizontalBorder();
52 m_aData
.mbVerticalBorders
= m_aDataTablePropertiesResources
.getVerticalBorder();
53 m_aData
.mbOutline
= m_aDataTablePropertiesResources
.getOutline();
54 m_aData
.mbKeys
= m_aDataTablePropertiesResources
.getKeys();
61 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */