[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 4 commits - include/oox oox/source sd/qa sfx2/uiconfig vcl/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Thu May 7 07:25:15 UTC 2020


 include/oox/drawingml/drawingmltypes.hxx |    3 +
 include/oox/export/drawingml.hxx         |    1 
 oox/source/drawingml/drawingmltypes.cxx  |    6 +++
 oox/source/export/drawingml.cxx          |   35 +++++++++++++++++++
 sd/qa/unit/data/pptx/tdf79082.pptx       |binary
 sd/qa/unit/export-tests-ooxml2.cxx       |   57 +++++++++++++++++++++++++++++++
 sfx2/uiconfig/ui/custominfopage.ui       |    4 ++
 vcl/source/control/button.cxx            |    3 -
 vcl/source/edit/textview.cxx             |    5 ++
 9 files changed, 111 insertions(+), 3 deletions(-)

New commits:
commit c44d85b32fdee8fedb40e30b61bcd7732600e4f5
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue May 5 12:02:47 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu May 7 09:24:41 2020 +0200

    tdf#79082 Export paragraph tab stops to ooxml
    
    Change-Id: I7d25dc1ab3c960aafc07a3be69b54f5aceef23fe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93462
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 2c14bbd5820f854be3a4b1c0f49b9d9afa05b08c)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93526
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/include/oox/drawingml/drawingmltypes.hxx b/include/oox/drawingml/drawingmltypes.hxx
index 5e3517b58524..8b513d8c3f61 100644
--- a/include/oox/drawingml/drawingmltypes.hxx
+++ b/include/oox/drawingml/drawingmltypes.hxx
@@ -106,6 +106,9 @@ sal_Int32 GetCoordinate( sal_Int32 nValue );
 /** converts an emu string into 1/100th mmm */
 sal_Int32 GetCoordinate( const OUString& sValue );
 
+/** converts 1/100mm to EMU */
+sal_Int32 GetPointFromCoordinate( sal_Int32 nValue );
+
 /** converts a ST_Percentage % string into 1/1000th of % */
 sal_Int32 GetPercent( const OUString& sValue );
 
diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx
index a3da6a3cb442..fb7b7877138c 100644
--- a/include/oox/export/drawingml.hxx
+++ b/include/oox/export/drawingml.hxx
@@ -247,6 +247,7 @@ public:
     void WriteParagraphProperties(const css::uno::Reference< css::text::XTextContent >& rParagraph, float fFirstCharHeight);
     void WriteParagraphNumbering(const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, float fFirstCharHeight,
                                   sal_Int16 nLevel );
+    void WriteParagraphTabStops(const css::uno::Reference<css::beans::XPropertySet>& rXPropSet);
     void WriteRun( const css::uno::Reference< css::text::XTextRange >& rRun,
                    bool& rbOverridingCharHeight, sal_Int32& rnCharHeight );
     void WriteRunProperties( const css::uno::Reference< css::beans::XPropertySet >& rRun, bool bIsField, sal_Int32 nElement, bool bCheckDirect,
diff --git a/oox/source/drawingml/drawingmltypes.cxx b/oox/source/drawingml/drawingmltypes.cxx
index f341ff3f9587..9a5ddf3cc4b9 100644
--- a/oox/source/drawingml/drawingmltypes.cxx
+++ b/oox/source/drawingml/drawingmltypes.cxx
@@ -54,6 +54,12 @@ sal_Int32 GetCoordinate( const OUString& sValue )
     return GetCoordinate( nRet );
 }
 
+/** converts 1/100mm to EMU */
+sal_Int32 GetPointFromCoordinate( sal_Int32 nValue )
+{
+    return nValue * 360;
+}
+
 /** converts a ST_Percentage % string into 1/1000th of % */
 sal_Int32 GetPercent( const OUString& sValue )
 {
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 468c89ad7b7e..4259feb2ae81 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2393,6 +2393,40 @@ void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropS
     }
 }
 
