[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:45:07 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=c49b024

The following commit has been merged in the master branch:
commit c49b024810e70d66611796a45ef53c0e475b40ef
Author: Robin Mills <robin at clanmills.com>
Date:   Tue Apr 21 14:44:16 2015 +0000

    #1056.  Changed LangAltValueComparator to return bool str1 < str2 ? true : false.  Test reference files updated to reflect alphabetic lang output.
---
 include/exiv2/value.hpp      |  14 +++++++-------
 test/data/bugfixes-test.out  | Bin 140655 -> 141119 bytes
 test/data/conversions.out    |   2 +-
 test/data/xmpparser-test.out |  14 +++++---------
 4 files changed, 13 insertions(+), 17 deletions(-)

diff --git a/include/exiv2/value.hpp b/include/exiv2/value.hpp
index 738b4ea..65405e0 100644
--- a/include/exiv2/value.hpp
+++ b/include/exiv2/value.hpp
@@ -879,24 +879,24 @@ namespace Exiv2 {
 	  XMP spec chapter B.4 (page 42) the xml:lang qualifier is to be compared case insensitive.
       */
 	struct LangAltValueComparator {
-		int operator() (const std::string& str1, const std::string& str2) const
+		bool operator() (const std::string& str1, const std::string& str2) const
 		{
-    		int result = str1.size() < str2.size() ? -1
-    		           : str1.size() > str2.size() ?  1
+    		int result = str1.size() < str2.size() ?  1
+    		           : str1.size() > str2.size() ? -1
     		           : 0
     		           ;
     		std::string::const_iterator c1 = str1.begin();
     		std::string::const_iterator c2 = str2.begin();
-    		for (
+    		if (  result==0 ) for (
     		    ; result==0 && c1 != str1.end()
     		    ; ++c1, ++c2
     		    ) {
-        		result = tolower(*c1) < tolower(*c2) ? -1
-        		       : tolower(*c1) > tolower(*c2) ?  1
+        		result = tolower(*c1) < tolower(*c2) ?  1
+        		       : tolower(*c1) > tolower(*c2) ? -1
         		       : 0
         		       ;
     		}
-    		return result;
+    		return result < 0 ;
     	}
 	};
 
diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out
index 02f9cc2..1db2634 100644
Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ
diff --git a/test/data/conversions.out b/test/data/conversions.out
index 1fe627d..039897c 100644
--- a/test/data/conversions.out
+++ b/test/data/conversions.out
@@ -34,7 +34,7 @@ Testcase 5
 Warning: Failed to convert Xmp.dc.description to Iptc.Application2.Caption
 Warning: Failed to convert Xmp.dc.description to Exif.Image.ImageDescription
      <rdf:li xml:lang="x-default">How to fix this mess</rdf:li>
-Xmp.dc.description                           LangAlt     3  lang="x-default" How to fix this mess, lang="de-DE" The Exif image description, lang="it-IT" Ciao bella
+Xmp.dc.description                           LangAlt     3  lang="x-default" How to fix this mess, lang="it-IT" Ciao bella, lang="de-DE" The Exif image description
 Exif.Image.ImageDescription                  Ascii      21  How to fix this mess
 Iptc.Envelope.CharacterSet                   String      3  $%G
 Iptc.Application2.Caption                    String     20  How to fix this mess
diff --git a/test/data/xmpparser-test.out b/test/data/xmpparser-test.out
index de9b06f..2b91b5c 100644
--- a/test/data/xmpparser-test.out
+++ b/test/data/xmpparser-test.out
@@ -147,7 +147,7 @@ Xmp.ns1.SimpleProp1                          XmpText    13  Simple1 value
 Xmp.ns1.SimpleProp2                          XmpText    13  Simple2 value
 Xmp.ns1.SimpleProp2/?xml:lang                XmpText     9  x-default
 Xmp.ns1.ArrayProp1                           XmpBag      2  Item1.1 value, Item1.2 value
-Xmp.ns1.ArrayProp2                           LangAlt     2  lang="x-two" Item2.2 value, lang="x-one" Item2.1 value
+Xmp.ns1.ArrayProp2                           LangAlt     2  lang="x-one" Item2.1 value, lang="x-two" Item2.2 value
 Xmp.ns1.StructProp                           XmpText     0  type="Struct"
 Xmp.ns1.StructProp/ns2:Field1                XmpText    12  Field1 value
 Xmp.ns1.StructProp/ns2:Field2                XmpText    12  Field2 value
@@ -229,8 +229,8 @@ Xmp.ns1.NestedStructProp/ns2:Outer/ns2:Middle/ns2:Inner/ns2:Field2 XmpText    12
 >    </ns1:ArrayProp1>
 >    <ns1:ArrayProp2>
 >     <rdf:Alt>
->      <rdf:li xml:lang="x-two">Item2.2 value</rdf:li>
 >      <rdf:li xml:lang="x-one">Item2.1 value</rdf:li>
+>      <rdf:li xml:lang="x-two">Item2.2 value</rdf:li>
 >     </rdf:Alt>
 >    </ns1:ArrayProp2>
 >    <ns1:StructProp
@@ -279,13 +279,9 @@ Xmp.ns1.NestedStructProp/ns2:Outer/ns2:Middle/ns2:Inner/ns2:Field2 XmpText    12
 >                            
 > <?xpacket end="w"?>
 \ No newline at end of file
-5c5
-< Xmp.ns1.ArrayProp2                           LangAlt     2  lang="x-two" Item2.2 value, lang="x-one" Item2.1 value
----
-> Xmp.ns1.ArrayProp2                           LangAlt     2  lang="x-one" Item2.1 value, lang="x-two" Item2.2 value
 Xmp.dc.source                                XmpText    13  xmpsample.cpp
 Xmp.dc.subject                               XmpBag      2  Palmtree, Rubbertree
-Xmp.dc.title                                 LangAlt     2  lang="en-US" Sunset on the beach, lang="de-DE" Sonnenuntergang am Strand
+Xmp.dc.title                                 LangAlt     2  lang="de-DE" Sonnenuntergang am Strand, lang="en-US" Sunset on the beach
 Xmp.dc.one                                   XmpText     2  -1
 Xmp.dc.two                                   XmpText     6  3.1415
 Xmp.dc.three                                 XmpText     3  5/7
@@ -342,8 +338,8 @@ Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiUrlWork XmpText    20  http://www.exi
    </dc:subject>
    <dc:title>
     <rdf:Alt>
-     <rdf:li xml:lang="en-US">Sunset on the beach</rdf:li>
      <rdf:li xml:lang="de-DE">Sonnenuntergang am Strand</rdf:li>
+     <rdf:li xml:lang="en-US">Sunset on the beach</rdf:li>
     </rdf:Alt>
    </dc:title>
    <dc:creator>
@@ -358,8 +354,8 @@ Xmp.iptc.CreatorContactInfo/Iptc4xmpCore:CiUrlWork XmpText    20  http://www.exi
    </dc:creator>
    <dc:description>
     <rdf:Alt>
-     <rdf:li xml:lang="x-default">Hello, World</rdf:li>
      <rdf:li xml:lang="de-DE">Hallo, Welt</rdf:li>
+     <rdf:li xml:lang="x-default">Hello, World</rdf:li>
     </rdf:Alt>
    </dc:description>
    <dc:publisher>

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list