[Libreoffice-commits] core.git: xmlsecurity/Module_xmlsecurity.mk
xmlsecurity/Module_xmlsecurity.mk |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit 149df1fec6472e30582162e17e04c75aee91d26a Author: Miklos Vajna AuthorDate: Thu Mar 11 17:45:58 2021 +0100 Commit: Miklos Vajna CommitDate: Thu Mar 11 23:26:56 2021 +0100 Turn CppunitTest_xmlsecurity_signing into a subsequentcheck This is one of the most unreliable tests on Windows, probably due to reading the real system cert store, unlike macOS/Linux (which have a per-test NSS template). Give up on running this on Windows / macOS for pre-submit CI to get more reliability instead. Local 'make check' on Windows keeps running this, since it does pass most of the time. The change can be reverted once somebody can figure out how to reliably reproduce this failure on Windows. Change-Id: I50df09bda9c353ce08038dab8d307bbf7738bb5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112358 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk index 1ce7364d4ce9..81e74ecf21d3 100644 --- a/xmlsecurity/Module_xmlsecurity.mk +++ b/xmlsecurity/Module_xmlsecurity.mk @@ -18,10 +18,13 @@ $(eval $(call gb_Module_add_targets,xmlsecurity,\ )) $(eval $(call gb_Module_add_slowcheck_targets,xmlsecurity,\ -CppunitTest_xmlsecurity_signing \ CppunitTest_xmlsecurity_pdfsigning \ )) +$(eval $(call gb_Module_add_subsequentcheck_targets,xmlsecurity,\ +CppunitTest_xmlsecurity_signing \ +)) + $(eval $(call gb_Module_add_l10n_targets,xmlsecurity,\ AllLangMoTarget_xsc \ )) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlsecurity/Module_xmlsecurity.mk
xmlsecurity/Module_xmlsecurity.mk |2 -- 1 file changed, 2 deletions(-) New commits: commit a0effa00b4b3db15a9c2f80db2da5b54d63b4559 Author: Caolán McNamaraDate: Tue May 2 09:46:23 2017 +0100 revert 'tweak for pdfiumless build' commit 8d747b8cf849b7d705048544ac20eceba7eb5a45 Author: Caolán McNamara Date: Sat Apr 29 20:01:40 2017 +0100 tweak for pdfiumless build and lets see if commit 6f53cf281eb3c13fc516ff79decb70b2a87a96d0 Author: Markus Mohrhard Date: Sat Apr 29 05:11:40 2017 +0200 apparently the executable does not need pdfium directly anymore is sufficient here Change-Id: I2bf381e1d51d851aa829730b3d13edb1c03ea873 diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk index 79675290fcd3..d3fafeb7e4ec 100644 --- a/xmlsecurity/Module_xmlsecurity.mk +++ b/xmlsecurity/Module_xmlsecurity.mk @@ -46,14 +46,12 @@ $(eval $(call gb_Module_add_screenshot_targets,xmlsecurity,\ )) ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) -ifneq (,$(filter PDFIUM,$(BUILD_TYPE))) $(eval $(call gb_Module_add_targets,xmlsecurity,\ Executable_pdfverify \ )) endif -endif endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: [Libreoffice-commits] core.git: xmlsecurity/Module_xmlsecurity.mk
On Tue, 2017-05-02 at 09:26 +0200, Miklos Vajna wrote: > Is this necessary after 6f53cf281eb3c13fc516ff79decb70b2a87a96d0 from > Markus? I can find out ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice-commits] core.git: xmlsecurity/Module_xmlsecurity.mk
Hi, On Sat, Apr 29, 2017 at 07:04:58PM +, Caolán McNamarawrote: > xmlsecurity/Module_xmlsecurity.mk |2 ++ > 1 file changed, 2 insertions(+) > > New commits: > commit 8d747b8cf849b7d705048544ac20eceba7eb5a45 > Author: Caol??n McNamara > Date: Sat Apr 29 20:01:40 2017 +0100 > > tweak for pdfiumless build > > Change-Id: Ic83f0e0491bede43dba7f22c5bd6c31b95e65df1 > > diff --git a/xmlsecurity/Module_xmlsecurity.mk > b/xmlsecurity/Module_xmlsecurity.mk > index d3fafeb7e4ec..79675290fcd3 100644 > --- a/xmlsecurity/Module_xmlsecurity.mk > +++ b/xmlsecurity/Module_xmlsecurity.mk > @@ -46,12 +46,14 @@ $(eval $(call > gb_Module_add_screenshot_targets,xmlsecurity,\ > )) > > ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) > +ifneq (,$(filter PDFIUM,$(BUILD_TYPE))) Is this necessary after 6f53cf281eb3c13fc516ff79decb70b2a87a96d0 from Markus? I suspect it's a mid-air collision that didn't result in a merge conflict by accident. Thanks, Miklos signature.asc Description: Digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice
[Libreoffice-commits] core.git: xmlsecurity/Module_xmlsecurity.mk
xmlsecurity/Module_xmlsecurity.mk |2 ++ 1 file changed, 2 insertions(+) New commits: commit 8d747b8cf849b7d705048544ac20eceba7eb5a45 Author: Caolán McNamaraDate: Sat Apr 29 20:01:40 2017 +0100 tweak for pdfiumless build Change-Id: Ic83f0e0491bede43dba7f22c5bd6c31b95e65df1 diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk index d3fafeb7e4ec..79675290fcd3 100644 --- a/xmlsecurity/Module_xmlsecurity.mk +++ b/xmlsecurity/Module_xmlsecurity.mk @@ -46,12 +46,14 @@ $(eval $(call gb_Module_add_screenshot_targets,xmlsecurity,\ )) ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) +ifneq (,$(filter PDFIUM,$(BUILD_TYPE))) $(eval $(call gb_Module_add_targets,xmlsecurity,\ Executable_pdfverify \ )) endif +endif endif ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlsecurity/Module_xmlsecurity.mk xmlsecurity/workben
xmlsecurity/Module_xmlsecurity.mk |2 xmlsecurity/workben/pdfverify.cxx | 86 ++ 2 files changed, 6 insertions(+), 82 deletions(-) New commits: commit 834df8b3d10fb15e9bf2ef657a7fac4747544852 Author: Miklos VajnaDate: Thu Apr 27 09:14:26 2017 +0200 xmlsecurity pdfverify: go via vcl graphic filter Initially some proof of concept code was implemented here, but then I copied that to VCL and it got fixes there, so call into vcl from here instead of invoking pdfium directly. Change-Id: I8590cbe94876ff6aff3f870535a99062304f3996 Reviewed-on: https://gerrit.libreoffice.org/37016 Reviewed-by: Miklos Vajna Tested-by: Jenkins diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk index cb68c595f82d..d3fafeb7e4ec 100644 --- a/xmlsecurity/Module_xmlsecurity.mk +++ b/xmlsecurity/Module_xmlsecurity.mk @@ -46,14 +46,12 @@ $(eval $(call gb_Module_add_screenshot_targets,xmlsecurity,\ )) ifneq (,$(filter DESKTOP,$(BUILD_TYPE))) -ifeq ($(ENABLE_PDFIUM),TRUE) $(eval $(call gb_Module_add_targets,xmlsecurity,\ Executable_pdfverify \ )) endif -endif endif diff --git a/xmlsecurity/workben/pdfverify.cxx b/xmlsecurity/workben/pdfverify.cxx index 7746a6e7b716..7b64e42c2a49 100644 --- a/xmlsecurity/workben/pdfverify.cxx +++ b/xmlsecurity/workben/pdfverify.cxx @@ -9,15 +9,6 @@ #include -#ifdef WNT -#include -#endif -#include -#include -#ifdef WNT -#include -#endif - #include #include #include @@ -26,10 +17,9 @@ #include #include #include -#include -#include #include #include +#include #include @@ -39,88 +29,24 @@ using namespace com::sun::star; namespace { -/// Convert to inch, then assume 96 DPI. -double pointToPixel(double fPoint) -{ -return fPoint / 72 * 96; -} - /// Does PDF to PNG conversion using pdfium. void generatePreview(const OString& rPdfPath, const OString& rPngPath) { -FPDF_LIBRARY_CONFIG aConfig; -aConfig.version = 2; -aConfig.m_pUserFontPaths = nullptr; -aConfig.m_pIsolate = nullptr; -aConfig.m_v8EmbedderSlot = 0; -FPDF_InitLibraryWithConfig(); - -// Read input into a buffer. +GraphicFilter& rFilter = GraphicFilter::GetGraphicFilter(); +Graphic aGraphic; OUString aInURL; osl::FileBase::getFileURLFromSystemPath(OUString::fromUtf8(rPdfPath), aInURL); SvFileStream aInStream(aInURL, StreamMode::READ); -SvMemoryStream aInBuffer; -aInBuffer.WriteStream(aInStream); - -// Load the buffer using pdfium. -FPDF_DOCUMENT pPdfDocument = FPDF_LoadMemDocument(aInBuffer.GetData(), aInBuffer.GetSize(), /*password=*/nullptr); -if (!pPdfDocument) -return; - -// Render the first page. -FPDF_PAGE pPdfPage = FPDF_LoadPage(pPdfDocument, /*page_index=*/0); -if (!pPdfPage) -return; - -// Returned unit is points, convert that to pixel. -int nPageWidth = pointToPixel(FPDF_GetPageWidth(pPdfPage)); -int nPageHeight = pointToPixel(FPDF_GetPageHeight(pPdfPage)); -FPDF_BITMAP pPdfBitmap = FPDFBitmap_Create(nPageWidth, nPageHeight, /*alpha=*/1); -if (!pPdfBitmap) +WMF_EXTERNALHEADER* pExtHeader = nullptr; +if (rFilter.ImportGraphic(aGraphic, OUString(), aInStream, GRFILTER_FORMAT_DONTKNOW, nullptr, GraphicFilterImportFlags::NONE, pExtHeader) != GRFILTER_OK) return; -FPDF_DWORD nColor = FPDFPage_HasTransparency(pPdfPage) ? 0x : 0x; -FPDFBitmap_FillRect(pPdfBitmap, 0, 0, nPageWidth, nPageHeight, nColor); -FPDF_RenderPageBitmap(pPdfBitmap, pPdfPage, /*start_x=*/0, /*start_y=*/0, nPageWidth, nPageHeight, /*rotate=*/0, /*flags=*/0); - -// Save the buffer as a PNG file. -Bitmap aBitmap(Size(nPageWidth, nPageHeight), 32); -{ -Bitmap::ScopedWriteAccess pWriteAccess(aBitmap); -const char* pPdfBuffer = static_cast(FPDFBitmap_GetBuffer(pPdfBitmap)); -#ifndef MACOSX -std::memcpy(pWriteAccess->GetBuffer(), pPdfBuffer, nPageWidth * nPageHeight * 4); -#else -// ARGB -> BGRA -for (int nRow = 0; nRow < nPageHeight; ++nRow) -{ -int nStride = FPDFBitmap_GetStride(pPdfBitmap); -const char* pPdfLine = pPdfBuffer + (nStride * nRow); -Scanline pRow = pWriteAccess->GetBuffer() + (nPageWidth * nRow * 4); -for (int nCol = 0; nCol < nPageWidth; ++nCol) -{ -pRow[nCol * 4] = pPdfLine[(nCol * 4) + 3]; -pRow[(nCol * 4) + 1] = pPdfLine[(nCol * 4) + 2]; -pRow[(nCol * 4) + 2] = pPdfLine[(nCol * 4) + 1]; -pRow[(nCol * 4) + 3] = pPdfLine[nCol * 4]; -} -} -#endif -} -BitmapEx aBitmapEx(aBitmap); -#if defined(WNT) || defined(MACOSX) -aBitmapEx.Mirror(BmpMirrorFlags::Vertical); -#endif +BitmapEx aBitmapEx = aGraphic.GetBitmapEx();
[Libreoffice-commits] core.git: xmlsecurity/Module_xmlsecurity.mk
xmlsecurity/Module_xmlsecurity.mk |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 59460acff8a8cad0569fb4955945258ca1d5e3f2 Author: Thorsten BehrensDate: Sat Mar 4 12:15:09 2017 +0100 Fix build for mobile Change-Id: I420035cec4f3d5f56363eab1fabff5c053c60cd6 diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk index d1642b95..cb68c59 100644 --- a/xmlsecurity/Module_xmlsecurity.mk +++ b/xmlsecurity/Module_xmlsecurity.mk @@ -19,7 +19,7 @@ $(eval $(call gb_Module_add_targets,xmlsecurity,\ Library_xsec_xmlsec \ )) -ifneq ($(filter-out WNT MACOSX,$(OS)),) +ifneq ($(filter-out WNT MACOSX ANDROID IOS,$(OS)),) $(eval $(call gb_Module_add_targets,xmlsecurity,\ Library_xsec_gpg \ )) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: xmlsecurity/Module_xmlsecurity.mk
xmlsecurity/Module_xmlsecurity.mk |3 +++ 1 file changed, 3 insertions(+) New commits: commit d76b4682aa6d75b5c6b2de19b0bb18181a99e9bc Author: Miklos VajnaDate: Mon Jan 11 16:28:48 2016 +0100 CppunitTest_xmlsecurity_signing: disable on Windows for now Change-Id: Icc0d11cfe421d6328739211511379a39195436b9 diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk index f5fb0ca..beea26b 100644 --- a/xmlsecurity/Module_xmlsecurity.mk +++ b/xmlsecurity/Module_xmlsecurity.mk @@ -15,9 +15,12 @@ $(eval $(call gb_Module_add_targets,xmlsecurity,\ $(if $(filter-out ANDROID IOS,$(OS)),Library_xsec_xmlsec) \ )) +# FIXME find out what's the proper fix to get this linked on Windows +ifneq ($(OS),WNT) $(eval $(call gb_Module_add_slowcheck_targets,xmlsecurity,\ CppunitTest_xmlsecurity_signing \ )) +endif $(eval $(call gb_Module_add_l10n_targets,xmlsecurity,\ AllLangResTarget_xsec \ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits