From 3663bc728b1cbe10cfc385173239ea4c90c0e4e72d03063c9ae3659d1f489b08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 24 Jun 2017 10:09:21 +0000 Subject: [PATCH] - Drop upstreamed patch 0001-watermark.patch OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=510 --- 0001-watermark.patch | 77 -------------------------------------------- libreoffice.changes | 1 + libreoffice.spec | 3 -- 3 files changed, 1 insertion(+), 80 deletions(-) delete mode 100644 0001-watermark.patch diff --git a/0001-watermark.patch b/0001-watermark.patch deleted file mode 100644 index ffb29ed..0000000 --- a/0001-watermark.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 42353b95629322f51e059337ab06579ffb1c6934 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Szymon=20K=C5=82os?= -Date: Fri, 9 Jun 2017 11:10:28 +0200 -Subject: Watermark: fix rotation calculation - -* when angle > 180 was used calculated value was 0 -* values are rounded - -Change-Id: I0cade407883a60d8d802b487668882e95f42ddce -Reviewed-on: https://gerrit.libreoffice.org/38597 -Tested-by: Jenkins -Reviewed-by: Miklos Vajna - -diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx -index 8d6965c..94c066e9 100644 ---- a/sw/source/core/edit/edfcol.cxx -+++ b/sw/source/core/edit/edfcol.cxx -@@ -266,6 +266,29 @@ void SwEditShell::SetClassification(const OUString& rName, SfxClassificationPoli - } - } - -+sal_Int16 lcl_GetAngle(const drawing::HomogenMatrix3& rMatrix) -+{ -+ basegfx::B2DHomMatrix aTransformation; -+ basegfx::B2DTuple aScale; -+ basegfx::B2DTuple aTranslate; -+ double fRotate = 0; -+ double fShear = 0; -+ -+ aTransformation.set(0, 0, rMatrix.Line1.Column1); -+ aTransformation.set(0, 1, rMatrix.Line1.Column2); -+ aTransformation.set(0, 2, rMatrix.Line1.Column3); -+ aTransformation.set(1, 0, rMatrix.Line2.Column1); -+ aTransformation.set(1, 1, rMatrix.Line2.Column2); -+ aTransformation.set(1, 2, rMatrix.Line2.Column3); -+ aTransformation.set(2, 0, rMatrix.Line3.Column1); -+ aTransformation.set(2, 1, rMatrix.Line3.Column2); -+ aTransformation.set(2, 2, rMatrix.Line3.Column3); -+ -+ aTransformation.decompose(aScale, aTranslate, fRotate, fShear); -+ sal_Int16 nDeg = round(basegfx::rad2deg(fRotate)); -+ return nDeg < 0 ? round(nDeg) * -1 : round(360.0 - nDeg); -+} -+ - SfxWatermarkItem SwEditShell::GetWatermark() - { - SwDocShell* pDocShell = GetDoc()->GetDocShell(); -@@ -311,13 +334,7 @@ SfxWatermarkItem SwEditShell::GetWatermark() - if (xPropertySet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= nColor) - aItem.SetColor(nColor); - if (xPropertySet->getPropertyValue("Transformation") >>= aMatrix) -- { -- double y = aMatrix.Line2.Column1; -- double x = aMatrix.Line1.Column1; -- double nRad = atan2(y, x) * -1; -- double nDeg = nRad * 180.0 / F_PI; -- aItem.SetAngle(nDeg); -- } -+ aItem.SetAngle(lcl_GetAngle(aMatrix)); - if (xPropertySet->getPropertyValue(UNO_NAME_FILL_TRANSPARENCE) >>= nTransparency) - aItem.SetTransparency(nTransparency); - -@@ -374,10 +391,7 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark) - xPropertySet->getPropertyValue(UNO_NAME_FILLCOLOR) >>= nColor; - xPropertySet->getPropertyValue(UNO_NAME_FILL_TRANSPARENCE) >>= nTransparency; - xPropertySet->getPropertyValue("Transformation") >>= aMatrix; -- double y = aMatrix.Line2.Column1; -- double x = aMatrix.Line1.Column1; -- double nRad = atan2(y, x) * -1; -- nAngle = nRad * 180.0 / F_PI; -+ nAngle = lcl_GetAngle(aMatrix); - - // If the header already contains a watermark, see if it its text is up to date. - uno::Reference xTextRange(xWatermark, uno::UNO_QUERY); --- -cgit v0.10.2 - diff --git a/libreoffice.changes b/libreoffice.changes index 5b5724e..7e73b58 100644 --- a/libreoffice.changes +++ b/libreoffice.changes @@ -4,6 +4,7 @@ Sat Jun 24 09:51:43 UTC 2017 - tchvatal@suse.com - Update to 5.4.0.1: * First rc of the series, now only serious bugs will be fixed - Drop upstreamed patch 0001-undo-clone.patch +- Drop upstreamed patch 0001-watermark.patch ------------------------------------------------------------------- Wed Jun 21 13:04:49 UTC 2017 - tchvatal@suse.com diff --git a/libreoffice.spec b/libreoffice.spec index f428438..b356a32 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -83,8 +83,6 @@ Patch4: nlpsolver-no-broken-help.diff Patch5: mediawiki-no-broken-help.diff # PATCH-HOTFIX-UPSTREAM: disable test that rounds wrongly on most archs Patch16: libreoffice-hotfix-disablebrokenshapetest.patch -# PATCH-FIX-UPSTREAM taken from git will be in next release -Patch18: 0001-watermark.patch # try to save space by using hardlinks Patch990: install-with-hardlinks.diff BuildRequires: %{name}-share-linker @@ -914,7 +912,6 @@ Provides additional %{langname} translations and resources for %{project}. \ %patch4 %patch5 %patch16 -p1 -%patch18 -p1 %patch990 -p1 # Do not generate doxygen timestamp