<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - findAll and replaceAll methods have an unexpected behavior when they are called from the com.sun.star.sheet.SheetCellRanges service."
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=115983">115983</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>findAll and replaceAll methods have an unexpected behavior when they are called from the com.sun.star.sheet.SheetCellRanges service.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.3.0 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>framework
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tvataire@starxpert.fr
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
When the findAll or replaceAll methods are called from the
com.sun.star.sheet.SheetCellRanges service, the result include more cells than
expected if the ranges of the collection are spread over several sheets.


Steps to Reproduce:
Hereafter, a sample of code that reproduces the problem.
Step to reproduce :
1. quit LibreOffice.
2. save the script into the Scripts/python path of your user profile
3. execute the script with the command : <libo_install_path>/program/soffice
'vnd.sun.star.script:cellranges_replace.py$replace?language=Python&location=user'


Actual Results:  
If the following ranges are added to an empty SheetCellRanges collection :
- '$asheet'.$A$1:$B$2
- '$anothersheet'.$B$3:$C$4,
the searched value is found (and replaced) on the following ranges :
- '$asheet'.$A$1:$B$2
- '$anothersheet'.$B$3:$C$4
- '$anothersheet'.$A$1:$B$2
- '$asheet'.$B$3:$C$4
whereas the last two ranges are not part of the collection.


Expected Results:
The scope of the findAll and replaceAll methods should be restricted to the
ranges that are parts of the collection.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
This bug yet exists in LibreOffice 6.0.1.

A workaround is to browse ranges in the collection and call the findAll /
replaceAll methods on each of theses ranges.


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Firefox/52.0</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>