vcl/qa/cppunit/pdfexport/data/alternativeText.fodp |   29 +++++++++++----------
 vcl/qa/cppunit/pdfexport/pdfexport.cxx             |    2 -
 2 files changed, 17 insertions(+), 14 deletions(-)

New commits:
commit ecd4867f99d64f5da6801bb106750bf64307e7ff
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri May 20 10:17:43 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri May 20 13:33:47 2022 +0200

    vcl: extend test to also check the description
    
    Change-Id: I53dbec86254670ca09432a316962cb9e337b286b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134661
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/vcl/qa/cppunit/pdfexport/data/alternativeText.fodp 
b/vcl/qa/cppunit/pdfexport/data/alternativeText.fodp
index 29b55044887f..78b647b78593 100644
--- a/vcl/qa/cppunit/pdfexport/data/alternativeText.fodp
+++ b/vcl/qa/cppunit/pdfexport/data/alternativeText.fodp
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <office:document 
xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" 
xmlns:smil="urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0" 
xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooow="http://ope
 noffice.org/2004/writer" xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:table="urn:oasis:names:tc:opendocument:x
 mlns:table:1.0" 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.presentation">
- 
<office:meta><meta:creation-date>2022-05-19T20:19:11.610154378</meta:creation-date><dc:date>2022-05-19T20:23:51.171910727</dc:date><meta:editing-duration>PT4M38S</meta:editing-duration><meta:editing-cycles>4</meta:editing-cycles><meta:generator>LibreOfficeDev/7.4.0.0.alpha1$Linux_X86_64
 
LibreOffice_project/e39ea45caa3712ae2ff077203ef8aef0e16fe41a</meta:generator><meta:document-statistic
 meta:object-count="24"/></office:meta>
+ 
<office:meta><meta:creation-date>2022-05-19T20:19:11.610154378</meta:creation-date><dc:date>2022-05-20T10:09:03.143295257</dc:date><meta:editing-duration>PT4M52S</meta:editing-duration><meta:editing-cycles>5</meta:editing-cycles><meta:generator>LibreOfficeDev/7.4.0.0.alpha1$Linux_X86_64
 
LibreOffice_project/5f2dac9510bb511eaf08418342218000945cf180</meta:generator><meta:document-statistic
 meta:object-count="24"/></office:meta>
  <office:font-face-decls>
   <style:font-face style:name="Bitstream Vera Sans" 
svg:font-family="'Bitstream Vera Sans'" style:font-family-generic="system" 
style:font-pitch="variable"/>
   <style:font-face style:name="DejaVu Sans" svg:font-family="'DejaVu Sans'" 
style:font-family-generic="system" style:font-pitch="variable"/>
@@ -20,7 +20,7 @@
   <draw:marker draw:name="Arrow" svg:viewBox="0 0 20 30" svg:d="M10 0l-10 
30h20z"/>
   <style:default-style style:family="graphic">
    <style:graphic-properties svg:stroke-color="#3465a4" 
draw:fill-color="#729fcf" fo:wrap-option="no-wrap"/>
-   <style:paragraph-properties style:text-autospace="ideograph-alpha" 
style:punctuation-wrap="simple" style:line-break="strict" 
style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+   <style:paragraph-properties style:text-autospace="ideograph-alpha" 
style:punctuation-wrap="simple" style:line-break="strict" 
style:font-independent-line-spacing="false">
     <style:tab-stops/>
    </style:paragraph-properties>
    <style:text-properties style:use-window-font-color="true" 
loext:opacity="0%" loext:color-lum-mod="100%" loext:color-lum-off="0%" 
style:font-name="Liberation Serif" fo:font-size="24pt" fo:language="es" 
fo:country="ES" style:font-name-asian="DejaVu Sans" 
style:font-size-asian="24pt" style:language-asian="zh" style:country-asian="CN" 
style:font-name-complex="Bitstream Vera Sans" style:font-size-complex="24pt" 
style:language-complex="hi" style:country-complex="IN"/>
@@ -395,7 +395,7 @@
    <style:paragraph-properties style:writing-mode="lr-tb"/>
   </style:style>
   <style:style style:name="gr3" style:family="graphic" 
