From 35cf4a4818a0d1bc7cda07e29f271360e06443a0 Mon Sep 17 00:00:00 2001 From: Weng Xuetian Date: Mon, 12 Dec 2011 09:12:35 +0000 Subject: [PATCH 1/8] Fix xpm and xbm index. REVIEW: 103368 --- plugins/lineplugins/xpmlineanalyzer.cpp | 10 +++++----- plugins/throughplugins/xbmthroughanalyzer.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/plugins/lineplugins/xpmlineanalyzer.cpp b/plugins/lineplugins/xpmlineanalyzer.cpp index 980b2f7..c87a071 100644 --- a/plugins/lineplugins/xpmlineanalyzer.cpp +++ b/plugins/lineplugins/xpmlineanalyzer.cpp @@ -65,7 +65,7 @@ XpmLineAnalyzer::handleLine(const char* data, uint32_t length) { uint32_t i = 0; // we have found the line which should contain the information we want ready = true; - // read the height + // read the width uint32_t propertyValue = 0; i++; while (i < length && isdigit(data[i])) { @@ -76,9 +76,9 @@ XpmLineAnalyzer::handleLine(const char* data, uint32_t length) { if (i >= length || data[i] != ' ') return; - analysisResult->addValue(factory->heightField, propertyValue); + analysisResult->addValue(factory->widthField, propertyValue); - // read the width + // read the height propertyValue = 0; i++; while (i < length && isdigit(data[i])) { @@ -89,7 +89,7 @@ XpmLineAnalyzer::handleLine(const char* data, uint32_t length) { if (i >= length || data[i] != ' ') return; - analysisResult->addValue(factory->widthField, propertyValue); + analysisResult->addValue(factory->heightField, propertyValue); // read the number of colors propertyValue = 0; @@ -103,7 +103,7 @@ XpmLineAnalyzer::handleLine(const char* data, uint32_t length) { return; analysisResult->addValue(factory->numberOfColorsField, propertyValue); - analysisResult->addValue(factory->typeField, "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Image"); + analysisResult->addValue(factory->typeField, "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#RasterImage"); } bool XpmLineAnalyzer::isReadyWithStream() { diff --git a/plugins/throughplugins/xbmthroughanalyzer.cpp b/plugins/throughplugins/xbmthroughanalyzer.cpp index e926e84..e3f35cc 100644 --- a/plugins/throughplugins/xbmthroughanalyzer.cpp +++ b/plugins/throughplugins/xbmthroughanalyzer.cpp @@ -145,7 +145,7 @@ XbmThroughAnalyzer::connectInputStream(InputStream* in) { } } - analysisResult->addValue(factory->typeField, "http://www.semanticdesktop.org/ontologies/nfo#Cursor"); + analysisResult->addValue(factory->typeField, "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#Cursor"); return in; } -- 1.7.10.4