fix interactive growing of impress tables as you type
This commit is contained in:
parent
caf84efc3b
commit
4589096b67
55
0001-impress-tables-are-not-interactively-growing.patch
Normal file
55
0001-impress-tables-are-not-interactively-growing.patch
Normal file
@ -0,0 +1,55 @@
|
||||
From 5a958aa9d95f0c14e4980f6909550e657d87a3a9 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] 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 | 9 ++++-----
|
||||
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
|
||||
index fbd532a..856a9e5 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->IsAutoGrowHeight());
|
||||
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() )
|
||||
--
|
||||
1.9.3
|
||||
|
@ -342,6 +342,7 @@ Patch44: 0001-have-a-stab-at-improving-impossible-question.patch
|
||||
Patch45: 0001-just-use-ANSI-C-declarations.patch
|
||||
Patch46: 0001-valgrind-check-return-of-convertDateTime-before-usin.patch
|
||||
Patch47: 0001-table-layout-cache-returns-wrong-rectangle.patch
|
||||
Patch48: 0001-impress-tables-are-not-interactively-growing.patch
|
||||
|
||||
%define instdir %{_libdir}
|
||||
%define baseinstdir %{instdir}/libreoffice
|
||||
|
Loading…
Reference in New Issue
Block a user