1
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
3
* Version: MPL 2.0 / LGPLv2.1+
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/.
9
* Major Contributor(s):
3
10
* Copyright (C) 2005 Fridrich Strba (fridrich.strba@bluewin.ch)
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Library General Public
7
* License as published by the Free Software Foundation; either
8
* version 2 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Library General Public License for more details.
15
* You should have received a copy of the GNU Library General Public
16
* License along with this library; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
12
* For minor contributions see the git repository.
14
* Alternatively, the contents of this file may be used under the terms
15
* of the GNU Lesser General Public License Version 2.1 or later
16
* (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
17
* applicable instead of those above.
19
19
* For further information visit http://libwpd.sourceforge.net
42
42
void WP5FontNameStringPoolPacket::_readContents(WPXInputStream *input, WPXEncryption *encryption, uint32_t dataSize)
44
unsigned int tmpInitialOffset = input->tell();
45
while ((long)input->tell() < (long)(tmpInitialOffset + dataSize))
44
long tmpInitialOffset = input->tell();
45
while (input->tell() < (long)(tmpInitialOffset + dataSize))
47
unsigned int offset = input->tell() - tmpInitialOffset;
47
unsigned offset = (unsigned)(input->tell() - tmpInitialOffset);
48
48
WPXString fontName = readCString(input, encryption);
49
49
m_fontNameString[offset] = fontName;
52
for (std::map<unsigned int, WPXString>::const_iterator Iter = m_fontNameString.begin(); Iter != m_fontNameString.end(); Iter++)
52
for (std::map<unsigned int, WPXString>::const_iterator Iter = m_fontNameString.begin(); Iter != m_fontNameString.end(); ++Iter)
53
53
WPD_DEBUG_MSG(("WP5 Font Name String Pool Packet: offset: %i font name: %s\n", Iter->first, (Iter->second).cstr()));