sw/source/uibase/inc/conttree.hxx | 2 +- sw/source/uibase/utlui/content.cxx | 26 ++++++++++++-------------- sw/uiconfig/swriter/ui/pagestylespanel.ui | 2 ++ 3 files changed, 15 insertions(+), 15 deletions(-)
New commits: commit c74e95207991cd39561968bdb85be0de03120246 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Wed May 21 11:20:29 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed May 21 16:19:33 2025 +0200 fix invalid cast from 'GtkImage' to 'GtkLabel' Change-Id: I3e608207bdde10b02d4ef3fe7392d63284b06594 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185609 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins diff --git a/sw/uiconfig/swriter/ui/pagestylespanel.ui b/sw/uiconfig/swriter/ui/pagestylespanel.ui index fd6f2e493971..feae1288c7fc 100644 --- a/sw/uiconfig/swriter/ui/pagestylespanel.ui +++ b/sw/uiconfig/swriter/ui/pagestylespanel.ui @@ -247,6 +247,7 @@ <property name="hexpand">True</property> <property name="xalign">0</property> <property name="draw-indicator">True</property> + <property name="label" translatable="no"></property> <child> <placeholder/> </child> @@ -272,6 +273,7 @@ <property name="hexpand">True</property> <property name="xalign">0</property> <property name="draw-indicator">True</property> + <property name="label" translatable="no"></property> <child> <placeholder/> </child> commit c2b4ee64fa60e53ff8996571c88d5de192336111 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Tue May 6 11:16:13 2025 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Wed May 21 16:19:26 2025 +0200 clear while frozen if we will need to freeze anyway so we have a single thaw event Change-Id: If82c40480b418e845932854c6b20b09af208967e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184984 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185591 Tested-by: Jenkins diff --git a/sw/source/uibase/inc/conttree.hxx b/sw/source/uibase/inc/conttree.hxx index b2981e9b50d5..7512c574d178 100644 --- a/sw/source/uibase/inc/conttree.hxx +++ b/sw/source/uibase/inc/conttree.hxx @@ -239,7 +239,7 @@ public: /** Show the file */ void Display( bool bActiveView ); /** In the clear the content types have to be deleted, also. */ - void clear(bool bLeaveFrozen = false); + void clear(); /** After a file is dropped on the Navigator, the new shell will be set */ void SetHiddenShell(SwWrtShell* pSh); diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index bc322460de81..3fdad2456ca7 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -3218,11 +3218,6 @@ void SwContentTree::Display( bool bActive ) nEntryRelPos = GetAbsPos(*xOldSelEntry) - GetAbsPos(*xParentEntry); } - SwWrtShell* pShell = GetWrtShell(); - // thaw updates widget, in case we still do modification - leave it frozen - bool bLeaveFrozen = !!pShell; - clear(bLeaveFrozen); - if (!bActive) { m_aOverlayObjectDelayTimer.Stop(); @@ -3236,7 +3231,10 @@ void SwContentTree::Display( bool bActive ) else if (State::HIDDEN == m_eState) m_eState = State::ACTIVE; - if (pShell) + SwWrtShell* pShell = GetWrtShell(); + if (!pShell) + clear(); + else { std::unique_ptr<weld::TreeIter> xEntry = m_xTreeView->make_iterator(); std::unique_ptr<weld::TreeIter> xCntTypeEntry; @@ -3244,6 +3242,9 @@ void SwContentTree::Display( bool bActive ) // all content navigation view if(m_nRootType == ContentTypeId::UNKNOWN) { + m_xTreeView->freeze(); + clear(); + for( ContentTypeId nCntType : o3tl::enumrange<ContentTypeId>() ) { std::unique_ptr<SwContentType>& rpContentT = bActive ? @@ -3281,7 +3282,6 @@ void SwContentTree::Display( bool bActive ) } } - bLeaveFrozen = false; // do not thaw on the end m_xTreeView->thaw(); // restore visual expanded tree state @@ -3291,6 +3291,9 @@ void SwContentTree::Display( bool bActive ) // root content navigation view else { + m_xTreeView->freeze(); + clear(); + std::unique_ptr<SwContentType>& rpRootContentT = bActive ? m_aActiveContentArr[m_nRootType] : m_aHiddenContentArr[m_nRootType]; @@ -3317,7 +3320,6 @@ void SwContentTree::Display( bool bActive ) m_xTreeView->set_sensitive(*xEntry, m_xTreeView->iter_has_child(*xEntry)); - bLeaveFrozen = false; // do not thaw on the end m_xTreeView->thaw(); if (bChOnDemand) @@ -3362,22 +3364,18 @@ void SwContentTree::Display( bool bActive ) UpdateContentFunctionsToolbar(); } - if (bLeaveFrozen) - m_xTreeView->thaw(); - if (!m_bIgnoreDocChange && GetEntryCount() == nOldEntryCount) { m_xTreeView->vadjustment_set_value(nOldScrollPos); } } -void SwContentTree::clear(bool bLeaveFrozen) +void SwContentTree::clear() { m_xTreeView->freeze(); m_xTreeView->clear(); m_nEntryCount = 0; - if (!bLeaveFrozen) - m_xTreeView->thaw(); + m_xTreeView->thaw(); } bool SwContentTree::FillTransferData(TransferDataContainer& rTransfer)