[Libreoffice-bugs] [Bug 140836] New: Calc Advanced Filter does not work correctly when copying criteria range fields (BASIC code)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Mar 6 04:42:34 UTC 2021


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

            Bug ID: 140836
           Summary: Calc Advanced Filter does not work correctly when
                    copying criteria range fields (BASIC code)
           Product: LibreOffice
           Version: 7.1.1.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: eeigor at inbox.ru

Description:
BASIC: When the numeric criterion as string value is applied, the leading zero
is lost. Looking ahead: FilterFields(0).StringValue = "01", but after copying
the structure from critera range, we get .StringValue = "1" (see example
attached).

<pseudocode>

 ' Update filter fields.
 oFields = oCriteriaRange _
  .createFilterDescriptorByObject(oDBRange.ReferredCells).FilterFields

 ' #ERROR! after copying the structure
 oDescriptor.FilterFields = oFields  'the leading zero is lost

When applying the advanced (standard) filter manually, everything works
correctly. The REGEX function, of course, also works correctly.

Steps to Reproduce:
1. Download the example.
2. Run the code.
3. It doesn't work correctly.

Actual Results:
The leading zero is lost

Expected Results:
If the numeric criterion as a string contains a leading zero, then the
representation of the value should not change.


Reproducible: Always


User Profile Reset: No



Additional Info:
https://bugs.documentfoundation.org/show_bug.cgi?id=140613

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210306/3cba8257/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list