diff options
author | Justin Luth <justin_luth@sil.org> | 2020-03-14 14:45:39 +0300 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-04-03 10:04:56 +0200 |
commit | 0f29d36aa9e6ac7d0914a6e1749c16ecec216904 (patch) | |
tree | 1d4fe8dde667d5caffad571a88a5322aacb91b81 /include/editeng | |
parent | 730c5317a968f4e99d4d2d28499b1d6204a07285 (diff) |
tdf#80194 autoEsc: use fontmetrics in calculation
This replaces the previous 7.0 patch in
commit 2940d1905b921d9909b08b1e32014d3c44474ef0
where the following is still true:
THIS WILL CHANGE THE POSITION OF EDITENG SUBSCRIPTS
AND SUPERSCRIPTS IN EXISTING DOCUMENTS!
That is because they were very poorly placed
before - using a formula that is very different
from how Writer does it. Everyone in the bug reports
indicates that Writer does it good, but Impress
does it really bad. (tdf#89849, tdf#63083).
Instead of using the previous patch's 80%/20%
generalization, copy Writer's use of the actual
ascent and descent of the font to determine
the best position for the subscript or superscript.
Change-Id: I0f10f6174b0709f3bc3b9acdc54b7b1fd59c5ee2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90489
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'include/editeng')
-rw-r--r-- | include/editeng/svxfont.hxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/editeng/svxfont.hxx b/include/editeng/svxfont.hxx index b584bb842b4d..1a33e73189f2 100644 --- a/include/editeng/svxfont.hxx +++ b/include/editeng/svxfont.hxx @@ -49,6 +49,8 @@ public: // Methods for Superscript/Subscript short GetEscapement() const { return nEsc; } void SetEscapement( const short nNewEsc ) { nEsc = nNewEsc; } + // set specific values instead of automatic, and ensure valid value. Depends on nPropr being set already. + void SetNonAutoEscapement(short nNewEsc, const OutputDevice* pOutDev = nullptr); sal_uInt8 GetPropr() const { return nPropr; } void SetPropr( const sal_uInt8 nNewPropr ) { nPropr = nNewPropr; } |