Weekly Status Update 5
Hi, In this week, 1. Submitted a new pull request for tdf#41777 (Window size and position for each document) and 2. submitted patches addressing code reviews for (tdf#159380 Add an UNO command to close all documents) link to a new pull request - https://gerrit.libreoffice.org/c/core/+/168581 (tdf#41777 - Window size and position for each document) Best Regards, Aung
core.git: sc/source
sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d2eab48f697a1e6097778158f623f11306ac7a3d Author: Caolán McNamara AuthorDate: Sat Jun 8 19:56:21 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Jun 8 22:01:04 2024 +0200 cid#1603563 Unchecked return value Change-Id: Ie41d77d8809b28e44b2fa084f2f9e6cdfb6e167f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168579 Tested-by: Jenkins Reviewed-by: Caolán McNamara diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx index 64d220619c7f..39998fa7fee6 100644 --- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx +++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx @@ -685,7 +685,7 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint { uno::Any aOldValue; uno::Any aNewValue; - comphelper::OCommonAccessibleText::implInitTextChangedEvent(m_strCurCellValue, valStr, aOldValue, aNewValue); + (void)comphelper::OCommonAccessibleText::implInitTextChangedEvent(m_strCurCellValue, valStr, aOldValue, aNewValue); AccessibleEventObject aTextChangedEvent; aTextChangedEvent.EventId = AccessibleEventId::TEXT_CHANGED; aTextChangedEvent.OldValue = aOldValue;
core.git: sw/source
sw/source/core/text/guess.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit f050103c3324d878b310f37429ea3580a8230905 Author: Caolán McNamara AuthorDate: Fri Jun 7 20:14:15 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Jun 8 20:51:33 2024 +0200 stale hyphenation data after skipping blanks what I see is that after skipping the blanks that the m_xHyphWord remains describing the word at the original m_nBreakStart, but we have changed that m_nBreakStart and in the example I have the m_nBreakStart is at the next word, so the contents of m_xHyphWord bear no relationship to the current break position. Change-Id: I07c91495f0cd7ef6d78c0f0d5cef70070ebb6ff2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168561 Reviewed-by: Caolán McNamara Tested-by: Jenkins diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index ad95c41fd39d..c476de7110cc 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -474,6 +474,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, { m_nCutPos = m_nBreakStart = AdjustCutPos(m_nCutPos, m_nBreakPos, rInf); nPorLen = m_nBreakPos - rInf.GetIdx(); +m_xHyphWord = nullptr; } else {
core.git: Branch 'distro/collabora/co-24.04' - sw/source
sw/source/core/text/guess.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 12c8d404f47c6fc0c36f4319a68dee5f02d2f8e8 Author: Caolán McNamara AuthorDate: Fri Jun 7 20:14:15 2024 +0100 Commit: Caolán McNamara CommitDate: Sat Jun 8 20:51:10 2024 +0200 stale hyphenation data after skipping blanks what I see is that after skipping blanks that the m_xHyphWord remains describing the word at the original m_nBreakStart, but we have changed that m_nBreakStart and m_nBreakStart is now at the next word, so the contents of m_xHyphWord bear no relationship to the current break position. Change-Id: I07c91495f0cd7ef6d78c0f0d5cef70070ebb6ff2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168564 Tested-by: Jenkins CollaboraOffice Reviewed-by: Caolán McNamara diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index c3a94187a7ea..c199bbfcfa97 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -443,6 +443,7 @@ bool SwTextGuess::Guess( const SwTextPortion& rPor, SwTextFormatInfo &rInf, { m_nCutPos = m_nBreakStart = AdjustCutPos(m_nCutPos, m_nBreakPos, rInf); nPorLen = m_nBreakPos - rInf.GetIdx(); +m_xHyphWord = nullptr; } else {
core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c988d9e5cbb7bc6795d9555e86acb3543e66b863 Author: Eike Rathke AuthorDate: Sat Jun 8 18:38:08 2024 +0200 Commit: Gerrit Code Review CommitDate: Sat Jun 8 18:38:08 2024 +0200 Update git submodules * Update helpcontent2 from branch 'master' to 95755ff59d2fc074796f341d2dc781660c52ce74 - Tip link to INDIRECT wiki page Change-Id: I53d0bb0932617785ff64adc84c890d0be115125f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/168578 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/helpcontent2 b/helpcontent2 index 4167f524c471..95755ff59d2f 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 4167f524c4718c3960cae2e4f390d04ffdb20839 +Subproject commit 95755ff59d2fc074796f341d2dc781660c52ce74
help.git: source/text
source/text/scalc/01/04060109.xhp |3 +++ 1 file changed, 3 insertions(+) New commits: commit 95755ff59d2fc074796f341d2dc781660c52ce74 Author: Eike Rathke AuthorDate: Sat Jun 8 18:35:04 2024 +0200 Commit: Eike Rathke CommitDate: Sat Jun 8 18:38:08 2024 +0200 Tip link to INDIRECT wiki page Change-Id: I53d0bb0932617785ff64adc84c890d0be115125f Reviewed-on: https://gerrit.libreoffice.org/c/help/+/168578 Reviewed-by: Eike Rathke Tested-by: Jenkins diff --git a/source/text/scalc/01/04060109.xhp b/source/text/scalc/01/04060109.xhp index c0375dee07..04318693ba 100644 --- a/source/text/scalc/01/04060109.xhp +++ b/source/text/scalc/01/04060109.xhp @@ -228,6 +228,9 @@ =INDIRECT(A1) equals 100 if A1 contains C108 as a reference and cell C108 contains a value of 100. =SUM(INDIRECT("a1:" & ADDRESS(1;3))) totals the cells in the area of A1 up to the cell with the address defined by row 1 and column 3. This means that area A1:C1 is totaled. + + https://wiki.documentfoundation.org/Documentation/Calc_Functions/INDIRECT";>INDIRECT wiki page. + COLUMN function
New Defects reported by Coverity Scan for LibreOffice
Hi, Please find the latest report on new defect(s) introduced to LibreOffice found with Coverity Scan. 1 new defect(s) introduced to LibreOffice found with Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 1 of 1 defect(s) ** CID 1603563: Error handling issues (CHECKED_RETURN) /sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx: 688 in ScAccessibleSpreadsheet::Notify(SfxBroadcaster &, const SfxHint &)() *** CID 1603563: Error handling issues (CHECKED_RETURN) /sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx: 688 in ScAccessibleSpreadsheet::Notify(SfxBroadcaster &, const SfxHint &)() 682 { 683 OUString valStr(pScDoc->GetString(aNewCell.Col(),aNewCell.Row(),aNewCell.Tab())); 684 if(m_strCurCellValue != valStr) 685 { 686 uno::Any aOldValue; 687 uno::Any aNewValue; >>> CID 1603563: Error handling issues (CHECKED_RETURN) >>> Calling "implInitTextChangedEvent" without checking return value (as is >>> done elsewhere 7 out of 8 times). 688 comphelper::OCommonAccessibleText::implInitTextChangedEvent(m_strCurCellValue, valStr, aOldValue, aNewValue); 689 AccessibleEventObject aTextChangedEvent; 690 aTextChangedEvent.EventId = AccessibleEventId::TEXT_CHANGED; 691 aTextChangedEvent.OldValue = aOldValue; 692 aTextChangedEvent.NewValue = aNewValue; 693 mpAccCell->CommitChange(aTextChangedEvent); To view the defects in Coverity Scan visit, https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy-2BKADyCpvUKOL6EWmZljiu6VvXBlQRUbS683tC8265rGNPXqJ1ffcoLZCnTuJFQbNcTEkb4XaEQkzovKhJ5DB3c-3D2yhF_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtmVoA1ZVpVtHQewmxaxpP10IOsJWFFHZ1AWjnb-2BNn4Dm5uyy5rIiKxQhMDSKKdArZJmQsaQdkJf7dCm-2BsgvDhmKs6cjEsTI1PB833ifS08gUSajunuSq7tgJZ0ZJKQwCpl2ukeBgr4z38hc7rWcKXJH5wyNr4mWuBBccK7hBRXvY-3D
core.git: Branch 'private/quwex/notespane-search' - sd/source
sd/source/ui/view/Outliner.cxx | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) New commits: commit 148aabdb074b593c9c8d7b0b62695e490d46996f Author: Thorsten Behrens AuthorDate: Sat Jun 8 10:20:46 2024 +0200 Commit: Thorsten Behrens CommitDate: Sat Jun 8 10:26:33 2024 +0200 Fix crash after 'make notes pane searchable' Before that, make CppunitTest_sd_uiimpress CPPUNIT_TEST_NAME=testSearchAllInDocumentAndNotes was crashing with pInstance->GetViewShell() returning a nullptr. Change-Id: I1f497936ca31c761fdbdc86d159ba9b4d6104cd0 diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index c6a092f5d562..727cef1a7f9f 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1749,12 +1749,14 @@ void SdOutliner::EnterEditMode (bool bGrabFocus) pInstance->RequestSynchronousUpdate(); std::shared_ptr pNotesPaneShell(pInstance->GetViewShell(sd::framework::FrameworkHelper::msBottomImpressPaneURL)); - -// likely only one or two of these is enough -pNotesPaneShell->GetParentWindow()->GrabFocus(); -pNotesPaneShell->GetContentWindow()->Activate(); -pNotesPaneShell->GetContentWindow()->GrabFocus(); -pNotesPaneShell->GetContentWindow()->GetFocus(); +if(pNotesPaneShell) +{ +// likely only one or two of these is enough +pNotesPaneShell->GetParentWindow()->GrabFocus(); +pNotesPaneShell->GetContentWindow()->Activate(); +pNotesPaneShell->GetContentWindow()->GrabFocus(); +pNotesPaneShell->GetContentWindow()->GetFocus(); +} } mbFoundObject = true;
core.git: Branch 'feature/cib_contract49c' - sd/inc sd/sdi sd/source
Rebased ref, commits from common ancestor: commit c8612129fc641ee68381f0d364ab7a770a3d9c5d Author: Sarper Akdemir AuthorDate: Fri Jun 7 21:18:47 2024 +0200 Commit: Thorsten Behrens CommitDate: Sat Jun 8 10:21:18 2024 +0200 [WIP] make notes pane searchable Change-Id: I8133c6a74861e783ab1a23f51ac5faf362a0f512 diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx index 8d00cfbbba9c..94f83c0753e3 100644 --- a/sd/inc/Outliner.hxx +++ b/sd/inc/Outliner.hxx @@ -201,6 +201,7 @@ private: /// Returns the current outline view OutlinerView* getOutlinerView(); +OutlinerView* lclGetNotesPaneOutliner(); /// Specifies whether to search and replace, to spell check or to do a /// text conversion. diff --git a/sd/sdi/NotesPanelView.sdi b/sd/sdi/NotesPanelView.sdi index 2fca90c56fdc..933ef9922401 100644 --- a/sd/sdi/NotesPanelView.sdi +++ b/sd/sdi/NotesPanelView.sdi @@ -492,10 +492,14 @@ interface NotesPanelView ExecMethod = FuTemporary ; StateMethod = GetMenuState ; ] +FID_SEARCH_NOW // ole : ?, status : ? +[ +ExecMethod = Execute ; +StateMethod = GetState ; +GroupId = SfxGroupId::Document ; +] } -include "drtxtob.sdi" - shell NotesPanelViewShell { import NotesPanelView; diff --git a/sd/sdi/drviewsh.sdi b/sd/sdi/drviewsh.sdi index 84fa9bfa8471..ac7e44ab1a37 100644 --- a/sd/sdi/drviewsh.sdi +++ b/sd/sdi/drviewsh.sdi @@ -203,6 +203,12 @@ interface ImpressEditView : DrawView ExecMethod = FuTemporary ; StateMethod = GetMenuState ; ] +FID_SEARCH_NOW +[ +ExecMethod = Execute ; +StateMethod = GetState ; +GroupId = SfxGroupId::Document ; +] } shell DrawViewShell diff --git a/sd/source/ui/inc/OutlinerIteratorImpl.hxx b/sd/source/ui/inc/OutlinerIteratorImpl.hxx index 84b11e47b636..bb44cf6029a5 100644 --- a/sd/source/ui/inc/OutlinerIteratorImpl.hxx +++ b/sd/source/ui/inc/OutlinerIteratorImpl.hxx @@ -193,13 +193,15 @@ protected: */ void SetPage (sal_Int32 nPageIndex); +/// Iterator of all objects on the current page. +std::optional moObjectIterator; + +/// Pointer to the page associated with the current page index. May be NULL. +SdPage* mpPage; + private: /// Indicates whether a page changed occurred on switching to current page. bool mbPageChangeOccurred; -/// Pointer to the page associated with the current page index. May be NULL. -SdPage* mpPage; -/// Iterator of all objects on the current page. -std::optional moObjectIterator; // Don't use this operator. ViewIteratorImpl& operator= (const ViewIteratorImpl&) = delete; diff --git a/sd/source/ui/view/NotesPanelViewShell.cxx b/sd/source/ui/view/NotesPanelViewShell.cxx index 46c8fc144e78..f7d5f28a31db 100644 --- a/sd/source/ui/view/NotesPanelViewShell.cxx +++ b/sd/source/ui/view/NotesPanelViewShell.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -1333,15 +1334,49 @@ void NotesPanelViewShell::FuSupport(SfxRequest& rReq) void NotesPanelViewShell::Execute(SfxRequest& rReq) { -bool bForwardCall = true; - switch (rReq.GetSlot()) { +case FID_SEARCH_NOW: +{ +const SfxItemSet* pReqArgs = rReq.GetArgs(); + +sd::View* pView = nullptr; +if (auto pMainViewSh = GetViewShellBase().GetMainViewShell()) +pView = pMainViewSh->GetView(); + +if (pReqArgs) +{ +if (pView) +{ +rtl::Reference& xFuSearch += pView->getSearchContext().getFunctionSearch(); + +if (!xFuSearch.is()) +{ +xFuSearch = rtl::Reference(FuSearch::createPtr( +this, this->GetActiveWindow(), pView, GetDoc(), rReq)); + +pView->getSearchContext().setSearchFunction(xFuSearch); +} + +if (xFuSearch.is()) +{ +const SvxSearchItem& rSearchItem = pReqArgs->Get(SID_SEARCH_ITEM); + +SD_MOD()->SetSearchItem( + std::unique_ptr(rSearchItem.Clone())); +xFuSearch->SearchAndReplace(&rSearchItem); +} +} +} +rReq.Done(); +} +break; + case SID_SEARCH_ITEM: // Forward this request to the common (old) code of the // document shell. GetDocSh()->Execute(rReq); -bForwardCall = false; break; case SID_SPELL_DIALOG: @@ -1357,16 +1392,12 @@ void NotesPanelViewShell::Execute(SfxRequest& rReq) pViewFrame->GetBindings().Invalidate(SID_SPELL_DIALOG); rReq.Done(); -bForwardCall = false; } break;