style:parent-style-name="Object_20_with_20_no_20_fill_20_and_20_no_20_line">
-   <style:graphic-properties draw:textarea-horizontal-align="center" 
draw:textarea-vertical-align="middle" draw:color-mode="standard" 
draw:luminance="0%" draw:contrast="0%" draw:gamma="100%" draw:red="0%" 
draw:green="0%" draw:blue="0%" fo:clip="rect(0cm, 0cm, 0cm, 0cm)" 
draw:image-opacity="100%" style:mirror="none"/>
+   <style:graphic-properties draw:stroke="none" draw:fill="none" 
draw:textarea-horizontal-align="center" draw:textarea-vertical-align="middle" 
draw:color-mode="standard" draw:luminance="0%" draw:contrast="0%" 
draw:gamma="100%" draw:red="0%" draw:green="0%" draw:blue="0%" 
fo:clip="rect(0cm, 0cm, 0cm, 0cm)" draw:image-opacity="100%" 
style:mirror="none"/>
   </style:style>
   <style:style style:name="gr4" style:family="graphic">
    <style:graphic-properties style:protect="size"/>
@@ -417,10 +417,12 @@
    <style:paragraph-properties style:writing-mode="lr-tb"/>
   </style:style>
   <style:style style:name="P1" style:family="paragraph">
-   <style:text-properties fo:font-size="14pt" style:font-size-asian="14pt" 
style:font-size-complex="14pt"/>
+   <style:paragraph-properties style:writing-mode="lr-tb"/>
   </style:style>
   <style:style style:name="P3" style:family="paragraph">
-   <style:paragraph-properties fo:text-align="end"/>
+   <style:paragraph-properties fo:text-align="end" style:writing-mode="lr-tb"/>
+  </style:style>
+  <style:style style:name="T1" style:family="text">
    <style:text-properties fo:font-size="14pt" style:font-size-asian="14pt" 
style:font-size-complex="14pt"/>
   </style:style>
   </office:automatic-styles>
@@ -441,22 +443,22 @@
    <draw:page-thumbnail draw:layer="backgroundobjects" svg:width="8.999cm" 
svg:height="5.061cm" svg:x="11cm" svg:y="20.894cm"/>
    <draw:frame draw:style-name="gr1" draw:text-style-name="P2" 
draw:layer="backgroundobjects" svg:width="9.113cm" svg:height="1.484cm" 
svg:x="0cm" svg:y="0cm" presentation:class="header">
     <draw:text-box>
-     <text:p text:style-name="P1"><presentation:header/></text:p>
+     <text:p text:style-name="P1"><text:span 
text:style-name="T1"><presentation:header/></text:span></text:p>
     </draw:text-box>
    </draw:frame>
-   <draw:frame draw:style-name="gr1" draw:text-style-name="P4" 
draw:layer="backgroundobjects" svg:width="9.113cm" svg:height="1.484cm" 
svg:x="11.886cm" svg:y="0cm" presentation:class="date-time">
+   <draw:frame draw:style-name="gr1" draw:text-style-name="P2" 
draw:layer="backgroundobjects" svg:width="9.113cm" svg:height="1.484cm" 
svg:x="11.886cm" svg:y="0cm" presentation:class="date-time">
     <draw:text-box>
-     <text:p text:style-name="P3"><presentation:date-time/></text:p>
+     <text:p text:style-name="P3"><text:span 
text:style-name="T1"><presentation:date-time/></text:span></text:p>
     </draw:text-box>
    </draw:frame>
    <draw:frame draw:style-name="gr2" draw:text-style-name="P2" 
draw:layer="backgroundobjects" svg:width="9.113cm" svg:height="1.484cm" 
svg:x="0cm" svg:y="28.215cm" presentation:class="footer">
     <draw:text-box>
-     <text:p text:style-name="P1"><presentation:footer/></text:p>
+     <text:p text:style-name="P1"><text:span 
text:style-name="T1"><presentation:footer/></text:span></text:p>
     </draw:text-box>
    </draw:frame>
-   <draw:frame draw:style-name="gr2" draw:text-style-name="P4" 
draw:layer="backgroundobjects" svg:width="9.113cm" svg:height="1.484cm" 
svg:x="11.886cm" svg:y="28.215cm" presentation:class="page-number">
+   <draw:frame draw:style-name="gr2" draw:text-style-name="P2" 
draw:layer="backgroundobjects" svg:width="9.113cm" svg:height="1.484cm" 
svg:x="11.886cm" svg:y="28.215cm" presentation:class="page-number">
     <draw:text-box>
-     <text:p 
text:style-name="P3"><text:page-number>&lt;number&gt;</text:page-number></text:p>
+     <text:p text:style-name="P3"><text:span 
text:style-name="T1"><text:page-number>&lt;number&gt;</text:page-number></text:span></text:p>
     </draw:text-box>
    </draw:frame>
   </style:handout-master>
@@ -464,7 +466,7 @@
  <office:body>
   <office:presentation>
    <draw:page draw:name="page1" draw:style-name="dp3" 
draw:master-page-name="Default" 
presentation:presentation-page-layout-name="AL1T0">
-    <draw:frame draw:style-name="gr3" draw:text-style-name="P7" 
draw:layer="layout" svg:width="17.752cm" svg:height="2.832cm" svg:x="6.248cm" 
svg:y="4.168cm">
+    <draw:frame draw:style-name="gr3" draw:text-style-name="P10" 
draw:layer="layout" svg:width="17.752cm" svg:height="2.832cm" svg:x="6.248cm" 
svg:y="4.168cm">
      <draw:image draw:mime-type="image/png">
       
<office:binary-data>iVBORw0KGgoAAAANSUhEUgAAAZAAAABACAYAAAA09iFXAAAABmJLR0QA/wD/AP+gvaeTAAAA
        CXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH3AsKBgM2UV8daQAAIABJREFUeNrsnXecVOW9
@@ -889,10 +891,11 @@
       <text:p/>
      </draw:image>
      <svg:title>This is the text alternative</svg:title>
+     <svg:desc>This is the description</svg:desc>
     </draw:frame>
     <presentation:notes draw:style-name="dp2">
      <draw:page-thumbnail draw:style-name="gr4" draw:layer="layout" 
svg:width="19.798cm" svg:height="11.136cm" svg:x="0.6cm" svg:y="2.257cm" 
draw:page-number="1" presentation:class="page"/>
-     <draw:frame presentation:style-name="pr4" draw:text-style-name="P8" 
draw:layer="layout" svg:width="16.799cm" svg:height="13.364cm" svg:x="2.1cm" 
svg:y="14.107cm" presentation:class="notes" presentation:placeholder="true">
+     <draw:frame presentation:style-name="pr4" draw:text-style-name="P11" 
draw:layer="layout" svg:width="16.799cm" svg:height="13.364cm" svg:x="2.1cm" 
svg:y="14.107cm" presentation:class="notes" presentation:placeholder="true">
       <draw:text-box/>
      </draw:frame>
     </presentation:notes>
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 172f1b7d80ec..bbf9908eb9de 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -885,7 +885,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testAlternativeText)
             if (pS && pS->GetValue() == "Figure")
             {
                 CPPUNIT_ASSERT_EQUAL(
-                    OUString(u"This is the text alternative"),
+                    OUString(u"This is the text alternative - This is the 
description"),
                     ::vcl::filter::PDFDocument::DecodeHexStringUTF16BE(
                         
*dynamic_cast<vcl::filter::PDFHexStringElement*>(pObject->Lookup("Alt"))));
             }

Reply via email to