diff options
author | Jozsef Szakacs <zmx3@citromail.hu> | 2019-03-13 12:32:20 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2019-05-29 14:31:03 +0200 |
commit | bdfb3edb981ff04f1f3f6dc1ef335e37a0980245 (patch) | |
tree | 003858f805b7cc912d048e703c5fec7dd8aeceeb /writerfilter | |
parent | bdc74dc279946abfdcca409edc96e985699eb368 (diff) |
tdf#120412 DOCX filter: fix missing superscript
by editeng support of large superscript raising.
Maximal raising of superscript text is 1584 pt in MSO,
while LibreOffice didn't import the values greater
than 100% of the current font height. Using the maximal
percent value of the default 11 pt font, the limit
is 14400% now, fixing most of the import problems.
Greater raisings will be limited to 14400% during the
DOCX import.
Note: the standard doesn't limit the bigger percent
values, see "20.374 style:text-position" and
"18.3.23 percent" in OpenDocument 1.2.
Change-Id: I3d0d08f273f2067180f74fba40c47d62364fcc59
Reviewed-on: https://gerrit.libreoffice.org/69164
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index cc7b7c720e05..6276d56a1b01 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -2839,6 +2839,8 @@ void DomainMapper::processDeferredCharacterProperties( const std::map< sal_Int32 nEscapement = ( nIntValue > 0 ) ? 58: -58; } } + // tdf#120412 up to 14400% (eg. 1584 pt with 11 pt letters) + if( nEscapement > 14400 ) nEscapement = 14400; rContext->Insert(PROP_CHAR_ESCAPEMENT, uno::makeAny( nEscapement ) ); rContext->Insert(PROP_CHAR_ESCAPEMENT_HEIGHT, uno::makeAny( nProp ) ); } |