Bug 36789 - Number of Decimal point can't save in Major Interval in [scale]tab on [Y Axis]dialogobx.
Summary: Number of Decimal point can't save in Major Interval in [scale]tab on [Y Axis...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Chart (show other bugs)
Version:
(earliest affected)
3.4.0 Beta3
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:3.4
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-03 02:11 UTC by Akira Matsumiya
Modified: 2011-05-06 21:39 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample document (12.54 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-05-03 02:11 UTC, Akira Matsumiya
Details
a proposed fix (1009 bytes, patch)
2011-05-06 11:48 UTC, Takeshi Abe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Akira Matsumiya 2011-05-03 02:11:54 UTC
Created attachment 46279 [details]
Sample document

Number of Decimal point can't save in [Major Interval]textbox.

I tested package LibO_3.4.0beta3_Win_x86_install_multi.exe on WindowsXP.

How to reproduce the problem.

1.Open attached "SampleChart.ods"
2.Graph area double click and right click on Y axis
3.[Format Axis] click on contextmenu
4.[Scale]tab click
5.[Automatic]checkbox uncheck and input "0.5" in textbox on [Major interval]Item
6.[OK]click
7.[Format Axis] click on context menu on Y Axis
8.[Major interval] value should be keep "0.5" but that has changed "1" unexpectedly.
Comment 1 Takeshi Abe 2011-05-04 10:42:13 UTC
Reproduced this behavior with the master branch built on my Debian box.
Comment 2 Muthu 2011-05-05 03:00:33 UTC
One for kohei?

@Abe-san, please do re-assign it to yourself, if you would like to work on it. Thank you!
Comment 3 Takeshi Abe 2011-05-06 11:48:27 UTC
Created attachment 46404 [details]
a proposed fix

OK, let me propose a fix as attached.

@Kohei, please give it your careful eyes.
Comment 4 Kohei Yoshida 2011-05-06 17:59:16 UTC
(In reply to comment #3)
> Created an attachment (id=46404) [details]
> a proposed fix
> 
> OK, let me propose a fix as attached.
> 
> @Kohei, please give it your careful eyes.

Well, the patch does fix this, but I don't know if it's the right place to put a fix in.

The problem is that, the date control is hidden, yet its IsVisible() method returns true, which to me is wrong, since that control was never visible to begin with.

Someone may have changes the visibility handling in the vcl code, which accidentally changes the behavior over here in the chart2 code...
Comment 5 Kohei Yoshida 2011-05-06 19:31:20 UTC
Ok.  I figured it out.

The logic there depends on the date control being invisible when the axis date type is not date.  The problem comes when that code path is reached *before* the it has the chance to set its real visibility of "false", so it depends on the initial visibility of that control which happens to be "true".

When you switch to another tab page, and come back to the Scale page, everything works correctly because it now has the correct visibility.

The solution I like best is to explicitly set the visibility of all the dynamic controls to "false" when that tab page class is constructed, then everything works as expected.
Comment 7 Takeshi Abe 2011-05-06 21:39:37 UTC
Thanks a lot for your quick response!

(In reply to comment #5)
> The logic there depends on the date control being invisible when the axis date
> type is not date.  The problem comes when that code path is reached *before*
> the it has the chance to set its real visibility of "false", so it depends on
> the initial visibility of that control which happens to be "true".
Anyway I'm not yet sure why&how the initial visibility of that control which happens to be "true"...