fdo#61135 New feature in Calc: Stepped Lines graphs - first part of code submitted

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Mar 18 13:07:08 PDT 2013


2013/3/16 Eric Seynaeve <bugzilla.libreoffice at nosperse.com>:
> I have (finally) created a mock with the new features added. There was a
> mistake in it first which cause me to loose quite some time in a wild
> goose-chase :-( I attach it so this mail and place it under MPL/LGPLv3.
>
>
>
> On Friday 08 March 2013 09:55:53 Markus Mohrhard wrote:
>
>> >> remove all the references to the GNM_* values in the other source
>
>> >> files. For that to correctly work we need to register the gnumeric
>
>> >> namespace and map the elements in the chart namespace and the elements
>
>> >> in the gnumeric namesapce to the same UNO attributes.
>
>> >
>
>> > Could you explain this a bit more. Are we talking about the XML
>> > namespace
>
>> > or the C++ namespace ? I see some references in the code related to
>
>> > Gnumeric and a link with orcus.
>
>>
>
>> We are talking about XML namespaces. The gnumeric elements with gnm
>
>> prefix are in an gnumeric namespace. The other links you see to
>
>> gnumeric code is in calc and orcus for the gnumeric import which is
>
>> only a proof of concept right now.
>
>>
>
>> So the right way is to register the namespace. An exmaple for such a
>
>> change is
>
>>
>> (http://cgit.freedesktop.org/libreoffice/core/commit/?id=f18a242966d3fd25ec
>
>> 0832c09ce7164bdae7ba2d ) where I added a namespace for calc ODF1.2
>> extended
>
>> elements. You need to do something similar for gnumeric with the
>
>> http://www.gnumeric.org/odf-extension/1.0 URL. It makes sense to use
>
>> GNM or something like that as namespace alias in our code as this is
>
>> more or less the official gnumeric namespace prefix.
>
>
>
> I look at your code Markus and it seems doeable. However, I wonder if this
> is really needed for attribute *values* ("gnm:step-start" is a value of the
> chart:interpolation attribute). This is indeed confusing as mentioned by
> Regina (ML on feb 21st).
>
>
>
> If it's needed, I will add the namespace but I was just wondering.

As Michael pointed out values are not namespaced. So the code should
just map the gnm values to the normal ODF properties.

>
>
>
>> >> into the gnumeric namespace. Additionally we need to take care of the
>
>> >> ODF version during export and make sure we only export it into ODF1.2
>
>> >> extended. I think Thorsten was fine with exporting the elements into
>
>> >> the chart namespace but only for ODF 1.2 extended.
>
>
>
> Indeed.
>
>
>
>> > Secondly, can you point to an example where the above is done ? Then I
>> > can
>
>> > implement something similar.
>
>>
>
>> Sadly this one is a bit tricky. Normally the magic happens in how we
>
>> specify the attribute values in the map but for this one I need to
>
>> explore it a bit more.
>
>
>
> Do you have an example for me ? The new values are written also when we
> select 1.0/1.1 compatibility, so this is something that still needs some
> work.
>

So I think we need to explicitly check for the ODF version and decide
to export depending on that. I'll look into that as soon as it hits
master. I found some similar issues recently and have to look into
them so it should be easy to solve that the same way.

>
>
> Next item is the UI.
>

Great. I'll push the core changes as soon as they are ready. Thanks
for your work.

Regards,
Markus


More information about the LibreOffice mailing list