20#ifndef INCLUDED_SVX_SOURCE_INC_CELL_HXX
21#define INCLUDED_SVX_SOURCE_INC_CELL_HXX
23#include <config_options.h>
24#include <com/sun/star/table/XMergeableCell.hpp>
25#include <com/sun/star/awt/XLayoutConstrains.hpp>
26#include <com/sun/star/lang/XEventListener.hpp>
46class UNLESS_MERGELIBS(SVXCORE_DLLPUBLIC)
Cell final :
public SdrText,
48 public css::table::XMergeableCell,
49 public css::awt::XLayoutConstrains,
50 public css::lang::XEventListener
52 friend class CellUndo;
61 bool IsActiveCell()
const;
62 bool IsTextEditActive()
const;
68 SVX_DLLPRIVATE const ::tools::Rectangle& getCellRect()
const {
return maCellRect; }
69 SVX_DLLPRIVATE ::tools::Rectangle& getCellRect() {
return maCellRect; }
71 bool CanCreateEditOutlinerParaObject()
const;
92 SVX_DLLPRIVATE void merge( sal_Int32 nColumnSpan, sal_Int32 nRowSpan );
102 virtual void SAL_CALL acquire() noexcept override;
103 virtual
void SAL_CALL release() noexcept override;
112 SVX_DLLPRIVATE virtual css::awt::
Size SAL_CALL calcAdjustedSize( const css::awt::
Size& aNewSize ) override;
115 SVX_DLLPRIVATE virtual ::sal_Int32 SAL_CALL getRowSpan() override;
116 SVX_DLLPRIVATE virtual ::sal_Int32 SAL_CALL getColumnSpan() override;
117 virtual
sal_Bool SAL_CALL isMerged() override;
121 SVX_DLLPRIVATE virtual
void SAL_CALL setFormula( const OUString& aFormula ) override;
124 SVX_DLLPRIVATE virtual css::table::CellContentType SAL_CALL getType() override;
128 SVX_DLLPRIVATE virtual css::
uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
129 SVX_DLLPRIVATE virtual
void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::
uno::Any& aValue ) override;
130 SVX_DLLPRIVATE virtual css::
uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
131 SVX_DLLPRIVATE virtual
void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::
uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
132 SVX_DLLPRIVATE virtual
void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::
uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
133 SVX_DLLPRIVATE virtual
void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::
uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
134 SVX_DLLPRIVATE virtual
void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::
uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
137 SVX_DLLPRIVATE virtual
void SAL_CALL setPropertyValues( const css::
uno::Sequence< OUString >& aPropertyNames, const css::
uno::Sequence< css::
uno::Any >& aValues ) override;
138 SVX_DLLPRIVATE virtual css::
uno::Sequence< css::
uno::Any > SAL_CALL getPropertyValues( const css::
uno::Sequence< OUString >& aPropertyNames ) override;
139 SVX_DLLPRIVATE virtual
void SAL_CALL addPropertiesChangeListener( const css::
uno::Sequence< OUString >& aPropertyNames, const css::
uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
140 SVX_DLLPRIVATE virtual
void SAL_CALL removePropertiesChangeListener( const css::
uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
141 SVX_DLLPRIVATE virtual
void SAL_CALL firePropertiesChangeEvent( const css::
uno::Sequence< OUString >& aPropertyNames, const css::
uno::Reference< css::beans::XPropertiesChangeListener >& xListener ) override;
144 SVX_DLLPRIVATE virtual css::beans::PropertyState SAL_CALL getPropertyState( const OUString& PropertyName ) override;
145 SVX_DLLPRIVATE virtual css::
uno::Sequence< css::beans::PropertyState > SAL_CALL getPropertyStates( const css::
uno::Sequence< OUString >& aPropertyName ) override;
146 SVX_DLLPRIVATE virtual
void SAL_CALL setPropertyToDefault( const OUString& PropertyName ) override;
147 SVX_DLLPRIVATE virtual css::
uno::Any SAL_CALL getPropertyDefault( const OUString& aPropertyName ) override;
150 SVX_DLLPRIVATE virtual
void SAL_CALL setAllPropertiesToDefault() override;
151 SVX_DLLPRIVATE virtual
void SAL_CALL setPropertiesToDefault( const css::
uno::Sequence< OUString >& aPropertyNames ) override;
152 SVX_DLLPRIVATE virtual css::
uno::Sequence< css::
uno::Any > SAL_CALL getPropertyDefaults( const css::
uno::Sequence< OUString >& aPropertyNames ) override;
155 SVX_DLLPRIVATE virtual
void SAL_CALL insertTextContent( const css::
uno::Reference< css::text::XTextRange >& xRange, const css::
uno::Reference< css::text::XTextContent >& xContent,
sal_Bool bAbsorb ) override;
156 SVX_DLLPRIVATE virtual
void SAL_CALL removeTextContent( const css::
uno::Reference< css::text::XTextContent >& xContent ) override;
159 SVX_DLLPRIVATE virtual
void SAL_CALL insertString( const css::
uno::Reference< css::text::XTextRange >& xRange, const OUString& aString,
sal_Bool bAbsorb ) override;
160 SVX_DLLPRIVATE virtual
void SAL_CALL insertControlCharacter( const css::
uno::Reference< css::text::XTextRange >& xRange, ::sal_Int16 nControlCharacter,
sal_Bool bAbsorb ) override;
164 SVX_DLLPRIVATE virtual
void SAL_CALL setString( const OUString& aString ) override;
167 SVX_DLLPRIVATE virtual
void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
173 using SvxUnoTextRangeBase::setPropertyValue;
174 using SvxUnoTextRangeBase::getPropertyValue;
180 void dumpAsXml(
xmlTextWriterPtr pWriter, sal_Int32 nRow, sal_Int32 nCol) const;
193 void operator =(
Cell const &) = delete;
199 css::table::CellContentType mnCellContentType;
208 tools::Rectangle maCellRect;
210 css::
uno::Reference< css::table::XTable > mxTable;
struct _xmlTextWriter * xmlTextWriterPtr
css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType, Interface1 *p1)
css::uno::Reference< css::deployment::XPackageRegistry > create(css::uno::Reference< css::deployment::XPackageRegistry > const &xRootRegistry, OUString const &context, OUString const &cachePath, css::uno::Reference< css::uno::XComponentContext > const &xComponentContext)
TextVerticalAdjust GetTextVerticalAdjust(sal_Int32 nToken)
rtl::Reference< Cell > CellRef