[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 4 commits - emfio/qa sfx2/classification svtools/source sw/qa xmloff/source

Vasily Melenchuk (via logerrit) logerrit at kemper.freedesktop.org
Sun May 30 06:20:51 UTC 2021


 emfio/qa/cppunit/emf/EmfImportTest.cxx     |    8 ++++----
 emfio/qa/cppunit/wmf/data/TestPalette.wmf  |binary
 sfx2/classification/example_sl-SI.xml      |    2 +-
 svtools/source/control/valueset.cxx        |    4 +++-
 sw/qa/extras/odfexport/data/tdf137199.docx |binary
 sw/qa/extras/odfexport/odfexport.cxx       |   11 +++++++++++
 xmloff/source/style/xmlnume.cxx            |   19 ++++++++++++++++++-
 7 files changed, 37 insertions(+), 7 deletions(-)

New commits:
commit a253c5823bf8b8de13a091eac315f4cb0d9c4dd2
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Fri May 28 09:10:35 2021 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun May 30 08:20:17 2021 +0200

    tdf#137199: sw: convert list format string to prefix/suffix for ODF
    
    Since internally LO is able right now to use list level format strings
    and prefixes/suffixes only for backward compatibility, there is a need
    for conversion from format string (like "%1.") to prefix ("") and suffix
    (".") still used by ODT.
    
    Change-Id: If4b459e1b25b7f0ce511e6ac2de0824bb2c43d05
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116288
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
    Signed-off-by: Xisco Fauli <xiscofauli at libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116316

diff --git a/sw/qa/extras/odfexport/data/tdf137199.docx b/sw/qa/extras/odfexport/data/tdf137199.docx
new file mode 100644
index 000000000000..25b52977beca
Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf137199.docx differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 615cbed57fe5..5651a2c3d954 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -131,6 +131,17 @@ DECLARE_ODFEXPORT_TEST(testMathObjectFlatExport, "2_MathType3.docx")
     CPPUNIT_ASSERT_EQUAL(OUString(" size 12{2+2=4} {}"), formula2);
 }
 
+DECLARE_ODFEXPORT_TEST(testTdf137199, "tdf137199.docx")
+{
+    CPPUNIT_ASSERT_EQUAL(OUString(">1<"), getProperty<OUString>(getParagraph(1), "ListLabelString"));
+
+    CPPUNIT_ASSERT_EQUAL(OUString("1)"), getProperty<OUString>(getParagraph(2), "ListLabelString"));
+
+    CPPUNIT_ASSERT_EQUAL(OUString("HELLO1WORLD!"), getProperty<OUString>(getParagraph(3), "ListLabelString"));
+
+    CPPUNIT_ASSERT_EQUAL(OUString("HELLO2WORLD!"), getProperty<OUString>(getParagraph(4), "ListLabelString"));
+}
+
 static void testTdf43569_CheckIfFieldParse()
 {
     {
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index 2aac21253218..8c5ac4dc52c9 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -121,7 +121,24 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
         {
             rProp.Value >>= sSuffix;
         }
-        else if( rProp.Name == "BulletChar" )
+        else if (rProp.Name == "ListFormat")
+        {
+            OUString sListFormat;
+            rProp.Value >>= sListFormat;
+
+            // Since we have no support for entire format string it should be converted
+            // to prefix and suffix. Of course, it is not so flexible as format string,
+            // but it is the only option
+            sal_Int32 nFirstReplacement = sListFormat.indexOf('%');
+            sal_Int32 nLastReplacement = sListFormat.lastIndexOf('%') + 1;
+            if (nFirstReplacement > 0)
+                // Everything before first '%' will be prefix
+                sPrefix = sListFormat.copy(0, nFirstReplacement);
+            if (nLastReplacement >= 0 && nLastReplacement  < sListFormat.getLength() -1 )
+                // Everything beyond last '%' (+1 for follow up id) is a suffix
+                sSuffix = sListFormat.copy(nLastReplacement + 1);
+        }
+        else if (rProp.Name == "BulletChar")
         {
             OUString sValue;
             rProp.Value >>= sValue;
commit dd738da44019885b7f22271d6a87b52a108bf342
Author:     Bartosz Kosiorek <gang65 at poczta.onet.pl>
AuthorDate: Thu May 27 19:38:50 2021 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun May 30 08:20:16 2021 +0200

    tdf#117957 WMF Replace ellipses with rects to fix tests on arm64
    
    The issue is caused by floating numbers,
    On x86_64 it is:
    
      338.499728160392-445.269903703769
    
    on arm it is:
    
      338.499728160392-445.26990370377
    
    As in test files, we have two ellipses (which are made from small lines),
    which points rounds differently on different architectures
    
    Change-Id: I44dd5c7b3b13f3b1680d5a3a8348d6f467cb2f7c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116270
    Tested-by: Jenkins
    Tested-by: René Engelhard <rene at debian.org>
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
    Signed-off-by: Xisco Fauli <xiscofauli at libreoffice.org>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116314
    Reviewed-by: Bartosz Kosiorek <gang65 at poczta.onet.pl>

diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index e74bb9ad3725..5f0567fd313b 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -490,25 +490,25 @@ void Test::TestPaletteWMF()
 
     assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polypolygoncolor", 2);
     assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polypolygoncolor[1]/polypolygon",
-                "path", "m2433 1216.5c0 213.540351086756-56.2099207528522 423.318631225821-162.98009629623 608.25s-260.338534929591 338.499728160392-445.269903703769 445.26990370377-394.709648913244 162.98009629623-608.25 162.98009629623-423.318631225821-56.2099207528518-608.25-162.98009629623-338.499728160392-260.338534929591-445.26990370377-445.26990370377-162.980096296231-394.709648913244-162.980096296231-608.25c-2.70117261891301E-013-213.540351086756 56.2099207528519-423.318631225821 162.98009629623-608.25 106.770175543378-184.931368774179 260.338534929591-338.499728160392 445.269903703769-445.26990370377s394.709648913244-162.980096296231 608.25-162.980096296231c213.540351086756-5.40234523782601E-013 423.318631225821 56.2099207528518 608.25 162.98009629623s338.499728160392 260.338534929591 445.26990370377 445.269903703769c106.770175543379 184.931368774179 162.980096296231 394.709648913244 162.980096296231 608.25z");
+                "path", "m0 0h3015v3015h-3015z");
     assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polypolygoncolor[1]",
                 "color", "#ffff00");
 
     assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polypolygoncolor[2]/polypolygon",
