You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
2.4 KiB
60 lines
2.4 KiB
11 years ago
|
From bbcfb0a054efbe3aa106bff62938e218fea91d29 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
|
||
|
Date: Tue, 22 Apr 2014 12:05:48 +0100
|
||
|
Subject: [PATCH] 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
|
||
|
(cherry picked from commit 88c3b4bbf005299203370efecbc09dd9d9d26a72)
|
||
|
---
|
||
|
svx/source/table/svdotable.cxx | 10 +++++++++-
|
||
|
1 file changed, 9 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
|
||
|
index d59c166..45c6a30 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;
|
||
|
|
||
|
// -----------------------------------------------------------------------------
|
||
|
|
||
|
@@ -696,13 +700,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 );
|
||
|
}
|
||
|
--
|
||
|
1.9.0
|
||
|
|