[Pkg-privacy-commits] [Git][pkg-privacy-team/mat2][master] 3 commits: debian/patches: Pull in another upstream patch wrt XLSX files
Georg Faerber (@georg)
georg at debian.org
Thu Jul 29 17:40:59 BST 2021
Georg Faerber pushed to branch master at Privacy Maintainers / mat2
Commits:
842b3ce7 by Georg Faerber at 2021-07-29T16:07:47+00:00
debian/patches: Pull in another upstream patch wrt XLSX files
- - - - -
4bbb5701 by Georg Faerber at 2021-07-29T16:12:59+00:00
debian/patches: Pull in upstream patch to fix printing issues of pdfs
- - - - -
61457934 by Georg Faerber at 2021-07-29T16:21:34+00:00
debian/changelog: Debian release 0.12.1-3
- - - - -
4 changed files:
- debian/changelog
- debian/patches/0001-improve-support-for-xlsx-files.patch
- + debian/patches/0002-fix-printing-of-cleaned-pdf-files.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+mat2 (0.12.1-3) unstable; urgency=medium
+
+ * debian/patches:
+ - Pull in upstream patch to improve support of OpenXML (xlsx) files.
+ This patch extends the one introduced in the previous upload, 0.12.1-2.
+ This approach is chosen to limit the diff, as both patches target the
+ same area of the source code.
+ - Pull in upstream patch to fix issues if printing cleaned Portable
+ Document Format (pdf) files.
+
+ -- Georg Faerber <georg at debian.org> Thu, 29 Jul 2021 16:21:06 +0000
+
mat2 (0.12.1-2) unstable; urgency=medium
* debian/patches:
=====================================
debian/patches/0001-improve-support-for-xlsx-files.patch
=====================================
@@ -1,19 +1,37 @@
Description: Improve support of Open XML (xlsx) files
Origin: upstream
-Applied-Upstream: bf0c777cb9159e220f636b0c019fe4957e4fea75
+Applied-Upstream: bf0c777cb9159e220f636b0c019fe4957e4fea75, 0b094b594bd1db017ed3d063a10714f6b2a7b9f3
Reviewed-by: Georg Faerber <georg at debian.org>
-Last-Update: 2021-05-24
+Last-Update: 2021-07-29
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: mat2/libmat2/office.py
===================================================================
---- mat2.orig/libmat2/office.py 2021-05-19 11:26:06.093187321 +0000
-+++ mat2/libmat2/office.py 2021-05-24 14:44:33.698488246 +0000
-@@ -107,6 +107,7 @@
+--- mat2.orig/libmat2/office.py 2021-07-29 15:56:40.307190532 +0000
++++ mat2/libmat2/office.py 2021-07-29 15:58:33.200905419 +0000
+@@ -88,6 +88,7 @@
+ r'^\[Content_Types\]\.xml$',
+ r'^_rels/\.rels$',
+ r'^xl/sharedStrings\.xml$', # https://docs.microsoft.com/en-us/office/open-xml/working-with-the-shared-string-table
++ r'^xl/calcChain\.xml$',
+ r'^(?:word|ppt|xl)/_rels/document\.xml\.rels$',
+ r'^(?:word|ppt|xl)/_rels/footer[0-9]*\.xml\.rels$',
+ r'^(?:word|ppt|xl)/_rels/header[0-9]*\.xml\.rels$',
+@@ -107,6 +108,9 @@
# TODO: check if p:bgRef can be randomized
r'^ppt/slideMasters/slideMaster[0-9]+\.xml',
r'^ppt/slideMasters/_rels/slideMaster[0-9]+\.xml\.rels',
+ r'^xl/worksheets/_rels/sheet[0-9]+\.xml\.rels',
++ r'^xl/drawings/vmlDrawing[0-9]+\.vml',
++ r'^xl/drawings/drawing[0-9]+\.xml',
}))
self.files_to_omit = set(map(re.compile, { # type: ignore
r'^\[trash\]/',
+@@ -123,6 +127,7 @@
+ # Additional presentation-wide properties like printing properties,
+ # presentation show properties etc.
+ r'^(?:word|ppt|xl)/presProps\.xml$',
++ r'^(?:word|ppt|xl)/comments[0-9]+\.xml$',
+
+ # we have an allowlist in self.files_to_keep,
+ # so we can trash everything else
=====================================
debian/patches/0002-fix-printing-of-cleaned-pdf-files.patch
=====================================
@@ -0,0 +1,48 @@
+Description: Fix issues if printing cleaned pdf file
+ pyCairo by default renders the PDF surfaces with a resolution of 72
+ dpi which is so low that the bitmap gets blurred compared to original.
+ Since pyCairo 1.12.0, a new method set_device_scale(x_scale, y_scale)
+ is added, which allows changing the canvas resolution.
+Origin: upstream
+Applied-Upstream: 3b094ae449afbb2c375454c1ee76b76aa98648d4
+Reviewed-by: Georg Faerber <georg at debian.org>
+Last-Update: 2021-07-29
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+Index: mat2/libmat2/pdf.py
+===================================================================
+--- mat2.orig/libmat2/pdf.py 2021-07-29 16:11:46.254777280 +0000
++++ mat2/libmat2/pdf.py 2021-07-29 16:12:42.239485144 +0000
+@@ -32,7 +32,7 @@
+ def __init__(self, filename):
+ super().__init__(filename)
+ self.uri = 'file://' + os.path.abspath(self.filename)
+- self.__scale = 2 # how much precision do we want for the render
++ self.__scale = 200 / 72.0 # how much precision do we want for the render
+ try: # Check now that the file is valid, to avoid surprises later
+ Poppler.Document.new_from_file(self.uri, None)
+ except GLib.GError: # Invalid PDF
+@@ -90,8 +90,8 @@
+ page_width, page_height = page.get_size()
+ logging.info("Rendering page %d/%d", pagenum + 1, pages_count)
+
+- width = int(page_width) * self.__scale
+- height = int(page_height) * self.__scale
++ width = int(page_width * self.__scale)
++ height = int(page_height * self.__scale)
+ img_surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
+ img_context = cairo.Context(img_surface)
+
+@@ -105,7 +105,11 @@
+ buf.seek(0)
+
+ img = cairo.ImageSurface.create_from_png(buf)
+- pdf_surface.set_size(page_width*self.__scale, page_height*self.__scale)
++ if cairo.version_info < (1, 12, 0):
++ pdf_surface.set_size(width, height)
++ else:
++ pdf_surface.set_size(page_width, page_height)
++ pdf_surface.set_device_scale(1 / self.__scale, 1 / self.__scale)
+ pdf_context.set_source_surface(img, 0, 0)
+ pdf_context.paint()
+ pdf_context.show_page() # draw pdf_context on pdf_surface
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
+0002-fix-printing-of-cleaned-pdf-files.patch
0001-improve-support-for-xlsx-files.patch
View it on GitLab: https://salsa.debian.org/pkg-privacy-team/mat2/-/compare/0cdf73a149d956b3fb7849187333ee5904b558d5...61457934a899b4b600d91a99a142204b98eb0671
--
View it on GitLab: https://salsa.debian.org/pkg-privacy-team/mat2/-/compare/0cdf73a149d956b3fb7849187333ee5904b558d5...61457934a899b4b600d91a99a142204b98eb0671
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-privacy-commits/attachments/20210729/e0271966/attachment-0001.htm>
More information about the Pkg-privacy-commits
mailing list