Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Jacobo,

On Tue, Oct 15, 2013 at 09:44:48AM +0200, Jacobo Aragunde Pérez <jaragunde@igalia.com> wrote:
I've been thinking on potential solutions to #70457 [1]. It's related
with rotation information lost when importing a docx that contains some
bitmap.

Writer bitmaps are only allowed to be rotated in 90º steps, 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.

I wonder if importing embedded bitmaps coming from docx as Draw objects
would be an acceptable solution for this bug (Draw objects allow to be
rotated to any arbitrary position).

Such a change should be discussed first, imho. What do you think?

The problem is that if you change the shape import in docx to always
produce drawinglayer shapes (as opposed to Writer ones), then you'll
introduce regressions, like you'll loose image cropping.

Here is a comparision:

http://wiki.openoffice.org/wiki/User:Regina/ComparisonWriterDrawPicture

An idea out of that trap is to define a set of corner cases when
drawinglayer picture import happens (e.g. start with "if special
rotation angle"); and hope that that's rare enough, e.g. if a shape has
a special rotation, then probably it doesn't have cropping as well.
That won't be perfect, either, but much easier than implementing proper
Writer picture rotation in sw core.

We do something similar for textboxes already: if it's a normal textbox,
then it's imported as a writer textframe, but if it's inside a group
shape, then it's imported as a drawinglayer rectangle (since writer
textframes can't be part of group shapes).

Hope this helps,

Miklos

Attachment: signature.asc
Description: Digital signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.