summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/table/cell.cxx14
-rw-r--r--svx/source/table/cell.hxx1
-rw-r--r--svx/source/table/tablelayouter.cxx8
3 files changed, 9 insertions, 14 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 7e04db74f313..d4f199bf07e6 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -358,7 +358,6 @@ Cell::Cell( SdrTableObj& rTableObj, OutlinerParaObject* pOutlinerParaObject ) th
, mbMerged( sal_False )
, mnRowSpan( 1 )
, mnColSpan( 1 )
-, mnCachedMinHeight( -1 )
, mxTable( rTableObj.getTable() )
{
if( rTableObj.GetModel() )
@@ -525,7 +524,6 @@ void Cell::setMerged()
void Cell::notifyModified()
{
- mnCachedMinHeight = -1;
if( mxTable.is() )
mxTable->setModified( sal_True );
}
@@ -682,10 +680,8 @@ sal_Int32 Cell::getMinimumHeight()
if( !mpProperties )
return 0;
- if( mnCachedMinHeight != -1 )
- return mnCachedMinHeight;
-
SdrTableObj& rTableObj = dynamic_cast< SdrTableObj& >( GetObject() );
+ sal_Int32 nMinimumHeight = 0;
Rectangle aTextRect;
TakeTextAnchorRect( aTextRect );
@@ -696,7 +692,7 @@ sal_Int32 Cell::getMinimumHeight()
if(pEditOutliner)
{
pEditOutliner->SetMaxAutoPaperSize(aSize);
- mnCachedMinHeight = pEditOutliner->GetTextHeight()+1;
+ nMinimumHeight = pEditOutliner->GetTextHeight()+1;
}
else /*if ( hasText() )*/
{
@@ -709,12 +705,12 @@ sal_Int32 Cell::getMinimumHeight()
{
rOutliner.SetText(*GetOutlinerParaObject());
}
- mnCachedMinHeight=rOutliner.GetTextHeight()+1;
+ nMinimumHeight=rOutliner.GetTextHeight()+1;
rOutliner.Clear();
}
- mnCachedMinHeight += GetTextUpperDistance() + GetTextLowerDistance();
- return mnCachedMinHeight;
+ nMinimumHeight += GetTextUpperDistance() + GetTextLowerDistance();
+ return nMinimumHeight;
}
// -----------------------------------------------------------------------------
diff --git a/svx/source/table/cell.hxx b/svx/source/table/cell.hxx
index ba2c6f6ad862..1b26b1cf9a80 100644
--- a/svx/source/table/cell.hxx
+++ b/svx/source/table/cell.hxx
@@ -222,7 +222,6 @@ private:
::sal_Bool mbMerged;
::sal_Int32 mnRowSpan;
::sal_Int32 mnColSpan;
- ::sal_Int32 mnCachedMinHeight;
Rectangle maCellRect;
diff --git a/svx/source/table/tablelayouter.cxx b/svx/source/table/tablelayouter.cxx
index 55ed2d2247a8..2b979968a215 100644
--- a/svx/source/table/tablelayouter.cxx
+++ b/svx/source/table/tablelayouter.cxx
@@ -556,7 +556,7 @@ void TableLayouter::LayoutTableWidth( Rectangle& rArea, bool bFit )
}
else
{
- nMinWidth = std::max( nMinWidth, xCell->getMinimumSize().Width );
+ nMinWidth = std::max( nMinWidth, xCell->getMinimumWidth() );
}
}
}
@@ -622,7 +622,7 @@ void TableLayouter::LayoutTableWidth( Rectangle& rArea, bool bFit )
while( iter != aMergedCells[nCol].end() )
{
CellRef xCell( (*iter++) );
- sal_Int32 nMinWidth = xCell->getMinimumSize().Width;
+ sal_Int32 nMinWidth = xCell->getMinimumWidth();
for( sal_Int32 nMCol = nCol - xCell->getColumnSpan() + 1; (nMCol > 0) && (nMCol < nCol); ++nMCol )
nMinWidth -= maColumns[nMCol].mnSize;
@@ -706,7 +706,7 @@ void TableLayouter::LayoutTableHeight( Rectangle& rArea, bool bFit )
}
else
{
- nMinHeight = std::max( nMinHeight, xCell->getMinimumSize().Height );
+ nMinHeight = std::max( nMinHeight, xCell->getMinimumHeight() );
}
}
}
@@ -773,7 +773,7 @@ void TableLayouter::LayoutTableHeight( Rectangle& rArea, bool bFit )
while( iter != aMergedCells[nRow].end() )
{
CellRef xCell( (*iter++) );
- sal_Int32 nMinHeight = xCell->getMinimumSize().Height;
+ sal_Int32 nMinHeight = xCell->getMinimumHeight();
for( sal_Int32 nMRow = nRow - xCell->getRowSpan() + 1; (nMRow > 0) && (nMRow < nRow); ++nMRow )
nMinHeight -= maRows[nMRow].mnSize;