21 #include <com/sun/star/lang/DisposedException.hpp>
22 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
24 #include <tablemodel.hxx>
51 , mxTableModel( xTableModel )
54 , mbOptimalWidth( true )
56 , mbIsStartOfNewPage(
false )
75 throw DisposedException();
99 throw IndexOutOfBoundsException();
108 if( (nTop >= 0 ) && (nLeft == 0) && (nBottom >= nTop) && (nRight == 0) )
112 throw IndexOutOfBoundsException();
118 return Reference< XCellRange >();
143 bool bChange =
false;
146 std::unique_ptr<TableColumnUndo> pUndo;
159 bOk = aValue >>= nWidth;
160 if( bOk && (nWidth !=
mnWidth) )
168 case Property_OptimalWidth:
171 bOk = aValue >>= bOptimalWidth;
181 case Property_IsVisible:
184 bOk = aValue >>= bIsVisible;
193 case Property_IsStartOfNewPage:
196 bOk = aValue >>= bIsStartOfNewPage;
205 throw UnknownPropertyException( OUString::number(nHandle), static_cast<cppu::OWeakObject*>(
this));
209 throw IllegalArgumentException();
216 rModel.AddUndo( std::move(pUndo) );
231 default:
throw UnknownPropertyException( OUString::number(nHandle), static_cast<cppu::OWeakObject*>(
this));
241 aProperties[0].Name =
"Width";
244 aProperties[0].Attributes = 0;
246 aProperties[1].Name =
"OptimalWidth";
249 aProperties[1].Attributes = 0;
251 aProperties[2].Name =
"IsVisible";
254 aProperties[2].Attributes = 0;
256 aProperties[3].Name =
"IsStartOfNewPage";
259 aProperties[3].Attributes = 0;
261 aProperties[4].Name =
"Size";
264 aProperties[4].Attributes = 0;
266 aProperties[5].Name =
"OptimalSize";
269 aProperties[5].Attributes = 0;
virtual void SAL_CALL setFastPropertyValue(::sal_Int32 nHandle, const css::uno::Any &aValue) override
const sal_Int32 Property_OptimalWidth
std::vector< css::beans::Property > PropertyVector
const sal_Int32 Property_IsStartOfNewPage
void throwIfDisposed() const
TableColumn & operator=(const TableColumn &)
virtual css::uno::Any SAL_CALL getFastPropertyValue(::sal_Int32 nHandle) override
static rtl::Reference< FastPropertySetInfo > getStaticPropertySetInfo()
const sal_Int32 Property_IsVisible
virtual ~TableColumn() override
PropertiesInfo aProperties
const sal_Int32 Property_Width
virtual OUString SAL_CALL getName() override
::cppu::ImplInheritanceHelper< FastPropertySet, css::table::XCellRange, css::container::XNamed > TableColumnBase
sal_Int32 getWidth() const
Get the width of this column.
virtual void SAL_CALL setName(const OUString &aName) override
css::uno::Type const & get()
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByName(const OUString &aRange) override
TableColumn(const TableModelRef &xTableModel, sal_Int32 nColumn)
virtual css::uno::Reference< css::table::XCell > SAL_CALL getCellByPosition(sal_Int32 nColumn, sal_Int32 nRow) override
virtual css::uno::Reference< css::table::XCellRange > SAL_CALL getCellRangeByPosition(sal_Int32 nLeft, sal_Int32 nTop, sal_Int32 nRight, sal_Int32 nBottom) override
TableModelRef const & getModel() const
Get the table that owns this column.
TableModelRef mxTableModel
friend class TableColumnUndo
bool m_bDetectedRangeSegmentation false