summaryrefslogtreecommitdiff
path: root/poppler
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2006-05-01 13:32:31 +0000
committerAlbert Astals Cid <aacid@kde.org>2006-05-01 13:32:31 +0000
commitf2424ef63e86d82b2be277e2b268b48aae29601e (patch)
tree2ebb43557945619b3c78adf884bc7a938313ab01 /poppler
parent4147400e2b692df7f70c3772e8a4b576d4d85294 (diff)
* qt4/src/poppler-document.cc:
* qt4/src/poppler-private.h: * qt4/src/poppler-qt4.h: Add the possibility of setting the paper color One step more to make oKular fully use the qt4 bindings
Diffstat (limited to 'poppler')
-rw-r--r--poppler/PageLabelInfo.cc43
-rw-r--r--poppler/PageLabelInfo.h44
2 files changed, 44 insertions, 43 deletions
diff --git a/poppler/PageLabelInfo.cc b/poppler/PageLabelInfo.cc
index 6e70c8ff..f8d9745b 100644
--- a/poppler/PageLabelInfo.cc
+++ b/poppler/PageLabelInfo.cc
@@ -58,50 +58,7 @@ 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 f7364194..ae3f27d9 100644
--- a/poppler/PageLabelInfo.h
+++ b/poppler/PageLabelInfo.h
@@ -37,3 +37,47 @@ 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