422c4c
--- inkscape-0.92.3/src/extension/internal/pdfinput/pdf-input.cpp
422c4c
+++ inkscape-0.92.3/src/extension/internal/pdfinput/pdf-input.cpp
422c4c
@@ -319,7 +319,7 @@ PdfImportDialog::PdfImportDialog(PDFDoc
422c4c
     _render_thumb = true;
422c4c
 
422c4c
     // Create PopplerDocument
422c4c
-    Glib::ustring filename = _pdf_doc->getFileName()->getCString();
422c4c
+    Glib::ustring filename = _pdf_doc->getFileName()->c_str();
422c4c
     if (!Glib::path_is_absolute(filename)) {
422c4c
         filename = Glib::build_filename(Glib::get_current_dir(),filename);
422c4c
     }
422c4c
@@ -694,7 +694,7 @@ PdfInput::open(::Inkscape::Extension::In
422c4c
             globalParams = new GlobalParams();
422c4c
         }
422c4c
 #else
422c4c
-        globalParams = new GlobalParams();
422c4c
+        globalParams.reset(new GlobalParams());
422c4c
 #endif // ENABLE_OSX_APP_LOCATIONS
422c4c
     }
422c4c
 
422c4c
@@ -793,7 +793,7 @@ PdfInput::open(::Inkscape::Extension::In
422c4c
             dlg->getImportSettings(prefs);
422c4c
 
422c4c
         // Apply crop settings
422c4c
-        PDFRectangle *clipToBox = NULL;
422c4c
+        const PDFRectangle *clipToBox = NULL;
422c4c
         double crop_setting;
422c4c
         sp_repr_get_double(prefs, "cropTo", &crop_setting);
422c4c
 
422c4c
--- inkscape-0.92.3/src/extension/internal/pdfinput/pdf-parser.cpp
422c4c
+++ inkscape-0.92.3/src/extension/internal/pdfinput/pdf-parser.cpp
422c4c
@@ -270,8 +270,8 @@ public:
422c4c
     // Manipulate clip path stack
422c4c
     ClipHistoryEntry *save();
422c4c
     ClipHistoryEntry *restore();
422c4c
-    GBool hasSaves() { return saved != NULL; }
422c4c
-    void setClip(GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
422c4c
+    bool hasSaves() { return saved != NULL; }
422c4c
+    void setClip(const GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
422c4c
     GfxPath *getClipPath() { return clipPath; }
422c4c
     GfxClipType getClipType() { return clipType; }
422c4c
 
422c4c
@@ -294,15 +294,15 @@ PdfParser::PdfParser(XRef *xrefA,
422c4c
                      int /*pageNum*/,
422c4c
 		     int rotate,
422c4c
 		     Dict *resDict,
422c4c
-                     PDFRectangle *box,
422c4c
-		     PDFRectangle *cropBox) :
422c4c
+                     const PDFRectangle *box,
422c4c
+		     const PDFRectangle *cropBox) :
422c4c
     xref(xrefA),
422c4c
     builder(builderA),
422c4c
-    subPage(gFalse),
422c4c
+    subPage(false),
422c4c
     printCommands(false),
422c4c
     res(new GfxResources(xref, resDict, NULL)), // start the resource stack
422c4c
-    state(new GfxState(72.0, 72.0, box, rotate, gTrue)),
422c4c
-    fontChanged(gFalse),
422c4c
+    state(new GfxState(72.0, 72.0, box, rotate, true)),
422c4c
+    fontChanged(false),
422c4c
     clip(clipNone),
422c4c
     ignoreUndef(0),
422c4c
     baseMatrix(),
422c4c
@@ -317,7 +317,7 @@ PdfParser::PdfParser(XRef *xrefA,
422c4c
   builder->setDocumentSize(Inkscape::Util::Quantity::convert(state->getPageWidth(), "pt", "px"),
422c4c
                            Inkscape::Util::Quantity::convert(state->getPageHeight(), "pt", "px"));
422c4c
 
422c4c
-  double *ctm = state->getCTM();
422c4c
+  const double *ctm = state->getCTM();
422c4c
   double scaledCTM[6];
422c4c
   for (int i = 0; i < 6; ++i) {
422c4c
     baseMatrix[i] = ctm[i];
422c4c
@@ -352,14 +352,14 @@ PdfParser::PdfParser(XRef *xrefA,
422c4c
 PdfParser::PdfParser(XRef *xrefA,
422c4c
 		     Inkscape::Extension::Internal::SvgBuilder *builderA,
422c4c
                      Dict *resDict,
422c4c
-		     PDFRectangle *box) :
422c4c
+		     const PDFRectangle *box) :
422c4c
     xref(xrefA),
422c4c
     builder(builderA),
422c4c
-    subPage(gTrue),
422c4c
+    subPage(true),
422c4c
     printCommands(false),
422c4c
     res(new GfxResources(xref, resDict, NULL)), // start the resource stack
422c4c
-    state(new GfxState(72, 72, box, 0, gFalse)),
422c4c
-    fontChanged(gFalse),
422c4c
+    state(new GfxState(72, 72, box, 0, false)),
422c4c
+    fontChanged(false),
422c4c
     clip(clipNone),
422c4c
     ignoreUndef(0),
422c4c
     baseMatrix(),
422c4c
@@ -408,7 +408,7 @@ PdfParser::~PdfParser() {
422c4c
   }
422c4c
 }
422c4c
 
422c4c
-void PdfParser::parse(Object *obj, GBool topLevel) {
422c4c
+void PdfParser::parse(Object *obj, bool topLevel) {
422c4c
   Object obj2;
422c4c
 
422c4c
   if (obj->isArray()) {
422c4c
@@ -433,13 +433,13 @@ void PdfParser::parse(Object *obj, GBool
422c4c
 	error(errInternal, -1, "Weird page contents");
422c4c
     	return;
422c4c
   }
422c4c
-  parser = new Parser(xref, new Lexer(xref, obj), gFalse);
422c4c
+  parser = new Parser(xref, obj, false);
422c4c
   go(topLevel);
422c4c
   delete parser;
422c4c
   parser = NULL;
422c4c
 }
422c4c
 
422c4c
-void PdfParser::go(GBool /*topLevel*/)
422c4c
+void PdfParser::go(bool /*topLevel*/)
422c4c
 {
422c4c
   Object obj;
422c4c
   Object args[maxArgs];
422c4c
@@ -571,7 +571,7 @@ const char *PdfParser::getPreviousOperat
422c4c
 
422c4c
 void PdfParser::execOp(Object *cmd, Object args[], int numArgs) {
422c4c
   PdfOperator *op;
422c4c
-  char *name;
422c4c
+  const char *name;
422c4c
   Object *argPtr;
422c4c
   int i;
422c4c
 
422c4c
@@ -619,7 +619,7 @@ void PdfParser::execOp(Object *cmd, Obje
422c4c
   (this->*op->func)(argPtr, numArgs);
422c4c
 }
422c4c
 
422c4c
-PdfOperator* PdfParser::findOp(char *name) {
422c4c
+PdfOperator* PdfParser::findOp(const char *name) {
422c4c
   int a = -1;
422c4c
   int b = numOps;
422c4c
   int cmp = -1;
422c4c
@@ -639,7 +639,7 @@ PdfOperator* PdfParser::findOp(char *nam
422c4c
   return &opTab[a];
422c4c
 }
422c4c
 
422c4c
-GBool PdfParser::checkArg(Object *arg, TchkType type) {
422c4c
+bool PdfParser::checkArg(Object *arg, TchkType type) {
422c4c
   switch (type) {
422c4c
   case tchkBool:   return arg->isBool();
422c4c
   case tchkInt:    return arg->isInt();
422c4c
@@ -649,9 +649,9 @@ GBool PdfParser::checkArg(Object *arg, T
422c4c
   case tchkArray:  return arg->isArray();
422c4c
   case tchkProps:  return arg->isDict() || arg->isName();
422c4c
   case tchkSCN:    return arg->isNum() || arg->isName();
422c4c
-  case tchkNone:   return gFalse;
422c4c
+  case tchkNone:   return false;
422c4c
   }
422c4c
-  return gFalse;
422c4c
+  return false;
422c4c
 }
422c4c
 
422c4c
 int PdfParser::getPos() {
422c4c
@@ -706,7 +706,7 @@ void PdfParser::opConcat(Object args[],
422c4c
       builder->pushGroup();
422c4c
       builder->setTransform(a0, a1, a2, a3, a4, a5);
422c4c
   }
422c4c
-  fontChanged = gTrue;
422c4c
+  fontChanged = true;
422c4c
 }
422c4c
 
422c4c
 // TODO not good that numArgs is ignored but args[] is used:
422c4c
@@ -772,8 +772,8 @@ void PdfParser::opSetExtGState(Object ar
422c4c
   Object obj1, obj2, obj3, obj4, obj5;
422c4c
   Function *funcs[4] = {0, 0, 0, 0};
422c4c
   GfxColor backdropColor;
422c4c
-  GBool haveBackdropColor = gFalse;
422c4c
-  GBool alpha = gFalse;
422c4c
+  bool haveBackdropColor = false;
422c4c
+  bool alpha = false;
422c4c
 
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
   if ((obj1 = res->lookupGState(args[0].getName())).isNull()) {
422c4c
@@ -829,7 +829,7 @@ void PdfParser::opSetExtGState(Object ar
422c4c
 #endif
422c4c
 
422c4c
   // fill/stroke overprint
422c4c
-  GBool haveFillOP = gFalse;
422c4c
+  bool haveFillOP = false;
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
   if ((haveFillOP = (obj2 = obj1.dictLookup(const_cast<char*>("op"))).isBool())) {
422c4c
 #else
422c4c
@@ -924,9 +924,9 @@ void PdfParser::opSetExtGState(Object ar
422c4c
 #else
422c4c
       if (obj2.dictLookup(const_cast<char*>("S"), &obj3)->isName(const_cast<char*>("Alpha"))) {
422c4c
 #endif
422c4c
-	alpha = gTrue;
422c4c
+	alpha = true;
422c4c
       } else { // "Luminosity"
422c4c
-	alpha = gFalse;
422c4c
+	alpha = false;
422c4c
       }
422c4c
 #if !defined(POPPLER_NEW_OBJECT_API)
422c4c
       obj3.free();
422c4c
@@ -977,8 +977,8 @@ void PdfParser::opSetExtGState(Object ar
422c4c
 	if (obj3.streamGetDict()->lookup(const_cast<char*>("Group"), &obj4)->isDict()) {
422c4c
 #endif
422c4c
 	  GfxColorSpace *blendingColorSpace = 0;
422c4c
-	  GBool isolated = gFalse;
422c4c
-	  GBool knockout = gFalse;
422c4c
+	  bool isolated = false;
422c4c
+	  bool knockout = false;
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
 	  if (!((obj5 = obj4.dictLookup(const_cast<char*>("CS"))).isNull())) {
422c4c
 #else
422c4c
@@ -1049,9 +1049,9 @@ void PdfParser::opSetExtGState(Object ar
422c4c
 #endif
422c4c
 }
422c4c
 
422c4c
-void PdfParser::doSoftMask(Object *str, GBool alpha,
422c4c
+void PdfParser::doSoftMask(Object *str, bool alpha,
422c4c
 		     GfxColorSpace *blendingColorSpace,
422c4c
-		     GBool isolated, GBool knockout,
422c4c
+		     bool isolated, bool knockout,
422c4c
 		     Function *transferFunc, GfxColor *backdropColor) {
422c4c
   Dict *dict, *resDict;
422c4c
   double m[6], bbox[4];
422c4c
@@ -1144,7 +1144,7 @@ void PdfParser::doSoftMask(Object *str,
422c4c
 
422c4c
   // draw it
422c4c
   ++formDepth;
422c4c
-  doForm1(str, resDict, m, bbox, gTrue, gTrue,
422c4c
+  doForm1(str, resDict, m, bbox, true, true,
422c4c
 	  blendingColorSpace, isolated, knockout,
422c4c
 	  alpha, transferFunc, backdropColor);
422c4c
   --formDepth;
422c4c
@@ -1614,7 +1614,7 @@ void PdfParser::opFill(Object /*args*/[]
422c4c
   if (state->isPath()) {
422c4c
     if (state->getFillColorSpace()->getMode() == csPattern &&
422c4c
         !builder->isPatternTypeSupported(state->getFillPattern())) {
422c4c
-      doPatternFillFallback(gFalse);
422c4c
+      doPatternFillFallback(false);
422c4c
     } else {
422c4c
       builder->addPath(state, true, false);
422c4c
     }
422c4c
@@ -1631,7 +1631,7 @@ void PdfParser::opEOFill(Object /*args*/
422c4c
   if (state->isPath()) {
422c4c
     if (state->getFillColorSpace()->getMode() == csPattern &&
422c4c
         !builder->isPatternTypeSupported(state->getFillPattern())) {
422c4c
-      doPatternFillFallback(gTrue);
422c4c
+      doPatternFillFallback(true);
422c4c
     } else {
422c4c
       builder->addPath(state, true, false, true);
422c4c
     }
422c4c
@@ -1646,7 +1646,7 @@ void PdfParser::opFillStroke(Object /*ar
422c4c
     return;
422c4c
   }
422c4c
   if (state->isPath()) {
422c4c
-    doFillAndStroke(gFalse);
422c4c
+    doFillAndStroke(false);
422c4c
   } else {
422c4c
     builder->addPath(state, true, true);
422c4c
   }
422c4c
@@ -1661,7 +1661,7 @@ void PdfParser::opCloseFillStroke(Object
422c4c
   }
422c4c
   if (state->isPath()) {
422c4c
     state->closePath();
422c4c
-    doFillAndStroke(gFalse);
422c4c
+    doFillAndStroke(false);
422c4c
   }
422c4c
   doEndPath();
422c4c
 }
422c4c
@@ -1673,7 +1673,7 @@ void PdfParser::opEOFillStroke(Object /*
422c4c
     return;
422c4c
   }
422c4c
   if (state->isPath()) {
422c4c
-    doFillAndStroke(gTrue);
422c4c
+    doFillAndStroke(true);
422c4c
   }
422c4c
   doEndPath();
422c4c
 }
422c4c
@@ -1686,20 +1686,20 @@ void PdfParser::opCloseEOFillStroke(Obje
422c4c
   }
422c4c
   if (state->isPath()) {
422c4c
     state->closePath();
422c4c
-    doFillAndStroke(gTrue);
422c4c
+    doFillAndStroke(true);
422c4c
   }
422c4c
   doEndPath();
422c4c
 }
422c4c
 
422c4c
-void PdfParser::doFillAndStroke(GBool eoFill) {
422c4c
-    GBool fillOk = gTrue, strokeOk = gTrue;
422c4c
+void PdfParser::doFillAndStroke(bool eoFill) {
422c4c
+    bool fillOk = true, strokeOk = true;
422c4c
     if (state->getFillColorSpace()->getMode() == csPattern &&
422c4c
         !builder->isPatternTypeSupported(state->getFillPattern())) {
422c4c
-        fillOk = gFalse;
422c4c
+        fillOk = false;
422c4c
     }
422c4c
     if (state->getStrokeColorSpace()->getMode() == csPattern &&
422c4c
         !builder->isPatternTypeSupported(state->getStrokePattern())) {
422c4c
-        strokeOk = gFalse;
422c4c
+        strokeOk = false;
422c4c
     }
422c4c
     if (fillOk && strokeOk) {
422c4c
         builder->addPath(state, true, true, eoFill);
422c4c
@@ -1709,7 +1709,7 @@ void PdfParser::doFillAndStroke(GBool eo
422c4c
     }
422c4c
 }
422c4c
 
422c4c
-void PdfParser::doPatternFillFallback(GBool eoFill) {
422c4c
+void PdfParser::doPatternFillFallback(bool eoFill) {
422c4c
   GfxPattern *pattern;
422c4c
 
422c4c
   if (!(pattern = state->getFillPattern())) {
422c4c
@@ -1719,7 +1719,7 @@ void PdfParser::doPatternFillFallback(GB
422c4c
   case 1:
422c4c
     break;
422c4c
   case 2:
422c4c
-    doShadingPatternFillFallback(static_cast<GfxShadingPattern *>(pattern), gFalse, eoFill);
422c4c
+    doShadingPatternFillFallback(static_cast<GfxShadingPattern *>(pattern), false, eoFill);
422c4c
     break;
422c4c
   default:
422c4c
     error(errUnimplemented, getPos(), "Unimplemented pattern type (%d) in fill",
422c4c
@@ -1738,7 +1738,7 @@ void PdfParser::doPatternStrokeFallback(
422c4c
   case 1:
422c4c
     break;
422c4c
   case 2:
422c4c
-    doShadingPatternFillFallback(static_cast<GfxShadingPattern *>(pattern), gTrue, gFalse);
422c4c
+    doShadingPatternFillFallback(static_cast<GfxShadingPattern *>(pattern), true, false);
422c4c
     break;
422c4c
   default:
422c4c
     error(errUnimplemented, getPos(), "Unimplemented pattern type ({0:d}) in stroke",
422c4c
@@ -1748,10 +1748,10 @@ void PdfParser::doPatternStrokeFallback(
422c4c
 }
422c4c
 
422c4c
 void PdfParser::doShadingPatternFillFallback(GfxShadingPattern *sPat,
422c4c
-                                             GBool stroke, GBool eoFill) {
422c4c
+                                             bool stroke, bool eoFill) {
422c4c
   GfxShading *shading;
422c4c
   GfxPath *savedPath;
422c4c
-  double *ctm, *btm, *ptm;
422c4c
+  const double *ctm, *btm, *ptm;
422c4c
   double m[6], ictm[6], m1[6];
422c4c
   double xMin, yMin, xMax, yMax;
422c4c
   double det;
422c4c
@@ -1862,7 +1862,7 @@ void PdfParser::opShFill(Object args[],
422c4c
   double xTemp, yTemp;
422c4c
   double gradientTransform[6];
422c4c
   double *matrix = NULL;
422c4c
-  GBool savedState = gFalse;
422c4c
+  bool savedState = false;
422c4c
 
422c4c
 #if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
422c4c
   if (!(shading = res->lookupShading(args[0].getName(), NULL, NULL))) {
422c4c
@@ -1878,13 +1878,13 @@ void PdfParser::opShFill(Object args[],
422c4c
   if (shading->getType() != 2 && shading->getType() != 3) {
422c4c
     savedPath = state->getPath()->copy();
422c4c
     saveState();
422c4c
-    savedState = gTrue;
422c4c
+    savedState = true;
422c4c
   } else {  // get gradient transform if possible
422c4c
       // check proper operator sequence
422c4c
       // first there should be one W(*) and then one 'cm' somewhere before 'sh'
422c4c
-      GBool seenClip, seenConcat;
422c4c
+      bool seenClip, seenConcat;
422c4c
       seenClip = (clipHistory->getClipPath() != NULL);
422c4c
-      seenConcat = gFalse;
422c4c
+      seenConcat = false;
422c4c
       int i = 1;
422c4c
       while (i <= maxOperatorHistoryDepth) {
422c4c
         const char *opName = getPreviousOperator(i);
422c4c
@@ -1892,7 +1892,7 @@ void PdfParser::opShFill(Object args[],
422c4c
           if (seenConcat) {   // more than one 'cm'
422c4c
             break;
422c4c
           } else {
422c4c
-            seenConcat = gTrue;
422c4c
+            seenConcat = true;
422c4c
           }
422c4c
         }
422c4c
         i++;
422c4c
@@ -1993,7 +1993,7 @@ void PdfParser::doFunctionShFill1(GfxFun
422c4c
   GfxColor color0M, color1M, colorM0, colorM1, colorMM;
422c4c
   GfxColor colors2[4];
422c4c
   double functionColorDelta = colorDeltas[pdfFunctionShading-1];
422c4c
-  double *matrix;
422c4c
+  const double *matrix;
422c4c
   double xM, yM;
422c4c
   int nComps, i, j;
422c4c
 
422c4c
@@ -2173,7 +2173,7 @@ void PdfParser::doPatchMeshShFill(GfxPat
422c4c
   }
422c4c
 }
422c4c
 
422c4c
-void PdfParser::fillPatch(GfxPatch *patch, int nComps, int depth) {
422c4c
+void PdfParser::fillPatch(const GfxPatch *patch, int nComps, int depth) {
422c4c
   GfxPatch patch00 = blankPatch();
422c4c
   GfxPatch patch01 = blankPatch();
422c4c
   GfxPatch patch10 = blankPatch();
422c4c
@@ -2347,7 +2347,7 @@ void PdfParser::opBeginText(Object /*arg
422c4c
   state->setTextMat(1, 0, 0, 1, 0, 0);
422c4c
   state->textMoveTo(0, 0);
422c4c
   builder->updateTextPosition(0.0, 0.0);
422c4c
-  fontChanged = gTrue;
422c4c
+  fontChanged = true;
422c4c
   builder->beginTextObject(state);
422c4c
 }
422c4c
 
422c4c
@@ -2375,20 +2375,20 @@ void PdfParser::opSetFont(Object args[],
422c4c
     // unsetting the font (drawing no text) is better than using the
422c4c
     // previous one and drawing random glyphs from it
422c4c
     state->setFont(NULL, args[1].getNum());
422c4c
-    fontChanged = gTrue;
422c4c
+    fontChanged = true;
422c4c
     return;
422c4c
   }
422c4c
   if (printCommands) {
422c4c
     printf("  font: tag=%s name='%s' %g\n",
422c4c
-	   font->getTag()->getCString(),
422c4c
-	   font->getName() ? font->getName()->getCString() : "???",
422c4c
+	   font->getTag()->c_str(),
422c4c
+	   font->getName() ? font->getName()->c_str() : "???",
422c4c
 	   args[1].getNum());
422c4c
     fflush(stdout);
422c4c
   }
422c4c
 
422c4c
   font->incRefCnt();
422c4c
   state->setFont(font, args[1].getNum());
422c4c
-  fontChanged = gTrue;
422c4c
+  fontChanged = true;
422c4c
 }
422c4c
 
422c4c
 // TODO not good that numArgs is ignored but args[] is used:
422c4c
@@ -2421,7 +2421,7 @@ void PdfParser::opSetHorizScaling(Object
422c4c
 {
422c4c
   state->setHorizScaling(args[0].getNum());
422c4c
   builder->updateTextMatrix(state);
422c4c
-  fontChanged = gTrue;
422c4c
+  fontChanged = true;
422c4c
 }
422c4c
 
422c4c
 //------------------------------------------------------------------------
422c4c
@@ -2461,7 +2461,7 @@ void PdfParser::opSetTextMatrix(Object a
422c4c
   state->textMoveTo(0, 0);
422c4c
   builder->updateTextMatrix(state);
422c4c
   builder->updateTextPosition(0.0, 0.0);
422c4c
-  fontChanged = gTrue;
422c4c
+  fontChanged = true;
422c4c
 }
422c4c
 
422c4c
 void PdfParser::opTextNextLine(Object /*args*/[], int /*numArgs*/)
422c4c
@@ -2487,7 +2487,7 @@ void PdfParser::opShowText(Object args[]
422c4c
   }
422c4c
   if (fontChanged) {
422c4c
     builder->updateFont(state);
422c4c
-    fontChanged = gFalse;
422c4c
+    fontChanged = false;
422c4c
   }
422c4c
   doShowText(args[0].getString());
422c4c
 }
422c4c
@@ -2504,7 +2504,7 @@ void PdfParser::opMoveShowText(Object ar
422c4c
   }
422c4c
   if (fontChanged) {
422c4c
     builder->updateFont(state);
422c4c
-    fontChanged = gFalse;
422c4c
+    fontChanged = false;
422c4c
   }
422c4c
   tx = state->getLineX();
422c4c
   ty = state->getLineY() - state->getLeading();
422c4c
@@ -2525,7 +2525,7 @@ void PdfParser::opMoveSetShowText(Object
422c4c
   }
422c4c
   if (fontChanged) {
422c4c
     builder->updateFont(state);
422c4c
-    fontChanged = gFalse;
422c4c
+    fontChanged = false;
422c4c
   }
422c4c
   state->setWordSpace(args[0].getNum());
422c4c
   state->setCharSpace(args[1].getNum());
422c4c
@@ -2549,7 +2549,7 @@ void PdfParser::opShowSpaceText(Object a
422c4c
   }
422c4c
   if (fontChanged) {
422c4c
     builder->updateFont(state);
422c4c
-    fontChanged = gFalse;
422c4c
+    fontChanged = false;
422c4c
   }
422c4c
   wMode = state->getFont()->getWMode();
422c4c
   a = args[0].getArray();
422c4c
@@ -2586,11 +2586,11 @@ void PdfParser::doShowText(const GooStri
422c4c
   int wMode;
422c4c
   double riseX, riseY;
422c4c
   CharCode code;
422c4c
-  Unicode *u = NULL;
422c4c
+  Unicode const *u = NULL;
422c4c
   double x, y, dx, dy, tdx, tdy;
422c4c
   double originX, originY, tOriginX, tOriginY;
422c4c
   double oldCTM[6], newCTM[6];
422c4c
-  double *mat;
422c4c
+  const double *mat;
422c4c
   Object charProc;
422c4c
   Dict *resDict;
422c4c
   Parser *oldParser;
422c4c
@@ -2630,7 +2630,7 @@ void PdfParser::doShowText(const GooStri
422c4c
     double lineX = state->getLineX();
422c4c
     double lineY = state->getLineY();
422c4c
     oldParser = parser;
422c4c
-    p = g_strdup(s->getCString());
422c4c
+    p = g_strdup(s->c_str());
422c4c
     len = s->getLength();
422c4c
     while (len > 0) {
422c4c
       n = font->getNextChar(p, len, &code,
422c4c
@@ -2659,7 +2659,7 @@ void PdfParser::doShowText(const GooStri
422c4c
 	  pushResources(resDict);
422c4c
 	}
422c4c
 	if (charProc.isStream()) {
422c4c
-	  //parse(&charProc, gFalse); // TODO: parse into SVG font
422c4c
+	  //parse(&charProc, false); // TODO: parse into SVG font
422c4c
 	} else {
422c4c
 	  error(errSyntaxError, getPos(), "Missing or bad Type3 CharProc entry");
422c4c
 	}
422c4c
@@ -2685,7 +2685,7 @@ void PdfParser::doShowText(const GooStri
422c4c
 
422c4c
   } else {
422c4c
     state->textTransformDelta(0, state->getRise(), &riseX, &riseY);
422c4c
-    p = g_strdup(s->getCString());
422c4c
+    p = g_strdup(s->c_str());
422c4c
     len = s->getLength();
422c4c
     while (len > 0) {
422c4c
       n = font->getNextChar(p, len, &code,
422c4c
@@ -2757,7 +2757,7 @@ void PdfParser::opXObject(Object args[],
422c4c
 #else
422c4c
     res->lookupXObjectNF(name, &refObj);
422c4c
 #endif
422c4c
-    doImage(&refObj, obj1.getStream(), gFalse);
422c4c
+    doImage(&refObj, obj1.getStream(), false);
422c4c
 #if !defined(POPPLER_NEW_OBJECT_API)
422c4c
     refObj.free();
422c4c
 #endif
422c4c
@@ -2782,19 +2782,19 @@ void PdfParser::opXObject(Object args[],
422c4c
 #endif
422c4c
 }
422c4c
 
422c4c
-void PdfParser::doImage(Object * /*ref*/, Stream *str, GBool inlineImg)
422c4c
+void PdfParser::doImage(Object * /*ref*/, Stream *str, bool inlineImg)
422c4c
 {
422c4c
     Dict *dict;
422c4c
     int width, height;
422c4c
     int bits;
422c4c
-    GBool interpolate;
422c4c
+    bool interpolate;
422c4c
     StreamColorSpaceMode csMode;
422c4c
-    GBool mask;
422c4c
-    GBool invert;
422c4c
+    bool mask;
422c4c
+    bool invert;
422c4c
     Object maskObj, smaskObj;
422c4c
-    GBool haveColorKeyMask, haveExplicitMask, haveSoftMask;
422c4c
-    GBool maskInvert;
422c4c
-    GBool maskInterpolate;
422c4c
+    bool haveColorKeyMask, haveExplicitMask, haveSoftMask;
422c4c
+    bool maskInvert;
422c4c
+    bool maskInterpolate;
422c4c
     Object obj1, obj2;
422c4c
     
422c4c
     // get info from the stream
422c4c
@@ -2872,11 +2872,11 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
     if (obj1.isBool())
422c4c
       interpolate = obj1.getBool();
422c4c
     else
422c4c
-      interpolate = gFalse;
422c4c
+      interpolate = false;
422c4c
 #if !defined(POPPLER_NEW_OBJECT_API)
422c4c
     obj1.free();
422c4c
 #endif
422c4c
-    maskInterpolate = gFalse;
422c4c
+    maskInterpolate = false;
422c4c
 
422c4c
     // image or mask?
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
@@ -2892,7 +2892,7 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
         dict->lookup(const_cast<char*>("IM"), &obj1);
422c4c
 #endif
422c4c
     }
422c4c
-    mask = gFalse;
422c4c
+    mask = false;
422c4c
     if (obj1.isBool()) {
422c4c
         mask = obj1.getBool();
422c4c
     }
422c4c
@@ -2936,7 +2936,7 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
         if (bits != 1) {
422c4c
             goto err1;
422c4c
         }
422c4c
-        invert = gFalse;
422c4c
+        invert = false;
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
         obj1 = dict->lookup(const_cast<char*>("Decode"));
422c4c
 #else
422c4c
@@ -2957,7 +2957,7 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
             obj1.arrayGet(0, &obj2);
422c4c
 #endif
422c4c
             if (obj2.isInt() && obj2.getInt() == 1) {
422c4c
-                invert = gTrue;
422c4c
+                invert = true;
422c4c
             }
422c4c
 #if !defined(POPPLER_NEW_OBJECT_API)
422c4c
             obj2.free();
422c4c
@@ -3054,11 +3054,11 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
         
422c4c
         // get the mask
422c4c
         int maskColors[2*gfxColorMaxComps];
422c4c
-        haveColorKeyMask = haveExplicitMask = haveSoftMask = gFalse;
422c4c
+        haveColorKeyMask = haveExplicitMask = haveSoftMask = false;
422c4c
         Stream *maskStr = NULL;
422c4c
         int maskWidth = 0;
422c4c
         int maskHeight = 0;
422c4c
-        maskInvert = gFalse;
422c4c
+        maskInvert = false;
422c4c
         GfxImageColorMap *maskColorMap = NULL;
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
         maskObj = dict->lookup(const_cast<char*>("Mask"));
422c4c
@@ -3145,7 +3145,7 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
 	    if (obj1.isBool())
422c4c
 	      maskInterpolate = obj1.getBool();
422c4c
 	    else
422c4c
-	      maskInterpolate = gFalse;
422c4c
+	      maskInterpolate = false;
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
             obj1 = maskDict->lookup(const_cast<char*>("ColorSpace"));
422c4c
 #else
422c4c
@@ -3214,7 +3214,7 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
                 goto err1;
422c4c
             }
422c4c
             //~ handle the Matte entry
422c4c
-            haveSoftMask = gTrue;
422c4c
+            haveSoftMask = true;
422c4c
         } else if (maskObj.isArray()) {
422c4c
             // color key mask
422c4c
             int i;
422c4c
@@ -3229,7 +3229,7 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
                 obj1.free();
422c4c
 #endif
422c4c
             }
422c4c
-              haveColorKeyMask = gTrue;
422c4c
+              haveColorKeyMask = true;
422c4c
         } else if (maskObj.isStream()) {
422c4c
             // explicit mask
422c4c
             if (inlineImg) {
422c4c
@@ -3306,11 +3306,11 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
 	    if (obj1.isBool())
422c4c
 	      maskInterpolate = obj1.getBool();
422c4c
 	    else
422c4c
-	      maskInterpolate = gFalse;
422c4c
+	      maskInterpolate = false;
422c4c
 #if !defined(POPPLER_NEW_OBJECT_API)
422c4c
 	    obj1.free();
422c4c
 #endif
422c4c
-            maskInvert = gFalse;
422c4c
+            maskInvert = false;
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
             obj1 = maskDict->lookup(const_cast<char*>("Decode"));
422c4c
 #else
422c4c
@@ -3331,7 +3331,7 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
                 obj1.arrayGet(0, &obj2);
422c4c
 #endif
422c4c
                 if (obj2.isInt() && obj2.getInt() == 1) {
422c4c
-                    maskInvert = gTrue;
422c4c
+                    maskInvert = true;
422c4c
                 }
422c4c
 #if !defined(POPPLER_NEW_OBJECT_API)
422c4c
                 obj2.free();
422c4c
@@ -3342,7 +3342,7 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
 #if !defined(POPPLER_NEW_OBJECT_API)
422c4c
             obj1.free();
422c4c
 #endif
422c4c
-            haveExplicitMask = gTrue;
422c4c
+            haveExplicitMask = true;
422c4c
         }
422c4c
         
422c4c
         // draw it
422c4c
@@ -3377,7 +3377,7 @@ void PdfParser::doImage(Object * /*ref*/
422c4c
 
422c4c
 void PdfParser::doForm(Object *str) {
422c4c
   Dict *dict;
422c4c
-  GBool transpGroup, isolated, knockout;
422c4c
+  bool transpGroup, isolated, knockout;
422c4c
   GfxColorSpace *blendingColorSpace;
422c4c
   Object matrixObj, bboxObj;
422c4c
   double m[6], bbox[4];
422c4c
@@ -3471,7 +3471,7 @@ void PdfParser::doForm(Object *str) {
422c4c
   resDict = resObj.isDict() ? resObj.getDict() : (Dict *)NULL;
422c4c
 
422c4c
   // check for a transparency group
422c4c
-  transpGroup = isolated = knockout = gFalse;
422c4c
+  transpGroup = isolated = knockout = false;
422c4c
   blendingColorSpace = NULL;
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
   if ((obj1 = dict->lookup(const_cast<char*>("Group"))).isDict()) {
422c4c
@@ -3480,7 +3480,7 @@ void PdfParser::doForm(Object *str) {
422c4c
   if (dict->lookup(const_cast<char*>("Group"), &obj1)->isDict()) {
422c4c
     if (obj1.dictLookup(const_cast<char*>("S"), &obj2)->isName(const_cast<char*>("Transparency"))) {
422c4c
 #endif
422c4c
-      transpGroup = gTrue;
422c4c
+      transpGroup = true;
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
       if (!((obj3 = obj1.dictLookup(const_cast<char*>("CS"))).isNull())) {
422c4c
 #else
422c4c
@@ -3524,7 +3524,7 @@ void PdfParser::doForm(Object *str) {
422c4c
   // draw it
422c4c
   ++formDepth;
422c4c
   doForm1(str, resDict, m, bbox,
422c4c
-	  transpGroup, gFalse, blendingColorSpace, isolated, knockout);
422c4c
+	  transpGroup, false, blendingColorSpace, isolated, knockout);
422c4c
   --formDepth;
422c4c
 
422c4c
   if (blendingColorSpace) {
422c4c
@@ -3536,10 +3536,10 @@ void PdfParser::doForm(Object *str) {
422c4c
 }
422c4c
 
422c4c
 void PdfParser::doForm1(Object *str, Dict *resDict, double *matrix, double *bbox,
422c4c
-		  GBool transpGroup, GBool softMask,
422c4c
+		  bool transpGroup, bool softMask,
422c4c
 		  GfxColorSpace *blendingColorSpace,
422c4c
-		  GBool isolated, GBool knockout,
422c4c
-		  GBool alpha, Function *transferFunc,
422c4c
+		  bool isolated, bool knockout,
422c4c
+		  bool alpha, Function *transferFunc,
422c4c
 		  GfxColor *backdropColor) {
422c4c
   Parser *oldParser;
422c4c
   double oldBaseMatrix[6];
422c4c
@@ -3600,7 +3600,7 @@ void PdfParser::doForm1(Object *str, Dic
422c4c
   }
422c4c
 
422c4c
   // draw the form
422c4c
-  parse(str, gFalse);
422c4c
+  parse(str, false);
422c4c
 
422c4c
   // restore base matrix
422c4c
   for (i = 0; i < 6; ++i) {
422c4c
@@ -3640,7 +3640,7 @@ void PdfParser::opBeginImage(Object /*ar
422c4c
 
422c4c
   // display the image
422c4c
   if (str) {
422c4c
-    doImage(NULL, str, gTrue);
422c4c
+    doImage(NULL, str, true);
422c4c
   
422c4c
     // skip 'EI' tag
422c4c
     int c1 = str->getUndecodedStream()->getChar();
422c4c
@@ -3686,7 +3686,7 @@ Stream *PdfParser::buildImageStream() {
422c4c
 	break;
422c4c
       }
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
-      dict.dictAdd(key, std::move(obj));
422c4c
+      dict.dictAdd((const char *) key, std::move(obj));
422c4c
     }
422c4c
     obj = parser->getObj();
422c4c
 #else
422c4c
@@ -3709,10 +3709,10 @@ Stream *PdfParser::buildImageStream() {
422c4c
 
422c4c
   // make stream
422c4c
 #if defined(POPPLER_NEW_OBJECT_API)
422c4c
-  str = new EmbedStream(parser->getStream(), dict.copy(), gFalse, 0);
422c4c
+  str = new EmbedStream(parser->getStream(), dict.copy(), false, 0);
422c4c
   str = str->addFilters(dict.getDict());
422c4c
 #else
422c4c
-  str = new EmbedStream(parser->getStream(), &dict, gFalse, 0);
422c4c
+  str = new EmbedStream(parser->getStream(), &dict, false, 0);
422c4c
   str = str->addFilters(&dict);
422c4c
 #endif
422c4c
 
422c4c
@@ -3875,7 +3875,7 @@ ClipHistoryEntry::~ClipHistoryEntry()
422c4c
     }
422c4c
 }
422c4c
 
422c4c
-void ClipHistoryEntry::setClip(GfxPath *clipPathA, GfxClipType clipTypeA) {
422c4c
+void ClipHistoryEntry::setClip(const GfxPath *clipPathA, GfxClipType clipTypeA) {
422c4c
     // Free previous clip path
422c4c
     if (clipPath) {
422c4c
         delete clipPath;
422c4c
--- inkscape-0.92.3/src/extension/internal/pdfinput/pdf-parser.h
422c4c
+++ inkscape-0.92.3/src/extension/internal/pdfinput/pdf-parser.h
422c4c
@@ -25,7 +25,7 @@ namespace Inkscape {
422c4c
 // TODO clean up and remove using:
422c4c
 using Inkscape::Extension::Internal::SvgBuilder;
422c4c
 
422c4c
-#include "goo/gtypes.h"
422c4c
+/*#include "goo/gtypes.h"*/
422c4c
 #include "Object.h"
422c4c
 
422c4c
 class GooString;
422c4c
@@ -96,7 +96,7 @@ struct PdfOperator {
422c4c
 struct OpHistoryEntry {
422c4c
     const char *name;       // operator's name
422c4c
     GfxState *state;        // saved state, NULL if none
422c4c
-    GBool executed;         // whether the operator has been executed
422c4c
+    bool executed;         // whether the operator has been executed
422c4c
 
422c4c
     OpHistoryEntry *next;   // next entry on stack
422c4c
     unsigned depth;         // total number of entries descending from this
422c4c
@@ -127,16 +127,16 @@ public:
422c4c
 
422c4c
   // Constructor for regular output.
422c4c
   PdfParser(XRef *xrefA, SvgBuilder *builderA, int pageNum, int rotate,
422c4c
-            Dict *resDict, PDFRectangle *box, PDFRectangle *cropBox);
422c4c
+            Dict *resDict, const PDFRectangle *box, const PDFRectangle *cropBox);
422c4c
 
422c4c
   // Constructor for a sub-page object.
422c4c
   PdfParser(XRef *xrefA, Inkscape::Extension::Internal::SvgBuilder *builderA,
422c4c
-            Dict *resDict, PDFRectangle *box);
422c4c
+            Dict *resDict, const PDFRectangle *box);
422c4c
 
422c4c
   virtual ~PdfParser();
422c4c
 
422c4c
   // Interpret a stream or array of streams.
422c4c
-  void parse(Object *obj, GBool topLevel = gTrue);
422c4c
+  void parse(Object *obj, bool topLevel = true);
422c4c
 
422c4c
   // Save graphics state.
422c4c
   void saveState();
422c4c
@@ -154,12 +154,12 @@ private:
422c4c
 
422c4c
   XRef *xref;			// the xref table for this PDF file
422c4c
   SvgBuilder *builder;          // SVG generator
422c4c
-  GBool subPage;		// is this a sub-page object?
422c4c
-  GBool printCommands;		// print the drawing commands (for debugging)
422c4c
+  bool subPage;		// is this a sub-page object?
422c4c
+  bool printCommands;		// print the drawing commands (for debugging)
422c4c
   GfxResources *res;		// resource stack
422c4c
 
422c4c
   GfxState *state;		// current graphics state
422c4c
-  GBool fontChanged;		// set if font or text matrix has changed
422c4c
+  bool fontChanged;		// set if font or text matrix has changed
422c4c
   GfxClipType clip;		// do a clip?
422c4c
   int ignoreUndef;		// current BX/EX nesting level
422c4c
   double baseMatrix[6];		// default matrix for most recent
422c4c
@@ -183,10 +183,10 @@ private:
422c4c
   OpHistoryEntry *popOperator();
422c4c
   const char *getPreviousOperator(unsigned int look_back=1);    // returns the nth previous operator's name
422c4c
 
422c4c
-  void go(GBool topLevel);
422c4c
+  void go(bool topLevel);
422c4c
   void execOp(Object *cmd, Object args[], int numArgs);
422c4c
-  PdfOperator *findOp(char *name);
422c4c
-  GBool checkArg(Object *arg, TchkType type);
422c4c
+  PdfOperator *findOp(const char *name);
422c4c
+  bool checkArg(Object *arg, TchkType type);
422c4c
   int getPos();
422c4c
 
422c4c
   // graphics state operators
422c4c
@@ -200,9 +200,9 @@ private:
422c4c
   void opSetMiterLimit(Object args[], int numArgs);
422c4c
   void opSetLineWidth(Object args[], int numArgs);
422c4c
   void opSetExtGState(Object args[], int numArgs);
422c4c
-  void doSoftMask(Object *str, GBool alpha,
422c4c
+  void doSoftMask(Object *str, bool alpha,
422c4c
 		  GfxColorSpace *blendingColorSpace,
422c4c
-		  GBool isolated, GBool knockout,
422c4c
+		  bool isolated, bool knockout,
422c4c
 		  Function *transferFunc, GfxColor *backdropColor);
422c4c
   void opSetRenderingIntent(Object args[], int numArgs);
422c4c
 
422c4c
@@ -239,11 +239,11 @@ private:
422c4c
   void opCloseFillStroke(Object args[], int numArgs);
422c4c
   void opEOFillStroke(Object args[], int numArgs);
422c4c
   void opCloseEOFillStroke(Object args[], int numArgs);
422c4c
-  void doFillAndStroke(GBool eoFill);
422c4c
-  void doPatternFillFallback(GBool eoFill);
422c4c
+  void doFillAndStroke(bool eoFill);
422c4c
+  void doPatternFillFallback(bool eoFill);
422c4c
   void doPatternStrokeFallback();
422c4c
   void doShadingPatternFillFallback(GfxShadingPattern *sPat,
422c4c
-                                    GBool stroke, GBool eoFill);
422c4c
+                                    bool stroke, bool eoFill);
422c4c
   void opShFill(Object args[], int numArgs);
422c4c
   void doFunctionShFill(GfxFunctionShading *shading);
422c4c
   void doFunctionShFill1(GfxFunctionShading *shading,
422c4c
@@ -256,7 +256,7 @@ private:
422c4c
 			   double x2, double y2, GfxColor *color2,
422c4c
 			   int nComps, int depth);
422c4c
   void doPatchMeshShFill(GfxPatchMeshShading *shading);
422c4c
-  void fillPatch(GfxPatch *patch, int nComps, int depth);
422c4c
+  void fillPatch(const GfxPatch *patch, int nComps, int depth);
422c4c
   void doEndPath();
422c4c
 
422c4c
   // path clipping operators
422c4c
@@ -291,13 +291,13 @@ private:
422c4c
 
422c4c
   // XObject operators
422c4c
   void opXObject(Object args[], int numArgs);
422c4c
-  void doImage(Object *ref, Stream *str, GBool inlineImg);
422c4c
+  void doImage(Object *ref, Stream *str, bool inlineImg);
422c4c
   void doForm(Object *str);
422c4c
   void doForm1(Object *str, Dict *resDict, double *matrix, double *bbox,
422c4c
-	       GBool transpGroup = gFalse, GBool softMask = gFalse,
422c4c
+	       bool transpGroup = false, bool softMask = false,
422c4c
 	       GfxColorSpace *blendingColorSpace = NULL,
422c4c
-	       GBool isolated = gFalse, GBool knockout = gFalse,
422c4c
-	       GBool alpha = gFalse, Function *transferFunc = NULL,
422c4c
+	       bool isolated = false, bool knockout = false,
422c4c
+	       bool alpha = false, Function *transferFunc = NULL,
422c4c
 	       GfxColor *backdropColor = NULL);
422c4c
 
422c4c
   // in-line image operators
422c4c
--- inkscape-0.92.3/src/extension/internal/pdfinput/svg-builder.cpp
422c4c
+++ inkscape-0.92.3/src/extension/internal/pdfinput/svg-builder.cpp
422c4c
@@ -264,10 +264,10 @@ static void svgSetTransform(Inkscape::XM
422c4c
 /**
422c4c
  * \brief Generates a SVG path string from poppler's data structure
422c4c
  */
422c4c
-static gchar *svgInterpretPath(GfxPath *path) {
422c4c
+static gchar *svgInterpretPath(const GfxPath *path) {
422c4c
     Inkscape::SVG::PathString pathString;
422c4c
     for (int i = 0 ; i < path->getNumSubpaths() ; ++i ) {
422c4c
-        GfxSubpath *subpath = path->getSubpath(i);
422c4c
+        const GfxSubpath *subpath = path->getSubpath(i);
422c4c
         if (subpath->getNumPoints() > 0) {
422c4c
             pathString.moveTo(subpath->getX(0), subpath->getY(0));
422c4c
             int j = 1;
422c4c
@@ -625,7 +625,7 @@ gchar *SvgBuilder::_createPattern(GfxPat
422c4c
     if ( pattern != NULL ) {
422c4c
         if ( pattern->getType() == 2 ) {  // Shading pattern
422c4c
             GfxShadingPattern *shading_pattern = static_cast<GfxShadingPattern *>(pattern);
422c4c
-            double *ptm;
422c4c
+            const double *ptm;
422c4c
             double m[6] = {1, 0, 0, 1, 0, 0};
422c4c
             double det;
422c4c
 
422c4c
@@ -672,7 +672,7 @@ gchar *SvgBuilder::_createTilingPattern(
422c4c
 
422c4c
     Inkscape::XML::Node *pattern_node = _xml_doc->createElement("svg:pattern");
422c4c
     // Set pattern transform matrix
422c4c
-    double *p2u = tiling_pattern->getMatrix();
422c4c
+    const double *p2u = tiling_pattern->getMatrix();
422c4c
     double m[6] = {1, 0, 0, 1, 0, 0};
422c4c
     double det;
422c4c
     det = _ttm[0] * _ttm[3] - _ttm[1] * _ttm[2];    // see LP Bug 1168908
422c4c
@@ -698,7 +698,7 @@ gchar *SvgBuilder::_createTilingPattern(
422c4c
     pattern_node->setAttribute("patternUnits", "userSpaceOnUse");
422c4c
     // Set pattern tiling
422c4c
     // FIXME: don't ignore XStep and YStep
422c4c
-    double *bbox = tiling_pattern->getBBox();
422c4c
+    const double *bbox = tiling_pattern->getBBox();
422c4c
     sp_repr_set_svg_double(pattern_node, "x", 0.0);
422c4c
     sp_repr_set_svg_double(pattern_node, "y", 0.0);
422c4c
     sp_repr_set_svg_double(pattern_node, "width", bbox[2] - bbox[0]);
422c4c
@@ -751,7 +751,7 @@ gchar *SvgBuilder::_createTilingPattern(
422c4c
  */
422c4c
 gchar *SvgBuilder::_createGradient(GfxShading *shading, double *matrix, bool for_shading) {
422c4c
     Inkscape::XML::Node *gradient;
422c4c
-    Function *func;
422c4c
+    const Function *func;
422c4c
     int num_funcs;
422c4c
     bool extend0, extend1;
422c4c
 
422c4c
@@ -865,7 +865,7 @@ static bool svgGetShadingColorRGB(GfxSha
422c4c
 
422c4c
 #define INT_EPSILON 8
422c4c
 bool SvgBuilder::_addGradientStops(Inkscape::XML::Node *gradient, GfxShading *shading,
422c4c
-                                   Function *func) {
422c4c
+                                   const Function *func) {
422c4c
     int type = func->getType();
422c4c
     if ( type == 0 || type == 2 ) {  // Sampled or exponential function
422c4c
         GfxRGB stop1, stop2;
422c4c
@@ -877,9 +877,9 @@ bool SvgBuilder::_addGradientStops(Inksc
422c4c
             _addStopToGradient(gradient, 1.0, &stop2, 1.0);
422c4c
         }
422c4c
     } else if ( type == 3 ) { // Stitching
422c4c
-        StitchingFunction *stitchingFunc = static_cast<StitchingFunction*>(func);
422c4c
-        double *bounds = stitchingFunc->getBounds();
422c4c
-        double *encode = stitchingFunc->getEncode();
422c4c
+        auto stitchingFunc = static_cast<const StitchingFunction*>(func);
422c4c
+        const double *bounds = stitchingFunc->getBounds();
422c4c
+        const double *encode = stitchingFunc->getEncode();
422c4c
         int num_funcs = stitchingFunc->getNumFuncs();
422c4c
 
422c4c
         // Add stops from all the stitched functions
422c4c
@@ -890,7 +890,7 @@ bool SvgBuilder::_addGradientStops(Inksc
422c4c
             svgGetShadingColorRGB(shading, bounds[i + 1], &color;;
422c4c
             // Add stops
422c4c
             if (stitchingFunc->getFunc(i)->getType() == 2) {    // process exponential fxn
422c4c
-                double expE = (static_cast<ExponentialFunction*>(stitchingFunc->getFunc(i)))->getE();
422c4c
+                double expE = (static_cast<const ExponentialFunction*>(stitchingFunc->getFunc(i)))->getE();
422c4c
                 if (expE > 1.0) {
422c4c
                     expE = (bounds[i + 1] - bounds[i])/expE;    // approximate exponential as a single straight line at x=1
422c4c
                     if (encode[2*i] == 0) {    // normal sequence
422c4c
@@ -1020,7 +1020,7 @@ void SvgBuilder::updateFont(GfxState *st
422c4c
     GfxFont *font = state->getFont();
422c4c
     // Store original name
422c4c
     if (font->getName()) {
422c4c
-        _font_specification = g_strdup(font->getName()->getCString());
422c4c
+        _font_specification = g_strdup(font->getName()->c_str());
422c4c
     } else {
422c4c
         _font_specification = (char*) "Arial";
422c4c
     }
422c4c
@@ -1047,7 +1047,7 @@ void SvgBuilder::updateFont(GfxState *st
422c4c
 
422c4c
     // Font family
422c4c
     if (font->getFamily()) { // if font family is explicitly given use it.
422c4c
-        sp_repr_css_set_property(_font_style, "font-family", font->getFamily()->getCString());
422c4c
+        sp_repr_css_set_property(_font_style, "font-family", font->getFamily()->c_str());
422c4c
     } else { 
422c4c
         int attr_value = 1;
422c4c
         sp_repr_get_int(_preferences, "localFonts", &attr_value);
422c4c
@@ -1148,7 +1148,7 @@ void SvgBuilder::updateFont(GfxState *st
422c4c
     Inkscape::CSSOStringStream os_font_size;
422c4c
     double css_font_size = _font_scaling * state->getFontSize();
422c4c
     if ( font->getType() == fontType3 ) {
422c4c
-        double *font_matrix = font->getFontMatrix();
422c4c
+        const double *font_matrix = font->getFontMatrix();
422c4c
         if ( font_matrix[0] != 0.0 ) {
422c4c
             css_font_size *= font_matrix[3] / font_matrix[0];
422c4c
         }
422c4c
@@ -1193,7 +1193,7 @@ void SvgBuilder::updateTextPosition(doub
422c4c
 void SvgBuilder::updateTextMatrix(GfxState *state) {
422c4c
     _flushText();
422c4c
     // Update text matrix
422c4c
-    double *text_matrix = state->getTextMat();
422c4c
+    const double *text_matrix = state->getTextMat();
422c4c
     double w_scale = sqrt( text_matrix[0] * text_matrix[0] + text_matrix[2] * text_matrix[2] );
422c4c
     double h_scale = sqrt( text_matrix[1] * text_matrix[1] + text_matrix[3] * text_matrix[3] );
422c4c
     double max_scale;
422c4c
@@ -1379,7 +1379,7 @@ void SvgBuilder::beginString(GfxState *s
422c4c
 void SvgBuilder::addChar(GfxState *state, double x, double y,
422c4c
                          double dx, double dy,
422c4c
                          double originX, double originY,
422c4c
-                         CharCode /*code*/, int /*nBytes*/, Unicode *u, int uLen) {
422c4c
+                         CharCode /*code*/, int /*nBytes*/, Unicode const *u, int uLen) {
422c4c
 
422c4c
 
422c4c
     bool is_space = ( uLen == 1 && u[0] == 32 );
422c4c
--- inkscape-0.92.3/src/extension/internal/pdfinput/svg-builder.h
422c4c
+++ inkscape-0.92.3/src/extension/internal/pdfinput/svg-builder.h
422c4c
@@ -140,7 +140,7 @@ public:
422c4c
     void addChar(GfxState *state, double x, double y,
422c4c
                  double dx, double dy,
422c4c
                  double originX, double originY,
422c4c
-                 CharCode code, int nBytes, Unicode *u, int uLen);
422c4c
+                 CharCode code, int nBytes, Unicode const *u, int uLen);
422c4c
     void beginTextObject(GfxState *state);
422c4c
     void endTextObject(GfxState *state);
422c4c
 
422c4c
@@ -174,7 +174,7 @@ private:
422c4c
     void _addStopToGradient(Inkscape::XML::Node *gradient, double offset,
422c4c
                             GfxRGB *color, double opacity);
422c4c
     bool _addGradientStops(Inkscape::XML::Node *gradient, GfxShading *shading,
422c4c
-                           Function *func);
422c4c
+                           const Function *func);
422c4c
     gchar *_createTilingPattern(GfxTilingPattern *tiling_pattern, GfxState *state,
422c4c
                                 bool is_stroke=false);
422c4c
     // Image/mask creation