[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - 2 commits - sc/source sfx2/source

Samuel Mehrbrodt (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 5 07:54:46 UTC 2019


 sc/source/core/data/column3.cxx           |   22 +++++++++++++++++-----
 sfx2/source/sidebar/SidebarController.cxx |    7 +++----
 2 files changed, 20 insertions(+), 9 deletions(-)

New commits:
commit bc451f16f1ddb5bc21efe6530752fe2bf5d9dea9
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue Jul 16 14:19:25 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Aug 5 09:54:16 2019 +0200

    tdf#126427 Fix deck highlighting after activating via UNO API
    
    Reviewed-on: https://gerrit.libreoffice.org/75723
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 5a6671e8d8dc65f2bbb0880f19fd8c8c8e426b6d)
    
    Change-Id: I4ff7dfa156905abcba0df8e6bfbddc9e7d37cbbb
    Reviewed-on: https://gerrit.libreoffice.org/75750
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit f9efc7a88806069daea8878d881a804a21e0b736)
    Reviewed-on: https://gerrit.libreoffice.org/76930
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 95b33d7cde4a..3e1d6c477224 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -557,8 +557,7 @@ void SidebarController::OpenThenToggleDeck (
     }
     RequestOpenDeck();
     SwitchToDeck(rsDeckId);
-    mpTabBar->Invalidate();
-    mpTabBar->HighlightDeck(rsDeckId);
+
     collectUIInformation(rsDeckId);
 }
 
@@ -571,8 +570,7 @@ void SidebarController::OpenThenSwitchToDeck (
         pSplitWindow->FadeIn();
     RequestOpenDeck();
     SwitchToDeck(rsDeckId);
-    mpTabBar->Invalidate();
-    mpTabBar->HighlightDeck(rsDeckId);
+
 }
 
 void SidebarController::SwitchToDefaultDeck()
@@ -712,6 +710,7 @@ void SidebarController::SwitchToDeck (
 
         msCurrentDeckId = rDeckDescriptor.msId;
     }
+    mpTabBar->Invalidate();
     mpTabBar->HighlightDeck(msCurrentDeckId);
 
     // Determine the panels to display in the deck.
commit 6553c058fb83a574ef70f0de421d42a9918816d8
Author:     Eike Rathke <erack at redhat.com>
AuthorDate: Thu Jun 27 14:12:32 2019 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Aug 5 09:54:06 2019 +0200

    Resolves: tdf#126116 keep original date format if detected type is identical
    
    Regression from
    
        commit 478e051f4ea13b15120fdf74faf94a6c2cfcb50c
        CommitDate: Tue May 21 15:35:07 2019 +0200
    
            Resolves: tdf#125109 prefer edit format's acceptance patterns and YMD order
    
    Change-Id: If1240f75ca7c4d46c156966a72b6a98c83448770
    Reviewed-on: https://gerrit.libreoffice.org/74803
    Reviewed-by: Eike Rathke <erack at redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit e6a1bbe6690474e752416c81e1ca8c82b2843539)
    Reviewed-on: https://gerrit.libreoffice.org/74856
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit bb329b0fbcc416b122885511f6120992bb369959)
    Reviewed-on: https://gerrit.libreoffice.org/76929
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 903111b20769..013cbd0850cc 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -2057,11 +2057,23 @@ bool ScColumn::ParseString(
                 if (!bIsNumberFormat)
                     break;
 
-                // convert back to the original language if a built-in format was detected
-                if (!pOldFormat)
-                    pOldFormat = aParam.mpNumFormatter->GetEntry( nOldIndex );
-                if ( pOldFormat )
-                    nIndex = aParam.mpNumFormatter->GetFormatForLanguageIfBuiltIn( nIndex, pOldFormat->GetLanguage() );
+                // If we have bForceFormatDate, the pOldFormat was/is of
+                // nOldIndex date(+time) type already, if detected type is
+                // compatible keep the original format.
+                if (bForceFormatDate && SvNumberFormatter::IsCompatible(
+                            eNumFormatType, aParam.mpNumFormatter->GetType( nIndex)))
+                {
+                    nIndex = nOldIndex;
+                }
+                else
+                {
+                    // convert back to the original language if a built-in format was detected
+                    if (!pOldFormat)
+                        pOldFormat = aParam.mpNumFormatter->GetEntry( nOldIndex );
+                    if (pOldFormat)
+                        nIndex = aParam.mpNumFormatter->GetFormatForLanguageIfBuiltIn(
+                                nIndex, pOldFormat->GetLanguage());
+                }
 
                 rCell.set(nVal);
                 if ( nIndex != nOldIndex)


More information about the Libreoffice-commits mailing list