[poppler] 6 commits - cmake/modules configure.ac poppler/Gfx.cc poppler/OutputDev.cc poppler/OutputDev.h poppler/PSOutputDev.cc utils/HtmlOutputDev.cc utils/HtmlOutputDev.h

Albert Astals Cid aacid at kemper.freedesktop.org
Fri Jul 31 14:27:33 PDT 2009


 cmake/modules/PopplerMacros.cmake |    1 +
 configure.ac                      |    2 +-
 poppler/Gfx.cc                    |    2 --
 poppler/OutputDev.cc              |    4 +---
 poppler/OutputDev.h               |    2 +-
 poppler/PSOutputDev.cc            |    2 +-
 utils/HtmlOutputDev.cc            |    4 ++--
 utils/HtmlOutputDev.h             |    4 ++--
 8 files changed, 9 insertions(+), 12 deletions(-)

New commits:
commit 35c408ca49be08144bcf14aa112505fd556725d2
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Jul 31 23:27:02 2009 +0200

    add the overloaded virtual warning also the autotools based build

diff --git a/configure.ac b/configure.ac
index 1942393..4574582 100644
--- a/configure.ac
+++ b/configure.ac
@@ -507,7 +507,7 @@ if test "x$GCC" != xyes; then
 fi
 case "$enable_compile_warnings" in
   no)	;;
-  yes)	CXXFLAGS="-Wall -Wno-write-strings $CXXFLAGS" ;;
+  yes)	CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual $CXXFLAGS" ;;
   kde)	CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef -ansi \
 		-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align \
 		-Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith \
commit 1c32bd2d101e5dfb37e28276ecad699f121b27b7
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Jul 31 23:22:25 2009 +0200

    Add my copyright to files i just edited

diff --git a/poppler/OutputDev.cc b/poppler/OutputDev.cc
index 305004d..5adc7b8 100644
--- a/poppler/OutputDev.cc
+++ b/poppler/OutputDev.cc
@@ -17,6 +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>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
diff --git a/poppler/OutputDev.h b/poppler/OutputDev.h
index 161710b..ffd91a0 100644
--- a/poppler/OutputDev.h
+++ b/poppler/OutputDev.h
@@ -19,6 +19,7 @@
 // Copyright (C) 2007 Adrian Johnson <ajohnson at redneon.com>
 // Copyright (C) 2009 Thomas Freitag <Thomas.Freitag at alfa.de>
 // Copyright (C) 2009 Carlos Garcia Campos <carlosgc at gnome.org>
+// Copyright (C) 2009 Albert Astals Cid <aacid at kde.org>
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
diff --git a/utils/HtmlOutputDev.h b/utils/HtmlOutputDev.h
index e3ac4a6..6dd0327 100644
--- a/utils/HtmlOutputDev.h
+++ b/utils/HtmlOutputDev.h
@@ -14,7 +14,7 @@
 // All changes made under the Poppler project to this file are licensed
 // under GPL version 2 or later
 //
-// Copyright (C) 2006-2007 Albert Astals Cid <aacid at kde.org>
+// Copyright (C) 2006, 2007, 2009 Albert Astals Cid <aacid at kde.org>
 // Copyright (C) 2008-2009 Warren Toomey <wkt at tuhs.org>
 // Copyright (C) 2009 Carlos Garcia Campos <carlosgc at gnome.org>
 //
commit 10717a48c85f1dbeff1c6bcd094006a9ecc92efc
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Jul 31 23:22:10 2009 +0200

    Add -Woverloaded-virtual as default CXX flag

diff --git a/cmake/modules/PopplerMacros.cmake b/cmake/modules/PopplerMacros.cmake
index a0a7c27..5b0555f 100644
--- a/cmake/modules/PopplerMacros.cmake
+++ b/cmake/modules/PopplerMacros.cmake
@@ -91,6 +91,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
   set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wno-write-strings")
   set(DEFAULT_COMPILE_WARNINGS_KDE "-Wnon-virtual-dtor -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts -Wall -W -Wpointer-arith -Wwrite-strings -O2 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common")
 
