Bug 93301 - Font scaling is set to 400% if user input wrong character
Summary: Font scaling is set to 400% if user input wrong character
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
3.5 all versions
Hardware: All Linux (All)
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Options-Dialog-View
  Show dependency treegraph
 
Reported: 2015-08-09 14:22 UTC by Alexandr
Modified: 2019-03-30 19:42 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr 2015-08-09 14:22:01 UTC
A user can make LibreOffice unusable by mistyping

1. Open any LibreOffice application
2. Select Tools -> Options -> LibreOffice -> View
3. Write 100?0  to scaling field (You can use any incorrect character instead of “?”, for example, wrong decimal separator)
4. Press OK

Scaling is set to 400%. LibreOffice interface become unusable (at least for 1280x1024 screen resolution). I think it would be great to show a warning if a user tried to input not a number into the field.

In LibreOffict 3.5 it was not a problem, because it has much less scale range, hence, the scale become 130% and a user can open the dialogue and fix his mistake. In LibreOffice 4.3 - 5.0 it is frustrating. 

Workaround:
Open a file with the configuration in a text editor (in my case (Debian Jessie) the file is 
~/.config/libreoffice/4/user/registrymodifications.xcu). Find and delete the string 
<item oor:path="/org.openoffice.Office.Common/View"><prop oor:name="FontScaling" oor:op="fuse"><value>400</value></prop></item>
Comment 1 Julien Nabet 2015-08-09 21:27:43 UTC
On pc Debian x86-64 with master sources updated 2 days ago, I could reproduce this.
Here are some code pointers:
http://opengrok.libreoffice.org/xref/core/svtools/source/config/apearcfg.cxx#125
http://opengrok.libreoffice.org/xref/core/cui/source/options/optgdlg.cxx#807
but I'm recognize I'm a bit stuck:
(gdb) p *m_pBody
$10 = {...
  mpIMEInfos = 0x0, maText = "400 %", maPlaceholderText = "", maSaveValue = "", ...0x68006f8}
(gdb) bt
#0  0x00002aaab196db54 in rtl::Reference<Edit>::get() const (this=0x67fde78) at /home/julien/compile-libreoffice/libreoffice/include/rtl/ref.hxx:142
#1  0x00002aaab1b52672 in VclPtr<Edit>::operator bool() const (this=0x67fde78) at /home/julien/compile-libreoffice/libreoffice/include/vcl/vclptr.hxx:187
#2  0x00002aaab1b82344 in Edit::GetText() const (this=0x67fdc10) at /home/julien/compile-libreoffice/libreoffice/vcl/source/control/edit.cxx:2700
#3  0x00002aaab1bafcf3 in MetricFormatter::GetValue(FieldUnit) const (this=0x67fe018, eOutUnit=FUNIT_NONE)
    at /home/julien/compile-libreoffice/libreoffice/vcl/source/control/field.cxx:1517
#4  0x00002aaab1bafe86 in MetricFormatter::GetValue() const (this=0x67fe018) at /home/julien/compile-libreoffice/libreoffice/vcl/source/control/field.cxx:1539
#5  0x00002aaadfa4e042 in OfaViewTabPage::FillItemSet(SfxItemSet*) (this=0x67d7460) at /home/julien/compile-libreoffice/libreoffice/cui/source/options/optgdlg.cxx:809

I don't know where this "400 %" comes from.
Comment 2 Alexandr 2015-08-10 14:13:30 UTC
As far as I understand, LibreOffice just ignores incorrect characters in the field. Hence, if a user types wrong decimal separator, it gets 1000 instead of 100.0 and uses max possible value 400%.

Anyway, the behaviour has not appeared in 5.1. Even LibreOffice 3.5 interprets wrong characters this way. So, I change version to older one.
Comment 3 Julien Nabet 2015-08-10 14:40:22 UTC
Alexandr: just for curiosity, where do you see "1000"?
Comment 4 Alexandr 2015-08-10 16:28:43 UTC
Julien, it is my guess. If I type 1?23 I get 123%. If I type something more than 400, I get 400%. So if I type 100?0 (where "?" can be a wrong decimal separator), it would be interpreted as 1000.
Comment 5 QA Administrators 2016-09-20 10:20:47 UTC Comment hidden (obsolete)
Comment 6 Roman Kuznetsov 2019-03-30 19:42:41 UTC
close as WONTFIX because scale options were delete from GUI