<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Text Grid should accept floating point font-size for base text and ruby"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=134326">134326</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Text Grid should accept floating point font-size for base text and ruby
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>7.1.0.0.alpha0+ Master
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Writer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>himajin100000@gmail.com
</td>
</tr></table>
<p>
<div>
<pre>Description:
see steps to reproduce.
Steps to Reproduce:
Preparation steps:
1. Run LibreOffice
2. Tools->Options
3. Language Settings->Languages
4. Make sure "Asian" checkbox under "Default Languages for Documents " is
checked.
I also set the Language to "Japanese", but this may not be necessary.
5. Apply
6. Quit LibreOffice
7. Run Writer
8. Tools->Options
9. LibreOffice Writer->General
10. check "Use square page mode for text grid" under Settings. Also, note that
font-size is in points, whatever measurement unit is set.
11. Apply
12. Restart LibreOffice
Main Steps:
1. Run Writer
2. (for comparison) In the "Formatting" toolbar, you will find a
FontSizeBox(COMBOBOX, not a spinbutton), and there you will find 10.5 pt.
This font-size is said to be used by Japanese government's official documents.
<a href="https://opengrok.libreoffice.org/xref/core/svtools/source/control/ctrltool.cxx?r=d077cd61#45">https://opengrok.libreoffice.org/xref/core/svtools/source/control/ctrltool.cxx?r=d077cd61#45</a>
<a href="https://opengrok.libreoffice.org/xref/core/svtools/source/control/ctrlbox.cxx?r=fcce0642#962">https://opengrok.libreoffice.org/xref/core/svtools/source/control/ctrlbox.cxx?r=fcce0642#962</a>
3. Format ( in Main menu) -> Page Style
4. you will find "Text Grid" tab
5. In the "Grid" section, click "Grid (lines and characters)". "Grid Layout"
section will be enabled.
6. In the "Grid Layout" section, you will find "Max. base text size."
MetricSpinButton.
7. Input 10.5pt to the MetricSpinButton.
8. Leave the control(e.g. with Tab key) so that we can notify the program of
completion of our text input to the spinbutton.
Actual Results:
The spinbutton's value changes to 11pt.
Previews, Max characters per line, Max lines per page are calculated based on
this 11pt.
Expected Results:
MetricSpinButtons hold floating point values. In this case, 10.5pt.
Reproducible: Always
User Profile Reset: No
Additional Info:
My guess( but just a guess ):
MetricSpinButton holds a floating point length, for example, 100.405 cm (=
100405 * 10^(-3) cm ), with an integer member variable( = 100405), a member
variable for the decimal digits(= 3) , and the measurement unit(= "cm").
When we change its unit from its initial unit through e.g. SetFieldUnit, the
decimal digits will be set based on the new unit.
<a href="https://opengrok.libreoffice.org/xref/core/svtools/source/misc/unitconv.cxx?r=ec11b733#25">https://opengrok.libreoffice.org/xref/core/svtools/source/misc/unitconv.cxx?r=ec11b733#25</a>
Also, please note that MetricSpinButton constructor doesn't seem to call this
function.
I guess, the MetricSpinButton's unit hasn't changed since its initial value, 0.
(not that sure)
<a href="https://opengrok.libreoffice.org/xref/core/vcl/source/app/salvtables.cxx?r=01e37e3e#5272">https://opengrok.libreoffice.org/xref/core/vcl/source/app/salvtables.cxx?r=01e37e3e#5272</a>
<a href="https://opengrok.libreoffice.org/xref/core/vcl/source/control/fmtfield.cxx?r=01e37e3e#657">https://opengrok.libreoffice.org/xref/core/vcl/source/control/fmtfield.cxx?r=01e37e3e#657</a>
<a href="https://opengrok.libreoffice.org/xref/core/svl/source/numbers/zformat.cxx?r=1861363d#221">https://opengrok.libreoffice.org/xref/core/svl/source/numbers/zformat.cxx?r=1861363d#221</a>
I have one more concern.
when we call a method to try to get 100.405 in the example case, the control
tries to caluculate 100405 / 10^3.
<a href="https://opengrok.libreoffice.org/xref/core/vcl/source/window/builder.cxx?r=7e4a3eee#240">https://opengrok.libreoffice.org/xref/core/vcl/source/window/builder.cxx?r=7e4a3eee#240</a>
but the return value seems to be of int type, not floating point type like
double.
This value is set to SwTextGridItem::SetBaseHeight(int), yes this also take an
integer parameter, and this value seems to be used for layouting I guess.
<a href="https://opengrok.libreoffice.org/xref/core/sw/source/ui/misc/pggrid.cxx?r=eaeabd78#229">https://opengrok.libreoffice.org/xref/core/sw/source/ui/misc/pggrid.cxx?r=eaeabd78#229</a>
==================
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 642fc41cd7d080384658e10b30bb9d3b38a2cbd9
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: ja-JP (ja_JP); UI: en-US
Calc: CL</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>