Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63735 - in trunk/tools/quickbook: detail doc test
From: daniel_james_at_[hidden]
Date: 2010-07-08 03:14:05


Author: danieljames
Date: 2010-07-08 03:14:03 EDT (Thu, 08 Jul 2010)
New Revision: 63735
URL: http://svn.boost.org/trac/boost/changeset/63735

Log:
Fix duplicate image attribute detection.
Added:
   trunk/tools/quickbook/test/fail-image_1_5.quickbook (contents, props changed)
Text files modified:
   trunk/tools/quickbook/detail/actions.cpp | 1 +
   trunk/tools/quickbook/detail/actions.hpp | 7 +++++--
   trunk/tools/quickbook/detail/actions_class.cpp | 2 +-
   trunk/tools/quickbook/doc/quickbook.qbk | 1 +
   trunk/tools/quickbook/test/Jamfile.v2 | 1 +
   5 files changed, 9 insertions(+), 3 deletions(-)

Modified: trunk/tools/quickbook/detail/actions.cpp
==============================================================================
--- trunk/tools/quickbook/detail/actions.cpp (original)
+++ trunk/tools/quickbook/detail/actions.cpp 2010-07-08 03:14:03 EDT (Thu, 08 Jul 2010)
@@ -475,6 +475,7 @@
         {
             detail::outerr(pos.file,pos.line)
                 << "Repeated attribute: " << attribute_name << ".\n";
+ ++error_count;
         }
     }
 

Modified: trunk/tools/quickbook/detail/actions.hpp
==============================================================================
--- trunk/tools/quickbook/detail/actions.hpp (original)
+++ trunk/tools/quickbook/detail/actions.hpp 2010-07-08 03:14:03 EDT (Thu, 08 Jul 2010)
@@ -407,14 +407,17 @@
         
         attribute_action(
             attribute_map& attributes
- , std::string& attribute_name)
+ , std::string& attribute_name
+ , int& error_count)
         : attributes(attributes)
- , attribute_name(attribute_name) {}
+ , attribute_name(attribute_name)
+ , error_count(error_count) {}
 
         void operator()(iterator first, iterator last) const;
 
         attribute_map& attributes;
         std::string& attribute_name;
+ int& error_count;
     };
 
     struct image_action

Modified: trunk/tools/quickbook/detail/actions_class.cpp
==============================================================================
--- trunk/tools/quickbook/detail/actions_class.cpp (original)
+++ trunk/tools/quickbook/detail/actions_class.cpp 2010-07-08 03:14:03 EDT (Thu, 08 Jul 2010)
@@ -99,7 +99,7 @@
         , plain_char(phrase)
         , raw_char(phrase)
         , escape_unicode(phrase)
- , attribute(attributes, attribute_name)
+ , attribute(attributes, attribute_name, error_count)
         , image(phrase, attributes, image_fileref)
         , cond_phrase_pre(phrase, conditions, macro)
         , cond_phrase_post(phrase, conditions, macro)

Modified: trunk/tools/quickbook/doc/quickbook.qbk
==============================================================================
--- trunk/tools/quickbook/doc/quickbook.qbk (original)
+++ trunk/tools/quickbook/doc/quickbook.qbk 2010-07-08 03:14:03 EDT (Thu, 08 Jul 2010)
@@ -205,6 +205,7 @@
 * Allow empty document bodies.
 * Less empty paragraphs.
 * XML encode the documentation info correctly.
+* Fix duplicate image attribute detection.
 * Preparing for quickbook 1.6:
   * When automatically generating ids for headers, use the quickbook
     source, rather than the generated docbook.

Modified: trunk/tools/quickbook/test/Jamfile.v2
==============================================================================
--- trunk/tools/quickbook/test/Jamfile.v2 (original)
+++ trunk/tools/quickbook/test/Jamfile.v2 2010-07-08 03:14:03 EDT (Thu, 08 Jul 2010)
@@ -65,6 +65,7 @@
     [ quickbook-fail-test fail-template-section-1 ]
     [ quickbook-fail-test fail-template-section-2 ]
     [ quickbook-fail-test fail-template-section-3 ]
+ [ quickbook-fail-test fail-image_1_5 ]
     [ quickbook-test utf-8 ]
     [ quickbook-test utf-8-bom ]
     [ quickbook-test unicode-escape ]

Added: trunk/tools/quickbook/test/fail-image_1_5.quickbook
==============================================================================
--- (empty file)
+++ trunk/tools/quickbook/test/fail-image_1_5.quickbook 2010-07-08 03:14:03 EDT (Thu, 08 Jul 2010)
@@ -0,0 +1,5 @@
+[article Images 1.5
+ [quickbook 1.5]
+]
+
+[$test.gif [width 10cm] [height 10cm] [width 10cm]]


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk