Hi Jan!
This is really cool feature you've made!
Tell me please, have you used some of my macros (I've posted here a long ago) or you've made it by yourself?
I propose to implement the same feature for charts. Look, when we isert the new chart (Insert Chart), it is created with some default style settings. I don't know where to change this "default" style in LibreOffice. But I could change style of an existing chart (font, fontsize, colors, transperancy etc) and then apply these settings to all charts in the document.
Also we may create a simple dialog for managing styles for Math nad Chart objects. It is missing in LO/OOO. We may create several themes for Chart (Dark theme, Light theme, Educational theme etc.). And we may set which theme should be applied as Default. Wha do you think?
As an example I post here two nice-looking charts made by me :)
Anonymous
These examples are unfinished, don't post them anywhere please
Update. I've found "Formula font" in Settings dialog. This is the similar thing to what I propose for Math object. I propose to improve it. I'd like to create new dialog (or dialogs) for it. And let's name them "Styles". What do you think?
Last edit: zeon_account_will_be_deleted 2018-08-09
Hi Zeon,
I coded this feature in C++ but I think you gave me the idea with those macros.
Yes, we can extend the dialog for a styles menu.
Implementing styles and templates management for charts is not really iMath responsibility. That should be implemented by the Office developers. See this
https://bz.apache.org/ooo/show_bug.cgi?id=36672
But if it is easy to make the feature "apply formatting to all charts in document" then I will do it. For formulas it was easy, just a loop over all properties of the formula.
Hi Zeon,
can you make a list of all the chart properties you would like to copy to other charts? There are so many properties. It doesn't make sense to copy all properties. For example I don't think you want to copy the axis limits (minium and maximum axis value).
HI Jan!
Do you know which OOO API entries are responsible to get access to Chart properties? I've been searching here and here. I also use Xray extension to examine objects. Unfortunately I didn't find anything like Chart.Title.FontName or Chart.Legend.FontSize.
In short I'd like to have an option to change the font and size of all text objects inside charts. The same way as it's possible for all Math objects now. Also it would be nice to have several color schemes for charts. If you know where to search, tell me please. Maybe there are some other useful stuff there.
Last edit: zeon_account_will_be_deleted 2018-09-06
Hi zeon,
for the chart title, the text properties are hidden here:
https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1chart2_1_1ChartDocument.html
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1chart2_1_1XTitled.html
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1chart2_1_1XTitled.html#a317bb92c5199a14e984d286d67179cf5
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1chart2_1_1XTitle.html
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1chart2_1_1XTitle.html#a47a71df10ff78e6b5fb4361bbf46aeea
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1chart2_1_1XFormattedString.html
https://api.libreoffice.org/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1chart2_1_1XFormattedString2.html
https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1style_1_1CharacterProperties.html
Happy hunting for how to access the other text stuff in a chart ...
Hi Jan!
Thank you for help. But I don't know what to do with the XInterface in LO.
Anyway I have almost found all of them. You can see it in my macros. But I still have some issues.
Hi zeon,
I implemented the "apply properties" like for your macros.
Do you only want to copy the "CharFontName" property or any other of the properties in the list?
https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1style_1_1CharacterProperties.html#a72570751efb344dd58918fd8184ae205
That is not a lot of work now to copy other properties as well.
Can we close this ticket?
Hi, Jan!
I tested "Apply properties to all" with LO 6 and iMath 2.2.8. It works with math formulas, but doesn't work with charts at all. At least I can't see any difference. What properties of the source chart object can be applied to all the other?
I don't know if it is some kind of incompatibility or anything else. But in my opinion this feature needs to be fixed or removed from right-click menu.
As you can see, I haven’t been very helpful lately. So it's up to you, I think.
Hi zeon,
currently it should copy only the CharFontName property of Title, Subtitle, Legend, Axis and Series.