Issue 93953 - Source Format for secondary axes
Summary: Source Format for secondary axes
Status: CLOSED FIXED
Alias: None
Product: General
Classification: Code
Component: chart (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: kla
QA Contact: issues@graphics
URL:
Keywords:
Depends on:
Blocks: 72764
  Show dependency tree
 
Reported: 2008-09-16 12:21 UTC by kla
Modified: 2013-02-24 21:20 UTC (History)
2 users (show)

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


Attachments
patch_090223 (1.56 KB, patch)
2009-02-23 01:42 UTC, weiz
no flags Details | Diff
examples for secondary axis without data attached to it (26.98 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-02-24 11:02 UTC, IngridvdM
no flags Details
patch_090306 (2.63 KB, patch)
2009-03-06 01:43 UTC, weiz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description kla 2008-09-16 12:21:49 UTC
If the source for a chart formatted (e.g. as currency) the sec Axes should
adopted the source format.
Add info: the Numbers Dialog of the sec. Axes show the not correct Option
"Source format"
Comment 1 IngridvdM 2008-10-07 10:15:43 UTC
When at a secondary axis no series is attached it should act as copy of the
primary axis, when the scale options are set to automatic. This was implemented
with issue 80518.
What now is missing is that also the source format is copied from the primary to
the secondary axis for viewing purposes.

@weiz, please have a look.
Comment 2 weiz 2009-02-23 01:42:01 UTC
Created attachment 60364 [details]
patch_090223
Comment 3 weiz 2009-02-23 01:42:28 UTC
@iha: the patch is submitted, please let me know your suggestions. Thank you!
Comment 4 IngridvdM 2009-02-24 10:59:34 UTC
@weiz, thanks for the patch. As discussed in our IRC meeting already there are
some remaining problems. I'll attach an example document  that contains the
relevant cases.
Use function ExplicitValueProvider::getExplicitNumberFormatKeyForAxis to get the
correct number format from the axis with data attached to it.
Comment 5 IngridvdM 2009-02-24 11:02:06 UTC
Created attachment 60435 [details]
examples for secondary axis without data attached to it
Comment 6 IngridvdM 2009-02-24 11:06:10 UTC
@weiz, looking at the code I found another problem. You change the model during
view creation. The code in question is:
xDestAxisProp->setPropertyValue( C2U( "NumberFormat" ), uno::makeAny(
nNumberFormatKeySource ) );
That is forbidden! Creating a view on the model must not change the model.
Please find a different solution to transport and use the necessary information.
Comment 7 weiz 2009-03-06 01:43:48 UTC
Created attachment 60762 [details]
patch_090306
Comment 8 weiz 2009-03-06 01:44:22 UTC
@iha: the new patch is submitted. 
I added some codes in "ExplicitValueProvider::getExplicitNumberFormatKeyForAxis"
and call it self inside the function. Maybe there is a better solution, but I am
not familiar with the number format part, I am afraid if I change the structure
in this function, it will cause new problems, so I chose the current solution.
Please let me know your suggestions. Thank you!
Comment 9 IngridvdM 2009-03-06 15:13:49 UTC
@weiz, thanks for the second patch. It looks much better than the first one. All
the scenarios from the example document do work. But it still needs some
improvements.
if( !nNumberFormatKey ) has not the meaning of 'no numberformat was set or
found'. Instead nNumberFormatKey==0 is also a valid numberformat. It is the
standard number format.
if( !( xProp->getPropertyValue( C2U( "NumberFormat" ) ) >>= nNumberFormatKey ) )
instead has the meaning of 'no numberformat was set'. In addition the recursive
call currently looks too risky to me. To more explicitly avoid an endless loop I
created a second function which carries a parameter
'bSearchForParallelAxisIfNothingIsFound' to stop the recursion.
I commited the corrected fix to CWS chart37. Have a nice weekend!
Comment 10 IngridvdM 2009-04-28 09:50:00 UTC
@kla, please verify in CWS chart37.
Comment 11 kla 2009-05-20 06:03:00 UTC
seen ok in CWS chart37 -> verified
Comment 12 kla 2009-09-25 13:16:21 UTC
Seen ok in Master -> closed