diff options
author | Jan-Marek Glogowski <jan-marek.glogowski@extern.cib.de> | 2020-02-25 09:50:48 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-03-06 21:42:24 +0100 |
commit | 3269f4fa5477104fbea363937ec84dfab2f914d9 (patch) | |
tree | f7436a8baca622b66cc517bcc515ab949de34f77 | |
parent | dfed8bca32312884eb6166cbd8aba1d3397cd813 (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>
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.cxx | 3 | ||||
-rw-r--r-- | extensions/source/propctrlr/standardcontrol.hxx | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index 7d79231e1ecd..776b691e0fb1 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -934,11 +934,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 f78c225e1175..ca79424345a5 100644 --- a/extensions/source/propctrlr/standardcontrol.hxx +++ b/extensions/source/propctrlr/standardcontrol.hxx @@ -343,7 +343,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; |