diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2024-07-15 14:40:24 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2024-07-15 17:11:00 +0200 |
commit | dc3e022866893d8c0950f2269c0c8d61c24ed9bf (patch) | |
tree | 329e54f0c782302eec2a0a06811829bf46fb518d /avmedia | |
parent | 272f776b322cfd017506a6b67638ae7d2b83c014 (diff) |
cool#9504 sw: don't invalidate num rules when pasting into a non-num paragraph
The bugdoc has ~300 pages of content, most of that is bullets, but
otherwise not complex, pasting a trivial string at doc end (which is not
a bulleted paragraph) takes a noticeable time:
debug:20449:20330: SwLayAction::InternalAction: start
debug:20449:20330: SwLayAction::InternalAction: end, took 268 ms
Profiling points out that we re-layout the internal document, which is
not expected: we just pasted on the first page, causing no layout change
on page 2 and later pages. Watching who turns on m_bInvalidContent on
the page frames, it can be noticed that SwReader::Read() invalidates all
numberings after pasting.
Fix the problem by not doing that in case we paste plain text and we
know the insertion point is not in a numbering: the invalidation is not
useful in this case and fixes the unexpected delay.
Other related ideas are 1) don't do the layout for all pages in one go
2) recognize that the bullets need no invalidation, unlike an actual
numbering with numbers. Neither of these are done in this commit yet.
Change-Id: Id7b2c022b31acb358f42ddd77195db70ae451109
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170499
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'avmedia')
0 files changed, 0 insertions, 0 deletions