[libreoffice/f21] Resolves: fdo#88378 flipping by reversing coords no longer works

Caolán McNamara caolanm at fedoraproject.org
Thu Jan 22 14:46:10 UTC 2015


commit 5e8f10267fd60c993bceeb4eeedda5fa32ec4749
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Jan 22 14:46:36 2015 +0000

    Resolves: fdo#88378 flipping by reversing coords no longer works

 ...o-88378-flipping-by-reversing-co-ord-syst.patch |   64 ++++++++++++++++++++
 libreoffice.spec                                   |    4 +-
 2 files changed, 67 insertions(+), 1 deletions(-)
---
diff --git a/0001-Resolves-fdo-88378-flipping-by-reversing-co-ord-syst.patch b/0001-Resolves-fdo-88378-flipping-by-reversing-co-ord-syst.patch
new file mode 100644
index 0000000..e0b1189
--- /dev/null
+++ b/0001-Resolves-fdo-88378-flipping-by-reversing-co-ord-syst.patch
@@ -0,0 +1,64 @@
+From a3f67c5f1cff926904d73603fee7a0b142d5f126 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm at redhat.com>
+Date: Thu, 22 Jan 2015 14:37:29 +0000
+Subject: [PATCH] Resolves: fdo#88378 flipping by reversing co-ord system no
+ longer works
+
+not entirely sure when this stopped working, but our contempory code is riddled
+with asserts and throws for negative sizes so rework this to explicitly mirror
+the preview rather than try the no longer working technique
+
+Change-Id: Ie90283cad2797ab1c37848469b007dc01a2c9d75
+(cherry picked from commit a8835936e9d3e19443c63b7b365174254741cf76)
+---
+ sw/source/ui/frmdlg/frmpage.cxx | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
+index cd22bb5..e42f13a 100644
+--- a/sw/source/ui/frmdlg/frmpage.cxx
++++ b/sw/source/ui/frmdlg/frmpage.cxx
+@@ -2654,25 +2654,25 @@ void BmpWindow::Paint( const Rectangle& )
+             aPntPos.X() += nWidth - aPntSz.Width() ;
+     }
+ 
+-    if ( bHorz )
+-    {
+-        aPntPos.Y()     += aPntSz.Height();
+-        aPntPos.Y() --;
+-        aPntSz.Height() *= -1;
+-    }
+-    if ( bVert )
+-    {
+-        aPntPos.X()     += aPntSz.Width();
+-        aPntPos.X()--;
+-        aPntSz.Width()  *= -1;
+-    }
+-
+     // #i119307# clear window background, the graphic might have transparency
+     DrawRect(Rectangle(aPntPos, aPntSz));
+ 
+-    if ( bGraphic )
++    if (bHorz || bVert)
++    {
++        BitmapEx aTmpBmp(bGraphic ? aGraphic.GetBitmapEx() : aBmp);
++        sal_uLong nMirrorFlags(BMP_MIRROR_NONE);
++        if (bHorz)
++            nMirrorFlags |= BMP_MIRROR_VERT;
++        if (bVert)
++            nMirrorFlags |= BMP_MIRROR_HORZ;
++        aTmpBmp.Mirror(nMirrorFlags);
++        DrawBitmapEx( aPntPos, aPntSz, aTmpBmp );
++    }
++    else if (bGraphic)  //draw unmirrored preview graphic
++    {
+         aGraphic.Draw( this, aPntPos, aPntSz );
+-    else
++    }
++    else    //draw unmirrored stock sample image
+     {
+         DrawBitmapEx( aPntPos, aPntSz, aBmp );
+     }
+-- 
+1.9.3
+
diff --git a/libreoffice.spec b/libreoffice.spec
index a5117e9..3c5f03a 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -372,6 +372,7 @@ Patch64: 0001-Resolves-fdo-86978-append-formula-cells-to-track-ins.patch
 Patch65: 0001-if-we-change-the-keys-we-have-to-resort-based-on-the.patch
 Patch66: 0001-font-cache-gets-broken-on-adding-an-embedded-font.patch
 Patch67: 0001-rhbz-1184582-At-least-catch-and-log-UNO-exceptions-i.patch
+Patch68: 0001-Resolves-fdo-88378-flipping-by-reversing-co-ord-syst.patch
 
 %define instdir %{_libdir}
 %define baseinstdir %{instdir}/libreoffice
@@ -2343,11 +2344,12 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
-* Mon Jan 19 2015 Caolán McNamara <caolanm at redhat.com> - 1:4.3.5.2-12-UNBUILT
+* Thu Jan 22 2015 Caolán McNamara <caolanm at redhat.com> - 1:4.3.5.2-12-UNBUILT
 - Resolves: rhbz#1136013 ExternalToolEdit crash
 - font cache gets broken on adding an embedded font
 - if we change the keys we have to resort based on the new keys
 - Resolves: rhbz#1184582 crash in grammar checking thread
+- Resolves: fdo#88378 flipping by reversing coords no longer works
 
 * Fri Jan 16 2015 Eike Rathke <erack at redhat.com> - 1:4.3.5.2-11
 - Resolves: rhbz#1171828 fdo#86978 append formula cells to track instead of tree


More information about the scm-commits mailing list