[Libreoffice-bugs] [Bug 101948] Search fails to find specified indentation in imported Word document
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Thu Dec 5 20:21:56 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=101948
--- Comment #10 from Mike Kaganski <mikekaganski at hotmail.com> ---
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.
--
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/20191205/3bd01412/attachment.html>
More information about the Libreoffice-bugs
mailing list