https://bugs.documentfoundation.org/show_bug.cgi?id=160781

Julien Nabet <serval2...@yahoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |serval2...@yahoo.fr
                 OS|Windows (All)               |All
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Julien Nabet <serval2...@yahoo.fr> ---
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.

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

Reply via email to