summaryrefslogtreecommitdiff
path: root/poppler
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2006-05-01 13:41:14 +0000
committerAlbert Astals Cid <aacid@kde.org>2006-05-01 13:41:14 +0000
commit61b126390f764fd38c79b6a64160a7dc7870bd4a (patch)
tree3b3a9de607daa7a5436b8005f5be27344f9d4f23 /poppler
parentf2424ef63e86d82b2be277e2b268b48aae29601e (diff)
revert thing that should not have gone in
Diffstat (limited to 'poppler')
-rw-r--r--poppler/PageLabelInfo.cc43
-rw-r--r--poppler/PageLabelInfo.h44
2 files changed, 43 insertions, 44 deletions
diff --git a/poppler/PageLabelInfo.cc b/poppler/PageLabelInfo.cc
index f8d9745b..a8bcd723 100644
--- a/poppler/PageLabelInfo.cc
+++ b/poppler/PageLabelInfo.cc
@@ -58,7 +58,50 @@ static int fromRoman(const char *buffer) {
return value;
}
+static void toRoman(int number, GooString *str, GBool uppercase) {
+ static const char uppercaseNumerals[] = "IVXLCDM";
+ static const char lowercaseNumerals[] = "ivxlcdm";
+ int divisor;
+ int i, j, k;
+ const char *wh;
+ if (uppercase)
+ wh = uppercaseNumerals;
+ else
+ wh = lowercaseNumerals;
+
+ divisor = 1000;
+ for (k = 3; k >= 0; k--) {
+ i = number / divisor;
+ number = number % divisor;
+
+ switch (i) {
+ case 0:
+ break;
+ case 5:
+ str->append(wh[2 * k + 1]);
+ break;
+ case 9:
+ str->append(wh[2 * k + 0]);
+ str->append(wh[ 2 * k + 2]);
+ break;
+ case 4:
+ str->append(wh[2 * k + 0]);
+ str->append(wh[2 * k + 1]);
+ break;
+ default:
+ if (i > 5) {
+ str->append(wh[2 * k + 1]);
+ i -= 5;
+ }
+ for (j = 0; j < i; j++) {
+ str->append(wh[2 * k + 0]);
+ }
+ }
+
+ divisor = divisor / 10;
+ }
+}
static int fromLatin(const char *buffer)
{
diff --git a/poppler/PageLabelInfo.h b/poppler/PageLabelInfo.h
index ae3f27d9..f7364194 100644
--- a/poppler/PageLabelInfo.h
+++ b/poppler/PageLabelInfo.h
@@ -37,47 +37,3 @@ private:
GooList intervals;
};
-static void toRoman(int number, GooString *str, GBool uppercase) {
- static const char uppercaseNumerals[] = "IVXLCDM";
- static const char lowercaseNumerals[] = "ivxlcdm";
- int divisor;
- int i, j, k;
- const char *wh;
-
- if (uppercase)
- wh = uppercaseNumerals;
- else
- wh = lowercaseNumerals;
-
- divisor = 1000;
- for (k = 3; k >= 0; k--) {
- i = number / divisor;
- number = number % divisor;
-
- switch (i) {
- case 0:
- break;
- case 5:
- str->append(wh[2 * k + 1]);
- break;
- case 9:
- str->append(wh[2 * k + 0]);
- str->append(wh[ 2 * k + 2]);
- break;
- case 4:
- str->append(wh[2 * k + 0]);
- str->append(wh[2 * k + 1]);
- break;
- default:
- if (i > 5) {
- str->append(wh[2 * k + 1]);
- i -= 5;
- }
- for (j = 0; j < i; j++) {
- str->append(wh[2 * k + 0]);
- }
- }
-
- divisor = divisor / 10;
- }
-} \ No newline at end of file