blob: 867f1790f027d444b16a104b54b27bf2ed57c7e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* This file is part of the libsdf project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <algorithm>
#include <cstring>
#include <boost/scoped_ptr.hpp>
#include <boost/shared_ptr.hpp>
#include <librevenge-stream/librevenge-stream.h>
#include <libsdf/libsdf.h>
#include "libsdf_utils.h"
using boost::scoped_ptr;
using boost::shared_ptr;
using librevenge::RVNGInputStream;
using std::equal;
namespace libsdf
{
SDFAPI bool SDFDocument::isSupported(librevenge::RVNGInputStream *const input) try
{
return false;
}
catch (...)
{
return false;
}
SDFAPI bool SDFDocument::parse(librevenge::RVNGInputStream *const input, librevenge::RVNGTextInterface *const document) try
{
if (!isSupported(input))
return false;
const RVNGInputStreamPtr_t input_(input, SDFDummyDeleter());
input_->seek(0, librevenge::RVNG_SEEK_SET);
return false;
}
catch (...)
{
return false;
}
} // namespace libsdf
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
|