libedata-book: Improve national phone number matching
authorMathias Hasselmann <mathias@openismus.com>
Fri, 1 Mar 2013 11:49:44 +0000 (12:49 +0100)
committerMathias Hasselmann <mathias@openismus.com>
Wed, 6 Mar 2013 11:10:34 +0000 (12:10 +0100)
commitc2c059e4e81410edfea4384d653fbf18838a0978
tree7c30e29e8f5eb06cb7043451586c96918ed2d392
parent335d9afe932070f5d3bfd79d30e52d860eec3bd9
libedata-book: Improve national phone number matching

e_phone_number_compare() and e_phone_number_compare_strings()
had different opinion how well "1234" and "234" match within
NANP regions. First considered them a national significant
number match as it interpreted the leading "1" as country
calling code, the later didn't. The former interpretion fits
better our E.164 normalization we do in the SQLite backend,
therefore we adopted that approach.

This also introduces e_phone_number_compare_strings_for_region().

https://bugs.freedesktop.org/show_bug.cgi?id=59571
addressbook/libebook-contacts/e-phone-number-private.cpp
addressbook/libebook-contacts/e-phone-number-private.h
addressbook/libebook-contacts/e-phone-number.c
addressbook/libebook-contacts/e-phone-number.h