Re: fdo#61135 New feature in Calc: Stepped Lines graphs - first part of code submitted
On 08/03/13 09:55, Markus Mohrhard wrote: On Wednesday 06 March 2013 17:00:56 Markus Mohrhard wrote: The import for files written by gnumeric should map the values to the corresponding ODF values and during export we only want to export them as ODF and never into the gnumeric namespace. This also means to OK. I thought that it would be nice for somebody that wrote the file with Gnumeric not to silently convert it to something that might not be read back the same in Gnumeric. That's why I added all these GNM_* values. But I can understand your POV. the problem is that an attribute can have only one value, and it's far better in the long run to write the value that is in a current ODF draft than the value that will only be understood by Gnumeric. 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. you have fallen into the same trap as i have 2 weeks ago: the gnm: prefix is part of the value, not any attribute or element name, and thus no namespace needs to be declared to support it. 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. First a general question. I found the option for selecting the ODF type. But how does that work when somebody requires, e.g., strict ODF1.2 or lower compliance. Is there a warning given when the file is written ? Do we hide the option for stepped lines then ? We warn the user that choosing anything except ODF 1.2 extended may loose data but we don't hide anything in the UI. We just drop the elements during export. in the latter Sun days there were plans to query the ODF version from the configuration in the UI and only allow inserting those content elements that are supported by the selected ODF version. i can't remember if anything was ever implemented for that, but in general it would be a good idea. (except it would not be worth the effort for 1.1 because there is just too much missing there; it was only intended for post-ODF 1.2 features). 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. some maps have an additional element to store the required version which is then checked on export but apparently this one does not (yet). for example there is a MAP_ENTRY_ODF_EXT macro in that PropertyMap.hxx... oh actually that applies to entire attributes while here we want to only handle certain values of the attribute differently... i guess it needs some special handling then, there is some flag MID_FLAG_SPECIAL_ITEM_EXPORT which causes a call to the handleSpecialItem() method, which can then mangle the attribute in arbitrary ways, so you can use it to generate appropriate fall-back values for older ODF versions. also, your changes to xmloff/source/transform/StyleOASISTContext.cxx seem a bit pointless to me: source/transform is for the OpenOffice.org XML format, which is a predecessor of ODF and a legacy format and usually does not get new features added :) well i guess nobody will complain about some different values there. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Re: fdo#61135 New feature in Calc: Stepped Lines graphs - first part of code submitted
Hey Eric, On Wednesday 06 March 2013 17:00:56 Markus Mohrhard wrote: First we need to move the new values in CurveStyle.idl to the end and remove all the GNM_* values. Moving the values to the end ensures that the old values stay unchanged which causes as little trouble for extension developers using the API as possible. OK. I wasn't aware that the last value there was not a sentinel but needed to remain the same. It is always better to leave existing values to make it easier for potential external users of the API. The import for files written by gnumeric should map the values to the corresponding ODF values and during export we only want to export them as ODF and never into the gnumeric namespace. This also means to OK. I thought that it would be nice for somebody that wrote the file with Gnumeric not to silently convert it to something that might not be read back the same in Gnumeric. That's why I added all these GNM_* values. But I can understand your POV. 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=f18a242966d3fd25ec0832c09ce7164bdae7ba2d ) 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. 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. First a general question. I found the option for selecting the ODF type. But how does that work when somebody requires, e.g., strict ODF1.2 or lower compliance. Is there a warning given when the file is written ? Do we hide the option for stepped lines then ? We warn the user that choosing anything except ODF 1.2 extended may loose data but we don't hide anything in the UI. We just drop the elements during export. 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. Additionally it would be nice if you would provide at least one of your test documents from gnumeric and one of your test documents for normal ODF as MPL/LGPL licensed test documents that we can add to our test file repository. If you are interested it would also be nice if you could add a test case for it to our new chart2 import test at chart2/qa/extras/chart2import.cxx. There is a Gnumeric file attached to the bugzilla. I hereby place it under MPL/LGPL. Once I'm further, I will also add a similar file created fully in LO. Thanks I'll add it to the test file repository at http://cgit.freedesktop.org/libreoffice/contrib/test-files/ I'll have a look at the test cases and what is done there. Basically what we do there is just import a document and check through the UNO API that the feature we are interested in is correctly imported. So in your case it just means that we need to have a test document with all the stepped line featiures that you want to test. The easiest way is to have just one chart per sheet and then use the existing code to get the chart and the data series and just test for your property. However if you have problems with it I can add the test. For the UI part of the task it might make sense to first convert the relevant dialog to the new UI format and then add the new elements into it. As indicated in the UI ML, I will use a seperate dialog. As for getting up to speed with Glade, I was thinking about converting the existing dialog for the spline option first. Then, I know better how to create a new one. Great. Thanks. But first I'll amend the existing patch with the code changes you requested above. Once those are accepted I'll tackle the UI. Regards, Markus ___ LibreOffice mailing list
Re: Re: fdo#61135 New feature in Calc: Stepped Lines graphs - first part of code submitted
Hello Markus, thanks for your review. On Wednesday 06 March 2013 17:00:56 Markus Mohrhard wrote: First we need to move the new values in CurveStyle.idl to the end and remove all the GNM_* values. Moving the values to the end ensures that the old values stay unchanged which causes as little trouble for extension developers using the API as possible. OK. I wasn't aware that the last value there was not a sentinel but needed to remain the same. The import for files written by gnumeric should map the values to the corresponding ODF values and during export we only want to export them as ODF and never into the gnumeric namespace. This also means to OK. I thought that it would be nice for somebody that wrote the file with Gnumeric not to silently convert it to something that might not be read back the same in Gnumeric. That's why I added all these GNM_* values. But I can understand your POV. 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. 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. First a general question. I found the option for selecting the ODF type. But how does that work when somebody requires, e.g., strict ODF1.2 or lower compliance. Is there a warning given when the file is written ? Do we hide the option for stepped lines then ? Secondly, can you point to an example where the above is done ? Then I can implement something similar. Additionally it would be nice if you would provide at least one of your test documents from gnumeric and one of your test documents for normal ODF as MPL/LGPL licensed test documents that we can add to our test file repository. If you are interested it would also be nice if you could add a test case for it to our new chart2 import test at chart2/qa/extras/chart2import.cxx. There is a Gnumeric file attached to the bugzilla. I hereby place it under MPL/LGPL. Once I'm further, I will also add a similar file created fully in LO. I'll have a look at the test cases and what is done there. Thanks a lot for your great work. It is highly appreciated and feel free to ask for any help you need. :-) For the UI part of the task it might make sense to first convert the relevant dialog to the new UI format and then add the new elements into it. As indicated in the UI ML, I will use a seperate dialog. As for getting up to speed with Glade, I was thinking about converting the existing dialog for the spline option first. Then, I know better how to create a new one. But first I'll amend the existing patch with the code changes you requested above. Once those are accepted I'll tackle the UI. Regards, Markus Thanks, Eric___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: fdo#61135 New feature in Calc: Stepped Lines graphs - first part of code submitted
Hey Eric, I have added my first real code for submission to LO :-) It's in gerrit: https://gerrit.libreoffice.org/2476. I'm going to review it in the next days. so here is the inital review for your change. Your patch looks already quite good but there are some small changes necessary before we can merge it. First we need to move the new values in CurveStyle.idl to the end and remove all the GNM_* values. Moving the values to the end ensures that the old values stay unchanged which causes as little trouble for extension developers using the API as possible. The import for files written by gnumeric should map the values to the corresponding ODF values and during export we only want to export them as ODF and never into the gnumeric namespace. This also means to 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. Your current export code is producing invalid xml files because you were exporting the gnumeric values without registering the namespace. However this problem should be gone once we no longer export elements 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. The code in AreaChart.cxx looks mostly good and I will have a final look at it when all the other problems are fixed. Additionally it would be nice if you would provide at least one of your test documents from gnumeric and one of your test documents for normal ODF as MPL/LGPL licensed test documents that we can add to our test file repository. If you are interested it would also be nice if you could add a test case for it to our new chart2 import test at chart2/qa/extras/chart2import.cxx. Please let me know if I should help you with any of the above tasks. I can take care of them if neccesary. Thanks a lot for your great work. It is highly appreciated and feel free to ask for any help you need. For the UI part of the task it might make sense to first convert the relevant dialog to the new UI format and then add the new elements into it. Regards, Markus ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Re: fdo#61135 New feature in Calc: Stepped Lines graphs - first part of code submitted
Anyway, I will now create a mock for the UI and discuss this on the UI list. Once this is done, what would be the best way to add the new UI functionality ? A friendly push in the right direction would save me quite some time ;-) You should design the dialogs nowadays with Glade. We are switching from our old dialog descriptions to new glade xml files. Caolan wrote a nice wiki page about widgetllayout (https://wiki.documentfoundation.org/Development/WidgetLayout). While it focuses mostly on transfering old dialogs to the new format it should give you a basic idea how to create a new one. If you need one of the custom widgets that we have somewhere in the code or other customization of an existing widget we can help you implement that. I'm with you on new Dialogs. I could convert the existing dialog (ChartTypeDialog?) to glade, but it seems a bit ambitious at the moment for my knowledge in LO. Maybe later after getting more experience with simpler dialogs. I saw Caolan's talk on FOSDEM and it seemed not too difficult for the simpler dialogs. Well i think it belongs maybe in the Smooth lines dialog with a new title for the dialog which seems reasonable easy to convert. I think Caolan's tutorial will give you all the information you need for it. If you sill have questions about it you can just ask and we will help you with the task. An inital step would be to design the dialog in glade and send it to the ML. Caolan or I can take care of the source code part if necessary. Regards, Markus ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Re: fdo#61135 New feature in Calc: Stepped Lines graphs - first part of code submitted
Hello Markus, I also want to add some debug code in what I have done, mainly to print a warning if new curve types are fed to LO. What's the best way to do that ? From https://wiki.documentfoundation.org/Development/How_to_debug#Macros_Contro lling_Debug_Code I would think to add the code in #ifdef SAL_LOG_WARN or use the SAL_WARN macro. You should use SAL_WARN and SAL_INFO for these tasks. Additionally we are using more and more assert if we really want an abort for a special condition. THere is also SAL_WARN_IF and SAL_INFO_IF for conditional debug statements. Thanks for the pointers. Looks like SAL_WARN_IF is what I want. I have amended the patch with this already. Anyway, I will now create a mock for the UI and discuss this on the UI list. Once this is done, what would be the best way to add the new UI functionality ? A friendly push in the right direction would save me quite some time ;-) You should design the dialogs nowadays with Glade. We are switching from our old dialog descriptions to new glade xml files. Caolan wrote a nice wiki page about widgetllayout (https://wiki.documentfoundation.org/Development/WidgetLayout). While it focuses mostly on transfering old dialogs to the new format it should give you a basic idea how to create a new one. If you need one of the custom widgets that we have somewhere in the code or other customization of an existing widget we can help you implement that. I'm with you on new Dialogs. I could convert the existing dialog (ChartTypeDialog?) to glade, but it seems a bit ambitious at the moment for my knowledge in LO. Maybe later after getting more experience with simpler dialogs. I saw Caolan's talk on FOSDEM and it seemed not too difficult for the simpler dialogs. Eric___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: fdo#61135 New feature in Calc: Stepped Lines graphs - first part of code submitted
Hey Eric, I have added my first real code for submission to LO :-) It's in gerrit: https://gerrit.libreoffice.org/2476. I'm going to review it in the next days. I looked on the LO website to find some pointers around in the code, but didn't really found it. My main helpers were OpenGrok and gdb. Did I miss a nice overview of where to find which functionality ? No. There is no real documentation. As you already discovered xmloff/ contains the ODF import and export code for charts and chart2 the whole implementation for the chart code. Additionally oox/ contains the OOXML import and export code for charts. Secondly, what would you recommend as a primer on the C++ functionalities used in LO code + how they are used ? I didn't do that advanced C++ coding before that I know a lot about templates and namespaces. It very much depends on your knowledge. I also want to add some debug code in what I have done, mainly to print a warning if new curve types are fed to LO. What's the best way to do that ? From https://wiki.documentfoundation.org/Development/How_to_debug#Macros_Controlling_Debug_Code I would think to add the code in #ifdef SAL_LOG_WARN or use the SAL_WARN macro. You should use SAL_WARN and SAL_INFO for these tasks. Additionally we are using more and more assert if we really want an abort for a special condition. THere is also SAL_WARN_IF and SAL_INFO_IF for conditional debug statements. Anyway, I will now create a mock for the UI and discuss this on the UI list. Once this is done, what would be the best way to add the new UI functionality ? A friendly push in the right direction would save me quite some time ;-) You should design the dialogs nowadays with Glade. We are switching from our old dialog descriptions to new glade xml files. Caolan wrote a nice wiki page about widgetllayout (https://wiki.documentfoundation.org/Development/WidgetLayout). While it focuses mostly on transfering old dialogs to the new format it should give you a basic idea how to create a new one. If you need one of the custom widgets that we have somewhere in the code or other customization of an existing widget we can help you implement that. Thanks a lot for your great work on this feature. Regards, Markus ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
fdo#61135 New feature in Calc: Stepped Lines graphs - first part of code submitted
Hello everyone, I have added my first real code for submission to LO :-) It's in gerrit: https://gerrit.libreoffice.org/2476. It took me a while to find my way around the code and also to get used to the new possibilities in C++. I looked on the LO website to find some pointers around in the code, but didn't really found it. My main helpers were OpenGrok and gdb. Did I miss a nice overview of where to find which functionality ? Secondly, what would you recommend as a primer on the C++ functionalities used in LO code + how they are used ? I didn't do that advanced C++ coding before that I know a lot about templates and namespaces. I also want to add some debug code in what I have done, mainly to print a warning if new curve types are fed to LO. What's the best way to do that ? From https://wiki.documentfoundation.org/Development/How_to_debug#Macros_Controlling_Debug_Code I would think to add the code in #ifdef SAL_LOG_WARN or use the SAL_WARN macro. Anyway, I will now create a mock for the UI and discuss this on the UI list. Once this is done, what would be the best way to add the new UI functionality ? A friendly push in the right direction would save me quite some time ;-) Thanks, Eric___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: New feature in Calc: Stepped Lines graphs
Regina Henschel wrote: Where do I find that information? In the JIRA issue you quoted - https://tools.oasis-open.org/issues/browse/OFFICE-3662 :) Cheers, -- Thorsten signature.asc Description: Digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Re: New feature in Calc: Stepped Lines graphs
On Wednesday 20 February 2013 11:09:06 Regina Henschel wrote: In Gnumeric I see an interpolation with stepped lines. Is it that, what you want to get? If yes, then I would not implement them as new chart type in LO, but use the same way as in Gnumeric and make it a new kind of interpolation. I looked it up and indeed, this shows what I want. I have taken screenshots of how it looks in Gnumeric and in my code (so far). Also, I have saved the Gnumeric file as ODF. All of this is attached to the bug report for posterity ;-) There exists already a request for ODF1.3 to specify such interpolation. If LO will implement them too, it will become more likely, that they will be specified in ODF1.3. Nice. Can I have a look at this proposal somewhere online or do you need to be an OASIS member ? Thanks a lot for the information Regina. Eric___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Re: New feature in Calc: Stepped Lines graphs
On Wednesday 20 February 2013 11:09:06 Regina Henschel wrote: The specification is not written in a way, that some people image cool new features, but they look, what existing programs do. And those things which are common are standardized. Therefore LO has ODF1.2 extended and Gnumeric with foreign elements. Regina, I looked at the xml in Gnumeric. It indicates it as follows: style:style ... style:chart-properties chart:interpolation=gnm:step-end.../ /style:style I guess the 'gnm:step-end' is a foreign element/attribute. Should I implement something similar for LO ? If yes, what to use instead of gnm:. If no, can you point me in the right direction. Thanks a lot. Eric___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: New feature in Calc: Stepped Lines graphs
On 20/02/13 22:11, Eric Seynaeve wrote: On Wednesday 20 February 2013 11:09:06 Regina Henschel wrote: The specification is not written in a way, that some people image cool new features, but they look, what existing programs do. And those things which are common are standardized. Therefore LO has ODF1.2 extended and Gnumeric with foreign elements. Regina, I looked at the xml in Gnumeric. It indicates it as follows: style:style ... style:chart-properties chart:interpolation=gnm:step-end.../ /style:style I guess the 'gnm:step-end' is a foreign element/attribute. Should I implement something similar for LO ? If yes, what to use instead of gnm:. If no, can you point me in the right direction. if what you implement has the same semantics as what Gnumeric does (and i think that's your goal) then it does make sense to use the same foreign elements. you'd need to add a namespace declaration for the gnm prefix; look at the xmlns:gnm=... attribute that must be somewhere in the file (likely on the root element). you can add namespaces in xmloff/inc/xmloff/xmlnmspe.hxx and SchXMLExport::SchXMLExport() in xmloff/source/chart/SchXMLExport.cxx. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: New feature in Calc: Stepped Lines graphs
Hi Michael, hi Eric, Michael Stahl schrieb: On 20/02/13 22:11, Eric Seynaeve wrote: On Wednesday 20 February 2013 11:09:06 Regina Henschel wrote: The specification is not written in a way, that some people image cool new features, but they look, what existing programs do. And those things which are common are standardized. Therefore LO has ODF1.2 extended and Gnumeric with foreign elements. Regina, I looked at the xml in Gnumeric. It indicates it as follows: style:style ... style:chart-properties chart:interpolation=gnm:step-end.../ /style:style I guess the 'gnm:step-end' is a foreign element/attribute. Should I implement something similar for LO ? If yes, what to use instead of gnm:. If no, can you point me in the right direction. if what you implement has the same semantics as what Gnumeric does (and i think that's your goal) then it does make sense to use the same foreign elements. you'd need to add a namespace declaration for the gnm prefix; look at the xmlns:gnm=... attribute that must be somewhere in the file (likely on the root element). you can add namespaces in xmloff/inc/xmloff/xmlnmspe.hxx and SchXMLExport::SchXMLExport() in xmloff/source/chart/SchXMLExport.cxx. I'm not sure whether the namespace it necessary for an attribute _value_. Currently the attribute chart:interpolation allows only the values none, cubic-spline and b-spline. Gnumeric does not introduce a new attribute or element, but a new value for the attribute. I'm not sure whether the way Gnumeric does it, is grammatically correct. Perhaps it is necessary to make an own attribute LOchart:interpolation, which then allows more values. Thorsten might know it, and you should ask him. Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: New feature in Calc: Stepped Lines graphs
Hi Eric, Eric Seynaeve schrieb: On Wednesday 20 February 2013 11:09:06 Regina Henschel wrote: In Gnumeric I see an interpolation with stepped lines. Is it that, what you want to get? If yes, then I would not implement them as new chart type in LO, but use the same way as in Gnumeric and make it a new kind of interpolation. I looked it up and indeed, this shows what I want. I have taken screenshots of how it looks in Gnumeric and in my code (so far). Also, I have saved the Gnumeric file as ODF. All of this is attached to the bug report for posterity ;-) There exists already a request for ODF1.3 to specify such interpolation. If LO will implement them too, it will become more likely, that they will be specified in ODF1.3. Nice. Can I have a look at this proposal somewhere online or do you need to be an OASIS member ? You can browse the OASIS issue tracker at https://tools.oasis-open.org/issues/browse/office and search the comment mailing list https://lists.oasis-open.org/archives/office-comment/. Here especially https://tools.oasis-open.org/issues/browse/OFFICE-3662 But it is not actually discussed, AFAIK. Kind regards Regina Thanks a lot for the information Regina. Eric ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: New feature in Calc: Stepped Lines graphs
Eric Seynaeve wrote: Regina, I looked at the xml in Gnumeric. It indicates it as follows: style:style ... style:chart-properties chart:interpolation=gnm:step-end.../ /style:style I guess the 'gnm:step-end' is a foreign element/attribute. Should I implement something similar for LO ? If yes, what to use instead of gnm:. If no, can you point me in the right direction. Hey Eric, first off, great stuff - looking forward to have this land! :) To your question, step-start, step-end, step-center-x, and step-center-y (without any prefix) are added as permissible values to ODF1.3 (thanks to Andreas Guelzow of Gnumeric fame), so I would simply go and use those. I would assume Gnumeric reads, or soonish will read, those. If it is little effort, of course it would be friendly to read those gnm: values too and map accordingly. HTH, -- Thorsten signature.asc Description: Digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: New feature in Calc: Stepped Lines graphs
Regina Henschel wrote: I'm not sure whether the way Gnumeric does it, is grammatically correct. Perhaps it is necessary to make an own attribute LOchart:interpolation, which then allows more values. Thorsten might know it, and you should ask him. Prefixes in attribute values are meaningless on an xml level (http://www.rpbourret.com/xml/NamespacesFAQ.htm#names_5), though of course it serves a documentation purpose. For sheer schema validity, one would indeed have to add a new, foreign-namespace attribute with whatever values one needs. But that appears really excessive, and is more due to inflexibility/lack of expressiveness on the rng level rather than anything else. At any rate, the point is moot, since the additional values got accepted into ODF1.3 already, so I would not have any problem calling such a document valid ODF1.2 extended. ;) Cheers, -- Thorsten signature.asc Description: Digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: New feature in Calc: Stepped Lines graphs
I wrote: To your question, step-start, step-end, step-center-x, and step-center-y (without any prefix) are added as permissible values to ODF1.3 (thanks to Andreas Guelzow of Gnumeric fame), so I would simply go and use those. I would assume Gnumeric reads, or soonish will read, those. If it is little effort, of course it would be friendly to read those gnm: values too and map accordingly. This is more a note to self than to you, Eric - once this is in, we should document it on https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes Also, it would be good to conditionalize exporting the new attribute value along these lines: https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes#ODF_version_choice_-_Code Cheers, -- Thorsten signature.asc Description: Digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: New feature in Calc: Stepped Lines graphs
Hi Thorsten, Thorsten Behrens schrieb: [..] At any rate, the point is moot, since the additional values got accepted into ODF1.3 already,[..] Where do I find that information? Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: New feature in Calc: Stepped Lines graphs
On 21/02/13 15:43, Regina Henschel wrote: Michael Stahl schrieb: On 20/02/13 22:11, Eric Seynaeve wrote: style:style ... style:chart-properties chart:interpolation=gnm:step-end.../ /style:style I guess the 'gnm:step-end' is a foreign element/attribute. Should I implement something similar for LO ? If yes, what to use instead of gnm:. If no, can you point me in the right direction. if what you implement has the same semantics as what Gnumeric does (and i think that's your goal) then it does make sense to use the same foreign elements. you'd need to add a namespace declaration for the gnm prefix; look at the xmlns:gnm=... attribute that must be somewhere in the file (likely on the root element). you can add namespaces in xmloff/inc/xmloff/xmlnmspe.hxx and SchXMLExport::SchXMLExport() in xmloff/source/chart/SchXMLExport.cxx. I'm not sure whether the namespace it necessary for an attribute _value_. Currently the attribute chart:interpolation allows only the values none, cubic-spline and b-spline. Gnumeric does not introduce a new attribute or element, but a new value for the attribute. oops, i should have read more carefully - i completely missed that it's a value that is prefixed :) of course since Thorsten says it's already in ODF 1.3 it's best to just use the values specified in that draft. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
New feature in Calc: Stepped Lines graphs
Hello everyone, in order to scratch my own itch, I started working on a stepped lines feature for XY graphs (and Line graphs) in Calc. See bugzilla 61135. This is my first coding in LO :-) Next steps would be to expose this functionality in the UI and check that it would be saved and read in the file format. However, before spending more time, I would like to know about the following: - can we just add a new type of graph ? Don't we have to follow the ODF 1.2 specification ? - if I add this, what about compatibility with older LO/OOo versions and other spreadsheets using ODF (Gnumeric, KOffice, ...) ? - how to handle UI changes ? Can I create a patch/proposal independently ? Thanks for the answers, Eric ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: New feature in Calc: Stepped Lines graphs
Hi Eric, Eric Seynaeve schrieb: Hello everyone, in order to scratch my own itch, I started working on a stepped lines feature for XY graphs (and Line graphs) in Calc. See bugzilla 61135 https://bugs.freedesktop.org/show_bug.cgi?id=61135. This is my first coding in LO :-) you are welcome. Next steps would be to expose this functionality in the UI and check that it would be saved and read in the file format. However, before spending more time, I would like to know about the following: - can we just add a new type of graph ? Don't we have to follow the ODF 1.2 specification ? The specification is not written in a way, that some people image cool new features, but they look, what existing programs do. And those things which are common are standardized. Therefore LO has ODF1.2 extended and Gnumeric with foreign elements. In Gnumeric I see an interpolation with stepped lines. Is it that, what you want to get? If yes, then I would not implement them as new chart type in LO, but use the same way as in Gnumeric and make it a new kind of interpolation. There exists already a request for ODF1.3 to specify such interpolation. If LO will implement them too, it will become more likely, that they will be specified in ODF1.3. - if I add this, what about compatibility with older LO/OOo versions and other spreadsheets using ODF (Gnumeric, KOffice, ...) ? - how to handle UI changes ? Can I create a patch/proposal independently ? Applications, which support ODF but do not know special elements or attributes, ignore such elements or attributes. If you will make the stepped lines an interpolation in an XY-chart, those applications would only show the points of the chart but not the interpolating lines. Kind regards Regina ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: New feature in Calc: Stepped Lines graphs
Hi Eric, Regina Henschel píše v St 20. 02. 2013 v 11:09 +0100: in order to scratch my own itch, I started working on a stepped lines feature for XY graphs (and Line graphs) in Calc. See bugzilla 61135 https://bugs.freedesktop.org/show_bug.cgi?id=61135. This is my first coding in LO :-) This is extremely cool, thanks for that! - and nice code too :-) - how to handle UI changes ? Can I create a patch/proposal independently ? Applications, which support ODF but do not know special elements or attributes, ignore such elements or attributes. If you will make the stepped lines an interpolation in an XY-chart, those applications would only show the points of the chart but not the interpolating lines. If you meant UI changes in the dialog, you can do them part of your patch, or separate, whatever you prefer. If you want to have user experience input on the changes, the best is to involve the guys at libreoffice-ux-adv...@lists.freedesktop.org, either to check what you have already done, or to work with them on the design. Please let us know when you have finalized the patch by sending a [PATCH] mail to this ML, or via gerrit. And of course, should you have any questions, just ask, or reach us at the IRC (#libreoffice-dev at irc.freenode.net). Thank you, Kendy ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Re: New feature in Calc: Stepped Lines graphs
On Wednesday 20 February 2013 14:04:12 Jan Holesovsky wrote: If you want to have user experience input on the changes, the best is to involve the guys at libreoffice-ux-adv...@lists.freedesktop.org, either to check what you have already done, or to work with them on the design. I'll do that once I have a mockup. Please let us know when you have finalized the patch by sending a [PATCH] mail to this ML, or via gerrit. And of course, should you have any questions, just ask, or reach us at the IRC (#libreoffice-dev at irc.freenode.net). Will do. Thanks for the compliment as well Jan. This makes me want to do more :-) Eric___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice