summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2020-02-25 09:50:48 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2020-03-11 00:57:06 +0100
commit44d17472c426d8fa98ab3d965c7d26b07617fed2 (patch)
tree6f645001c271b6a485b75043ac66fbe2527d467b
parent8ba958c97b72738c9aceb47354ecff7d493e2d1c (diff)
tdf#131000 fix stuck combo box property editor
If you create a combo box control with a lot of entries, like a large cell range in Calc, LO will take a long time to render that cell content into the small, line-height MultiLineEdit (MLE). This doesn't happen for master, because it contains commit 1efeb17837c22499f00299c033ae59ba3910f7d7 ("weld Property Browser"), which changed the whole dialog and is much too large for a backport. A debugger shows LO is stuck in TextEngine:: CreateLines, which is part of the MLE resize call stack. Checking the master patch, it also replaces the MLE with a mere Edit. And since editing now always happens in the popup, no functionality is lost. So this patch just does just that MLE => Edit replacement for old releases. This results in a much faster visible / usable property editor. For the attached test document with 4000 entries, resize time goes down to 5s instead of minutes. Fun fact: since you can't actually edit that entry in the example bug document, because its content depends on Cell data, all the "work" is basically mood. Change-Id: I7583e0ed1a70765c9f3bd7ff730e920a833bf30b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89417 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 3269f4fa5477104fbea363937ec84dfab2f914d9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90219
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx3
-rw-r--r--extensions/source/propctrlr/standardcontrol.hxx2
2 files changed, 2 insertions, 3 deletions
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 4bd7c2055d47..cf92e33f7ef7 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -930,11 +930,10 @@ namespace pcr
{
SetCompoundControl( true );
- m_pImplEdit = VclPtr<MultiLineEdit>::Create( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) );
+ m_pImplEdit = VclPtr<Edit>::Create( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) );
SetSubEdit( m_pImplEdit );
m_pImplEdit->Show();
- if ( _nStyle & WB_DROPDOWN )
{
m_pDropdownButton = VclPtr<PushButton>::Create( this, WB_NOLIGHTBORDER | WB_RECTSTYLE | WB_NOTABSTOP);
m_pDropdownButton->SetSymbol(SymbolType::SPIN_DOWN);
diff --git a/extensions/source/propctrlr/standardcontrol.hxx b/extensions/source/propctrlr/standardcontrol.hxx
index d9ec0552e3ed..dc51d8953f39 100644
--- a/extensions/source/propctrlr/standardcontrol.hxx
+++ b/extensions/source/propctrlr/standardcontrol.hxx
@@ -344,7 +344,7 @@ namespace pcr
class DropDownEditControl final : public Edit
{
VclPtr<OMultilineFloatingEdit> m_pFloatingEdit;
- VclPtr<MultiLineEdit> m_pImplEdit;
+ VclPtr<Edit> m_pImplEdit;
VclPtr<PushButton> m_pDropdownButton;
MultiLineOperationMode m_nOperationMode;
bool m_bDropdown : 1;