[Libreoffice-commits] core.git: Branch 'feature/cib_contract3753' - oox/source sax/source sw/qa

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Mon Feb 8 12:38:33 UTC 2021


 oox/source/export/preset-definitions-to-shape-types.pl |    2 
 oox/source/export/vmlexport.cxx                        |    6 
 oox/source/vml/vmlshape.cxx                            |    4 
 oox/source/vml/vmlshapecontext.cxx                     |    6 
 sax/source/tools/fastserializer.cxx                    |    8 
 sw/qa/extras/ooxmlexport/data/controlshape.fodt        |  182 +++++++++++++++++
 sw/qa/extras/ooxmlexport/ooxmlexport12.cxx             |   16 +
 7 files changed, 218 insertions(+), 6 deletions(-)

New commits:
commit 17a278c1aa5247a435c53c34580fdd529c4c0736
Author:     Michael Stahl <michael.stahl at allotropia.de>
AuthorDate: Fri Feb 5 21:19:32 2021 +0100
Commit:     Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Mon Feb 8 12:03:01 2021 +0100

    oox: prefix VML shapetype ids with _x0000_t
    
    Word 2013 refuses to even load a file that has a <v:shapetype
    id="shapetype_75"> on some form control shape, reporting a misleading
    error in a location far later when the top-level w:tbl that contains
    the shape ends.
    
    Using id="_x0000_t75" appears to work, so let's do that then.
    
    Couldn't find any documentation on why this is so.
    
    Change-Id: Ie22bb04244e24b00a1880544872ae8e281422405
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110493
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
    (cherry picked from commit 560f9bac4c1ee1b044efc55af8d532e9efefd313)

diff --git a/oox/source/export/preset-definitions-to-shape-types.pl b/oox/source/export/preset-definitions-to-shape-types.pl
index f6bd260f7cde..5760a8609070 100644
--- a/oox/source/export/preset-definitions-to-shape-types.pl
+++ b/oox/source/export/preset-definitions-to-shape-types.pl
@@ -985,7 +985,7 @@ sub end_element( $ )
             $state = "";
 
             # shape path