+void DrawingML::WriteParagraphTabStops(const Reference<XPropertySet>& rXPropSet)
+{
+    css::uno::Sequence<css::style::TabStop> aTabStops;
+    if (GetProperty(rXPropSet, "ParaTabStops"))
+        aTabStops = *o3tl::doAccess<css::uno::Sequence<css::style::TabStop>>(mAny);
+
+    if (aTabStops.getLength() > 0)
+        mpFS->startElementNS(XML_a, XML_tabLst);
+
+    for (const css::style::TabStop& rTabStop : std::as_const(aTabStops))
+    {
+        OString sPosition = OString::number(GetPointFromCoordinate(rTabStop.Position));
+        OString sAlignment;
+        switch (rTabStop.Alignment)
+        {
+            case css::style::TabAlign_DECIMAL:
+                sAlignment = "dec";
+                break;
+            case css::style::TabAlign_RIGHT:
+                sAlignment = "r";
+                break;
+            case css::style::TabAlign_CENTER:
+                sAlignment = "ctr";
+                break;
+            case css::style::TabAlign_LEFT:
+            default:
+                sAlignment = "l";
+        }
+        mpFS->singleElementNS(XML_a, XML_tab, XML_algn, sAlignment, XML_pos, sPosition);
+    }
+    if (aTabStops.getLength() > 0)
+        mpFS->endElementNS(XML_a, XML_tabLst);
+}
+
 bool DrawingML::IsGroupShape( const Reference< XShape >& rXShape )
 {
     bool bRet = false;
@@ -2593,6 +2627,7 @@ void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rPara
         }
 
         WriteParagraphNumbering( rXPropSet, fFirstCharHeight, nLevel );
+        WriteParagraphTabStops( rXPropSet );
 
         mpFS->endElementNS( XML_a, XML_pPr );
     }
diff --git a/sd/qa/unit/data/pptx/tdf79082.pptx b/sd/qa/unit/data/pptx/tdf79082.pptx
new file mode 100644
index 000000000000..8dcf4ff0a9e0
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf79082.pptx differ
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx
index 6bac3cca9584..7a188b885d08 100644
--- a/sd/qa/unit/export-tests-ooxml2.cxx
+++ b/sd/qa/unit/export-tests-ooxml2.cxx
@@ -182,6 +182,7 @@ public:
     void testTdf127372();
     void testTdf127379();
     void testTdf98603();
+    void testTdf79082();
     void testTdf119087();
     void testTdf131554();
     void testTdf132282();
@@ -285,6 +286,7 @@ public:
     CPPUNIT_TEST(testTdf127372);
     CPPUNIT_TEST(testTdf127379);
     CPPUNIT_TEST(testTdf98603);
+    CPPUNIT_TEST(testTdf79082);
     CPPUNIT_TEST(testTdf119087);
     CPPUNIT_TEST(testTdf131554);
     CPPUNIT_TEST(testTdf132282);
@@ -2639,6 +2641,61 @@ void SdOOXMLExportTest2::testTdf98603()
     CPPUNIT_ASSERT_EQUAL(OUString("IL"), aLocale.Country);
 }
 
