[poppler] poppler/Gfx.cc poppler/OutputDev.cc poppler/OutputDev.h

Albert Astals Cid aacid at kemper.freedesktop.org
Thu May 10 11:56:41 PDT 2012


 poppler/Gfx.cc       |    8 ++++++++
 poppler/OutputDev.cc |    8 +++++++-
 poppler/OutputDev.h  |    4 +++-
 3 files changed, 18 insertions(+), 2 deletions(-)

New commits:
commit df05d084cb26807c39695280cd8ea52d13aa1255
Author: Albert Astals Cid <aacid at kde.org>
Date:   Thu May 10 20:54:13 2012 +0200

    Bring back the begin/endMarkedContent virtuals
    
    For those evil people that keep using poppler internals

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 827bbed..9c2a9d8 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -4996,6 +4996,12 @@ void Gfx::opBeginMarkedContent(Object args[], int numArgs) {
     fflush(stdout);
   }
   ocState = !contentIsHidden();
+  
+  if (numArgs == 2 && args[1].isDict()) {
+    out->beginMarkedContent(args[0].getName(), args[1].getDict());
+  } else if(numArgs == 1) {
+    out->beginMarkedContent(args[0].getName(), NULL);
+  }
 }
 
 void Gfx::opEndMarkedContent(Object args[], int numArgs) {
@@ -5013,6 +5019,8 @@ void Gfx::opEndMarkedContent(Object args[], int numArgs) {
   if (mcKind == gfxMCActualText)
     out->endActualText(state);
   ocState = !contentIsHidden();
+  
+  out->endMarkedContent(state);
 }
 
 void Gfx::opMarkPoint(Object args[], int numArgs) {
diff --git a/poppler/OutputDev.cc b/poppler/OutputDev.cc
index c52f611..54580d0 100644
--- a/poppler/OutputDev.cc
+++ b/poppler/OutputDev.cc
@@ -17,7 +17,7 @@
 // Copyright (C) 2006 Thorkild Stray <thorkild at ifi.uio.no>
 // Copyright (C) 2007 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2009 Carlos Garcia Campos <carlosgc at gnome.org>
-// Copyright (C) 2009 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2009, 2012 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2012 Thomas Freitag <Thomas.Freitag at alfa.de>
 //
 // To see a description of the changes please see the Changelog file that
@@ -157,6 +157,12 @@ void OutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
   drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse);
 }
 
+void OutputDev::endMarkedContent(GfxState *state) {
+}
+
+void OutputDev::beginMarkedContent(char *name, Dict *properties) {
+}
+
 void OutputDev::markPoint(char *name) {
 }
 
diff --git a/poppler/OutputDev.h b/poppler/OutputDev.h
index 803d922..855dbaf 100644
--- a/poppler/OutputDev.h
+++ b/poppler/OutputDev.h
@@ -19,7 +19,7 @@
 // Copyright (C) 2007, 2011 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2009-2012 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2009, 2011 Carlos Garcia Campos <carlosgc at gnome.org>
-// Copyright (C) 2009 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2009, 2012 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2010 Christian Feuersänger <cfeuersaenger at googlemail.com>
 // Copyright (C) 2012 Fabio D'Urso <fabiodurso at hotmail.it>
 //
@@ -272,6 +272,8 @@ public:
 
   //----- grouping operators
 
+  virtual void endMarkedContent(GfxState *state);
+  virtual void beginMarkedContent(char *name, Dict *properties);
   virtual void markPoint(char *name);
   virtual void markPoint(char *name, Dict *properties);
 


More information about the poppler mailing list