[poppler] 3 commits - qt4/src

Pino Toscano pino at kemper.freedesktop.org
Mon Mar 3 07:57:33 PST 2008


 qt4/src/poppler-link.h     |   17 +++++++++++++++++
 qt4/src/poppler-private.h  |    5 +++++
 qt4/src/poppler-qt4.h      |   23 ++++++++++++++++++++++-
 qt4/src/poppler-textbox.cc |    2 +-
 4 files changed, 45 insertions(+), 2 deletions(-)

New commits:
commit 42c254b978c61e2ccfda083dfeffec9fc35a5fe7
Author: Pino Toscano <pino at kde.org>
Date:   Mon Mar 3 16:56:09 2008 +0100

    be safe about out-of-range values

diff --git a/qt4/src/poppler-textbox.cc b/qt4/src/poppler-textbox.cc
index 52e8138..840b389 100644
--- a/qt4/src/poppler-textbox.cc
+++ b/qt4/src/poppler-textbox.cc
@@ -50,7 +50,7 @@ TextBox *TextBox::nextWord() const
 
 double TextBox::edge(int i) const
 {
-	return m_data->edge[i];
+	return m_data->edge.value(i, 0.0);
 }
 
 bool TextBox::hasSpaceAfter() const
commit 5db75df77938eb7620867d0618058be52ed2d3cb
Author: Pino Toscano <pino at kde.org>
Date:   Mon Mar 3 16:53:39 2008 +0100

    initialize nicely

diff --git a/qt4/src/poppler-private.h b/qt4/src/poppler-private.h
index 6b88009..3774d20 100644
--- a/qt4/src/poppler-private.h
+++ b/qt4/src/poppler-private.h
@@ -294,6 +294,11 @@ namespace Poppler {
     class TextBoxData
     {
 	public:
+		TextBoxData()
+		  : nextWord(0), hasSpaceAfter(false)
+		{
+		}
+
 		QString text;
 		QRectF bBox;
 		TextBox *nextWord;
commit 3ad0ab7e4abd37528284269c69be3cdfb8d31d2e
Author: Pino Toscano <pino at kde.org>
Date:   Mon Mar 3 16:49:23 2008 +0100

    apidox

diff --git a/qt4/src/poppler-link.h b/qt4/src/poppler-link.h
index a7a066c..cf9a3d1 100644
--- a/qt4/src/poppler-link.h
+++ b/qt4/src/poppler-link.h
@@ -59,8 +59,10 @@ class POPPLER_QT4_EXPORT LinkDestination
 			destFitBV = 8
 		};
 
+		/// \cond PRIVATE
 		LinkDestination(const LinkDestinationData &data);
 		LinkDestination(const QString &description);
+		/// \endcond
 		/**
 		 * Copy constructor.
 		 */
@@ -178,6 +180,10 @@ class POPPLER_QT4_EXPORT LinkGoto : public Link
 		 */
 		bool isExternal() const;
 		// query for goto parameters
+		/**
+		 * The file name of the document the destination() refers to,
+		 * or an empty string in case it refers to the current document.
+		 */
 		QString fileName() const;
 		LinkDestination destination() const;
 		LinkType linkType() const;
@@ -308,12 +314,23 @@ class POPPLER_QT4_EXPORT LinkSound : public Link
 		 * - 1: full volume
 		 */
 		double volume() const;
+		/**
+		 * Whether the playback of the sound should be synchronous
+		 * (thus blocking, waiting for the end of the sound playback).
+		 */
 		bool synchronous() const;
 		/**
 		 * Whether the sound should be played continuously (that is,
 		 * started again when it ends)
 		 */
 		bool repeat() const;
+		/**
+		 * Whether the playback of this sound can be mixed with
+		 * playbacks with other sounds of the same document.
+		 *
+		 * \note When false, any other playback must be stopped before
+		 *       playing the sound.
+		 */
 		bool mix() const;
 		/**
 		 * The sound object to be played
diff --git a/qt4/src/poppler-qt4.h b/qt4/src/poppler-qt4.h
index 65bde55..ca9ceef 100644
--- a/qt4/src/poppler-qt4.h
+++ b/qt4/src/poppler-qt4.h
@@ -85,10 +85,23 @@ namespace Poppler {
       */
       QRectF boundingBox() const;
 
+      /**
+	  Returns the pointer to the next text box, if there is one.
+
+	  Otherwise, it returns a null pointer.
+      */
       TextBox *nextWord() const;
 
+      /**
+	  Returns the position of \p i -th edge of the current word.
+
+	  For a text() of \em n characters, there are \em n+1 edges.
+      */
       double edge(int i) const;
 
+      /**
+	  Returns whether there is a space character after this text box
+      */
       bool hasSpaceAfter() const;
 
     private:
@@ -105,6 +118,9 @@ namespace Poppler {
     */
     class POPPLER_QT4_EXPORT FontInfo {
     public:
+	/**
+	   The type of font.
+	*/
 	enum Type {
 		unknown,
 		Type1,
@@ -120,10 +136,12 @@ namespace Poppler {
 		CIDTrueTypeOT
 	};
 	
+	/// \cond PRIVATE
 	/**
 	   Create a new font information container.
 	*/
 	FontInfo( const FontInfoData &fid );
+	/// \endcond
 	
 	/**
 	   Copy constructor.
@@ -1056,9 +1074,12 @@ height = dummy.height();
             virtual ~PDFConverter();
 
             /**
-              Options for the PDF export.
+              Sets the options for the PDF export.
              */
             void setPDFOptions(PDFOptions options);
+            /**
+              The currently set options for the PDF export.
+             */
             PDFOptions pdfOptions() const;
 
             bool convert();


More information about the poppler mailing list