[poppler] poppler/poppler: PageLabelInfo.cc, 1.4,
1.5 PageLabelInfo.h, 1.3, 1.4
Albert Astals Cid
aacid at kemper.freedesktop.org
Mon May 1 06:32:33 PDT 2006
Update of /cvs/poppler/poppler/poppler
In directory kemper:/tmp/cvs-serv29288/poppler
Modified Files:
PageLabelInfo.cc PageLabelInfo.h
Log Message:
* 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
Index: PageLabelInfo.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/PageLabelInfo.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- PageLabelInfo.cc 28 Feb 2006 18:25:00 -0000 1.4
+++ PageLabelInfo.cc 1 May 2006 13:32:31 -0000 1.5
@@ -58,50 +58,7 @@
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)
{
Index: PageLabelInfo.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/PageLabelInfo.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- PageLabelInfo.h 28 Feb 2006 18:25:00 -0000 1.3
+++ PageLabelInfo.h 1 May 2006 13:32:31 -0000 1.4
@@ -37,3 +37,47 @@
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
More information about the poppler
mailing list