~ubuntu-branches/ubuntu/gutsy/libwpd/gutsy

« back to all changes in this revision

Viewing changes to src/lib/WP5ListFontsUsedPacket.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Rene Engelhard
  • Date: 2007-01-11 15:15:57 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20070111151557-rn1kysabqbccx3as
Tags: 0.8.8-2
run make check for stream check; build-depend on libcppunit-dev 

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "WP5Parser.h"
29
29
#include "libwpd_internal.h"
30
30
 
31
 
WP5ListFontsUsedPacket::WP5ListFontsUsedPacket(WPXInputStream *input, int id, uint32_t dataOffset, uint32_t dataSize, uint16_t packetType) :
 
31
WP5ListFontsUsedPacket::WP5ListFontsUsedPacket(WPXInputStream *input, int /* id */, uint32_t dataOffset, uint32_t dataSize, uint16_t packetType) :
32
32
        WP5GeneralPacketData(input),
33
33
        m_packetType(packetType)
34
34
{       
69
69
 
70
70
int WP5ListFontsUsedPacket::getFontNameOffset(const int fontNumber) const
71
71
{
72
 
        if ((fontNumber >= 0) && (fontNumber < fontNameOffset.size()))
 
72
        if ((fontNumber >= 0) && ((long)fontNumber < (long)fontNameOffset.size()))
73
73
                return fontNameOffset[fontNumber];
74
74
        return 0;
75
75
}
76
76
 
77
77
float WP5ListFontsUsedPacket::getFontSize(const int fontNumber) const
78
78
{
79
 
        if ((fontNumber >= 0) && (fontNumber < fontSize.size()))
 
79
        if ((fontNumber >= 0) && ((long)fontNumber < (long)fontSize.size()))
80
80
                return fontSize[fontNumber];
81
81
        return 0.0f;
82
82
}