~ubuntu-branches/ubuntu/oneiric/strigi/oneiric

« back to all changes in this revision

Viewing changes to libstreamanalyzer/lib/helperanalyzers/odfcontenthelperanalyzer.cpp

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2011-09-20 08:50:25 UTC
  • mto: (1.1.20 upstream) (5.1.6 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: package-import@ubuntu.com-20110920085025-wszfu6x8rshrjq0e
ImportĀ upstreamĀ versionĀ 0.7.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of Strigi Desktop Search
 
2
 *
 
3
 * Copyright (C) 2006 Jos van den Oever <jos@vandenoever.info>
 
4
 * Copyright (C) 2007 Arend van Beelen jr. <arend@auton.nl>
 
5
 *               2009 Evgeny Egorochkin <phreedom.stdin@gmail.com>
 
6
 * This library is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU Library General Public
 
8
 * License as published by the Free Software Foundation; either
 
9
 * version 2 of the License, or (at your option) any later version.
 
10
 *
 
11
 * This library is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
 * Library General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Library General Public License
 
17
 * along with this library; see the file COPYING.LIB.  If not, write to
 
18
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
19
 * Boston, MA 02110-1301, USA.
 
20
 */
 
21
 
 
22
#include "odfcontenthelperanalyzer.h"
 
23
#include <strigi/analysisresult.h>
 
24
#include <cassert>
 
25
#include <cstring>
 
26
#include <string>
 
27
 
 
28
#include <strigi/analysisresult.h>
 
29
#include <strigi/fieldtypes.h>
 
30
#include "../rdfnamespaces.h"
 
31
 
 
32
using namespace Strigi;
 
33
using namespace std;
 
34
 
 
35
void OdfContentHelperAnalyzer::startAnalysis(AnalysisResult &r) {
 
36
    result = &r;
 
37
}
 
38
 
 
39
void OdfContentHelperAnalyzer::endAnalysis(bool /*complete*/) {
 
40
    result = NULL;
 
41
}
 
42
 
 
43
void OdfContentHelperAnalyzer::startElement(const char *localname, const char *prefix,
 
44
                                  const char *uri, int nb_namespaces, const char **namespaces,
 
45
                                  int nb_attributes, int nb_defaulted, const char **attributes) {
 
46
}
 
47
 
 
48
void OdfContentHelperAnalyzer::endElement(const char *localname, const char *prefix,
 
49
                                const char *uri) {
 
50
}
 
51
 
 
52
void OdfContentHelperAnalyzer::characters(const char *data, uint32_t length) {
 
53
    assert(result != 0);
 
54
 
 
55
    result->addText(data,length);
 
56
}