summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-22 12:05:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-22 12:06:19 +0100
commit88c3b4bbf005299203370efecbc09dd9d9d26a72 (patch)
tree330990461f70f2a2a05e390198d2fad31aa893dc
parent432d735a1d4dbfd1558b95cc18edab1e677c7f71 (diff)
table not resizing when rows/columns added to it
I happened across a presentation whose table didn't resize when extra rows and columns were added to it. It worked on a higher resolution machine, but not on a 1024x768 one Change-Id: I98a7a04bee0b0175174e6376e9ebc046b9eff2dc
-rw-r--r--svx/source/table/svdotable.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 5e22fbaba37e..369b5a2cd45c 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -248,6 +248,8 @@ private:
static bool lastLayoutFitWidth;
static bool lastLayoutFitHeight;
static WritingMode lastLayoutMode;
+ static sal_Int32 lastRowCount;
+ static sal_Int32 lastColCount;
};
SdrTableObjImpl* SdrTableObjImpl::lastLayoutTable = NULL;
@@ -255,6 +257,8 @@ Rectangle SdrTableObjImpl::lastLayoutRectangle;
bool SdrTableObjImpl::lastLayoutFitWidth;
bool SdrTableObjImpl::lastLayoutFitHeight;
WritingMode SdrTableObjImpl::lastLayoutMode;
+sal_Int32 SdrTableObjImpl::lastRowCount;
+sal_Int32 SdrTableObjImpl::lastColCount;
SdrTableObjImpl::SdrTableObjImpl()
: mpTableObj( 0 )
@@ -694,13 +698,17 @@ void SdrTableObjImpl::LayoutTable( Rectangle& rArea, bool bFitWidth, bool bFitHe
WritingMode writingMode = mpTableObj->GetWritingMode();
if( lastLayoutTable != this || lastLayoutRectangle != rArea
|| lastLayoutFitWidth != bFitWidth || lastLayoutFitHeight != bFitHeight
- || lastLayoutMode != writingMode )
+ || lastLayoutMode != writingMode
+ || lastRowCount != getRowCount()
+ || lastColCount != getColumnCount() )
{
lastLayoutTable = this;
lastLayoutRectangle = rArea;
lastLayoutFitWidth = bFitWidth;
lastLayoutFitHeight = bFitHeight;
lastLayoutMode = writingMode;
+ lastRowCount = getRowCount();
+ lastColCount = getColumnCount();
TableModelNotifyGuard aGuard( mxTable.get() );
mpLayouter->LayoutTable( rArea, bFitWidth, bFitHeight );
}