[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 5 commits - configure.ac sc/source swext/mediawiki sw/source

Andras Timar andras.timar at collabora.com
Tue Jun 13 10:23:09 UTC 2017


 configure.ac                                 |    2 -
 sc/source/ui/unoobj/scdetect.cxx             |    3 +
 sw/source/core/edit/edfcol.cxx               |   45 ++++++++++++++++++++-------
 swext/mediawiki/src/filter/odt2mediawiki.xsl |    2 -
 4 files changed, 38 insertions(+), 14 deletions(-)

New commits:
commit 7daad240f62582e2b32bc3b1af951414e3db0a02
Author: Andras Timar <andras.timar at collabora.com>
Date:   Tue Jun 13 12:22:41 2017 +0200

    Bump version to 5.3-17
    
    Change-Id: Ia47411718c0f2e8c3cf5196686b7927a95e9d8ac

diff --git a/configure.ac b/configure.ac
index 27dec304bee6..a15bd9b2c70a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
 
-AC_INIT([Collabora Office],[5.3.10.16],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[5.3.10.17],[],[],[https://collaboraoffice.com/])
 
 AC_PREREQ([2.59])
 
commit 3e55cfac20a4438fa6277c708d317073127f9fc3
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Jun 6 23:15:20 2017 +0200

    tdf#98888: mediawiki inserts redundant emptylines in <ref>
    
    There's a newline in case of heading, table or bibliography following text:p
    ok but only if we're not in text:note node
    
    Change-Id: I71172751a51e29abdd770e758d27b1bc8f15cb0d
    Reviewed-on: https://gerrit.libreoffice.org/38470
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Tested-by: Julien Nabet <serval2412 at yahoo.fr>
    (cherry picked from commit 8a400cfa468655142103f18f722adf1d5cbda9c7)
    Reviewed-on: https://gerrit.libreoffice.org/38485
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit 509fb27b9b630f8506af6104f8230b0efa2ebaaa)

diff --git a/swext/mediawiki/src/filter/odt2mediawiki.xsl b/swext/mediawiki/src/filter/odt2mediawiki.xsl
index f3da0651bbeb..4aada97afd75 100644
--- a/swext/mediawiki/src/filter/odt2mediawiki.xsl
+++ b/swext/mediawiki/src/filter/odt2mediawiki.xsl
@@ -874,7 +874,7 @@
 				</otherwise>
 			</choose>
  		</when>
- 		<when test="boolean(./following::*[1]/self::text:h) or boolean(./following::*[1]/self::table:table) or boolean(./following::*[1]/self::text:bibliography)">
+		<when test="not(boolean(ancestor::text:note)) and (boolean(./following::*[1]/self::text:h) or boolean(./following::*[1]/self::table:table) or boolean(./following::*[1]/self::text:bibliography))">
  			<!-- Newline before following heading or table. -->
  			<value-of select="$NL"/>
  			<value-of select="$NL"/>
commit 3742b583af95aa08b17116fce35471081e925dfe
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Jun 11 12:57:31 2017 +0200

    tdf#106423: dbase file can have no records
    
    Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=4e3ff19b33c84557fd20e68960499933b4e52638
    tdf#84834 sc: stricter type detection for dBASE files
    
    Log test file from tdf#84834 still opens in Writer as expected
    
    Change-Id: Ibf5a0f586e3a132455d2363e61e5cc7ea249002d
    Reviewed-on: https://gerrit.libreoffice.org/38660
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    (cherry picked from commit 57ae8834c8313354477117b65d87c86407f6bf82)
    Reviewed-on: https://gerrit.libreoffice.org/38692
    Reviewed-by: Lionel Elie Mamane <lionel at mamane.lu>
    (cherry picked from commit d2353a5a8afa5aa0a760b0e6412c2f77aa3a6df6)

diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 6e3318bdddc8..841191816e45 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -241,7 +241,8 @@ static bool lcl_MayBeDBase( SvStream& rStream )
     }
 
     // tdf#84834 sanity check of size
-    if (0 == nRecords || nSize < nHeaderLen + nRecords * sal_uInt64(nRecordSize))
+    // tdf#106423: a dbf file can have 0 record, so no need to check nRecords
+    if (nSize < nHeaderLen + nRecords * sal_uInt64(nRecordSize))
         return false;
 
     // Last byte of header must be 0x0d, this is how it's specified.
commit 2f1fe6fb70ed7f71cd9e1cd12c35dca13eccc178
Author: Szymon Kłos <szymon.klos at collabora.com>
Date:   Fri Jun 9 11:10:28 2017 +0200

    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 <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    (cherry picked from commit 42353b95629322f51e059337ab06579ffb1c6934)
    Signed-off-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 910850971830..14acbb2e665c 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);
 
@@ -378,10 +395,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<text::XTextRange> xTextRange(xWatermark, uno::UNO_QUERY);
commit ba8cb853730fda59cc29dc33948d25825a6bc0be
Author: Szymon Kłos <szymon.klos at collabora.com>
Date:   Tue Jun 13 10:22:58 2017 +0200

    tdf#108494 incorrect Watermark position
    
    Change-Id: Iec1dba66604af008ad8b6b1c20cd508048144463

diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 82256317bb20..910850971830 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -352,6 +352,10 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark)
         if (!bHeaderIsOn)
             xPageStyle->setPropertyValue(UNO_NAME_HEADER_IS_ON, uno::makeAny(true));
 
+        // backup header height
+        sal_Int32 nOldValue;
+        xPageStyle->getPropertyValue(UNO_NAME_HEADER_HEIGHT) >>= nOldValue;
+
         // If the header already contains a document header field, no need to do anything.
         uno::Reference<text::XText> xHeaderText;
         xPageStyle->getPropertyValue(UNO_NAME_HEADER_TEXT) >>= xHeaderText;
@@ -505,6 +509,11 @@ void SwEditShell::SetWatermark(const SfxWatermarkItem& rWatermark)
             xNamed->setName(sWatermark);
             xLockable->removeActionLock();
         }
+
+        // tdf#108494 the header height was switched to height of a watermark
+        // and shape was moved to the lower part of a page
+        xPageStyle->setPropertyValue(UNO_NAME_HEADER_HEIGHT, uno::makeAny((sal_Int32)11));
+        xPageStyle->setPropertyValue(UNO_NAME_HEADER_HEIGHT, uno::makeAny(nOldValue));
     }
 }
 


More information about the Libreoffice-commits mailing list