include/svtools/ctrlbox.hxx | 1 + sc/source/ui/view/gridwin.cxx | 7 +++++++ svx/source/tbxctrls/tbcontrl.cxx | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-)
New commits: commit dc05d912b56751ee53e2ee3d2638d85829b6a2d9 Author: Mert Tumer <mert.tu...@collabora.com> AuthorDate: Tue Jan 18 12:57:16 2022 +0300 Commit: Mert Tumer <mert.tu...@collabora.com> CommitDate: Mon Mar 14 11:52:59 2022 +0100 set active element to -1 when no selection for fontnamebox FontNameBox sets the currentVal to emptystring when there's a mixed font-name selection on the text but does not update the active_element which is incorrect whereas other comboboxes such as FontSize does it correctly. Signed-off-by: Mert Tumer <mert.tu...@collabora.com> Change-Id: Iff86bba64c2ab564ff5c5fa979eb846af9651a11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128551 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131518 Tested-by: Jenkins diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx index 28730d16e85a..ca45b081cf5a 100644 --- a/include/svtools/ctrlbox.hxx +++ b/include/svtools/ctrlbox.hxx @@ -368,6 +368,7 @@ public: int get_active() const { return m_xComboBox->get_active(); } OUString get_active_text() const { return m_xComboBox->get_active_text(); } void set_active_or_entry_text(const OUString& rText); + void set_active(int nPos) { m_xComboBox->set_active(nPos); } int get_count() const { return m_xComboBox->get_count(); } OUString get_text(int nIndex) const { return m_xComboBox->get_text(nIndex); } void set_sensitive(bool bSensitive) { m_xComboBox->set_sensitive(bSensitive); } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index d9971a2e5f21..70b14ee14bba 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -3159,8 +3159,11 @@ void SvxFontNameBox_Base::statusChanged_Impl( const css::frame::FeatureStateEven css::awt::FontDescriptor aFontDesc; if ( rEvent.State >>= aFontDesc ) Update(&aFontDesc); - else + else { + // no active element; delete value in the display + m_xWidget->set_active(-1); set_active_or_entry_text(""); + } m_xWidget->save_value(); } } commit 74d24d03afc58a535d3afb7d0c2d172fa1636829 Author: Mert Tumer <mert.tu...@collabora.com> AuthorDate: Wed Jan 12 19:02:23 2022 +0300 Commit: Mert Tumer <mert.tu...@collabora.com> CommitDate: Mon Mar 14 11:52:47 2022 +0100 lok: remove residue text selection when there's none in the core Residue selection can stay at the browser even after changing the cellcursor pos make sure to clean it up if there is no selection rectangle in reality to be synced with core. Signed-off-by: Mert Tumer <mert.tu...@collabora.com> Change-Id: I1b06b6ec84ae195936d12dc986ef4a19b26dbc8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128351 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Tested-by: Henry Castro <hcas...@collabora.com> Reviewed-by: Henry Castro <hcas...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131517 diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index e676dcfadd42..b5c6965cbcc1 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5932,6 +5932,13 @@ void ScGridWindow::notifyKitCellCursor() const pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_CURSOR, getCellCursor().getStr()); if (bListValButton && aListValPos == mrViewData.GetCurPos()) updateLOKValListButton(true, aListValPos); + std::vector<tools::Rectangle> aRects; + GetSelectionRects(aRects); + if (aRects.empty() || !mrViewData.IsActive()) + { + pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, ""); + SfxLokHelper::notifyOtherViews(pViewShell, LOK_CALLBACK_TEXT_VIEW_SELECTION, "selection", "EMPTY"); + } } void ScGridWindow::notifyKitCellViewCursor(const SfxViewShell* pForShell) const