[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/tools/kfile-plugins/koffice
From:       Alex Merry <huntedhacker () tiscali ! co ! uk>
Date:       2007-03-31 16:51:54
Message-ID: 1175359914.078613.20564.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 648547 by alexmerry:

Changes to work with the revised Strigi API: removed
jstreams interface, getFoo to foo, setField to addValue



 M  +11 -11    kofficethroughanalyzer.cpp  


--- trunk/koffice/tools/kfile-plugins/koffice/kofficethroughanalyzer.cpp #648546:648547
@@ -38,7 +38,7 @@
         void setIndexable( AnalysisResult *i ) {
             idx = i;
         }
-        jstreams::InputStream* connectInputStream( jstreams::InputStream *in );
+        InputStream* connectInputStream( InputStream *in );
         bool isReadyWithStream() { return true; }
     public:
         KOfficeThroughAnalyzer( const KOfficeThroughAnalyzerFactory* f ) : factory( f ) {}
@@ -46,7 +46,7 @@
 
 class KOfficeThroughAnalyzerFactory : public StreamThroughAnalyzerFactory {
 private:
-    const char* getName() const {
+    const char* name() const {
         return "KOfficeThroughAnalyzer";
     }
     StreamThroughAnalyzer* newInstance() const {
@@ -81,18 +81,18 @@
     editingCyclesField = reg.registerField( editingCyclesFieldName, FieldRegister::integerType, 1, 0 );
 }
 
-jstreams::InputStream* KOfficeThroughAnalyzer::connectInputStream( jstreams::InputStream* in ) {
+InputStream* KOfficeThroughAnalyzer::connectInputStream( InputStream* in ) {
     if( !in )
         return in;
 
     const char *c;
-    int nread = in->read( c, in->getSize(), in->getSize() );
+    int nread = in->read( c, in->size(), in->size() );
     in->reset( 0 );
     if( nread == -2 )
         return in;
 
     QDomDocument doc;
-    if( !doc.setContent( QByteArray( c, in->getSize() ) ) )
+    if( !doc.setContent( QByteArray( c, in->size() ) ) )
         return in;
 
     // check if this is a koffice document
@@ -104,23 +104,23 @@
     QDomNode authorNode = doc.namedItem("document-info").namedItem("author");
 
     // set author information
-    idx->setField( factory->authorField,
+    idx->addValue( factory->authorField,
                    (const char*) authorNode.namedItem( "full-name" ).toElement().text().toUtf8() );
 
     // set title information
-    idx->setField( factory->titleField,
+    idx->addValue( factory->titleField,
                    (const char*) authorNode.namedItem( "title" ).toElement().text().toUtf8() );
 
     // set keyword information
-    idx->setField( factory->keywordsField,
+    idx->addValue( factory->keywordsField,
                    (const char*) aboutNode.namedItem( "keyword" ).toElement().text().toUtf8() );
 
     // set abstract information
-    idx->setField( factory->abstractField, 
+    idx->addValue( factory->abstractField, 
                    (const char*) authorNode.namedItem( "abstract" ).toElement().text().toUtf8() );
 
     // set editing cycles information
-    idx->setField( factory->editingCyclesField, 
+    idx->addValue( factory->editingCyclesField, 
                    aboutNode.namedItem( "editing-cycles" ).toElement().text().toInt() );
 
     return in;
@@ -129,7 +129,7 @@
 class Factory : public AnalyzerFactoryFactory {
 public:
     std::list<StreamThroughAnalyzerFactory*>
-    getStreamThroughAnalyzerFactories() const {
+    streamThroughAnalyzerFactories() const {
         std::list<StreamThroughAnalyzerFactory*> af;
         af.push_back(new KOfficeThroughAnalyzerFactory());
         return af;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic