Ask Your Question
0

Font Size in ChartTitle with UNO

asked 2018-05-11 04:39:27 +0200

S13g3lb4um gravatar image

How i can set a Font Size in a ChartTitle with UNO??

i have this:

aTitleProp = query_interface(XPropertySet, chartDoc.getTitle())
aTitleProp.setPropertyValue("String", "a titile")
aTitleProp.setPropertyValue("CharHeight", 16.0)

but this dont work...

i save my file:

xStorable = UnoRuntime.queryInterface(XStorable, xComp)
xStorable.storeToURL(url, None)

but de font size is diferent .

edit retag flag offensive close merge delete

Comments

Where is the chart located? Writer, Calc, Draw,...? Is it an ordinary chart or something special like presentation chart or pivot table chart? It might be, that you need to call "update".

Regina gravatar imageRegina ( 2018-05-11 20:54:46 +0200 )edit

On impress, the types of graph are pie and bar

S13g3lb4um gravatar imageS13g3lb4um ( 2018-05-15 19:03:59 +0200 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2018-05-15 23:57:40 +0200

Regina gravatar image

I cannot reproduce your problem in Basic. I have attached a file with a Basic macro MacroToExamineChartInside.odp. Perhaps you find the problem, if you compare the steps in Basic with your macro.

Do you really have a title? The title has to be actually inserted into the draw page. Only afterwards you can change its properties. Only size and position can be set on the not inserted object.

edit flag offensive delete link more

Comments

in the next link you can found my code, this is jython becauses pyuno dont wok for me

Code

in time of execution the title change of size , but when i sae the document and after i open again, the title size is diferent

S13g3lb4um gravatar imageS13g3lb4um ( 2018-06-15 22:37:06 +0200 )edit
0

answered 2018-06-27 14:43:52 +0200

From your code (lines 408-415), it appears that the condition not data['Agrupacion'] must be met to set the title size. Failure to meet this condition would apparently keep the size from being set. Can you confirm that this condition is met after opening the document again?

edit flag offensive delete link more

Comments

Yes, this condition work fine...

in time of execution the size of title change to value that i want ... but in the reopen doc the title change the size to default

S13g3lb4um gravatar imageS13g3lb4um ( 2018-06-29 11:10:18 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-05-11 04:39:27 +0200

Seen: 54 times

Last updated: Jun 27