summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVort <vvort@yandex.ru>2015-01-22 09:06:39 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-01-22 09:13:27 +0000
commit7c3386f279e5ea3a1d9b7694412f5c34b5183bab (patch)
tree6c0624ed47d93361c0d9db6530d7a9fb744c0bb0
parent89f01955e2594bfba6f1d148b7a48dfe3aff5e60 (diff)
fdo#79045 PDF Import: fix text displacement
Change-Id: I22e3b90671f1dc4f9720758a7a5b79f56fa2ff49 Reviewed-on: https://gerrit.libreoffice.org/14098 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 15454a4501b5..d3e39887e32e 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -849,9 +849,18 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y,
double csdx = 0.0;
double csdy = 0.0;
if (state->getFont()->getWMode())
+ {
csdy = state->getCharSpace();
+ if (*u == ' ')
+ csdy += state->getWordSpace();
+ }
else
- csdx = state->getCharSpace() * state->getHorizScaling();
+ {
+ csdx = state->getCharSpace();
+ if (*u == ' ')
+ csdx += state->getWordSpace();
+ csdx *= state->getHorizScaling();
+ }
double cstdx = 0.0;
double cstdy = 0.0;