[Libreoffice-commits] core.git: Branch 'libreoffice-5-3' - vcl/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu May 25 19:46:46 UTC 2017
vcl/source/gdi/pdfwriter_impl.cxx | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit f6a66846f50132fab7be6baf516ab6af04acf7e5
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon May 22 21:41:31 2017 +0200
tdf#107868 PDF export of editeng fill color: restrict to logic map modes
The original use case was Writer/Impress shape text, but when the map
mode is pixels, the reference device gives bogus values for the
PixelToLogic() calls, affecting e.g. form controls.
Just go back to the old way of not painting the background for those.
(cherry picked from commit 919a4ef592b6026a7533a93682f39118fef29ce8)
Conflicts:
vcl/qa/cppunit/pdfexport/pdfexport.cxx
Change-Id: I52f1901af15732274915fa3c77c06909b5164afb
Reviewed-on: https://gerrit.libreoffice.org/37977
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 9e592a71b977..28fb58db826f 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -9424,7 +9424,10 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool
}
}
- if (m_aCurrentPDFState.m_aFont.GetFillColor() != Color(COL_TRANSPARENT))
+ // Avoid fill color when map mode is in pixels, the below code assumes
+ // logic map mode.
+ bool bPixel = m_aCurrentPDFState.m_aMapMode.GetMapUnit() == MapUnit::MapPixel;
+ if (m_aCurrentPDFState.m_aFont.GetFillColor() != Color(COL_TRANSPARENT) && !bPixel)
{
// PDF doesn't have a text fill color, so draw a rectangle before
// drawing the actual text.
More information about the Libreoffice-commits
mailing list