The problem was that the right edge of the textbox was outside the parent
draw shape, which is unexpected for rectangle shapes.
Change-Id: I5154a61b07d3d8d894491e76923b3b017aa3ce8e
This method is called by the ODF export for each paragraph, so limiting
the result for TextBoxes anchored to a single paragraph helps to avoid
iterating over all the frames for each paragraph.
For a test document of 2000 mail merge records and 16 frames, the times for
css::text::MailMerge::execute() are 8m18.811s -> 7m53.575s.
Change-Id: I7a9cd7b23a3e903059ec0ae3a6a8f8309681bb2e
The intention was to have a container where it's fast to look elements
up, and list is a linked list, so it doesn't fit.
Change-Id: I3196c8dee96ecd4a6f464b74fd5141b27f1773b8
It builds a textbox -> shape map, so methods interested to pick the
shape instead of a shape's textbox can call it and act accordingly if
their textbox is in the map.
Change-Id: I0f30d64a284eb461f462ed6c0a36c88271153f04
The effect of this is that if you move around a shape (having a textbox)
with the keyboard or mouse, then the position of the textbox is now also
adjusted as you would expect it, as a user.
Change-Id: Ie079f8c7b76e9a97095e4233eded5bda514cf405
Shapes may not have a unique name, but TextFrames always have. So in
order to be able to link shapes with textboxes, provide a ChainName
property that's the name of the underlying TextFrame. This kills two
birds with one stone:
- we can have a unique name for each shape
- the names can be used for TextFrame linking, as they are valid
TextFrame names
Change-Id: Ie96f267d392d9fe5388c5eacff9b873f1639054c
Also, let the new SwTextBoxHelper::restoreLinks() restore also the
RES_CNTNT of the *old* draw formats, not only the link between the new
draw and fly formats.
This allows properly preserving the link between draw and fly formats,
when they are in the header (and so copied in and out variously).
Change-Id: I101ff06533e2ea27abea8bed171ed69c9649ebe8
E.g. the ODF import won't set an explicit size, it'll just set a
Transformation property, and a CustomShapeGeometry one, which contains
the textbox rectangle.
Change-Id: I9ac7ab5a324dc9c7c5ce3196fee8d257b7426f41
The situation is a bit more complicated here,
drawing::XCustomShapeEngine returns the text rectangle in absolute
coordinates, but that's on the drawpage. So count the relative
coordinates, and then just adjust the position we got from the original
shape.
Change-Id: Ibfbc183e5170037c8c281d61ce802a19a7acda17