summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-13 14:31:09 +0000
committerStephan Bergmann <sbergman@redhat.com>2014-11-18 11:39:37 +0100
commit9811ffe8b53307cb5fa9a365c4f7f9ba25a0a3a5 (patch)
tree06cfc5540fb732f52e4436640ac8dbf258761a5f
parent4ab54cf64ff194fa2f53f2f0d2512a4fc267674c (diff)
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) Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--svx/source/table/svdotable.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index fbd532a16cb0..0345677bca6d 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -689,16 +689,17 @@ sal_Int32 SdrTableObjImpl::getRowCount() const
return mxTable.is() ? mxTable->getRowCount() : 0;
}
-
-
void SdrTableObjImpl::LayoutTable( Rectangle& rArea, bool bFitWidth, bool bFitHeight )
{
if( mpLayouter && mpTableObj->GetModel() )
{
// 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()
@@ -722,8 +723,6 @@ void SdrTableObjImpl::LayoutTable( Rectangle& rArea, bool bFitWidth, bool bFitHe
}
}
-
-
void SdrTableObjImpl::UpdateCells( Rectangle& rArea )
{
if( mpLayouter && mxTable.is() )