+  set(CMAKE_CXX_FLAGS                "-Woverloaded-virtual")
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
   set(CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG")
   set(CMAKE_CXX_FLAGS_DEBUG          "-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline")
commit db5f736655f01575ac5d7c524cbf131924ae91fa
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Jul 31 23:12:00 2009 +0200

    rename the function
    
    That way the name is different from the OutputDev function and does
    not seem like a wrong overload

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 97b229d..3395878 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -1102,7 +1102,7 @@ void HtmlOutputDev::endPage() {
   Links *linksList = catalog->getPage(pageNum)->getLinks(catalog);
   for (int i = 0; i < linksList->getNumLinks(); ++i)
   {
-      processLink(linksList->getLink(i));
+      doProcessLink(linksList->getLink(i));
   }
   delete linksList;
 
@@ -1426,7 +1426,7 @@ void HtmlOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
 
 
 
-void HtmlOutputDev::processLink(Link* link){
+void HtmlOutputDev::doProcessLink(Link* link){
   double _x1,_y1,_x2,_y2;
   int x1,y1,x2,y2;
   
diff --git a/utils/HtmlOutputDev.h b/utils/HtmlOutputDev.h
index 613448a..e3ac4a6 100644
--- a/utils/HtmlOutputDev.h
+++ b/utils/HtmlOutputDev.h
@@ -297,7 +297,7 @@ private:
   // convert encoding into a HTML standard, or encoding->getCString if not
   // recognized
   static char* mapEncodingToHtml(GooString* encoding);
-  void processLink(Link *link);
+  void doProcessLink(Link *link);
   GooString* getLinkDest(Link *link,Catalog *catalog);
   void dumpMetaVars(FILE *);
   void doFrame(int firstPage);
commit 4be87f87509b93c4fe4025f9bd788e9412416663
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Jul 31 23:11:32 2009 +0200

    Remove Outputdev::beginMarkedContent as noone uses it

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index e71a0dd..eeefcac 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -4474,8 +4474,6 @@ void Gfx::opBeginMarkedContent(Object args[], int numArgs) {
 
   if(numArgs == 2 && args[1].isDict ()) {
     out->beginMarkedContent(args[0].getName(),args[1].getDict());
-  } else {
-    out->beginMarkedContent(args[0].getName());
   }
 }
 
diff --git a/poppler/OutputDev.cc b/poppler/OutputDev.cc
index cff10bc..305004d 100644
--- a/poppler/OutputDev.cc
+++ b/poppler/OutputDev.cc
@@ -147,9 +147,6 @@ void OutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
 void OutputDev::endMarkedContent(GfxState *state) {
 }
 
-void OutputDev::beginMarkedContent(char *name) {
-}
-
 void OutputDev::beginMarkedContent(char *name, Dict *properties) {
 }
 
diff --git a/poppler/OutputDev.h b/poppler/OutputDev.h
index d7fb10f..161710b 100644
--- a/poppler/OutputDev.h
+++ b/poppler/OutputDev.h
@@ -253,7 +253,6 @@ public:
   //----- grouping operators
 
   virtual void endMarkedContent(GfxState *state);
-  virtual void beginMarkedContent(char *name);
   virtual void beginMarkedContent(char *name, Dict *properties);
   virtual void markPoint(char *name);
   virtual void markPoint(char *name, Dict *properties);
commit 6ab2ec8a89519d2bd1576c8d62f8aec51b04479a
Author: Albert Astals Cid <aacid at kde.org>
Date:   Fri Jul 31 23:10:56 2009 +0200

    Warning--

diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 9c72294..881427f 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -4775,7 +4775,7 @@ void PSOutputDev::doImageL2(Object *ref, GfxImageColorMap *colorMap,
   GfxColor color;
   GfxCMYK cmyk;
   int c;
-  int col, i, j, x0, x1, y, maskXor;
+  int col, i, j, x0, x1, y;
   
   rectsOutLen = 0;
 


More information about the poppler mailing list