[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 3 commits - sd/source svtools/source vcl/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 16 14:40:27 UTC 2021


 sd/source/ui/animations/SlideTransitionPane.cxx |   16 ++++++++++------
 svtools/source/control/ctrlbox.cxx              |    5 ++++-
 vcl/source/treelist/svimpbox.cxx                |    9 +++++++++
 3 files changed, 23 insertions(+), 7 deletions(-)

New commits:
commit 36a1bcec94bd9dd17d37b4cff7bae97f5ac12e9c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Jul 15 15:28:09 2021 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jul 16 16:39:47 2021 +0200

    crashreporting: Crash seen in CachePreview from Idle UpdateHdl
    
    the intent here is regenerate the previews if font settings changed
    which should mean that we restart at index 0 and not continue from
    the old index
    
    https: //crashreport.libreoffice.org/stats/crash_details/a01c5fcd-983b-40ab-b90a-8ee90286e5b8
    
    Change-Id: I9604ad96cf6cc757d2d33469827d1295d309454d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118923
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 4a0210cde5bd..7c7f61cb61f8 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -360,8 +360,11 @@ IMPL_LINK(FontNameBox, SettingsChangedHdl, VclSimpleEvent&, rEvent, void)
         gFontPreviewVirDevs.clear();
         gRenderedFontNames.clear();
         calcCustomItemSize(*m_xComboBox);
-        if (mbWYSIWYG)
+        if (mbWYSIWYG && mpFontList && !mpFontList->empty())
+        {
+            mnPreviewProgress = 0;
             maUpdateIdle.Start();
+        }
     }
 }
 
commit 84ccea13a6c26a1dd531430920280c2be72c5437
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jul 13 16:56:23 2021 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jul 16 16:39:42 2021 +0200

    tdf#143245 activate-on-single-click only if 'up' is at active entry
    
    which is typically selected by the 'down'
    
    Change-Id: I23382fb97146820da49e570280778729a3156f03
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118807
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx
index 7198ed561c0f..cc41e184d431 100644
--- a/vcl/source/treelist/svimpbox.cxx
+++ b/vcl/source/treelist/svimpbox.cxx
@@ -2015,7 +2015,16 @@ void SvImpLBox::MouseButtonUp( const MouseEvent& rMEvt)
     }
 
     if (m_pView->mbActivateOnSingleClick)
+    {
+        Point aPos(rMEvt.GetPosPixel());
+        SvTreeListEntry* pEntry = GetEntry(aPos);
+        // tdf#143245 ActivateOnSingleClick only
+        // if the 'up' is at the active entry
+        // typically selected by the 'down'
+        if (!pEntry || pEntry != m_pCursor)
+            return;
         m_pView->DoubleClickHdl();
+    }
 }
 
 void SvImpLBox::MouseMove( const MouseEvent& rMEvt)
commit ab27d9055f2cdf6ed2c043cce1478018ac32feec
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jul 12 12:19:22 2021 +0100
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Fri Jul 16 16:39:37 2021 +0200

    tdf#143291 the "none" item selected is distinct from nothing selected
    
    Change-Id: I2e012df85a5c28f462a6c643d7a9a88f8775e870
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118777
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 2075ef37351a..4795bbc02b62 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -411,6 +411,8 @@ css::ui::LayoutSize SlideTransitionPane::GetHeightForWidth(const sal_Int32 /*nWi
     return css::ui::LayoutSize(nMinimumHeight, -1, nMinimumHeight);
 }
 
+constexpr sal_uInt16 nNoneId = std::numeric_limits<sal_uInt16>::max();
+
 void SlideTransitionPane::Initialize(SdDrawDocument* pDoc)
 {
     mxFT_VARIANT = m_xBuilder->weld_label("variant_label");
@@ -446,7 +448,7 @@ void SlideTransitionPane::Initialize(SdDrawDocument* pDoc)
 
     // dummy list box of slide transitions for startup.
     mxVS_TRANSITION_ICONS->InsertItem(
-        0, Image( StockImage::Yes, "sd/cmd/transition-none.png" ),
+        nNoneId, Image( StockImage::Yes, "sd/cmd/transition-none.png" ),
         SdResId( STR_SLIDETRANSITION_NONE ),
         VALUESET_APPEND, /* show legend */ true );
     mxVS_TRANSITION_ICONS->Recalculate();
@@ -567,14 +569,14 @@ void SlideTransitionPane::updateControls()
     if( aEffect.mbEffectAmbiguous )
     {
         SAL_WARN( "sd.transitions", "Unusual, ambiguous transition effect" );
-        mxVS_TRANSITION_ICONS->SetNoSelection();
+        mxVS_TRANSITION_ICONS->SelectItem(nNoneId);
     }
     else
     {
         // ToDo: That 0 is "no transition" is documented nowhere except in the
         // CTOR of sdpage
         if( aEffect.mnType == 0 )
-            mxVS_TRANSITION_ICONS->SetNoSelection();
+            mxVS_TRANSITION_ICONS->SelectItem(nNoneId);
         else
             updateVariants( getPresetOffset( aEffect ) );
     }
@@ -758,9 +760,11 @@ impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co
     impl::TransitionEffect aResult;
     aResult.setAllAmbiguous();
 
+    bool bNoneSelected = mxVS_TRANSITION_ICONS->IsNoSelection() || mxVS_TRANSITION_ICONS->GetSelectedItemId() == nNoneId;
+
     // check first (aResult might be overwritten)
     if(  mxVS_TRANSITION_ICONSWin->get_sensitive() &&
-        !mxVS_TRANSITION_ICONS->IsNoSelection() &&
+        !bNoneSelected &&
          mxVS_TRANSITION_ICONS->GetSelectedItemId() > 0 )
     {
         const sd::TransitionPresetList& rPresetList = sd::TransitionPreset::getTransitionPresetList();
@@ -801,7 +805,7 @@ impl::TransitionEffect SlideTransitionPane::getTransitionEffectFromControls() co
         }
         aResult.mbEffectAmbiguous = false;
     }
-    else if (mxVS_TRANSITION_ICONS->IsNoSelection())
+    else if (bNoneSelected)
     {
         aResult.mbEffectAmbiguous = false;
     }
@@ -1008,7 +1012,7 @@ void SlideTransitionPane::updateVariants( size_t nPresetOffset )
 {
     const sd::TransitionPresetList& rPresetList = sd::TransitionPreset::getTransitionPresetList();
     mxLB_VARIANT->clear();
-    mxVS_TRANSITION_ICONS->SetNoSelection();
+    mxVS_TRANSITION_ICONS->SelectItem(nNoneId);
 
     if( nPresetOffset >= rPresetList.size() )
     {


More information about the Libreoffice-commits mailing list