Issue 89430 - Asian strings truncated in Smooth Lines dialog
Summary: Asian strings truncated in Smooth Lines dialog
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: stefan.baltzer
QA Contact: issues@graphics
Keywords: CJK
Depends on:
Blocks: 72764
  Show dependency tree
Reported: 2008-05-14 06:37 UTC by yuko
Modified: 2013-02-24 21:20 UTC (History)
4 users (show)

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

English Smooth Lines dialog (31.11 KB, image/gif)
2008-05-14 06:38 UTC, yuko
no flags Details
Japanese Smooth Lines dialog (26.68 KB, image/gif)
2008-05-14 06:39 UTC, yuko
no flags Details
patch_081031 (1.51 KB, patch)
2008-10-31 07:36 UTC, weiz
no flags Details | Diff
example for zh-TW (22.68 KB, image/jpeg)
2009-01-09 15:09 UTC, IngridvdM
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description yuko 2008-05-14 06:37:02 UTC
In Chart Wizard, when selecting Line or XY (Scatter) and then click Properties,
Smooth Lines dialog appears. However, Japanese message for "Cubic spline" is
Please see the attached screen shot.

English: Cubic spline
Japanese: データãƒã‚¤ãƒ³ãƒˆãªã—平滑線ã¤ãªãŽ(C) <= "C)" is missing

Stefan, Please assign this to an appropriate engineer.
Comment 1 yuko 2008-05-14 06:38:30 UTC
Created attachment 53607 [details]
English Smooth Lines dialog
Comment 2 yuko 2008-05-14 06:39:11 UTC
Created attachment 53608 [details]
Japanese Smooth Lines dialog
Comment 3 stefan.baltzer 2008-06-16 16:11:31 UTC
SBA: For target OOo 3.0, UI freeze has passed and the final translation round is
currently under way. Set target to OOo 3.x.
Comment 4 Oliver Specht 2008-06-16 16:24:40 UTC
Reassigned to iha
Component changed to Chart
Comment 5 IngridvdM 2008-06-17 14:58:21 UTC
The position and sizes for the controls in this dialog are calculated dependent
on the current text length.
In this case the method RadioButton::CalcMinimumSize does return a wrong width
for the given string. Using an even longer english string makes no problems.
Maybe the string itself is buggy somehow? With my version I see a square
somewhere in the text at the screen. Also the string seems to end with a space
within the localize.sdf file. Don't know whether that is ok.
The string in the localize.sdf file is:
chart2	source\controller\dialogs\tp_ChartType.src	0	radiobutton
データãƒÂイントãªã—平滑線ã¤ãªãÂŽ				2002-02-02 02:02:02

@sba, please let someone who knows japanese check the string.
@hdu, do you know the text size calculation methods in vcl? Do you maybe have an
idea why the size of that special japanese string is calculated wrongly?
Comment 6 2008-06-19 15:13:00 UTC
> hdu, do you know the text size calculation methods in vcl?

Yes ;-) As a rule of thumb the text size is calculated correctly if Writer handles it correcly 
in "Online Layout" mode.

> Do you maybe have an idea why the size of that special japanese string is calculated 

Recently a developer had a similar problem with text size on a button seemingly being 
zero. The problem was that he called GetControlText() on the button to get the string. 
But the control text is not the button text, but was an empty string in that case. And the 
size of the empty string was... drumroll... zero.

Anyway, I can't read that specific string in the comment above even when changing the 
browser's View->Encoding. What encoding is it?
Comment 7 yuko 2008-06-20 01:59:04 UTC
I checked the localize.sdf and it looks ok as follows.

chart2  source\controller\dialogs\tp_ChartType.src      0       radiobutton    
        0       ja      データãƒã‚¤ãƒ³ãƒˆãªã—平滑線ã¤ãªãŽ                         
2002-02-02 02:02:02
Comment 8 IngridvdM 2008-06-20 08:46:13 UTC
@yuko, thanks!
@hdu, sorry I messed up the string. I think the copy from yuko is the correct
one, or look at the localize.sdf file directly. It is in
chart2\source\controller\dialogs\localize.sdf . Search for RB_SPLINES_CUBIC. The
control that gets this text is the RadioButton m_aRB_Splines_Cubic in file
chart2\source\controller\dialogs\tp_ChartType.cxx. Within constructor
SplinePropertiesDialog::SplinePropertiesDialog the method
m_aRB_Splines_Cubic.CalcMinimumSize() is called.
Comment 9 IngridvdM 2008-10-21 09:39:30 UTC
@weiz, please have a look at this one. It might be the same problem that leads
to issue 95051 - the size of Asian texts seem to be calculated wrongly .
Comment 10 2008-10-21 14:44:06 UTC
The textsize measurement seems to be done before ImplWindowAutoMnemonic() has done its work, so the 
automnemonic string extension is not taken measured.

That's the first time I've seen+debugged that code, so for more questions PL might be the better contact. 
From my rudimentary understanding calling Dialog::StateChanged(STATE_CHANGE_INITSHOW) would 
prepare the AutoMnemonic so the individual controls have their correct text.
Comment 11 weiz 2008-10-31 07:36:27 UTC
Created attachment 57604 [details]
Comment 12 weiz 2008-10-31 07:37:53 UTC
@iha: The patch is submitted. Please let me know if you have any suggestions. 
Comment 13 IngridvdM 2009-01-09 15:03:59 UTC
@weiz, thanks! The patch works, only it is necessary to call adjustSize after
the repositioning of the controls. Otherwise with some languages the dialog
becomes to small. I commited aa adapted fix to CWS chart35.
Comment 14 IngridvdM 2009-01-09 15:09:51 UTC
Created attachment 59271 [details]
example for zh-TW
Comment 15 IngridvdM 2009-01-19 14:11:48 UTC
@Kla, please verify in CWS chart35. Thanks! Use the zh-TW install set.
Comment 16 kla 2009-02-06 09:55:17 UTC
Thx SBA for take over this issue.
Comment 17 stefan.baltzer 2009-02-06 11:10:51 UTC
Verified in CWS chart35.
Comment 18 stefan.baltzer 2010-01-06 10:26:33 UTC
OK in OOo 3.2 RC1 (OOO320_m8). Closed.