[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:06 UTC 2017


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

The following commit has been merged in the master branch:
commit a6a3da9df8780f75a7d72e7c86535b3f65195952
Author: Robin Mills <robin at clanmills.com>
Date:   Mon Apr 20 08:54:52 2015 +0000

    #1054.  Write LangAltValue as json object "lang" : { "en-US":"...." , ... }
---
 samples/exiv2json.cpp | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/samples/exiv2json.cpp b/samples/exiv2json.cpp
index 4bf35d5..6fb433f 100644
--- a/samples/exiv2json.cpp
+++ b/samples/exiv2json.cpp
@@ -3,7 +3,8 @@
 // Sample program to print metadata in JSON format
 
 #include <exiv2/exiv2.hpp>
-#include <Jzon.h>
+#include <exiv2/value.hpp>
+#include <exiv2/Jzon.h>
 
 #include <iostream>
 #include <iomanip>
@@ -176,6 +177,21 @@ void push(Jzon::Node& node,const std::string& key,T i)
 			 STORE(node,key,arr);
         } break;
 
+        case Exiv2::langAlt: {
+        	 Jzon::Object l ;
+             const Exiv2::LangAltValue& langs = dynamic_cast<const Exiv2::LangAltValue&>(i->value());
+        	 for ( Exiv2::LangAltValue::ValueType::const_iterator lang = langs.value_.begin()
+        	     ; lang != langs.value_.end()
+        	     ; lang++
+        	 ) {
+        	 	l.Add(lang->first,lang->second);
+        	 }
+        	 Jzon::Object o ;
+        	 o.Add("lang",l);
+        	 STORE(node,key,o);
+        }
+        break;
+
         default:
         case Exiv2::date:
         case Exiv2::time:
@@ -188,7 +204,6 @@ void push(Jzon::Node& node,const std::string& key,T i)
         case Exiv2::xmpAlt:
         case Exiv2::xmpBag:
         case Exiv2::xmpSeq:
-        case Exiv2::langAlt:
              // http://dev.exiv2.org/boards/3/topics/1367#message-1373
              if ( key == "UserComment" ) {
                 size_t pos  = value.find('

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list