[Libreoffice-commits] core.git: sdext/source

Vort vvort at yandex.ru
Thu Jan 22 01:13:57 PST 2015


 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 7c3386f279e5ea3a1d9b7694412f5c34b5183bab
Author: Vort <vvort at yandex.ru>
Date:   Thu Jan 22 09:06:39 2015 +0200

    fdo#79045 PDF Import: fix text displacement
    
    Change-Id: I22e3b90671f1dc4f9720758a7a5b79f56fa2ff49
    Reviewed-on: https://gerrit.libreoffice.org/14098
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 15454a4..d3e3988 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;


More information about the Libreoffice-commits mailing list