Issue 72758 - Chart components cannot be edited correctly from code unless the chart is in edit mode
Summary: Chart components cannot be edited correctly from code unless the chart is in ...
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All Windows Server 2003
: P3 Trivial
Target Milestone: ---
Assignee: katahlyn
QA Contact: issues@api
URL:
Keywords:
: 68836 (view as issue list)
Depends on:
Blocks:
 
Reported: 2006-12-19 14:04 UTC by katahlyn
Modified: 2017-05-20 09:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Project to demonstrate the issue (217.64 KB, application/x-compressed)
2006-12-20 09:11 UTC, katahlyn
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description katahlyn 2006-12-19 14:04:10 UTC
I'm working on Windows 2003 with .Net Framework 2.0 (code written in C#, though 
I don't think that matters).
I open the Calc component from code, insert a chart (and resize it to maximum 
landscape dimension - at this point the title gets resized too to a 42 size), 
set the String property of the Title (also from code), then try to set the 
CharHeight property of the title and it there is no visual change. If I get the 
value of the property it's the one I set. At this point my code enters a 
breakpoint, so I set the chart to edit mode (manually, not from code), and 
resume the debugging. From code: I set the chart property HasSubtitle to true, 
subtitle property String, and subtitle property CharHeight to 13, break again 
and surprise, surprise, the font size is correctly set.
Another frustrating issue that I noticed is that getting the posions of chart 
components, when not in edit mode, leads to wrong values.
Comment 1 jsc 2006-12-19 14:55:35 UTC
This is no prio 1 issue and i adapt the target to prio 3.

Can you please provide a short example program or macro to reproduce this error. 
Comment 2 katahlyn 2006-12-20 09:11:14 UTC
Created attachment 41588 [details]
Project to demonstrate the issue
Comment 3 katahlyn 2006-12-20 09:23:54 UTC
I have attached a demo project that creates a chart, sets the title to some 
text and then tries to resize the font of the title.
The project was created with VS 2005, it probably is compilable on VS 2003 
with .Net Framework 1.1, and I don't know if the issue can be reproduced on 
that framework. So please use .Net Framework 2.0 in your test. The cli dlls 
(that are referenced in the project) are from version 2.0.4 (2.0.3 had the same 
problem).
You can run the program once to see that it doesn't set the font size to 14. 
Then set a break point on the line 'titlePropSet.setPropertyValue("CharHeight", 
new uno.Any(14));', and on break, go to the Calc instance, set the chart to 
Edit mode, and then resume debugging, to see that this way the font size is set 
to 14. 
Comment 4 jsc 2006-12-21 11:05:24 UTC
jsc -> bm: i can reproduce this with Java as well, can you please verify this. 
Comment 5 bjoern.milcke 2007-01-12 16:40:36 UTC
First idea: the change of the property does not lead to a modification so that
the replacement image of the chart is not replaced with the title's new font size.

This should be fixed in the new chart. Have to check, though.
Comment 6 bjoern.milcke 2007-07-16 16:47:23 UTC
->JSC: Could you please check if the issue is fixed. I don't know what to do
with the files in the attached zip ;-) As you wrote you could reproduce this,
maybe you can now verify that it is fixed with the chart-reimplementation.
Comment 7 jsc 2007-07-24 09:07:23 UTC
jsc -bm: as discussed back to you
Comment 8 bjoern.milcke 2007-07-24 12:31:56 UTC
Fixed with the new chart.

Verified in master SRC680.m219 with an SDK example
(DevelopersGuide/Charts/ChartInDraw), added code for setting the CharHeight, is
seen immediately and shown correctly when activating the chart. Important for
this issue: commented out the lockControllers() and unlockControllers() calls,
as those guarantee an update anyway.
Comment 9 bjoern.milcke 2007-07-24 12:38:59 UTC
->katahlyn: Please verify if your problem is solved. You need OOo 2.3, which is
not released yet. You can either wait for the release, or download a developer
snapshot version SRC680.m213 or greater (at the moment m222 should be
available). You can get a developer snapshot here:
http://download.openoffice.org/680/index.html
Comment 10 bjoern.milcke 2007-08-02 16:34:34 UTC
*** Issue 68836 has been marked as a duplicate of this issue. ***