beta-0.89.2
[luatex.git] / source / libs / poppler / poppler-src / poppler / PageLabelInfo.h
blob960e710069dd129b3d1880d2f52f832590aa8751
1 //========================================================================
2 //
3 // This file is under the GPLv2 or later license
4 //
5 // Copyright (C) 2005-2006 Kristian Høgsberg <krh@redhat.com>
6 // Copyright (C) 2005 Albert Astals Cid <aacid@kde.org>
7 //
8 // To see a description of the changes please see the Changelog file that
9 // came with your tarball or type make ChangeLog if you are building from git
11 //========================================================================
13 #include <limits.h>
14 #include <stdlib.h>
15 #include <stdio.h>
16 #include <ctype.h>
17 #include <assert.h>
19 #include "goo/gtypes.h"
20 #include "goo/GooList.h"
21 #include "goo/GooString.h"
22 #include "Object.h"
24 class PageLabelInfo {
25 public:
26 PageLabelInfo(Object *tree, int numPages);
27 ~PageLabelInfo();
28 GBool labelToIndex(GooString *label, int *index);
29 GBool indexToLabel(int index, GooString *label);
31 private:
32 void parse(Object *tree);
34 private:
35 struct Interval {
36 Interval(Object *dict, int baseA);
37 ~Interval();
38 GooString *prefix;
39 enum NumberStyle {
40 None,
41 Arabic,
42 LowercaseRoman,
43 UppercaseRoman,
44 UppercaseLatin,
45 LowercaseLatin
46 } style;
47 int first, base, length;
50 GooList intervals;