<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 - Writer: Numbering problem in Mail Merge toolbar"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=126366">126366</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Writer: Numbering problem in Mail Merge toolbar
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.1.5.2 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>Writer
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>amaldonado@linagora.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
When navigating through Mail Merge entries, the numbering is incorrect.

Steps to Reproduce:
1. In Writer, enable Mail Merge toolbar (View > Toolbars > Mail Merge)
2. Enable Data Sources (View > Data Sources)
3. Open the built-in table 'biblio'
4. Select the 'Identifier' column and drag&drop it into the document

Actual Results:
The counter is set to -1. If I click on the right arrow (Next Mail Merge
Entry), the counter changes successively to 1,1,3,3,5,5,...

Expected Results:
The counter should be set to 1. Clicking on the right arrow should change it
successively to 2,3,4,5...


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
I found that there are two commits that generate a regression:
- cbf3e0d241: <a class="bz_bug_link 
          bz_status_VERIFIED  bz_closed"
   title="VERIFIED FIXED - Crash when closing a document (being the only active) while being prompted for data source password"
   href="show_bug.cgi?id=121607">tdf#121607</a> defer other requests until password dialog is
dismissed
- 60714a8148: <a class="bz_bug_link 
          bz_status_VERIFIED  bz_closed"
   title="VERIFIED FIXED - prompt for password pops up of protected spreadsheet-datasource, as soon as file with related databasefields is opened"
   href="show_bug.cgi?id=121606">tdf#121606</a>: displaying Mail Merge toolbar shouldn't activate
connection

Before cbf3e0d241, the counter starts at 1 and updates as expected: 2,3,4,5,...
After cbf3e0d241 and before 60714a8148: 1,2,2,4,4,6,6,...
After 60714a8148: -1,1,1,3,3,5,5,...

Note: I found those commits while doing bisects with bibisect-linux-64-6.1

Note 2: I still get -1,1,1,3,3,5,5,... on:

Version: 6.4.0.0.alpha0+
Build ID: b9a7be7731ee7f03c8aa5498aa890b34552c94b1
CPU threads: 4; OS: Linux 5.1; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded</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>