25#include <com/sun/star/awt/XWindow.hpp>
29using ::com::sun::star::uno::Reference;
37 : GenericDialogController(pParent,
"modules/schart/ui/chartdatadialog.ui",
"ChartDataDialog")
41 , m_xTbxData(m_xBuilder->weld_toolbar(
"toolbar"))
42 , m_xCloseBtn(m_xBuilder->weld_button(
"close"))
43 , m_xTable(m_xBuilder->weld_container(
"datawindow"))
44 , m_xColumns(m_xBuilder->weld_container(
"columns"))
45 , m_xColors(m_xBuilder->weld_container(
"colorcolumns"))
46 , m_xTableCtrlParent(m_xTable->CreateChildFrame())
79 if (rId ==
"InsertRow")
80 m_xBrwData->InsertRow();
81 else if (rId ==
"InsertColumn")
82 m_xBrwData->InsertColumn();
83 else if (rId ==
"InsertTextColumn")
84 m_xBrwData->InsertTextColumn();
85 else if (rId ==
"RemoveRow")
86 m_xBrwData->RemoveRow();
87 else if (rId ==
"RemoveColumn")
88 m_xBrwData->RemoveColumn();
89 else if (rId ==
"MoveLeftColumn")
90 m_xBrwData->MoveLeftColumn();
91 else if (rId ==
"MoveRightColumn")
92 m_xBrwData->MoveRightColumn();
93 else if (rId ==
"MoveUpRow")
94 m_xBrwData->MoveUpRow();
95 else if (rId ==
"MoveDownRow")
96 m_xBrwData->MoveDownRow();
105 bool bIsDataValid = m_xBrwData->IsEnableItem();
107 m_xTbxData->set_item_sensitive(
"InsertRow", bIsDataValid && m_xBrwData->MayInsertRow() );
108 m_xTbxData->set_item_sensitive(
"InsertColumn", bIsDataValid && m_xBrwData->MayInsertColumn() );
109 m_xTbxData->set_item_sensitive(
"InsertTextColumn", bIsDataValid && m_xBrwData->MayInsertColumn() );
110 m_xTbxData->set_item_sensitive(
"RemoveRow", m_xBrwData->MayDeleteRow() );
111 m_xTbxData->set_item_sensitive(
"RemoveColumn", m_xBrwData->MayDeleteColumn() );
113 m_xTbxData->set_item_sensitive(
"MoveLeftColumn", bIsDataValid && m_xBrwData->MayMoveLeftColumns() );
114 m_xTbxData->set_item_sensitive(
"MoveRightColumn", bIsDataValid && m_xBrwData->MayMoveRightColumns() );
115 m_xTbxData->set_item_sensitive(
"MoveDownRow", bIsDataValid && m_xBrwData->MayMoveDownRows() );
116 m_xTbxData->set_item_sensitive(
"MoveUpRow", bIsDataValid && m_xBrwData->MayMoveUpRows() );
125 m_xTbxData->set_item_sensitive(
"InsertRow",
false);
126 m_xTbxData->set_item_sensitive(
"InsertColumn",
false);
127 m_xTbxData->set_item_sensitive(
"InsertTextColumn",
false);
128 m_xTbxData->set_item_sensitive(
"RemoveRow",
false);
129 m_xTbxData->set_item_sensitive(
"RemoveColumn",
false);
130 m_xTbxData->set_item_sensitive(
"MoveLeftColumn",
false);
131 m_xTbxData->set_item_sensitive(
"MoveRightColumn",
false);
132 m_xTbxData->set_item_sensitive(
"MoveUpRow",
false);
133 m_xTbxData->set_item_sensitive(
"MoveDownRow",
false);
141 bool bApplied = m_xBrwData->EndEditing();
rtl::Reference<::chart::ChartModel > m_xChartDoc
Reference< uno::XComponentContext > m_xContext
Reference< XExecutableDialog > m_xDialog
constexpr tools::Long Height() const
constexpr tools::Long Width() const
std::unique_ptr< weld::Toolbar > m_xTbxData
DataEditor(weld::Window *pParent, rtl::Reference<::chart::ChartModel > xChartDoc, const css::uno::Reference< css::uno::XComponentContext > &xContext)
css::uno::Reference< css::awt::XWindow > m_xTableCtrlParent
virtual ~DataEditor() override
std::unique_ptr< weld::Container > m_xTable
void SetReadOnly(bool bReadOnly)
std::unique_ptr< weld::Button > m_xCloseBtn
rtl::Reference<::chart::ChartModel > m_xChartDoc
VclPtr< DataBrowser > m_xBrwData
#define LINK(Instance, Class, Member)
IMPL_LINK(StackingResourceGroup, StackingChangeHdl, weld::Toggleable &, rRadio, void)
IMPL_LINK_NOARG(SplinePropertiesDialog, SplineTypeListBoxHdl, weld::ComboBox &, void)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)