diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-04-09 16:40:01 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> | 2022-05-23 10:54:01 +0200 |
commit | 44d80c54581b818a7405e98a591ba3b0632747ee (patch) | |
tree | 7745214e642ea2a4885304065b06e51a646dd321 /vcl | |
parent | 9b1d7b235753c85151cc97503764bc99a8903618 (diff) |
sw style copy: fix crash when handling a conditional paragraphy style
- "Text body" is normally a conditional style for a full-blown, default
SwDoc
- SwTransferable::GetData() creates a temporary, stripped down SwDoc,
which has a "Text body" style, but it's not conditional
- SwDoc::CopyFormatArr() assumes that in case the target already has a
style with a given name, then either both the source and destination
styles are conditional, or neither
- in practice this only causes a crash if the style is customized, as we
skip default styles, probably that's why this was not noticed so far
The Online case invokes this as part of
lok::Document::getSelectionType(), so it was enough to set the paragraph
style to Text body and then select some of that text (with a suitable
document) to hit this.
Based on a patch from Michael Meeks, thanks for that.
(cherry picked from commit ce98bef935dccd79735615a9299b2aa7a1ab0b94)
Conflicts:
sw/qa/extras/tiledrendering/tiledrendering.cxx
Change-Id: Ic3c27ec582ae1745469042856254313cbc996ee0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113970
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'vcl')
0 files changed, 0 insertions, 0 deletions