-            my $out = "<v:shapetype id=\"shapetype___ID__\" coordsize=\"21600,21600\" o:spt=\"__ID__\" ";
+            my $out = "<v:shapetype id=\"_x0000_t__ID__\" coordsize=\"21600,21600\" o:spt=\"__ID__\" ";
             if ( $adjust ne "" ) {
                 $out .= "adj=\"$adjust\" ";
             }
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 2009d9ccf055..deea12e04330 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -1248,7 +1248,7 @@ sal_Int32 VMLExport::StartShape()
             if ( !m_aShapeTypeWritten[ m_nShapeType ] )
             {
                 OString sShapeType =
-                    "<v:shapetype id=\"shapetype_" + OString::number(m_nShapeType) +
+                    "<v:shapetype id=\"_x0000_t" + OString::number(m_nShapeType) +
                         "\" coordsize=\"21600,21600\" o:spt=\"" + OString::number(m_nShapeType) +
                         "\" path=\"m,l,21600l21600,21600l21600,xe\">\n"
                         "<v:stroke joinstyle=\"miter\"/>\n"
@@ -1269,7 +1269,7 @@ sal_Int32 VMLExport::StartShape()
             if ( !m_aShapeTypeWritten[ m_nShapeType ] )
             {
                 OString sShapeType =
-                    "<v:shapetype id=\"shapetype_" + OString::number(m_nShapeType) +
+                    "<v:shapetype id=\"_x0000_t" + OString::number(m_nShapeType) +
                         "\" coordsize=\"21600,21600\" o:spt=\"" + OString::number(m_nShapeType) +
                         "\" o:preferrelative=\"t\" path=\"m at 4@5l at 4@11 at 9@11 at 9@5xe\" filled=\"f\" stroked=\"f\">\n"
                         "<v:stroke joinstyle=\"miter\"/>\n"
@@ -1405,7 +1405,7 @@ sal_Int32 VMLExport::StartShape()
         if (m_bUseHashMarkForType)
             sTypeBuffer.append("#");
         m_pShapeAttrList->add( XML_type, sTypeBuffer
-                .append( "shapetype_" ).append( sal_Int32( m_nShapeType ) )
+                .append( "_x0000_t" ).append( sal_Int32( m_nShapeType ) )
                 .makeStringAndClear() );
     }
 
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index e1c857f5528e..f2c0cae1a2cd 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -308,9 +308,13 @@ void ShapeBase::finalizeFragmentImport()
             // Temporary fix, shapetype not found if referenced from different substream
             // FIXME: extend scope of ShapeContainer to store all shapetypes from the document
             const OUString sShapeTypePrefix = "shapetype_";
+            OUString tmp;
             if (aType.startsWith(sShapeTypePrefix)) {
                 maTypeModel.moShapeType = aType.copy(sShapeTypePrefix.getLength()).toInt32();
             }
+            else if (aType.startsWith("_x0000_t", &tmp)) {
+                maTypeModel.moShapeType = tmp.toInt32();
+            }
         }
     }
 }
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index d27839a79084..d03d35901841 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -292,11 +292,17 @@ ShapeTypeContext::ShapeTypeContext(ContextHandler2Helper const & rParent,
         mrTypeModel.maShapeName = rAttribs.getXString( XML_id, OUString() );
         // get ShapeType and ShapeId from name for compatibility
         static const OUString sShapeTypePrefix = "shapetype_";
+        OUString tmp;
         if( mrTypeModel.maShapeName.startsWith( sShapeTypePrefix ) )
         {
             mrTypeModel.maShapeId = mrTypeModel.maShapeName;
             mrTypeModel.moShapeType = mrTypeModel.maShapeName.copy(sShapeTypePrefix.getLength()).toInt32();
         }
+        else if (mrTypeModel.maShapeName.startsWith("_x0000_t", &tmp))
+        {
+            mrTypeModel.maShapeId = mrTypeModel.maShapeName;
+            mrTypeModel.moShapeType = tmp.toInt32();
+        }
     }
 
     // coordinate system position/size, CSS style
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index a362ff438383..933992fdaca2 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -465,8 +465,12 @@ namespace sax_fastparser {
 
             const char* pAttributeValue = rAttrList.getFastAttributeValue(j);
 
-            // tdf#127274 don't escape the special VML shape type id "#_x0000_t202"
-            bool bEscape = !(pAttributeValue && strcmp(pAttributeValue, "#_x0000_t202") == 0);
+            // tdf#117274 don't escape the special VML shape type id "#_x0000_t202"
+            bool bEscape = !(pAttributeValue
+                    && *pAttributeValue != '\0'
+                    && (*pAttributeValue == '#'
+                        ? strncmp(pAttributeValue, "#_x0000_t", 9) == 0
+                        : strncmp(pAttributeValue, "_x0000_t", 8) == 0));
 
             write(pAttributeValue, rAttrList.AttributeValueLength(j), bEscape);
 
diff --git a/sw/qa/extras/ooxmlexport/data/controlshape.fodt b/sw/qa/extras/ooxmlexport/data/controlshape.fodt
new file mode 100644
index 000000000000..81a71092407c
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/controlshape.fodt
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 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:xlink="http://www.w3.org/1999/xlink" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d: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:rpt="http://openoffice.org/2005/report" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:css3t="http://www.w3.org/TR/css3-text/" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xm
 lns:xhtml="http://www.w3.org/1999/xhtml" xmlns:officeooo="http://openoffice.org/2009/office" office:version="1.2" office:mimetype="application/vnd.oasis.opendocument.text">
+ <office:font-face-decls>
+  <style:font-face style:name="StarSymbol" svg:font-family="StarSymbol" style:font-charset="x-symbol"/>
+  <style:font-face style:name="Arial" svg:font-family="Arial"/>
+  <style:font-face style:name="Tahoma1" svg:font-family="Tahoma"/>
+  <style:font-face style:name="Lucida Sans Unicode" svg:font-family="'Lucida Sans Unicode'" style:font-pitch="variable"/>
+  <style:font-face style:name="Tahoma" svg:font-family="Tahoma" style:font-pitch="variable"/>
+  <style:font-face style:name="Arial1" svg:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable"/>
+ </office:font-face-decls>
+ <office:styles>
+  <style:default-style style:family="graphic">
+   <style:graphic-properties svg:stroke-color="#000000" draw:fill-color="#99ccff" fo:wrap-option="no-wrap" draw:shadow-offset-x="0.3cm" draw:shadow-offset-y="0.3cm" draw:start-line-spacing-horizontal="0.283cm" draw:start-line-spacing-vertical="0.283cm" draw:end-line-spacing-horizontal="0.283cm" draw:end-line-spacing-vertical="0.283cm" style:flow-with-text="false"/>
+   <style:paragraph-properties style:text-autospace="ideograph-alpha" style:line-break="strict" style:writing-mode="lr-tb" style:font-independent-line-spacing="false">
+    <style:tab-stops/>
+   </style:paragraph-properties>
+   <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE"/>
+  </style:default-style>
+  <style:default-style style:family="paragraph">
+   <style:paragraph-properties fo:hyphenation-ladder-count="no-limit" style:text-autospace="ideograph-alpha" style:punctuation-wrap="hanging" style:line-break="strict" style:tab-stop-distance="1.251cm" style:writing-mode="page"/>
+   <style:text-properties style:use-window-font-color="true" loext:opacity="0%" style:font-name="Arial" fo:font-size="12pt" fo:language="de" fo:country="DE" style:font-name-asian="Lucida Sans Unicode" style:font-size-asian="12pt" style:language-asian="de" style:country-asian="DE" style:font-name-complex="Tahoma" style:font-size-complex="12pt" style:language-complex="de" style:country-complex="DE" fo:hyphenate="false" fo:hyphenation-remain-char-count="2" fo:hyphenation-push-char-count="2" loext:hyphenation-no-caps="false"/>
+  </style:default-style>
+  <style:default-style style:family="table">
+   <style:table-properties table:border-model="collapsing"/>
+  </style:default-style>
+  <style:default-style style:family="table-row">
+   <style:table-row-properties fo:keep-together="auto"/>
+  </style:default-style>
+  <style:style style:name="Standard" style:family="paragraph" style:class="text">
+   <style:text-properties fo:font-size="11pt"/>
+  </style:style>
+  <style:style style:name="Text_20_body" style:display-name="Text body" style:family="paragraph" style:parent-style-name="Standard" style:class="text">
+   <style:paragraph-properties fo:margin-top="0cm" fo:margin-bottom="0cm" loext:contextual-spacing="false" style:line-height-at-least="0.46cm"/>
+  </style:style>
+  <style:style style:name="Heading" style:family="paragraph" style:parent-style-name="Standard" style:next-style-name="Text_20_body" style:class="text">
+   <style:paragraph-properties fo:margin-top="0.423cm" fo:margin-bottom="0.212cm" loext:contextual-spacing="false" fo:keep-with-next="always"/>
+   <style:text-properties style:font-name="Arial1" fo:font-family="Arial" style:font-family-generic="swiss" style:font-pitch="variable" fo:font-size="14pt" style:font-name-asian="Lucida Sans Unicode" style:font-family-asian="'Lucida Sans Unicode'" style:font-pitch-asian="variable" style:font-size-asian="14pt" style:font-name-complex="Tahoma" style:font-family-complex="Tahoma" style:font-pitch-complex="variable" style:font-size-complex="14pt"/>
+  </style:style>
+  <style:style style:name="List" style:family="paragraph" style:parent-style-name="Text_20_body" style:class="list">
+   <style:text-properties style:font-name="Arial" fo:font-family="Arial" style:font-name-complex="Tahoma1" style:font-family-complex="Tahoma"/>
+  </style:style>
+  <style:style style:name="Table_20_Contents" style:display-name="Table Contents" style:family="paragraph" style:parent-style-name="Standard" style:class="extra">
+   <style:paragraph-properties text:number-lines="false" text:line-number="0"/>
+  </style:style>
+  <style:style style:name="Heading_20_1" style:display-name="Heading 1" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
+   <style:text-properties fo:font-size="115%" fo:font-weight="bold" style:font-size-asian="115%" style:font-weight-asian="bold" style:font-size-complex="115%" style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Heading_20_2" style:display-name="Heading 2" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="2" style:class="text">
+   <style:text-properties fo:font-size="14pt" fo:font-style="italic" fo:font-weight="bold" style:font-size-asian="14pt" style:font-style-asian="italic" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-style-complex="italic" style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Heading_20_3" style:display-name="Heading 3" style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="3" style:class="text">
+   <style:text-properties fo:font-size="14pt" fo:font-weight="bold" style:font-size-asian="14pt" style:font-weight-asian="bold" style:font-size-complex="14pt" style:font-weight-complex="bold"/>
+  </style:style>
+  <style:style style:name="Numbering_20_Symbols" style:display-name="Numbering Symbols" style:family="text"/>
+  <style:style style:name="Frame" style:family="graphic">
+   <style:graphic-properties text:anchor-type="paragraph" svg:x="0cm" svg:y="0cm" fo:margin-left="0.201cm" fo:margin-right="0.201cm" fo:margin-top="0.201cm" fo:margin-bottom="0.201cm" style:wrap="parallel" style:number-wrapped-paragraphs="no-limit" style:wrap-contour="false" style:vertical-pos="top" style:vertical-rel="paragraph-content" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" fo:padding="0.15cm" fo:border="0.06pt solid #000000"/>
+  </style:style>
+  <text:outline-style style:name="Outline">
+   <text:outline-level-style text:level="1" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="2" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="3" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="4" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="5" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="6" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="7" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="8" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="9" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+   <text:outline-level-style text:level="10" style:num-format="">
+    <style:list-level-properties text:min-label-distance="0.381cm"/>
+   </text:outline-level-style>
+  </text:outline-style>
+ </office:styles>
+ <office:automatic-styles>
+     <style:style style:name="Tabelle1" style:family="table" style:master-page-name="First_20_Page">
+      <style:table-properties style:width="19.396cm" fo:margin-left="-1.642cm" style:page-number="auto" table:align="left" style:writing-mode="lr-tb"/>
+    </style:style>
+    <style:style style:name="Tabelle1.A" style:family="table-column">
+      <style:table-column-properties style:column-width="19.396cm"/>
+    </style:style>
+    <style:style style:name="Tabelle1.1" style:family="table-row">
+      <style:table-row-properties fo:keep-together="auto"/>
+    </style:style>
+    <style:style style:name="Tabelle1.A1" style:family="table-cell">
+      <style:table-cell-properties style:vertical-align="top" fo:padding="0cm" fo:border="none" style:writing-mode="lr-tb"/>
+    </style:style>
+    <style:style style:name="fr1" style:family="graphic" style:parent-style-name="Frame">
+      <style:graphic-properties fo:margin-left="0.002cm" fo:margin-right="0cm" style:wrap="none" style:vertical-pos="top" style:vertical-rel="baseline" style:horizontal-pos="center" style:horizontal-rel="paragraph-content" style:flow-with-text="true"/>
+    </style:style>
+    <style:style style:name="gr1" style:family="graphic">
+      <style:graphic-properties style:vertical-pos="top" style:vertical-rel="baseline" style:horizontal-pos="from-left" style:horizontal-rel="paragraph" draw:wrap-influence-on-position="once-concurrent" loext:allow-overlap="true" style:flow-with-text="false"/>
+    </style:style>
+  <style:style style:name="P1" style:family="paragraph" style:parent-style-name="Table_20_Contents">
+  </style:style>
+  <style:page-layout style:name="pm1">
+   <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" fo:background-color="transparent" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" draw:fill="none" draw:fill-color="#99ccff" style:footnote-max-height="0cm">
+    <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+    <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+   </style:page-layout-properties>
+   <style:header-style>
+    <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+   </style:header-style>
+   <style:footer-style/>
+  </style:page-layout>
+  <style:page-layout style:name="pm2">
+   <style:page-layout-properties fo:page-width="21.001cm" fo:page-height="29.7cm" style:num-format="1" style:print-orientation="portrait" fo:margin-top="1.199cm" fo:margin-bottom="2.071cm" fo:margin-left="2.499cm" fo:margin-right="2.221cm" style:shadow="none" style:writing-mode="lr-tb" style:layout-grid-color="#c0c0c0" style:layout-grid-lines="20" style:layout-grid-base-height="0.706cm" style:layout-grid-ruby-height="0.353cm" style:layout-grid-mode="none" style:layout-grid-ruby-below="false" style:layout-grid-print="false" style:layout-grid-display="false" style:footnote-max-height="0cm">
+    <style:columns fo:column-count="1" fo:column-gap="0cm"/>
+    <style:footnote-sep style:width="0.018cm" style:distance-before-sep="0.101cm" style:distance-after-sep="0.101cm" style:line-style="none" style:adjustment="left" style:rel-width="25%" style:color="#000000"/>
+   </style:page-layout-properties>
+   <style:header-style>
+    <style:header-footer-properties svg:height="4.399cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="3.9cm" style:dynamic-spacing="false"/>
+   </style:header-style>
+   <style:footer-style/>
+  </style:page-layout>
+ </office:automatic-styles>
+ <office:master-styles>
+  <style:master-page style:name="Standard" style:page-layout-name="pm1">
+  </style:master-page>
+ </office:master-styles>
+ <office:body>
+  <office:text>
+      <office:forms form:automatic-focus="false" form:apply-design-mode="false">
+        <form:form form:name="WW-Standard" form:apply-filter="true" form:control-implementation="ooo:com.sun.star.form.component.Form" office:target-frame="">
+          <form:properties>
+            <form:property form:property-name="PropertyChangeNotificationEnabled" office:value-type="boolean" office:boolean-value="true"/>
+            <form:property form:property-name="TargetURL" office:value-type="string" office:string-value=""/>
+          </form:properties>
+          <form:checkbox form:name="Kontrollkästchen1" form:control-implementation="ooo:com.sun.star.form.component.CheckBox" xml:id="control1" form:id="control1" form:input-required="false" form:state="checked" form:current-state="checked" form:image-position="center">
+            <form:properties>
+              <form:property form:property-name="ControlTypeinMSO" office:value-type="float" office:value="0"/>
+              <form:property form:property-name="DefaultControl" office:value-type="string" office:string-value="com.sun.star.form.control.CheckBox"/>
+              <form:property form:property-name="ObjIDinMSO" office:value-type="float" office:value="65535"/>
+              <form:property form:property-name="SecondaryRefValue" office:value-type="string" office:string-value=""/>
+            </form:properties>
+          </form:checkbox>
+        </form:form>
+      </office:forms>
+   <text:sequence-decls>
+    <text:sequence-decl text:display-outline-level="0" text:name="Illustration"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Table"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Text"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Drawing"/>
+    <text:sequence-decl text:display-outline-level="0" text:name="Figure"/>
+   </text:sequence-decls>
+      <table:table table:name="Tabelle1" table:style-name="Tabelle1">
+        <table:table-column table:style-name="Tabelle1.A"/>
+        <table:table-row table:style-name="Tabelle1.1">
+          <table:table-cell table:style-name="Tabelle1.A1" office:value-type="string">
+            <text:p>
+              <draw:frame draw:style-name="fr1" draw:name="Rahmen2" text:anchor-type="as-char" svg:width="7.959cm" draw:z-index="0">
+                <draw:text-box fo:min-height="0.041cm">
+                  <text:p>
+                    <draw:control text:anchor-type="as-char" draw:z-index="1" draw:name="Shape1" draw:style-name="gr1" svg:width="0.318cm" svg:height="0.318cm" draw:control="control1"/>
+                  </text:p>
+                </draw:text-box>
+              </draw:frame>
+            </text:p>
+          </table:table-cell>
+        </table:table-row>
+      </table:table>
+   <text:p/>
+  </office:text>
+ </office:body>
+</office:document>
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
index 7fabda15147d..467a6ce099b2 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport12.cxx
@@ -855,6 +855,22 @@ DECLARE_OOXMLEXPORT_TEST(testWatermarkTrim, "tdf114308.docx")
     CPPUNIT_ASSERT_MESSAGE(ss.str(), nDifference >= -4);
 }
 
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testVMLShapetypeId, "controlshape.fodt")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+    // must be _x0000_t<NR>
+    assertXPath(pXmlDoc,
+                "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[1]/w:r/mc:AlternateContent/"
+                "mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wps:wsp/wps:txbx/"
+                "w:txbxContent/w:p/w:r/w:object/v:shapetype",
+                "id", "_x0000_t75");
+    assertXPath(pXmlDoc,
+                "/w:document/w:body/w:tbl[1]/w:tr[1]/w:tc[1]/w:p[1]/w:r/mc:AlternateContent/"
+                "mc:Choice/w:drawing/wp:inline/a:graphic/a:graphicData/wps:wsp/wps:txbx/"
+                "w:txbxContent/w:p/w:r/w:object/v:shape",
+                "type", "#_x0000_t75");
+}
+
 DECLARE_OOXMLEXPORT_TEST(testTdf73547, "tdf73547-dash.docx")
 {
     xmlDocPtr pXmlDoc = parseExport("word/document.xml");


More information about the Libreoffice-commits mailing list