+void SdOOXMLExportTest2::testTdf79082()
+{
+    ::sd::DrawDocShellRef xDocShRef = loadURL( m_directories.getURLFromSrc("/sd/qa/unit/data/pptx/tdf79082.pptx"), PPTX);
+    utl::TempFile tempFile;
+    xDocShRef = saveAndReload( xDocShRef.get(), PPTX, &tempFile );
+
+    xmlDocPtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml");
+    assertXPath(pXmlDocContent,
+        "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[1]",
+        "pos",
+        "360000");
+    assertXPath(pXmlDocContent,
+        "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[1]",
+        "algn",
+        "l");
+
+    assertXPath(pXmlDocContent,
+        "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[2]",
+        "pos",
+        "756000");
+    assertXPath(pXmlDocContent,
+        "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[2]",
+        "algn",
+        "l");
+
+    assertXPath(pXmlDocContent,
+        "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[3]",
+        "pos",
+        "1440000");
+    assertXPath(pXmlDocContent,
+        "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[3]",
+        "algn",
+        "ctr");
+
+    assertXPath(pXmlDocContent,
+        "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[4]",
+        "pos",
+        "1800000");
+    assertXPath(pXmlDocContent,
+        "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[4]",
+        "algn",
+        "r");
+
+    assertXPath(pXmlDocContent,
+        "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[5]",
+        "pos",
+        "3240000");
+    assertXPath(pXmlDocContent,
+        "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p/a:pPr/a:tabLst/a:tab[5]",
+        "algn",
+        "dec");
+
+    xDocShRef->DoClose();
+}
+
 void SdOOXMLExportTest2::testTdf119087()
 {
     ::sd::DrawDocShellRef xDocShRef = loadURL(m_directories.getURLFromSrc("sd/qa/unit/data/pptx/tdf119087.pptx"), PPTX);
commit 85aaf8f7fe99df0e8d34d421d93519d1bf6e2894
Author:     Andreas Heinisch <andreas.heinisch at yahoo.de>
AuthorDate: Mon May 4 17:41:11 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu May 7 09:24:35 2020 +0200

    tdf#64690 - Extend selection on find/replace
    
    In the Basic code window, extend the selection on the last paragraph
    during the search/replace process in order to consider newly inserted
    text portions.
    
    Change-Id: I27ad998709ac25cffbef4a354c87d422f97e1b51
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93432
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit e7f3731b8d3e930f85e7df0c0e55bbb1aaea191b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93377
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx
index 2eaa1b2f598c..9d4d46a0839d 100644
--- a/vcl/source/edit/textview.cxx
+++ b/vcl/source/edit/textview.cxx
@@ -2204,6 +2204,11 @@ sal_uInt16 TextView::Replace( const i18nutil::SearchOptions& rSearchOptions, boo
             nFound++;
 
             TextPaM aNewStart = pTextEngine->ImpInsertText( aSel, rSearchOptions.replaceString );
+            // tdf#64690 - extend selection to include inserted text portions
+            if ( aSel.GetEnd().GetPara() == aSearchSel.GetEnd().GetPara() )
+            {
+                aSearchSel.GetEnd().GetIndex() += rSearchOptions.replaceString.getLength() - 1;
+            }
             aSel = aSearchSel;
             aSel.GetStart() = aNewStart;
             bFound = pTextEngine->Search( aSel, rSearchOptions );
commit 1b043c61cf467dfdc8cadc2768fc7492b5d03355
Author:     Justin Luth <justin_luth at sil.org>
AuthorDate: Tue May 5 21:13:07 2020 +0300
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu May 7 09:24:31 2020 +0200

    Revert "tdf#125609c10 vcl/button: enforce only one radio selected on init"
    
    This reverts commit d35171456bc230efdaa9426da1398b2db7fa0df8,
    in order to resolve tdf#132581.
    
    Only applying this to LO 6.4 which is nearing stable.
    An attempt to find the real problem will be made for 7.0,
    but since this reverted commit is really obsolete, it can
    easily just be reverted.  (It fixes a situation caused by
    a commit that has since been fully reverted. So it should
    still be a valid fix, but if it exposes other problems,
    it can easily just be removed to cover them up again...)
    
    Change-Id: I0d765ce0cc4ab2b9d282d36a239518d43d6015ee
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93522
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 7d235e6bd4c8..f3fedd972a68 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1821,9 +1821,6 @@ WinBits RadioButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nSty
             nStyle &= ~WB_TABSTOP;
     }
 
-    if ( IsChecked() && IsRadioCheckEnabled() )
-        ImplUncheckAllOther( /*bSetStyle=*/false );
-
     return nStyle;
 }
 
commit 8c33f10edc9d97c294e763c124382ab4498f9589
Author:     andreas kainz <kainz.a at gmail.com>
AuthorDate: Sun May 3 08:37:36 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Thu May 7 09:24:26 2020 +0200

    tdf#132623 custom property dialog expand update
    
    Change-Id: Iab659269942853ed330ef65fbcb1e0155b3b24cc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93335
    Tested-by: Jenkins
    Reviewed-by: andreas_kainz <kainz.a at gmail.com>
    (cherry picked from commit 72d29798faac7bee311219b48d4a8373e6d50da3)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93382
    Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>

diff --git a/sfx2/uiconfig/ui/custominfopage.ui b/sfx2/uiconfig/ui/custominfopage.ui
index fcd78784d123..1893ba63b14e 100644
--- a/sfx2/uiconfig/ui/custominfopage.ui
+++ b/sfx2/uiconfig/ui/custominfopage.ui
@@ -5,6 +5,8 @@
   <object class="GtkGrid" id="CustomInfoPage">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
     <property name="border_width">6</property>
     <property name="row_spacing">6</property>
     <child>
@@ -85,6 +87,8 @@
           <object class="GtkViewport">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
+            <property name="hexpand">True</property>
+            <property name="vexpand">True</property>
             <child>
               <object class="GtkBox" id="box">
                 <property name="visible">True</property>


More information about the Libreoffice-commits mailing list