diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/svdotable.cxx | 12 | ||||
-rw-r--r-- | svx/source/table/tablelayouter.hxx | 6 |
2 files changed, 15 insertions, 3 deletions
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index f7d80e433612..6d50267a1b4d 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -2415,6 +2415,18 @@ void SdrTableObj::CropTableModelToSelection(const CellPos& rStart, const CellPos mpImpl->CropTableModelToSelection(rStart, rEnd); } +sal_Int32 SdrTableObj::getHeightWithoutFitting() +{ + tools::Rectangle aRect{}; + if( mpImpl.is() && mpImpl->mpLayouter) + { + mpImpl->mpLayouter->LayoutTableHeight(aRect, /*bFit=*/false); + return aRect.GetHeight(); + } + else + return 0; +} + void SdrTableObj::DistributeColumns( sal_Int32 nFirstColumn, sal_Int32 nLastColumn, const bool bOptimize, const bool bMinimize ) { if( mpImpl.is() && mpImpl->mpLayouter ) diff --git a/svx/source/table/tablelayouter.hxx b/svx/source/table/tablelayouter.hxx index 519c1bda0a47..ef6837b2c6b0 100644 --- a/svx/source/table/tablelayouter.hxx +++ b/svx/source/table/tablelayouter.hxx @@ -123,13 +123,13 @@ public: const bool bMinimize ); void dumpAsXml(xmlTextWriterPtr pWriter) const; + void LayoutTableWidth(::tools::Rectangle& rArea, bool bFit); + void LayoutTableHeight(::tools::Rectangle& rArea, bool bFit); + private: CellRef getCell( const CellPos& rPos ) const; basegfx::B2ITuple getCellSize( const CellRef& xCell, const CellPos& rPos ) const; - void LayoutTableWidth( ::tools::Rectangle& rArea, bool bFit ); - void LayoutTableHeight( ::tools::Rectangle& rArea, bool bFit ); - bool isValidColumn( sal_Int32 nColumn ) const { return (nColumn >= 0) && (o3tl::make_unsigned(nColumn) < maColumns.size()); } bool isValidRow( sal_Int32 nRow ) const { return (nRow >= 0) && (o3tl::make_unsigned(nRow) < maRows.size()); } bool isValid( const CellPos& rPos ) const { return isValidColumn( rPos.mnCol ) && isValidRow( rPos.mnRow ); } |