[poppler] poppler/poppler: GlobalParams.cc, 1.10, 1.11 GlobalParams.h, 1.4, 1.5 XRef.h, 1.4, 1.5

Albert Astals Cid aacid at freedesktop.org
Tue Sep 20 07:00:45 PDT 2005


Update of /cvs/poppler/poppler/poppler
In directory gabe:/tmp/cvs-serv22934/poppler

Modified Files:
	GlobalParams.cc GlobalParams.h XRef.h 
Log Message:
Merge GlobalParam.* changes, they are worthless for us as poppler but this way we are nearer to have the 3.01 sources merged, then we can remove them if we decide we don't need this options.
Remove a setEncryption from the Xref.h marco probably forgot to remove when merging


Index: GlobalParams.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/GlobalParams.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- GlobalParams.cc	20 Sep 2005 10:18:57 -0000	1.10
+++ GlobalParams.cc	20 Sep 2005 14:00:43 -0000	1.11
@@ -310,6 +310,12 @@
     }
   }
 
+#ifdef WIN32
+  // baseDir will be set by a call to setBaseDir
+  baseDir = new GooString();
+#else
+  baseDir = appendToPath(getHomeDir(), ".xpdf");
+#endif
   nameToUnicode = new NameToCharCode();
   cidToUnicodes = new GooHash(gTrue);
   unicodeToUnicodes = new GooHash(gTrue);
@@ -367,6 +373,7 @@
   textKeepTinyChars = gFalse;
   fontDirs = new GooList();
   initialZoom = new GooString("125");
+  continuousView = gFalse;
   enableT1lib = gTrue;
   enableFreeType = gTrue;
   antialias = gTrue;
@@ -575,6 +582,8 @@
 	parseFontDir(tokens, fileName, line);
       } else if (!cmd->cmp("initialZoom")) {
 	parseInitialZoom(tokens, fileName, line);
+      } else if (!cmd->cmp("continuousView")) {
+	parseYesNo("continuousView", &continuousView, tokens, fileName, line);
       } else if (!cmd->cmp("enableT1lib")) {
 	parseYesNo("enableT1lib", &enableT1lib, tokens, fileName, line);
       } else if (!cmd->cmp("enableFreeType")) {
@@ -946,6 +955,7 @@
 
   delete macRomanReverseMap;
 
+  delete baseDir;
   delete nameToUnicode;
   deleteGooHash(cidToUnicodes, GooString);
   deleteGooHash(unicodeToUnicodes, GooString);
@@ -993,6 +1003,13 @@
 }
 
 //------------------------------------------------------------------------
+
+void GlobalParams::setBaseDir(char *dir) {
+  delete baseDir;
+  baseDir = new GooString(dir);
+}
+
+//------------------------------------------------------------------------
 // accessors
 //------------------------------------------------------------------------
 
@@ -1001,6 +1018,15 @@
   return macRomanReverseMap->lookup(charName);
 }
 
+GooString *GlobalParams::getBaseDir() {
+  GooString *s;
+
+  lockGlobalParams;
+  s = baseDir->copy();
+  unlockGlobalParams;
+  return s;
+}
+
 Unicode GlobalParams::mapNameToUnicode(char *charName) {
   // no need to lock - nameToUnicode is constant
   return nameToUnicode->lookup(charName);
@@ -1545,6 +1571,15 @@
   return s;
 }
 
+GBool GlobalParams::getContinuousView() {
+  GBool f;
+
+  lockGlobalParams;
+  f = continuousView;
+  unlockGlobalParams;
+  return f;
+}
+
 GBool GlobalParams::getEnableT1lib() {
   GBool f;
 
@@ -1859,6 +1894,12 @@
   unlockGlobalParams;
 }
 
+void GlobalParams::setContinuousView(GBool cont) {
+  lockGlobalParams;
+  continuousView = cont;
+  unlockGlobalParams;
+}
+
 GBool GlobalParams::setEnableT1lib(char *s) {
   GBool ok;
 

Index: GlobalParams.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/GlobalParams.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- GlobalParams.h	16 Sep 2005 18:29:18 -0000	1.4
+++ GlobalParams.h	20 Sep 2005 14:00:43 -0000	1.5
@@ -49,6 +49,14 @@
   displayFontTT
 };
 
+struct DisplayFontParamT1 {
+  GooString *fileName;
+};
+
+struct DisplayFontParamTT {
+  GooString *fileName;
+};
+
 class DisplayFontParam {
 public:
 
@@ -57,12 +65,8 @@
 				//   generic CID fonts
   DisplayFontParamKind kind;
   union {
-    struct {
-      GooString *fileName;
-    } t1;
-    struct {
-      GooString *fileName;
-    } tt;
+    DisplayFontParamT1 t1;
+    DisplayFontParamTT tt;
   };
 
   DisplayFontParam(GooString *nameA, DisplayFontParamKind kindA);
@@ -117,10 +121,13 @@
 
   ~GlobalParams();
 
+  void setBaseDir(char *dir);
+
   //----- accessors
 
   CharCode getMacRomanCharCode(char *charName);
 
+  GooString *getBaseDir();
   Unicode mapNameToUnicode(char *charName);
   UnicodeMap *getResidentUnicodeMap(GooString *encodingName);
   FILE *getUnicodeMapFile(GooString *encodingName);
@@ -151,6 +158,7 @@
   GBool getTextKeepTinyChars();
   GooString *findFontFile(GooString *fontName, char **exts);
   GooString *getInitialZoom();
+  GBool getContinuousView();
   GBool getEnableT1lib();
   GBool getEnableFreeType();
   GBool getAntialias();
@@ -194,6 +202,7 @@
   void setTextPageBreaks(GBool pageBreaks);
   void setTextKeepTinyChars(GBool keep);
   void setInitialZoom(char *s);
+  void setContinuousView(GBool cont);
   GBool setEnableT1lib(char *s);
   GBool setEnableFreeType(char *s);
   GBool setAntialias(char *s);
@@ -289,6 +298,7 @@
   GBool textKeepTinyChars;	// keep all characters in text output
   GooList *fontDirs;		// list of font dirs [GooString]
   GooString *initialZoom;		// initial zoom level
+  GBool continuousView;		// continuous view mode
   GBool enableT1lib;		// t1lib enable flag
   GBool enableFreeType;		// FreeType enable flag
   GBool antialias;		// anti-aliasing enable flag

Index: XRef.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/XRef.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- XRef.h	16 Sep 2005 19:33:05 -0000	1.4
+++ XRef.h	20 Sep 2005 14:00:43 -0000	1.5
@@ -57,10 +57,6 @@
 		     Guchar *fileKeyA, int keyLengthA,
 		     int encVersionA, int encRevisionA);
 
-  // Set the encryption parameters.
-  void setEncryption(int permFlagsA, GBool ownerPasswordOkA,
-		     Guchar *fileKeyA, int keyLengthA, int encVersionA);
-
   // Is the file encrypted?
   GBool isEncrypted() { return encrypted; }
 



More information about the poppler mailing list