diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-05-28 11:55:02 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-05-28 13:58:27 +0200 |
commit | 7b9b57b41936eea673eb678407ed817856ba0912 (patch) | |
tree | 8649a9ee6184eaf8b3fbaa659c03736e5f4ed75d /svx/source/table/tablelayouter.cxx | |
parent | 32f60d78b15b5f2c677e8687720665f6814fef62 (diff) |
Pass also const CellRef& to save a lot of getCellByPosition() calls.
Change-Id: I86c89a05d263cada38ff54eaccf9ba39458db52e
Diffstat (limited to 'svx/source/table/tablelayouter.cxx')
-rw-r--r-- | svx/source/table/tablelayouter.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx index 687fa2738a91..7f4651d31f10 100644 --- a/svx/source/table/tablelayouter.cxx +++ b/svx/source/table/tablelayouter.cxx @@ -72,14 +72,13 @@ TableLayouter::~TableLayouter() -basegfx::B2ITuple TableLayouter::getCellSize( const CellPos& rPos ) const +basegfx::B2ITuple TableLayouter::getCellSize( const CellRef& xCell, const CellPos& rPos ) const { sal_Int32 width = 0; sal_Int32 height = 0; try { - CellRef xCell( getCell( rPos ) ); if( xCell.is() && !xCell->isMerged() ) { CellPos aPos( rPos ); @@ -117,14 +116,13 @@ basegfx::B2ITuple TableLayouter::getCellSize( const CellPos& rPos ) const -bool TableLayouter::getCellArea( const CellPos& rPos, basegfx::B2IRectangle& rArea ) const +bool TableLayouter::getCellArea( const CellRef& xCell, const CellPos& rPos, basegfx::B2IRectangle& rArea ) const { try { - CellRef xCell( getCell( rPos ) ); if( xCell.is() && !xCell->isMerged() && isValid(rPos) ) { - const basegfx::B2ITuple aCellSize( getCellSize( rPos ) ); + const basegfx::B2ITuple aCellSize( getCellSize( xCell, rPos ) ); const bool bRTL = (mxTable->getSdrTableObj()->GetWritingMode() == WritingMode_RL_TB); if( (rPos.mnCol < ((sal_Int32)maColumns.size()) && (rPos.mnRow < ((sal_Int32)maRows.size()) ) ) ) @@ -862,7 +860,7 @@ void TableLayouter::updateCells( Rectangle& rRectangle ) if( xCell.is() ) { basegfx::B2IRectangle aCellArea; - getCellArea( aPos, aCellArea ); + getCellArea( xCell, aPos, aCellArea ); Rectangle aCellRect; aCellRect.Left() = aCellArea.getMinX(); |