summaryrefslogtreecommitdiff
path: root/xmloff/source/draw/ximpcustomshape.cxx
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2022-02-23 11:18:59 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2022-02-24 11:36:56 +0100
commitcf2449aac0141711a7610d67f7c50cd108e12443 (patch)
tree680d11518c093a4e0730ad3f3e013cf8a67b4c91 /xmloff/source/draw/ximpcustomshape.cxx
parent76e11015a877da0eee21bb97b84a0f17bce41760 (diff)
tdf#72776 Allow text removal in the shapes
Previous fix had crafted condition for fixing one specific case but it was braking other cases. (svx/source/unodraw/unoshtxt.cxx) For example it was not possible to remove text inside textbox and save that -> it was not saved in LOK case. Problem is that we had not saved text inside shape and due to calling GetBackgroundTextForwarder() we did reset to empty content. In this patch we force UpdateData() call by releasing lock just before we try to do some final text cursor operations what applies changes in the content and prevents us from losing it. Call which was invoking GetBackgroundTextForwarder() was: file: xmloff/source/draw/ximpshap.cxx method: SdXMLShapeContext::endFastElement line: mxCursor->gotoEnd( false ); After that I found that we had bug which breaks test: sd/qa/unit/import-tests.cxx odp/shapes-test.odp It occurs when using this patch or when not using my code but removing locking functionality for SvxTextEditSourceImpl. NbcSetOutlinerParaObjectForText triggers shape resizing even when no text is present inside. Summary: 1. revert hack from https://git.libreoffice.org/core/+/71b66b0039819f38c935b4eb5d5951ceaf6e8468%5E%21 2. trigger text update by releasing lock for a moment to keep correct state 3. fix bug with resizing empty shape Change-Id: Idf1fc6caf19dfb932ce7caa21034f76fa04ce5f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130474 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'xmloff/source/draw/ximpcustomshape.cxx')
0 files changed, 0 insertions, 0 deletions