Changing the object created by imported docx
rb.henschel at t-online.de
Tue Oct 15 16:03:04 CEST 2013
Noel Grandin schrieb:
> On 2013-10-15 10:11, Miklos Vajna wrote:
>> Writer bitmaps are only allowed to be rotated in 90º steps
But that is a faked rotation. The picture is (silently!) changed from
linked to embedded. The rotation is not done by using a transformation
but by generating a new picture.
, but in Word
>> they can be rotated to any angle. When importing a document containing a
>> 45º bitmap the rotation is lost, and it keeps lost when the document is
>> saved back.
The problem is not the rotation of the image (more exactly of the
internal draw:frame element) itself. You can rotate Writer-kind images
already be applying a transformation via macro. But the missing part is
to make the surrounding text consider the rotated image.
And in addition, there are bugs:
(1) The area of the bounding box, which is not covered by content is
drawn wrongly. You see this bug already, when using negative crop values.
(2) Cropping does not work sufficient on rotated images.
> Perhaps we should extend the Writer code and the OO document spec to
> cope with arbitrary rotations?
That would be the wrong way. We would keep different kind of images. The
better way is, to enhance the Draw-kind images to have all features of
the Writer-kind images and then drop the Writer-kind images.
> Will take a little longer, what with needing to get the spec change
> ratified, but it seems like it might be a safer change, long-term, IMO.
There is no need for a change in spec. The element draw:frame, which is
used in Draw and Writer as well, has already an attribute draw:transform.
More information about the LibreOffice