Created attachment 127181 [details] Word document with various indented lines; described in text. In a .docx document stored by Word and imported into Writer, I tried to search for lines with a specified indentation (0.5", for instance). The lines were not found, even though the indentation format of the lines matched the search criteria. Changing the indent within Writer and then changing it back, or saving the file as rtf and then opening that, makes the search work correctly. The attached document, Indent_tests.docx, was stored by Word Starter v14.0.7172.5000. It contains seven lines, each indicating its indentation. To duplicate the problem, open the document in Writer. 1. Place the cursor in the second line, and choose Paragraph from the right-button menu or the Format menu. Verify that the line has a Before-text indent of 0.50". Click OK to close the Paragraph box. 2. Place the cursor in the first line. From the Edit menu, select Find & Replace, or press Ctrl+H. 3. In the Search For box, enter "This" (without the quotes). Click the plus sign beside Other options, then click Format. In the Before text box selector, enter 0.50", or use the up-arrow to reach that number. Click OK to close the Format box, then verify that "Indent left 0,5 inch" appears below the Search For box. 4. Click Find Next. The notation "Search key not found" appears. 5. Try the other indentations in the Format box: Before text of 1.00" or First line of 0.50". In every case, the search key is not found. 6. Click Close in the Find & Replace box. 7. Using the indent pointers in the ruler, or the Paragraph Format box, change the indent for one of the before-text lines, then change it back. Verify with the Paragraph Format box that the indent is back to what it was. 8. Go back into Search & Replace and specify the format of the line that you adjusted. That line will be found, but the other one with the same indent will not. Close the Find & Replace box. 9. Save the document as Rich Text (*.rtf). Close the document, then open the .rtf file. Repeat the tests in steps 1-5. All of the searches will succeed. It appears that in an imported Word document, the Search cannot find a specified indent, but once that indent has been set within Writer, or once the file has been converted to rtf by Writer, the Search is fine. Interestingly, storing an rtf file from Word doesn't fix the problem.
Repro. It works in 3.6, so regression. Arch Linux 64-bit, KDE Plasma 5 Version: 5.3.0.0.alpha0+ Build ID: 7cf444454c0c27e2f6d764164ea880b87163f45a CPU Threads: 8; OS Version: Linux 4.7; UI Render: default; Locale: fi-FI (fi_FI.UTF-8); Calc: group Built on September 27th 2016 Arch Linux 64-bit Version 3.6.7.2 (Build ID: e183d5b)
Reproducible with Version: 4.4.0.0.alpha0+, win7
This seems to have begun at the below commit. Adding Cc: to Michael Stahl; Could you possibly take a look at this one? Thanks 8a8b50772859fd6198e8e139ca853a4b7aca9133 is the first bad commit commit 8a8b50772859fd6198e8e139ca853a4b7aca9133 Author: Matthew Francis <mjay.francis@gmail.com> Date: Sat Sep 5 22:42:31 2015 +0800 source-hash-b8002169336b6b7597d32755e41fa3dc2688539e commit b8002169336b6b7597d32755e41fa3dc2688539e Author: Michael Stahl <mstahl@redhat.com> AuthorDate: Wed Nov 6 16:36:04 2013 +0100 Commit: Michael Stahl <mstahl@redhat.com> CommitDate: Thu Nov 7 14:27:50 2013 -0600 remove INPATH and PROEXT - WORKDIR path is just workdir - INSTDIR path is just instdir - WORKDIR_FOR_BUILD is workdir_for_build - INSTDIR_FOR_BUILD is instdir_for_build - replace other usage of INPATH by combination of OS and CPUNAME Change-Id: Ie398387ebd82a968ec2605f2103c55b43a231482 Reviewed-on: https://gerrit.libreoffice.org/6601 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Michael Stahl <mstahl@redhat.com> git bisect log # bad: [8775b1622f226e863b864de7e208226cbfb914e3] source-hash-22ea573b7417db0392c006dff06cde50ddbcd469 # good: [b3c6cf289ff72449408fa01958092d9e482e82bd] source-hash-a2c9d4f8bbde97f175bae4df771273a61251f402 git bisect start 'latest' 'oldest' # good: [be115ebaad667aefcc0366ce23d6bc7013060424] source-hash-5e6b2d0e4a55be8a4f57ecfe55248d7924d4f0b7 git bisect good be115ebaad667aefcc0366ce23d6bc7013060424 # good: [1d2a8e3e93e1b589fb1f7277c0997c6e9cf6a093] source-hash-2b0320da7b59d2d4c0c5dc5da8424458ce0d819d git bisect good 1d2a8e3e93e1b589fb1f7277c0997c6e9cf6a093 # good: [fde4c5cecac3fbf5feb5518a1385e62ab2ae56e9] source-hash-5084e2b313ef4c4a126f704e1d5397f20a3d4254 git bisect good fde4c5cecac3fbf5feb5518a1385e62ab2ae56e9 # bad: [7c4c99ee3ac62c9e36c0b61c6c7da226860a2af1] source-hash-ecc060715a7f903ff48a9db3d9c4c31769e82a18 git bisect bad 7c4c99ee3ac62c9e36c0b61c6c7da226860a2af1 # bad: [ea342832e3cc41055f723b6494ace2b1d5ceb550] source-hash-c4a593b6b1732def0a21f455c0ca50f82a9bc40d git bisect bad ea342832e3cc41055f723b6494ace2b1d5ceb550 # good: [41ef44652b1ce11e15b711fe0edf0b0b40a09212] source-hash-949e6c55300a58b0b3cb4c61a5d3ad923798281a git bisect good 41ef44652b1ce11e15b711fe0edf0b0b40a09212 # skip: [b46d232173db6f07c3177c3bc0878b789ae03f05] source-hash-9a0a4fddc53d72d90135058c3e6cf418b21f81ff git bisect skip b46d232173db6f07c3177c3bc0878b789ae03f05 # skip: [06aec7af97d33a5c2b21c31792915106907a919c] source-hash-43caf4fe9babdd68853df3cc68a4ece8e4223b1a git bisect skip 06aec7af97d33a5c2b21c31792915106907a919c # bad: [a8731f472a53eebb0793fdf289017b7b6abdd6c7] source-hash-b38e996bcee13eacb61f340ccff787806c053ce8 git bisect bad a8731f472a53eebb0793fdf289017b7b6abdd6c7 # good: [27885f462c0f6e3bce0b0cccc73579122bf2907c] source-hash-74ab9fb5cf6505aecee15f6f7eab61c1790bbda2 git bisect good 27885f462c0f6e3bce0b0cccc73579122bf2907c # good: [4067c418d26a8a94dc457fab7f67374baebab6f0] source-hash-63752c99899126ad57460dcc6c64ff223bfdce2c git bisect good 4067c418d26a8a94dc457fab7f67374baebab6f0 # bad: [8a8b50772859fd6198e8e139ca853a4b7aca9133] source-hash-b8002169336b6b7597d32755e41fa3dc2688539e git bisect bad 8a8b50772859fd6198e8e139ca853a4b7aca9133 # good: [31653dbb3567a9e70b8e48a9e844b3419712fc6a] source-hash-7fb73e6c30e66f028fe759376e3789456bf3ad33 git bisect good 31653dbb3567a9e70b8e48a9e844b3419712fc6a # first bad commit: [8a8b50772859fd6198e8e139ca853a4b7aca9133] source-hash-b8002169336b6b7597d32755e41fa3dc2688539e
See bug 103423 comment 8 (the bibisected commit might actually be not the real cause).
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
This bug is still present, with exactly the same symptoms as in the original report. Version: 6.0.5.2 (x64) Build ID: 54c8cbb85f300ac59db32fe8a675ff7683cd5a16 CPU threads: 4; OS: Windows 10.0; UI render: default; Locale: en-US (en_US); Calc: group
Dear David F Smith, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
This bug is still present, with exactly the same symptoms as in the original report. Version: 6.3.3.2 (x64) Build ID: a64200df03143b798afd1ec74a12ab50359878ed CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; Locale: en-US (en_US); UI-Language: en-US Calc: threaded
I should have mentioned in comment 8 that the user interface in the Find & Replace box has changed in minor ways, so some of the instructions aren't exactly correct (e.g., the field is now called "Find" instead of "Search For"). But functionally, the behavior is the same.
The search fails in lcl_Search in sw/source/core/crsr/findattr.cxx, where it calls CmpAttr, and there uses SvxLRSpaceItem::operator==. The difference between the paragraph's SvxLRSpaceItem and the one from search descriptor is in bExplicitZeroMarginValRight, which is true in the descriptor's, but false in paragraph's. It seems that the DOCX doesn't call SvxLRSpaceItem::SetRight for zero, unlike e.g. RTF filter. The obvious "fix" would be to make OOXML filter call SvxLRSpaceItem::SetRight in these cases. But that wouldn't be the correct fix, because it is obvious that the comparison failed on a value that wasn't meant to be searched: it's left indent that was important to user, but right indent that fails comparison. Since both indents are kept in the same item, the only way to fix that that I see is to use a special class derived from SvxLRSpaceItem for search, which would know which settings are set, and use an overridden operator== that would take that into account. Possibly could be made an easy hack with difficulty=interesting.
Still reproducible with the latest LO 7.5 dev master: Version: 7.5.0.0.alpha0+ / LibreOffice Community Build ID: ef9d461e420ca1869f88fa0d7ea749581819b360 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
Re-evaluating the EasyHack in 2022 This issue is still relevant. The EasyHacker should follow the solution and code pointer provided by Mike in comment 10. One should have a good understanding of C++ and be familiar with OOXML filter before trying to tackle this problem.
I would like to work on this
This was fixed in 7.6 by db115bec9254417ef7a3faf687478fe5424ab378
(In reply to Buovjaga from comment #14) > This was fixed in 7.6 by db115bec9254417ef7a3faf687478fe5424ab378 Note though, that there are other properties of this kind; when we use a complex item to represent several user-visible properties at once, they would show the same behavior. Michael's fix is the proper way fixing it. Splitting complex items into simple ones would be the best way. However, it might be non-trivial task, as the fixing commit shows. So the approach outlined in comment 10 might still be valid in similar cases.