Update of /cvsroot/mahogany/M/src/adb
In directory sc8-pr-cvs1:/tmp/cvs-serv533/src/adb
Modified Files:
ProvLine.cpp
Log Message:
Ignore local part in whitelist
Index: ProvLine.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/adb/ProvLine.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -b -u -2 -r1.9 -r1.10
--- ProvLine.cpp 16 Oct 2003 12:17:10 -0000 1.9
+++ ProvLine.cpp 16 Oct 2003 15:15:46 -0000 1.10
@@ -504,7 +504,13 @@
int LineEntryData::Matches(const wxChar *what, int /*where*/, int how) const
{
- wxString whatCopy(what);
+ wxString whatCopy;
wxString addressCopy(m_address);
+ if ( how & AdbLookup_Substring )
+ whatCopy << _T('*');
+ whatCopy << what;
+ if ( how & AdbLookup_Substring || how & AdbLookup_StartsWith )
+ whatCopy << _T('*');
+
if ( !(how & AdbLookup_CaseSensitive) )
{
@@ -513,20 +519,5 @@
}
- bool match;
- if ( how & AdbLookup_Substring )
- {
- match = addressCopy.find(whatCopy) != addressCopy.npos;
- }
- else if ( how & AdbLookup_StartsWith )
- {
- match = addressCopy.size() >= whatCopy.size()
- && addressCopy.compare(0, whatCopy.size(), whatCopy);
- }
- else
- {
- match = addressCopy == whatCopy;
- }
-
- return match ? AdbLookup_EMail : 0;
+ return addressCopy.Matches(whatCopy) ? AdbLookup_EMail : 0;
}
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates