[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - 2 commits - sc/source vcl/qa

Noel Grandin noel.grandin at collabora.co.uk
Wed May 30 06:40:03 UTC 2018


 sc/source/ui/unoobj/textuno.cxx |   25 ++++++++-----------------
 vcl/qa/cppunit/complextext.cxx  |    8 ++++++++
 2 files changed, 16 insertions(+), 17 deletions(-)

New commits:
commit af51fb638528c8fd6b2b49383828ead6e7b19406
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon May 28 11:14:36 2018 +0200

    disable part of VclComplexTextTest::testArabic
    
    fails sporadically on one of the windows buildboxes, Khaled might be
    able to get to it in a few weeks
    
    Change-Id: I65ebb8ad1e2ae08308d2ac150b88a393c134f715
    Reviewed-on: https://gerrit.libreoffice.org/54906
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 39eecc510667c8b1be9d3a031f7a30ae5be18040)
    Reviewed-on: https://gerrit.libreoffice.org/54956
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index ad5d6ca1f48f..97d156d4f8e8 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -9,7 +9,9 @@
 
 #include <ostream>
 #include <vector>
+#if !defined(_WIN32)
 std::ostream& operator<<(std::ostream& rStream, const std::vector<long>& rVec);
+#endif
 
 #include <unotest/filters-test.hxx>
 #include <test/bootstrapfixture.hxx>
@@ -23,6 +25,7 @@ std::ostream& operator<<(std::ostream& rStream, const std::vector<long>& rVec);
 
 #include <config_test.h>
 
+#if !defined(_WIN32)
 std::ostream& operator<<(std::ostream& rStream, const std::vector<long>& rVec)
 {
     rStream << "{ ";
@@ -32,6 +35,7 @@ std::ostream& operator<<(std::ostream& rStream, const std::vector<long>& rVec)
     rStream << " }";
     return rStream;
 }
+#endif
 
 class VclComplexTextTest : public test::BootstrapFixture
 {
@@ -76,12 +80,16 @@ void VclComplexTextTest::testArabic()
     pOutDev->SetFont( aFont );
 
     // absolute character widths AKA text array.
+#if !defined(_WIN32)
     std::vector<long> aRefCharWidths {6,  9,  16, 16, 22, 22, 26, 29, 32, 32,
                                       36, 40, 49, 53, 56, 63, 63, 66, 72, 72};
+#endif
     std::vector<long> aCharWidths(aOneTwoThree.getLength(), 0);
     long nTextWidth = pOutDev->GetTextArray(aOneTwoThree, aCharWidths.data());
 
+#if !defined(_WIN32)
     CPPUNIT_ASSERT_EQUAL(aRefCharWidths, aCharWidths);
+#endif
     CPPUNIT_ASSERT_EQUAL(72L, nTextWidth);
     CPPUNIT_ASSERT_EQUAL(nTextWidth, aCharWidths.back());
 
commit c520c7de690b0de826467758bfd9313b287e1956
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon May 28 10:19:25 2018 +0200

    tdf#100756 slowdown in manipulating spreadsheet via UNO
    
    regression from
        commit 5bce32904091ffe28884fd5c0f4801ee82bad101
        SfxHint: convert home-grown RTTI to normal C++ RTTI
    
    the cost does seem in this case to be mostly the dynamic_cast, but since
    we don't need it anymore, just remove it
    
    Change-Id: Icbf51b89c036b86cfb3e4c2a827228ccf25bb3a6
    Reviewed-on: https://gerrit.libreoffice.org/54899
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 06f86d544c8017c2e736bc77db27dd623853770b)
    Reviewed-on: https://gerrit.libreoffice.org/54916

diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index d868dffd3a84..49fc91b2037a 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -987,27 +987,18 @@ void ScCellTextData::UpdateData()
 
 void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
 {
-    if ( dynamic_cast<const ScUpdateRefHint*>(&rHint) )
+    const SfxHintId nId = rHint.GetId();
+    if ( nId == SfxHintId::Dying )
     {
-//        const ScUpdateRefHint& rRef = (const ScUpdateRefHint&)rHint;
+        pDocShell = nullptr;                       // invalid now
 
-        //! Ref-Update
+        DELETEZ( pForwarder );
+        pEditEngine.reset();     // EditEngine uses document's pool
     }
-    else
+    else if ( nId == SfxHintId::DataChanged )
     {
-        const SfxHintId nId = rHint.GetId();
-        if ( nId == SfxHintId::Dying )
-        {
-            pDocShell = nullptr;                       // invalid now
-
-            DELETEZ( pForwarder );
-            pEditEngine.reset();     // EditEngine uses document's pool
-        }
-        else if ( nId == SfxHintId::DataChanged )
-        {
-            if (!bInUpdate)                         // not for own UpdateData calls
-                bDataValid = false;                 // text has to be read from the cell again
-        }
+        if (!bInUpdate)                         // not for own UpdateData calls
+            bDataValid = false;                 // text has to be read from the cell again
     }
 }
 


More information about the Libreoffice-commits mailing list