Ask Your Question
0

How to set Conditional Formatting -> Data Bar from a macro? [closed]

asked 2013-05-02 10:31:52 +0200

kribel gravatar image

Hello,

recently I found the feature Data Bar under Format -> Conditional Formatting -> Data Bar... and I find it very useful. However, I would like to set this formatting from a macro. Unfortunately I was unable to find any helpful information regarding this topic.

Does anybody knows how to set Conditional Formatting -> Data Bar... from a macro?

Many thanks in advance! Konstantin

PS: I already discussed this topic here. Unfortunately I did not find a satisfying solution.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-31 02:15:24.529842

1 Answer

Sort by » oldest newest most voted
1

answered 2013-05-02 11:51:33 +0200

At the moment there is no API for the new conditional formats as they are in stabilization phase and may require one more refactoring. At least in LibO 4.2 I will provide a public API for that feature.

edit flag offensive delete link more

Comments

Is the related calcext:conditional-formats element simply a temporary ODF 1.2 Extended feature that will be otherwise encoded differently (elsewhere in the schema) in time i.e., in ODF 1.3?

oweng gravatar imageoweng ( 2013-05-02 12:20:10 +0200 )edit

Hello moggi, When can I expect LibO 4.2? Is there a way to get a preliminary API?

Many thanks, Konstantin

kribel gravatar imagekribel ( 2013-05-02 16:26:40 +0200 )edit
1

Yes calcext:conditional-formats and all sub elements are ODF 1.2 extended elements that will change with hopefully get a proper place in the spec with ODF 1.3. Until now we have to live with this solution.

moggi gravatar imagemoggi ( 2013-05-02 21:44:07 +0200 )edit

4.2 will be released in about 8 or 9 months. We are close to the 4.1 feature freeze and my list for items till the feature freeze is actually too long to work on conditional formats in the remaining time. I'm still hoping that there are some responses at the ODF change request before I start working on a stable API as I have to be much more careful with major design changes after providing a public API.

moggi gravatar imagemoggi ( 2013-05-02 21:46:43 +0200 )edit

Hi moggi, I am really desperate on having a solution for this issue. But I also understand that the API is not in the release plan for 4.1. Unfortunately I cannot wait 9 Months until the release of 4.2 and need to find a solution now. I see two options here: to develop some dirty workaround to set the data bar formatting directly in the content.xml or to move completely to MS Office 2010. I would like to avoid the latter option. Would you be able to guide me in the development of the workaround?

kribel gravatar imagekribel ( 2013-05-02 22:03:21 +0200 )edit

The best documentation for this is the source code at http://opengrok.libreoffice.org/xref/core/sc/source/filter/xml/xmlexprt.cxx#3897 Except for that just have a quick look at generated output. The content is really quite straight forward as I tried to keep it simple.

moggi gravatar imagemoggi ( 2013-05-02 22:35:32 +0200 )edit

Hi moggi,

I just installed LibreOffice 4.2.0.4. Is the official API for DataBars already there? If yes, do you have an example how to use it?

Cheers, Konstantin

kribel gravatar imagekribel ( 2014-02-19 06:39:11 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2013-05-02 10:31:52 +0200

Seen: 1,343 times

Last updated: May 02 '13