Revision: 29225
          http://sourceforge.net/p/bibdesk/svn/29225
Author:   hofman
Date:     2025-04-27 22:07:14 +0000 (Sun, 27 Apr 2025)
Log Message:
-----------
use CQL formatter from yaz

Modified Paths:
--------------
    trunk/bibdesk/BDSKSRUGroupServer.m
    trunk/bibdesk/de.lproj/Localizable.strings
    trunk/bibdesk/en.lproj/Localizable.strings
    trunk/bibdesk/fr.lproj/Localizable.strings

Modified: trunk/bibdesk/BDSKSRUGroupServer.m
===================================================================
--- trunk/bibdesk/BDSKSRUGroupServer.m  2025-04-27 22:06:07 UTC (rev 29224)
+++ trunk/bibdesk/BDSKSRUGroupServer.m  2025-04-27 22:07:14 UTC (rev 29225)
@@ -57,11 +57,6 @@
 
 enum { BDSKSRUStateIdle, BDSKSRUStateSearch, BDSKSRUStateRetrieve };
 
-@interface BDSKCQLQueryFormatter : NSFormatter
-@end
-
-#pragma mark -
-
 @interface BDSKSRUGroupServer ()
 
 @property (nonatomic, copy) NSString *searchTerm;
@@ -196,7 +191,7 @@
 - (NSFormatter *)searchStringFormatter {
     static NSFormatter *formatter = nil;
     if (formatter == nil)
-        formatter = [[BDSKCQLQueryFormatter alloc] init];
+        formatter = [[ZOOMCQLQueryFormatter alloc] init];
     return formatter;
 }
 
@@ -368,31 +363,3 @@
 }
 
 @end
-
-#pragma mark -
-
-@implementation BDSKCQLQueryFormatter
-
-- (NSString *)stringForObjectValue:(id)obj { return obj; }
-
-- (BOOL)getObjectValue:(id *)obj forString:(NSString *)string 
errorDescription:(NSString **)error;
-{
-    BOOL success;
-    if (string && [@"" isEqualToString:string] == NO) {
-        ZOOM_query query = ZOOM_query_create();
-        int status = ZOOM_query_cql2rpn(query, [string UTF8String], NULL);
-        if (status) {
-            if (error) *error = NSLocalizedString(@"This is not a valid CQL 
query.", @"Error description");
-            success = NO;
-        } else {
-            success = YES;
-        }
-        ZOOM_query_destroy(query);
-    } else {
-        success = YES;
-    }
-    *obj = string;
-    return success;
-}
-
-@end

Modified: trunk/bibdesk/de.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/bibdesk/en.lproj/Localizable.strings
===================================================================
(Binary files differ)

Modified: trunk/bibdesk/fr.lproj/Localizable.strings
===================================================================
(Binary files differ)

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Bibdesk-commit mailing list
Bibdesk-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit

Reply via email to