20 #ifndef INCLUDED_SVX_SVDOTABLE_HXX
21 #define INCLUDED_SVX_SVDOTABLE_HXX
23 #include <com/sun/star/text/WritingMode.hpp>
24 #include <com/sun/star/container/XIndexAccess.hpp>
25 #include <com/sun/star/table/XTable.hpp>
26 #include <rtl/ref.hxx>
29 #include <boost/property_tree/ptree_fwd.hpp>
36 class ViewContactOfTableObj;
42 struct ImplTableShadowPaintInfo;
67 CellPos( sal_Int32 nCol, sal_Int32 nRow ) { mnCol = nCol; mnRow = nRow; }
106 const ::tools::Rectangle& rNewRect,
111 void CropTableModelToSelection(
const CellPos& rStart,
const CellPos& rEnd);
114 void DistributeColumns( sal_Int32 nFirstColumn, sal_Int32 nLastColumn,
const bool bOptimize,
const bool bMinimize );
115 void DistributeRows( sal_Int32 nFirstRow, sal_Int32 nLastRow,
const bool bOptimize,
const bool bMinimize );
117 css::uno::Reference< css::table::XTable > getTable()
const;
122 CellPos getLeftCell(
const CellPos& rPos,
bool bEdgeTravel )
const;
123 CellPos getRightCell(
const CellPos& rPos,
bool bEdgeTravel )
const;
125 CellPos getDownCell(
const CellPos& rPos,
bool bEdgeTravel )
const;
126 CellPos getPreviousCell(
const CellPos& rPos,
bool bEdgeTravel )
const;
127 CellPos getNextCell(
const CellPos& rPos,
bool bEdgeTravel )
const;
128 CellPos getPreviousRow(
const CellPos& rPos,
bool bEdgeTravel )
const;
129 CellPos getNextRow(
const CellPos& rPos,
bool bEdgeTravel )
const;
136 TableHitKind CheckTableHit(
const Point& rPos, sal_Int32& rnX, sal_Int32& rnY,
const sal_uInt16 aTol = 0 )
const;
146 sal_Int32 getColumnCount()
const;
147 sal_Int32 getRowCount()
const;
149 bool createTableEdgesJson(boost::property_tree::ptree & rJsonRoot);
150 void changeEdge(
bool bHorizontal,
int nEdge, sal_Int32 nOffset);
154 const SfxItemSet& GetActiveCellItemSet()
const;
156 void setTableStyle(
const css::uno::Reference< css::container::XIndexAccess >& xAutoFormatStyle );
157 const css::uno::Reference< css::container::XIndexAccess >& getTableStyle()
const;
162 virtual SdrText* getActiveText()
const override;
165 virtual SdrText* getText( sal_Int32 nIndex )
const override;
168 virtual sal_Int32 getTextCount()
const override;
171 virtual void setActiveText( sal_Int32 nIndex )
override;
174 virtual sal_Int32 CheckTextHit(
const Point& rPnt)
const override;
177 virtual bool HasText()
const override;
183 virtual bool IsReallyEdited()
const override;
191 virtual void TakeTextAnchorRect(::
tools::Rectangle& rAnchorRect)
const override;
193 virtual bool IsAutoGrowHeight()
const override;
194 virtual bool IsAutoGrowWidth()
const override;
196 virtual bool IsFontwork()
const override;
199 virtual SdrObjKind GetObjIdentifier()
const override;
200 virtual void SetChanged()
override;
202 virtual bool AdjustTextFrameWidthAndHeight(
tools::Rectangle& rR,
bool bHgt =
true,
bool bWdt =
true)
const override;
203 virtual bool AdjustTextFrameWidthAndHeight()
override;
204 virtual OUString TakeObjNameSingul()
const override;
205 virtual OUString TakeObjNamePlural()
const override;
208 virtual void RecalcSnapRect()
override;
214 virtual void AdjustToMaxRect(
const tools::Rectangle& rMaxRect,
bool bShrinkOnly =
false )
override;
216 virtual sal_uInt32 GetHdlCount()
const override;
217 virtual void AddToHdlList(
SdrHdlList& rHdlList)
const override;
220 virtual bool hasSpecialDrag()
const override;
221 virtual bool beginSpecialDrag(
SdrDragStat& rDrag)
const override;
222 virtual bool applySpecialDrag(
SdrDragStat& rDrag)
override;
225 virtual bool BegCreate(
SdrDragStat& rStat)
override;
226 virtual bool MovCreate(
SdrDragStat& rStat)
override;
228 virtual bool BckCreate(
SdrDragStat& rStat)
override;
229 virtual void BrkCreate(
SdrDragStat& rStat)
override;
233 virtual void NbcMove(
const Size& rSiz)
override;
234 virtual void NbcResize(
const Point& rRef,
const Fraction& xFact,
const Fraction& yFact)
override;
236 virtual bool BegTextEdit(
SdrOutliner& rOutl)
override;
240 virtual EEAnchorMode GetOutlinerViewAnchorMode()
const override;
242 virtual void NbcSetOutlinerParaObject(std::unique_ptr<OutlinerParaObject> pTextObject)
override;
246 virtual void NbcReformatText()
override;
248 virtual bool IsVerticalWriting()
const override;
249 virtual void SetVerticalWriting(
bool bVertical)
override;
251 css::text::WritingMode GetWritingMode()
const;
257 void SetSkipChangeLayout(
bool bSkipChangeLayout);
259 virtual void onEditOutlinerStatusEvent(
EditStatus* pEditStatus )
override;
264 void init( sal_Int32 nColumns, sal_Int32 nRows );
266 virtual std::unique_ptr<sdr::properties::BaseProperties> CreateObjectSpecificProperties()
override;
267 virtual std::unique_ptr<sdr::contact::ViewContact> CreateObjectSpecificViewContact()
override;
270 virtual void SaveGeoData(
SdrObjGeoData& rGeo)
const override;
271 virtual void RestGeoData(
const SdrObjGeoData& rGeo)
override;
273 SdrOutliner* GetCellTextEditOutliner(
const sdr::table::Cell& rCell )
const;
struct _xmlTextWriter * xmlTextWriterPtr
Abstract base class (ABC) for all UndoActions of DrawingEngine.
rtl::Reference< SdrTableObjImpl > mpImpl
All geometrical data of an arbitrary object for use in undo/redo.
bool operator==(const CellPos &r) const
rtl::Reference< Cell > CellRef
TableHitKind
SdrTableHitKind.
tools::Rectangle maLogicRect
bool operator==(const TableStyleSettings &r) const
void ExportAsRTF(SvStream &rStrm, SdrTableObj &rObj)
Hack for clipboard with calc and writer, export and import table content as rtf table.
bool IsTextEditActive() const
bool operator!=(const CellPos &r) const
CellPos(sal_Int32 nCol, sal_Int32 nRow)
#define SVXCORE_DLLPUBLIC
FILE * init(int, char **)
void ImportAsRTF(SvStream &rStream, SdrTableObj &rObj)
TableStyleSettings & operator=(const TableStyleSettings &rStyle)