Summary: | [EDITING] Find and Replace with [x] Cell Styles mistakes Direction (Rows & Columns) | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | LeroyG <iavs.leroy> |
Component: | Calc | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | ||
Severity: | normal | CC: | iavs.leroy, serval2412 |
Priority: | medium | ||
Version: | 6.4.7.2 release | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: |
Description
LeroyG
2024-04-22 12:31:07 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this. Code pointer: https://opengrok.libreoffice.org/xref/core/sc/source/core/data/table6.cxx?r=8ef4dc07#624 I tried this: diff --git a/sc/source/core/data/table6.cxx b/sc/source/core/data/table6.cxx index 243783c55d2e..240b2802962d 100644 --- a/sc/source/core/data/table6.cxx +++ b/sc/source/core/data/table6.cxx @@ -637,7 +637,7 @@ bool ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& bool bBack = rSearchItem.GetBackward(); short nAdd = bBack ? -1 : 1; - if (bRows) // by row + if (!bRows) // by column { if ( !IsColValid( nCol ) ) { @@ -661,7 +661,7 @@ bool ScTable::SearchStyle(const SvxSearchItem& rSearchItem, SCCOL& rCol, SCROW& } while ( !bFound && IsColValid( nCol ) ); } - else // by column + else // by row { SCCOL aColSize = aCol.size(); std::vector< SCROW > nNextRows ( aColSize ); It worked but the weird thing is with columns direction , I got "Search key not found" at the end instead of looping again. I don't have this with rows direction. Also, without the patch, the direction is wrong but the loop works in both cases. I suppose it'll require a less naive patch. |