[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-19 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

--- Comment #11 from BogdanB  ---
I found that this style is not even search for.
In my matrix, I replaced A1 with Heading 1, and all other with Heading 2. The
cursor on A1. Find next is not finding anything, despite the cursor being
exactly where the result should be.

In sc/source/core/data/table6.cxx, ScTable::SearchStyle has a 
bool bSelect = rSearchItem.GetSelection(); -> this is "false" after passing,
like no selection have been made.

If I select 2 cells, bSelect is "true".

I supose click on a cell is not considered selection, in this case.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-19 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

--- Comment #12 from Mike Kaganski  ---
Note that we don't discuss the code in Bugzilla: we use gerrit for that. You
create a change, send it to review, and then we discuss the issues there. The
change doesn't have to be complete, even doesn't have to compile.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-17 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

--- Comment #9 from BogdanB  ---
Created attachment 197663
  --> https://bugs.documentfoundation.org/attachment.cgi?id=197663&action=edit
Demo document

(In reply to BogdanB from comment #6)
> I moved line:
> nRow += nAdd;
> from line 647 to 651, after the nRow is called, and this bug is solved.

So, particularly for this exact bug case, this change would solve the case,
BUT, for this document I will attach, not.

Just open the file, place the cursor on yellow cell, and replace with Ctrl+H,
"Cell styles", “Heading 1” with “Accent 1”.

You will notice that the first column is not included when Replace is
actioning.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-17 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

--- Comment #10 from BogdanB  ---
I studied this bug with my matrice of 9 cells in 24.8. If you have the A1
selected, and press repeatedly Replace, first cell is passed and not replaced,
than all the others are replaced, then, the last one, A1, is replaced, also.
But if there is just one cell to be replaced, this is not working.

Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-17 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

--- Comment #8 from BogdanB  ---
I tried with a matrix of 3*3 cells (first 9 cells from the sheet), enter any
text, mark with Heading 1 Style, move the selected cell outside the matrix,
Ctrl+H, Check Cell Styles and deselect "Selection" if is checked, and when
replaced with Accent 1, the first column is not replacing. Just everything
else. So, a similar problem could be with column number initialization.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

--- Comment #7 from BogdanB  ---
I will make more tests for different scenarios, and if everything will be ok, I
will come with a commit.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-16 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

--- Comment #6 from BogdanB  ---
I moved line:
nRow += nAdd;
from line 647 to 651, after the nRow is called, and this bug is solved.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

--- Comment #5 from BogdanB  ---
(In reply to Mike Kaganski from comment #4)
> I don't really know. The code pointer is ScTable::SearchStyle
> (sc/source/core/data/table6.cxx), which in turn calls ScColumn::SearchStyle
> (sc/source/core/data/column.cxx); but which of them is faulty, needs
> investigation (one already suspicious bit is immediate increment of nRow in
> the former function, before the first call to the latter; but maybe that's
> OK).


I am note sure by this, but nRow (which is zero) is increased before search in
sc/source/core/data/table6.cxx:

//nRow here is zero
nRow += nAdd; 
648
do
649
{
650
//nRow here already is one
SCROW nNextRow = aCol[nCol].SearchStyle( nRow, pSearchStyle, bBack,
bSelect, rMark );
651
if (!ValidRow(nNextRow))

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

--- Comment #4 from Mike Kaganski  ---
I don't really know. The code pointer is ScTable::SearchStyle
(sc/source/core/data/table6.cxx), which in turn calls ScColumn::SearchStyle
(sc/source/core/data/column.cxx); but which of them is faulty, needs
investigation (one already suspicious bit is immediate increment of nRow in the
former function, before the first call to the latter; but maybe that's OK).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

Xisco Faulí  changed:

   What|Removed |Added

 CC||xiscofa...@libreoffice.org

--- Comment #2 from Xisco Faulí  ---
it works if AAA is added to B2 instead of A1

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

Xisco Faulí  changed:

   What|Removed |Added

 CC||mikekagan...@hotmail.com

--- Comment #3 from Xisco Faulí  ---
Hi Mike,
I'm wondering if this issue is caused by a loop starting as position 1 instead
of 0

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-13 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

BogdanB  changed:

   What|Removed |Added

 CC||buzea.bog...@libreoffice.or
   ||g
 Blocks||106876


Referenced Bugs:

https://bugs.documentfoundation.org/show_bug.cgi?id=106876
[Bug 106876] [META] Find & Replace with styles
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 163889] Cannot replace style of cell A1 when cursor is in cell A1

2024-11-13 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=163889

mkt  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
 CC||sendmoreinfo2...@yahoo.com

--- Comment #1 from mkt  ---
Hi,

It seems like the whenever the [Replace] button is clicked, LO is looking for
the next cell with "Heading 1" to apply "Accent 1" instead of applying to the
current cell. Therefore, it is showing "Search key not found".

If there are 2 cells with "Heading 1", keep clicking [Replace] button would
apply "Accent 1" to the second cell then to the first cell.

I could reproduced this with version:
Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 2; OS: Windows 10 X86_64 (10.0 build 19045); UI render:
Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.