Writer and Draw may want to implement wildcard search

Eike Rathke erack at redhat.com
Fri Feb 26 21:22:04 UTC 2016


Hi,

We now have a simple "Use Wildcards" search (* and ? wildcards with
\ escape) available in the Find&Replace dialog. It is *not* the weird
wildcards implemented by MS-Word's Advanced Find, which would be a mix
of shell wildcards and some fragments but not quite of regular
expressions plus some own peculiarities. Instead of these we have
full-blown regular expressions. It is more the very simple Excel
wildcards, but with \ instead of ~ as escape character, in preparation
for an office-wide usage.

This currently is visible and working only in Calc because it needs
some adaption in the applications to support the new algoritm type
css::util::SearchAlgorithms2::WILDCARD of the
css::util::SearchOptions2::AlgorithmType2 field, respectively
SvxSearchItem::GetWildcard() and/or the css::util::SearchDescriptor
service's SearchWildcard property.

In Writer I adapted all places that used css::util::SearchOptions to now
use css::util::SearchOptions2 and css::util::SearchAlgorithms2 constants
instead of css::util::SearchAlgorithms enums.

It would need to inspect places where currently a check for
css::util::SearchOptions2::AlgorithmType2 ==
css::util::SearchOptions2::SearchAlgorithms2::REGEXP or APPROXIMATE or
SvxSearchItem::GetRegExp() takes place and additionally support
WILDCARD or SvxSearchItem::GetWildcard(). Likely the handling is similar
to APPROXIMATE or REGEXP without ReplaceBackReferences().

To activate the checkbox for Writer or Draw see
svx/source/dialog/srchdlg.cxx places with TODO:WILDCARD comment.

Happy wildcarding ;-)

  Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GPG key "ID" 0x65632D3A - 2265 D7F3 A7B0 95CC 3918  630B 6A6C D5B7 6563 2D3A
Better use 64-bit 0x6A6CD5B765632D3A here is why: https://evil32.com/
Care about Free Software, support the FSFE https://fsfe.org/support/?erack
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20160226/26841447/attachment.sig>


More information about the LibreOffice mailing list