Blob Blame History Raw
From 15b6a83447d55c4b429757d20377763d59f37832 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 13 Nov 2014 14:31:09 +0000
Subject: [PATCH 2/2] impress tables are not interactively growing

the optimization here stops tables growing as their text
contents change in editing mode

So, just recalculate if the table could grow and its
being interactively edited, which leaves the original
(dubious ?) load-time optimization in place

Change-Id: I894acf47d34ec8b68aaf9076b5a0cb7e29c38a17
(cherry picked from commit 22ef69b25fa60f4543dc72cb7a8d2f88b789ce43)
---
 svx/source/table/svdotable.cxx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index e3a2a47..3120333 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -699,8 +699,11 @@ void SdrTableObjImpl::LayoutTable( Rectangle& rArea, bool bFitWidth, bool bFitHe
     {
         // Optimization: SdrTableObj::SetChanged() can call this very often, repeatedly
         // with the same settings, noticeably increasing load time. Skip if already done.
+        bool bInteractiveMightGrowBecauseTextChanged =
+            mpTableObj->IsRealyEdited() && (mpTableObj->IsAutoGrowHeight() || mpTableObj->IsAutoGrowWidth());
         WritingMode writingMode = mpTableObj->GetWritingMode();
-        if( lastLayoutTable != this || lastLayoutInputRectangle != rArea
+        if( bInteractiveMightGrowBecauseTextChanged
+            || lastLayoutTable != this || lastLayoutInputRectangle != rArea
             || lastLayoutFitWidth != bFitWidth || lastLayoutFitHeight != bFitHeight
             || lastLayoutMode != writingMode
             || lastRowCount != getRowCount()
-- 
1.9.3