[libreoffice/f16] Resolves: fdo#42784 BorderLine with only InnerWidth set does not work

Michael Stahl mstahl at fedoraproject.org
Fri Feb 3 11:29:34 UTC 2012


commit 89eee9404927ea443d955b091556f42eb17a0272
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Feb 3 12:28:14 2012 +0100

    Resolves: fdo#42784 BorderLine with only InnerWidth set does not work

 ...o-42784-BorderLine-with-only-InnerWidth-s.patch |   42 ++++++++++++++++++++
 libreoffice.spec                                   |    3 +
 2 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/0001-resolved-fdo-42784-BorderLine-with-only-InnerWidth-s.patch b/0001-resolved-fdo-42784-BorderLine-with-only-InnerWidth-s.patch
new file mode 100644
index 0000000..7d3a388
--- /dev/null
+++ b/0001-resolved-fdo-42784-BorderLine-with-only-InnerWidth-s.patch
@@ -0,0 +1,42 @@
+From e44b64d297293b83459fddda968923750e2f6a5b Mon Sep 17 00:00:00 2001
+From: Eike Rathke <erack at redhat.com>
+Date: Thu, 2 Feb 2012 19:11:37 +0100
+Subject: [PATCH] resolved fdo#42784 BorderLine with only InnerWidth set does
+ not work (cherry picked from commit
+ 971f826a96f0938bfcfd8dfe26edd50d8e031bb4)
+
+Signed-off-by: Michael Stahl <mstahl at redhat.com>
+---
+ editeng/source/items/borderline.cxx |   16 ++++++++++++++++
+ 1 files changed, 16 insertions(+), 0 deletions(-)
+
+diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx
+index 61cecce..d15f53c 100644
+--- a/editeng/source/items/borderline.cxx
++++ b/editeng/source/items/borderline.cxx
+@@ -300,6 +300,22 @@ void SvxBorderLine::GuessLinesWidths( SvxBorderStyle nStyle, sal_uInt16 nOut, sa
+     else
+     {
+         SetStyle( nStyle );
++        if (nOut == 0 && nIn > 0)
++        {
++            // If only inner width is given swap inner and outer widths for
++            // single line styles, otherwise GuessWidth() marks this as invalid
++            // and returns a 0 width.
++            switch (nStyle)
++            {
++                case SOLID:
++                case DOTTED:
++                case DASHED:
++                    ::std::swap( nOut, nIn);
++                    break;
++                default:
++                    ;   // nothing
++            }
++        }
+         m_nWidth = m_aWidthImpl.GuessWidth( nOut, nIn, nDist );
+     }
+ }
+-- 
+1.7.7.6
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 2c1e0f2..9df1fab 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -185,6 +185,7 @@ Patch66: 0002-fdo-40438-force-calculating-layout-before-Activate-t.patch
 Patch67: 0003-fdo-38542-sw-ODF-import-divide-width-by-3-for-double.patch
 Patch68: 0004-fdo-38542-sw-ODF-import-prevent-border-width-overrid.patch
 Patch69: 0001-rhbz-746174-also-export-list-restart-for-non-root-li.patch
+Patch70: 0001-resolved-fdo-42784-BorderLine-with-only-InnerWidth-s.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1042,6 +1043,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch67 -p1 -b .fdo-38542-sw-ODF-import-divide-width-by-3-for-double.patch
 %patch68 -p1 -b .fdo-38542-sw-ODF-import-prevent-border-width-overrid.patch
 %patch69 -p1 -b .rhbz-746174-also-export-list-restart-for-non-root-li.patch
+%patch70 -p1 -b .resolved-fdo-42784-BorderLine-with-only-InnerWidth-s.patch
 
 # these are horribly incomplete--empty translations and copied english
 # strings with spattering of translated strings
@@ -2371,6 +2373,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 - Resolves: fdo#40438 force calculating layout before Activate to
   avoid crashes and loops
 - Resolves: rhbz#746174 also export list restart for non root list
+- Resolves: fdo#42784 BorderLine with only InnerWidth set does not work
 
 * Tue Jan 17 2012 David Tardon <dtardon at redhat.com> - 3.4.5.2-1
 - new upstream version 3.4.5


More information about the scm-commits mailing list