diff options
author | Vasily Melenchuk <vasily.melenchuk@cib.de> | 2021-12-27 13:54:23 +0300 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-08-04 13:04:11 +0200 |
commit | d83a82d872417a0c50d38c54f95af512136f6d94 (patch) | |
tree | 7ceb5ae3dcefda4717fc52ad300e879e186b8ed2 /sfx2/source | |
parent | e4181b920d6916933f9b546a875677d0f5388e1e (diff) |
tdf#143703 sw: always assign name for fly section
Previously generated name was assigned only if not in doc
reading mode. But there is no guarantee that it will be assigned
later. Better to insert any name in SwDoc::MakeFlySection_() and
later it can be overwritten, but fly will definitely have
any unique name.
* Some test failed because GraphicImport_Impl::applyName() overwrote the
name with a different generated one.
* This breaks chaining of VML shapes, see test testTDF87348.
The code introduced in commit 091fe76b6329b4bb974987554369cbfadd8f2401
in DomainMapper_Impl::ChainTextFrames() breaks if the text frame
already has a name; it's a bit confusing which names there come from
the file and which come from the API, and it also mixes 2 different
cases of VML chaining and DrawingML chaining that look like they
should be using different data.
* This also breaks moving flys anchored at-char in flys into them in
SwXText::convertToTextFrame(), see ooxmlexport13 testFlyInFly.
This kind of worked by accident before: the fly is copied and then the
original deleted, keeping the same name (with help of
SwDoc::mbCopyIsMove); with no name it would compare the SdrObject
pointer, which is different for the new copy, now the name is the
same.
Fix this by only moving flys anchored at the edge of the selection
back inoto the body; it turns out that Word actually supports at-char
anchors in text frames, but only if it's a VML shape or Compatibility
Mode or whatever; i wasn't able to do it in a document created from
scratch.
This is a bit tricky to ignore the nodes added for floating tables as
seen in ooxmlexport10 testFloatingTablesAnchor.
* Another change is required in SwDoc::SetFlyName() because of
testTdf127732, as it would rename a frame named "Frame1" to "Frame2"
when called to rename it to "Frame1".
* Some tests failed because after MakeFlySection_() assigns a name it is
immediately unconditionally overwritten; replace that with asserts
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127556
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit 4d6243693c228703394c00164276f8326447beb9)
Change-Id: I46752a4413ba3a9e981eccd1e153b3aaf8053781
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137766
Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'sfx2/source')
0 files changed, 0 insertions, 0 deletions