vcl/source/gdi/pdfwriter_impl.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
New commits: commit da421e63733bffd064eeabb4a2106adae2fdca03 Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Mon Sep 11 22:38:49 2017 +0200 tdf#108963 PDF export of editeng text highlight: handle rotated text The highlight rectangle was not rotated, handle it similar to PDFWriterImpl::drawStrikeoutChar(). (cherry picked from commit da705eff910f512623a689aaf28604270fb8f1c4, but testcase is left out as pdfium in libreoffice-5-4 does not provide the FPDFPageObj_GetBounds() API) Change-Id: I97a5b1fc05706729c58c92b90d6808629af8ca4c Reviewed-on: https://gerrit.libreoffice.org/42185 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 17ed3e07ff3a..c0ebe40f2c88 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -8736,7 +8736,17 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool aRectangle.SetSize(m_pReferenceDevice->PixelToLogic(Size(rLayout.GetTextWidth(), 0))); // This includes ascent / descent. aRectangle.setHeight(aRefDevFontMetric.GetLineHeight()); - drawRectangle(aRectangle); + + LogicalFontInstance* pFontInstance = m_pReferenceDevice->mpFontInstance; + if (pFontInstance->mnOrientation) + { + // Adapt rectangle for rotated text. + tools::Polygon aPolygon(aRectangle); + aPolygon.Rotate(m_pReferenceDevice->PixelToLogic(rLayout.GetDrawPosition()), pFontInstance->mnOrientation); + drawPolygon(aPolygon); + } + else + drawRectangle(aRectangle); pop(); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits