|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75731 - in trunk/tools/quickbook: src test
From: dnljms_at_[hidden]
Date: 2011-11-29 17:41:11
Author: danieljames
Date: 2011-11-29 17:41:10 EST (Tue, 29 Nov 2011)
New Revision: 75731
URL: http://svn.boost.org/trac/boost/changeset/75731
Log:
Quickbook: Use version switch for image alt text change.
Was comparing the output of different versions of the quickbook executable and
the change seemed gratuitous.
Text files modified:
trunk/tools/quickbook/src/actions.cpp | 6 ++++
trunk/tools/quickbook/test/image-1_5.gold | 37 ++++++++++++++++++++++++++------
trunk/tools/quickbook/test/quickbook_manual-1_4.gold | 45 +++++++++++++++++++++++++++++----------
trunk/tools/quickbook/test/svg-1_1.gold | 13 ++++++++--
4 files changed, 78 insertions(+), 23 deletions(-)
Modified: trunk/tools/quickbook/src/actions.cpp
==============================================================================
--- trunk/tools/quickbook/src/actions.cpp (original)
+++ trunk/tools/quickbook/src/actions.cpp 2011-11-29 17:41:10 EST (Tue, 29 Nov 2011)
@@ -767,7 +767,11 @@
// Extract the alt tag, to use as a text description.
// Or if there isn't one, use the stem of the file name.
- quickbook::value alt_text = attributes["alt"];
+ attribute_map::iterator alt_pos = attributes.find("alt");
+ quickbook::value alt_text =
+ alt_pos != attributes.end() ? alt_pos->second :
+ qbk_version_n < 106u ? encoded_value(stem) :
+ quickbook::value();
attributes.erase("alt");
if(extension == "svg")
Modified: trunk/tools/quickbook/test/image-1_5.gold
==============================================================================
--- trunk/tools/quickbook/test/image-1_5.gold (original)
+++ trunk/tools/quickbook/test/image-1_5.gold 2011-11-29 17:41:10 EST (Tue, 29 Nov 2011)
@@ -3,12 +3,25 @@
<article id="images_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Images 1.5</title>
<para>
- <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
- <inlinemediaobject><imageobject><imagedata fileref="test this.gif"></imagedata></imageobject></inlinemediaobject>
- <inlinemediaobject><imageobject><imagedata fileref="test&this.gif"></imagedata></imageobject></inlinemediaobject>
- <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject></inlinemediaobject>
<inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
<textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test this.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test this</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test&this.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test&this</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"
+ height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
<phrase>Foo</phrase>
</textobject>
</inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
@@ -27,15 +40,25 @@
</inlinemediaobject>
</para>
<para>
- <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
- <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject></inlinemediaobject>
<inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
<textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="test.gif"></imagedata></imageobject>
+ <textobject>
<phrase>comment</phrase>
</textobject>
</inlinemediaobject>
</para>
<para>
- <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject>
</para>
</article>
Modified: trunk/tools/quickbook/test/quickbook_manual-1_4.gold
Modified: trunk/tools/quickbook/test/svg-1_1.gold
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
==============================================================================
--- trunk/tools/quickbook/test/quickbook_manual-1_4.gold (original)
+++ trunk/tools/quickbook/test/quickbook_manual-1_4.gold 2011-11-29 17:41:10 EST (Tue, 29 Nov 2011)
@@ -1762,7 +1762,11 @@
Now everywhere the sf_logo is placed, the picture will be inlined.
</para>
<para>
- <inlinemediaobject><imageobject><imagedata fileref="http://sourceforge.net/sflogo.php?group_id=28447&type=1"></imagedata></imageobject></inlinemediaobject>
+ <inlinemediaobject><imageobject><imagedata fileref="http://sourceforge.net/sflogo.php?group_id=28447&type=1"></imagedata></imageobject>
+ <textobject>
+ <phrase>sflogo</phrase>
+ </textobject>
+ </inlinemediaobject>
</para>
<tip>
<para>
@@ -1799,7 +1803,11 @@
</para>
<para>
Hi <ulink url="http://spirit.sourceforge.net">Spirit</ulink> <inlinemediaobject><imageobject><imagedata
- fileref="images/smiley.png"></imagedata></imageobject></inlinemediaobject>
+ fileref="images/smiley.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>smiley</phrase>
+ </textobject>
+ </inlinemediaobject>
</para>
</section>
<section id="quickbook.syntax.block.predefined_macros">
@@ -2210,8 +2218,12 @@
</para>
<sidebar role="blurb">
<para>
- <inlinemediaobject><imageobject><imagedata fileref="images/smiley.png"></imagedata></imageobject></inlinemediaobject>
- <emphasis role="bold">An eye catching advertisement or note...</emphasis>
+ <inlinemediaobject><imageobject><imagedata fileref="images/smiley.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>smiley</phrase>
+ </textobject>
+ </inlinemediaobject> <emphasis role="bold">An eye catching advertisement
+ or note...</emphasis>
</para>
<para>
<ulink url="http://spirit.sourceforge.net">Spirit</ulink> is an object-oriented
@@ -2968,10 +2980,13 @@
</para>
<sidebar role="blurb">
<para>
- <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject></inlinemediaobject>
- You may submit your settings, tips, and suggestions to the authors, or through
- the <ulink url="https://lists.sourceforge.net/lists/listinfo/boost-">docs Boost
- Docs mailing list</ulink>.
+ <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>note</phrase>
+ </textobject>
+ </inlinemediaobject> You may submit your settings, tips, and suggestions to
+ the authors, or through the <ulink url="https://lists.sourceforge.net/lists/listinfo/boost-">docs
+ Boost Docs mailing list</ulink>.
</para>
</sidebar>
<section id="quickbook.editors.scite">
@@ -2987,8 +3002,11 @@
</para>
<sidebar role="blurb">
<para>
- <inlinemediaobject><imageobject><imagedata fileref="images/tip.png"></imagedata></imageobject></inlinemediaobject>
- SciTE can be downloaded from <ulink url="http://www.scintilla.org/SciTE.html">http://www.scintilla.org/SciTE.html>
+ <inlinemediaobject><imageobject><imagedata fileref="images/tip.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>tip</phrase>
+ </textobject>
+ </inlinemediaobject> SciTE can be downloaded from <ulink url="http://www.scintilla.org/SciTE.html">http://www.scintilla.org/SciTE.html>
</para>
</sidebar>
<para>
@@ -3009,8 +3027,11 @@
<!--quickbook-escape-postfix--></programlisting>
<sidebar role="blurb">
<para>
- <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject></inlinemediaobject>
- Thanks to Rene Rivera for the above SciTE settings.
+ <inlinemediaobject><imageobject><imagedata fileref="images/note.png"></imagedata></imageobject>
+ <textobject>
+ <phrase>note</phrase>
+ </textobject>
+ </inlinemediaobject> Thanks to Rene Rivera for the above SciTE settings.
</para>
</sidebar>
</section>
==============================================================================
--- trunk/tools/quickbook/test/svg-1_1.gold (original)
+++ trunk/tools/quickbook/test/svg-1_1.gold 2011-11-29 17:41:10 EST (Tue, 29 Nov 2011)
@@ -4,8 +4,15 @@
<title>SVG test</title>
<para>
<inlinemediaobject><imageobject><imagedata contentdepth="513.25690" contentwidth="745.60706"
- fileref="images/open_clipart_library_logo.svg" format="SVG"></imagedata></imageobject></inlinemediaobject>
- <inlinemediaobject><imageobject><imagedata fileref="images/missing_image.svg"
- format="SVG"></imagedata></imageobject></inlinemediaobject>
+ fileref="images/open_clipart_library_logo.svg" format="SVG"></imagedata></imageobject>
+ <textobject>
+ <phrase>open_clipart_library_logo</phrase>
+ </textobject>
+ </inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="images/missing_image.svg"
+ format="SVG"></imagedata></imageobject>
+ <textobject>
+ <phrase>missing_image</phrase>
+ </textobject>
+ </inlinemediaobject>
</para>
</article>