-                "path", "m5079 3862.5c0 213.540351086756-56.2099207528527 423.318631225821-162.980096296231 608.25s-260.33853492959 338.499728160391-445.269903703769 445.269903703769-394.709648913244 162.980096296231-608.25 162.980096296231-423.318631225821-56.2099207528518-608.25-162.98009629623-338.499728160391-260.33853492959-445.26990370377-445.269903703769-162.980096296231-394.709648913245-162.980096296231-608.250000000001c-4.54747350886464E-013-213.540351086756 56.2099207528518-423.318631225821 162.98009629623-608.25 106.770175543378-184.931368774179 260.33853492959-338.499728160392 445.269903703769-445.26990370377s394.709648913244-162.980096296231 608.25-162.980096296231c213.540351086756-4.54747350886464E-013 423.318631225821 56.2099207528522 608.25 162.98009629623s338.499728160392 260.33853492959 445.26990370377 445.269903703769c106.770175543378 184.931368774178 162.980096296231 394.709648913244 162.980096296231 608.25z");
+                "path", "m2222 2222h2698v2698h-2698z");
     assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polypolygoncolor[2]",
                 "color", "#0080ff");
 
     assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polygonstroke", 2);
     assertXPathContent(pDocument, "/primitive2D/metafile/transform/mask/polygonstroke[1]/polygon",
-                       "2408,1191 2406,1129 2402,1068 2394,1007 2383,946 2369,886 2352,827 2332,768 2309,711 2284,655 2255,600 2224,547 2190,496 2153,446 2114,398 2073,353 2029,309 1984,268 1936,229 1886,192 1835,158 1782,127 1727,98 1671,73 1614,50 1555,30 1496,13 1436,-1 1375,-12 1314,-20 1253,-24 1191,-26 1191,-26 1129,-24 1068,-20 1007,-12 946,-1 886,13 827,30 768,50 711,73 655,98 600,127 547,158 496,192 446,229 398,268 353,309 309,353 268,398 229,446 192,496 158,547 127,600 98,655 73,711 50,768 30,827 13,886 -1,946 -12,1007 -20,1068 -24,1129 -26,1191 -26,1191 -24,1253 -20,1314 -12,1375 -1,1436 13,1496 30,1555 50,1614 73,1671 98,1727 127,1782 158,1835 192,1886 229,1936 268,1984 309,2029 353,2073 398,2114 446,2153 496,2190 547,2224 600,2255 655,2284 711,2309 768,2332 827,2352 886,2369 946,2383 1007,2394 1068,2402 1129,2406 1191,2408 1191,2408 1253,2406 1314,2402 1375,2394 1436,2383 1496,2369 1555,2352 1614,2332 1671,2309 1727,2284 1782,2255 1835,2224 1886,2190 1936,2153 1984,2114
  2029,2073 2073,2029 2114,1984 2153,1936 2190,1886 2224,1835 2255,1782 2284,1727 2309,1671 2332,1614 2352,1555 2369,1496 2383,1436 2394,1375 2402,1314 2406,1253");
+                       "0,0 3015,0 3015,3015 0,3015");
     assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polygonstroke[1]/line",
                 "color", "#ff0000");
     assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polygonstroke[1]/line",
                 "width", "132");
 
     assertXPathContent(pDocument, "/primitive2D/metafile/transform/mask/polygonstroke[2]/polygon",
-                       "5053,3836 5051,3774 5047,3713 5039,3652 5028,3591 5014,3531 4997,3472 4977,3413 4954,3356 4929,3300 4900,3245 4869,3192 4835,3141 4798,3091 4759,3043 4718,2998 4674,2954 4629,2913 4581,2874 4531,2837 4480,2803 4427,2772 4372,2743 4316,2718 4259,2695 4200,2675 4141,2658 4081,2644 4020,2633 3959,2625 3898,2621 3836,2619 3836,2619 3774,2621 3713,2625 3652,2633 3591,2644 3531,2658 3472,2675 3413,2695 3356,2718 3300,2743 3245,2772 3192,2803 3141,2837 3091,2874 3043,2913 2998,2954 2954,2998 2913,3043 2874,3091 2837,3141 2803,3192 2772,3245 2743,3300 2718,3356 2695,3413 2675,3472 2658,3531 2644,3591 2633,3652 2625,3713 2621,3774 2619,3836 2619,3836 2621,3898 2625,3959 2633,4020 2644,4081 2658,4141 2675,4200 2695,4259 2718,4316 2743,4372 2772,4427 2803,4480 2837,4531 2874,4581 2913,4629 2954,4674 2998,4718 3043,4759 3091,4798 3141,4835 3192,4869 3245,4900 3300,4929 3356,4954 3413,4977 3472,4997 3531,5014 3591,5028 3652,5039 3713,5047 3774,5051 3836,5053 3836,5053 389
 8,5051 3959,5047 4020,5039 4081,5028 4141,5014 4200,4997 4259,4977 4316,4954 4372,4929 4427,4900 4480,4869 4531,4835 4581,4798 4629,4759 4674,4718 4718,4674 4759,4629 4798,4581 4835,4531 4869,4480 4900,4427 4929,4372 4954,4316 4977,4259 4997,4200 5014,4141 5028,4081 5039,4020 5047,3959 5051,3898");
+                       "2222,2222 4920,2222 4920,4920 2222,4920");
     assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polygonstroke[2]/line",
                 "color", "#ff0000");
     assertXPath(pDocument, "/primitive2D/metafile/transform/mask/polygonstroke[2]/line",
diff --git a/emfio/qa/cppunit/wmf/data/TestPalette.wmf b/emfio/qa/cppunit/wmf/data/TestPalette.wmf
index 222809df5ff9..079a7f64f496 100644
Binary files a/emfio/qa/cppunit/wmf/data/TestPalette.wmf and b/emfio/qa/cppunit/wmf/data/TestPalette.wmf differ
commit 24675c1e569bef34584564baa690ffc8d228948f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 27 20:37:50 2021 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun May 30 08:20:16 2021 +0200

    tdf#142150 nothing already selected on MouseUp without previous MouseDown
    
    if mouse down was on tooltip (possible on macOS)
    
    Change-Id: Icb4328fa6977356c3bac5f37d42e99ae8d4e4b98
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116158
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index a83888276b31..0c3cb98bd58e 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -510,7 +510,9 @@ bool ValueSet::MouseButtonUp( const MouseEvent& rMouseEvent )
 {
     if (rMouseEvent.IsLeft() && !rMouseEvent.IsMod2())
     {
-        Select();
+        // tdf#142150 MouseUp seen without previous MouseDown
+        if (mnSelItemId)
+            Select();
         return true;
     }
 
commit 049e7a5e6d7c41f7d4a584487ffab4b637d17008
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 27 11:13:29 2021 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun May 30 08:20:15 2021 +0200

    add missing xmlns:loext to example_sl-SI.xml
    
    added to example.xml by
    
    commit 71ee09947d5a71105d64fd225bb3672dfa7ce834
    Date:   Tue Sep 19 15:37:04 2017 +0200
    
        TSCP: add advanced classification dialog
    
    but not to example_sl-SI.xml
    
    Change-Id: I8aa46554867db8c51bd118b6cc87e649b922cdfb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116157
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/sfx2/classification/example_sl-SI.xml b/sfx2/classification/example_sl-SI.xml
index 99e04a7aab71..13a4bcfdf29a 100644
--- a/sfx2/classification/example_sl-SI.xml
+++ b/sfx2/classification/example_sl-SI.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<baf:BusinessAuthorization xmlns:baf="urn:tscp:names:baf:1.1">
+<baf:BusinessAuthorization xmlns:baf="urn:tscp:names:baf:1.1" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0">
     <baf:PolicyAuthorityName>Avtoriteta primera politike TSCP</baf:PolicyAuthorityName>
     <baf:PolicyName>Primer politike TSCP</baf:PolicyName>
     <baf:AdministrativeData>


More information about the Libreoffice-commits mailing list