| 1 |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
| 2 |
/* |
| 3 |
* This file is part of the libqxp project. |
| 4 |
* |
| 5 |
* This Source Code Form is subject to the terms of the Mozilla Public |
| 6 |
* License, v. 2.0. If a copy of the MPL was not distributed with this |
| 7 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 8 |
*/ |
| 9 |
|
| 10 |
#include "QXP3HeaderBase.h" |
| 11 |
|
| 12 |
#include "libqxp_utils.h" |
| 13 |
|
| 14 |
namespace libqxp |
| 15 |
{ |
| 16 |
|
| 17 |
QXP3HeaderBase::QXP3HeaderBase(const boost::optional<QXPDocument::Type> &fileType) |
| 18 |
: QXPHeader(fileType) |
| 19 |
, m_signature() |
| 20 |
{ |
| 21 |
} |
| 22 |
|
| 23 |
bool QXP3HeaderBase::load(const std::shared_ptr<librevenge::RVNGInputStream> &input) |
| 24 |
{ |
| 25 |
seek(input, 2); |
| 26 |
|
| 27 |
m_proc = readU8(input); |
| 28 |
skip(input, 1); |
| 29 |
m_signature = readString(input, 3); |
| 30 |
|
| 31 |
m_language = readU8(input); |
| 32 |
|
| 33 |
m_version = readU16(input, isBigEndian()); |
| 34 |
|
| 35 |
return true; |
| 36 |
} |
| 37 |
|
| 38 |
} |
| 39 |
|
| 40 |
/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ |