Faulty handle position in shapes imported from MS Office

Regina Henschel rb.henschel at t-online.de
Mon Apr 8 23:06:12 UTC 2019


Hi all,

I'm looking at https://bugs.documentfoundation.org/show_bug.cgi?id=115813
"Position shifted while moving the handle of OOXML Callout shape".

Unfortunately not only the Callout shape is affected.
There are 106 shapes in MS Office, which have handles. 38 are OK with 
the current implementation and 68 have at least one handle, which reacts 
wrongly. These are only those from ooxml, not from binary format.

The calculation is in method 
EnhancedCustomShape2d::SetHandleControllerPosition in 
svx\source\customshapes\EnhancedCustomShape2d.cxx. The relevant part 
starts about #1230

The relation ship between handle position and adjustment value is in 
most cases not direct but via formulas. For to get an adjustment value 
from a handle position you need to apply the formulas backwards.

It might be possible to identify handles, which behave similar. For 
example some Star-shapes use the adjust value as factor to the radius 
with 0 in center and 1 at the edge. But other adjust values are used in 
other ways. I have not tried to find groups of similar usage yet.

What to do? In principle you can get the needed operations from the 
presets as defined in the standard. But how to organize that, so that it 
can be done step by step and perhaps can be done by several people? 
And, of course, the code should still be readable and clear.

Kind regards
Regina




More information about the LibreOffice mailing list