[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) New commits: commit e8a398bd165e1b90a69c453e0465e28de08b3cf8 Author: Michael Meeks Date: Fri Sep 12 14:09:34 2014 +0100 fdo#66701 - don't double destroy the HASH when PDF signing. Accidentally introduced in d73c039fa it seems. Change-Id: I846314ebca3a24520492887d4d9027f812cfb32f diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 89355ad..8f6a7e9 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -5951,6 +5951,17 @@ char *PDFSigningPKCS7PasswordCallback(PK11SlotInfo * /*slot*/, PRBool /*retry*/, return (char *)arg; } +namespace { +class HashContextScope { +HASHContext *mpPtr; +public: +HashContextScope(HASHContext *pPtr) : mpPtr(pPtr) {} +~HashContextScope() { clear(); } +void clear() { if (mpPtr) { HASH_Destroy(mpPtr); } mpPtr = NULL; } +HASHContext *get() { return mpPtr; } +}; +} + bool PDFWriterImpl::finalizeSignature() { @@ -6000,9 +6011,8 @@ bool PDFWriterImpl::finalizeSignature() // Prepare buffer and calculate PDF file digest CHECK_RETURN( (osl_File_E_None == osl_setFilePos( m_aFile, osl_Pos_Absolut, 0) ) ); -boost::scoped_ptr hc(HASH_Create(HASH_AlgSHA1)); - -if (!hc) +HashContextScope hc(HASH_Create(HASH_AlgSHA1)); +if (!hc.get()) { SAL_WARN("vcl.gdi", "PDF Signing: SHA1 HASH_Create failed!"); return false; @@ -6033,7 +6043,7 @@ bool PDFWriterImpl::finalizeSignature() unsigned char hash[SHA1_LENGTH]; digest.data = hash; HASH_End(hc.get(), digest.data, &digest.len, SHA1_LENGTH); -HASH_Destroy(hc.get()); +hc.clear(); const char *pass = OUStringToOString( m_aContext.SignPassword, RTL_TEXTENCODING_UTF8 ).getStr(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - vcl/source
vcl/source/filter/wmf/winmtf.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit db477faebd75ed31416cc642a6a1de30227cac29 Author: Tomaž Vajngerl Date: Tue Apr 22 12:06:11 2014 +0200 wmf: support fat lines for PolyPolygons in wmf filter Change-Id: I9fe9d7b5237031e3001f64af7001d91fa53f1c64 diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 5074a5d..97eed0c 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -1316,6 +1316,13 @@ void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordP { UpdateLineStyle(); mpGDIMetaFile->AddAction( new MetaPolyPolygonAction( rPolyPolygon ) ); +if (maLineStyle.aLineInfo.GetWidth() > 0 || maLineStyle.aLineInfo.GetStyle() == LINE_DASH) +{ +for (sal_uInt16 nPoly = 0; nPoly < rPolyPolygon.Count(); ++nPoly) +{ +mpGDIMetaFile->AddAction(new MetaPolyLineAction(rPolyPolygon[nPoly], maLineStyle.aLineInfo)); +} +} } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-4.2' - vcl/source
vcl/source/gdi/outdev.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ce9161733a8ef433d060b87a24ce566d20365679 Author: Tomaž Vajngerl Date: Thu Apr 24 17:57:09 2014 +0200 fdo#74336 wrongly transformed line width - use 0 for height Change-Id: I3915cfabb9568480d74ea6d4e459def6fe912eb9 diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index f8ec872..069fea1 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -2159,7 +2159,7 @@ bool OutputDevice::ImpTryDrawPolyLineDirect( // transform the line width if used if( fLineWidth != 0.0 ) { -aB2DLineWidth = aTransform * ::basegfx::B2DVector( fLineWidth, fLineWidth ); +aB2DLineWidth = aTransform * ::basegfx::B2DVector( fLineWidth, 0.0 ); } // transform the polygon ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits