22#include <com/sun/star/beans/XPropertySet.hpp>
31 : GenericDialogController(pParent,
"cui/ui/showcoldialog.ui",
"ShowColDialog")
32 , m_xList(m_xBuilder->weld_tree_view(
"treeview"))
33 , m_xOK(m_xBuilder->weld_button(
"ok"))
35 m_xList->set_size_request(
m_xList->get_approximate_digit_width() * 40,
37 m_xList->set_selection_mode(SelectionMode::Multiple);
47 "FmShowColsDialog::OnClickedOk : you should call SetColumns before executing the dialog !");
50 css::uno::Reference<css::beans::XPropertySet> xCol;
51 auto nSelectedRows = m_xList->get_selected_rows();
52 for (
auto i : nSelectedRows)
54 m_xColumns->getByIndex(m_xList->get_id(
i).toInt32()) >>= xCol;
64 "FmShowColsDialog::OnClickedOk Exception occurred!");
75 DBG_ASSERT(xCols.is(),
"FmShowColsDialog::SetColumns : invalid columns !");
82 css::uno::Reference<css::beans::XPropertySet> xCurCol;
84 for (sal_Int32
i = 0;
i < xCols->getCount(); ++
i)
87 xCurCol.set(xCols->getByIndex(
i), css::uno::UNO_QUERY);
88 bool bIsHidden =
false;
92 bIsHidden = ::comphelper::getBOOL(aHidden);
105 m_xList->append(OUString::number(
i), sCurName);
Reference< XExecutableDialog > m_xDialog
void SetColumns(const css::uno::Reference< css::container::XIndexContainer > &xCols)
virtual ~FmShowColsDialog() override
std::unique_ptr< weld::Button > m_xOK
std::unique_ptr< weld::TreeView > m_xList
FmShowColsDialog(weld::Window *pParent)
css::uno::Reference< css::container::XIndexAccess > m_xColumns
#define DBG_ASSERT(sCon, aError)
#define TOOLS_WARN_EXCEPTION(area, stream)
#define LINK(Instance, Class, Member)
constexpr OUStringLiteral CUIFM_PROP_HIDDEN
IMPL_LINK_NOARG(FmShowColsDialog, OnClickedOk, weld::Button &, void)
constexpr OUStringLiteral CUIFM_PROP_LABEL