| Summary: | zoom percentage: locale problem? | ||
|---|---|---|---|
| Product: | [Applications] okular | Reporter: | Daniel Franke <franke.daniel> |
| Component: | general | Assignee: | Okular developers <okular-devel> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | adrian |
| Priority: | NOR | ||
| Version First Reported In: | 0.15.2 | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
Use locale info to compose zoom values
Patch against KDE_3_3_0_RELEASE patch against KDE_3_3_2_RELEASE |
||
|
Description
Daniel Franke
2004-08-16 13:48:50 UTC
Created attachment 7553 [details]
Use locale info to compose zoom values
Patch applies to kgv_view.cpp.
Uses locale specific decimal separator for fractional zoom values and if
entered zoom value is not a number does nothing instead of scaling document to
0%.
Created attachment 7563 [details]
Patch against KDE_3_3_0_RELEASE
- uses locale info to compose fractional zoom values
- if entered zoom value is not a number then does nothing instead of zooming to
0%
Has the patch (20040917) already been applied? If not, please ignore the rest of this comment. -- KGhostView 0.20, KDE-3.3.91 (beta1), CVS 050113 > - uses locale info to compose fractional zoom values Seems to work =) > - if entered zoom value is not a number then does nothing instead > of zooming to 0% Doesn't work. Zooms to 0% if invalid numbers (in the sense of the locale - or strings) are given as zoom values. > - uses locale info to compose fractional zoom values
Well, there's another problem here. Setting decimal separator to "," breaks zooming to values like 125%, while 100% and 200% still works.
Created attachment 9350 [details]
patch against KDE_3_3_2_RELEASE
The problem with zooming to 125% was KGhostView using sprintf() to create
string arguments for XChangeProperty(). sprintf() formats numbers like "1.00"
or "1,00", depending on the locale settings, while XChangeProperty() expects
them to use dot (".") as decimal separator regardless of your locale. This
patch makes it use QString("%1")::arg() instead. The latter always formats
numbers according to POSIX locale => zooming always works as expected.
Although a patch is available for a couple of months now, this bug is still valid in KDE-3.4.3 (gentoo) ... Does not apply to Okular. |