LibreOffice Module toolkit (master) 1
unogridcolumnfacade.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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#pragma once
21
23
24#include <com/sun/star/awt/grid/XGridColumn.hpp>
25#include <com/sun/star/style/HorizontalAlignment.hpp>
26
27#include <rtl/ref.hxx>
28
29
30namespace svt::table
31{
32
33
34 //= UnoGridColumnFacade
35
36 class ColumnChangeMultiplexer;
37 class UnoControlTableModel;
39 {
40 public:
42 UnoControlTableModel const & i_owner,
43 css::uno::Reference< css::awt::grid::XGridColumn > const & i_gridColumn
44 );
45 virtual ~UnoGridColumnFacade() override;
48
49 // IColumnModel overridables
50 virtual OUString getName() const override;
51 virtual OUString getHelpText() const override;
52 virtual bool isResizable() const override;
53 virtual sal_Int32 getFlexibility() const override;
54 virtual TableMetrics getWidth() const override;
55 virtual void setWidth( TableMetrics _nWidth ) override;
56 virtual TableMetrics getMinWidth() const override;
57 virtual TableMetrics getMaxWidth() const override;
58 virtual css::style::HorizontalAlignment getHorizontalAlign() override;
59
65 void dispose();
66
67 sal_Int32
69
70 // callbacks for the XGridColumnListener
71 void columnChanged( ColumnAttributeGroup const i_attributeGroup );
73
74 private:
76
77 private:
80 css::uno::Reference< css::awt::grid::XGridColumn > m_xGridColumn;
82 };
83
84
85} // svt::table
86
87
88
89/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
interface to be implemented by table column models
Definition: tablemodel.hxx:158
virtual bool isResizable() const override
determines whether the column can be interactively resized
virtual sal_Int32 getFlexibility() const override
denotes the relative flexibility of the column
UnoGridColumnFacade(UnoControlTableModel const &i_owner, css::uno::Reference< css::awt::grid::XGridColumn > const &i_gridColumn)
virtual void setWidth(TableMetrics _nWidth) override
sets a new width for the column
virtual TableMetrics getMaxWidth() const override
returns the maximum width of the column, in app-font units, or 0 if the column does not have a minima...
void dispose()
disposes the column wrapper
UnoGridColumnFacade(const UnoGridColumnFacade &)=delete
virtual OUString getHelpText() const override
retrieves the help text to be displayed for the column.
virtual TableMetrics getMinWidth() const override
returns the minimum width of the column, in app-font units, or 0 if the column does not have a minima...
void columnChanged(ColumnAttributeGroup const i_attributeGroup)
UnoControlTableModel const * m_pOwner
virtual css::style::HorizontalAlignment getHorizontalAlign() override
retrieves the horizontal alignment to be used for content in this cell
virtual OUString getName() const override
returns the name of the column
::rtl::Reference< ColumnChangeMultiplexer > m_pChangeMultiplexer
virtual TableMetrics getWidth() const override
returns the width of the column, in app-font units
UnoGridColumnFacade & operator=(const UnoGridColumnFacade &)=delete
css::uno::Reference< css::awt::grid::XGridColumn > m_xGridColumn
sal_Int32 TableMetrics
Definition: tabletypes.hxx:36
ColumnAttributeGroup
Definition: tablemodel.hxx:42