[Libreoffice-commits] core.git: writerfilter/source

Miklos Vajna vmiklos at collabora.co.uk
Mon May 19 02:51:18 PDT 2014


 writerfilter/source/dmapper/DomainMapper.cxx |   10 ++++++++++
 writerfilter/source/ooxml/model.xml          |   16 ++++++++++++++--
 2 files changed, 24 insertions(+), 2 deletions(-)

New commits:
commit 599bb5cc8dbe728663c58a92d7231119c10a6d18
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon May 19 11:41:31 2014 +0200

    DOCX import: tokenize v:background (VML description of page background)
    
    Change-Id: I4ee2f01e714265b2684a9eb379e56654d34e2441

diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index ec3ee34..0050b89 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1013,6 +1013,16 @@ static bool ExchangeLeftRight( const PropertyMapPtr rContext, DomainMapper_Impl*
 
 void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
 {
+    // These SPRM's are not specific to any section, so it's expected that there is no context yet.
+    switch (rSprm.getId())
+    {
+    case NS_ooxml::LN_background_background:
+        return;
+        break;
+    default:
+        break;
+    }
+
     OSL_ENSURE(rContext.get(), "PropertyMap has to be valid!");
     if(!rContext.get())
         return ;
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 203d20a..6f43179 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -11906,6 +11906,12 @@
       <value name="venn" tokenid="ooxml:Value_vml_ST_EditAs_venn">venn</value>
       <value name="bullseye" tokenid="ooxml:Value_vml_ST_EditAs_bullseye">bullseye</value>
     </resource>
+    <resource name="CT_Background" resource="Properties" tag="shape">
+      <attribute name="id" tokenid="ooxml:CT_Background_id"/>
+    </resource>
+    <resource name="background" resource="Properties" tag="shape">
+      <element name="background" tokenid="ooxml:background_background"/>
+    </resource>
   </namespace>
   <namespace name="vml-officeDrawing" file="vml-officeDrawing.rng">
     <start name="shapedefaults"/>
@@ -14201,7 +14207,7 @@
     <start name="styles"/>
     <start name="document"/>
     <start name="glossaryDocument"/>
-    <grammar xmlns:sl="http://schemas.openxmlformats.org/schemaLibrary/2006/main" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:rel="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2006/xpath-functions" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" ns="http://schemas.openxmlformats.org/wordprocessingml/2006/main" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" attributeFormDefault="qualified">
+    <grammar xmlns:sl="http://schemas.openxmlformats.org/schemaLibrary/2006/main" xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" xmlns:rel="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2006/xpath-functions" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" xmlns:v="urn:schemas-microsoft-com:vml" ns="http://schemas.openxmlformats.org/wordprocessingml/2006/main" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes" attributeFormDefault="qualified">
       <!-- ISO RELAX NG Schema -->
       <include href="shared-customXmlSchemaProperties.rng"/>
       <include href="shared-math.rng"/>
@@ -16773,6 +16779,11 @@
             <xs:documentation>Border Theme Color Shade</xs:documentation>
           </attribute>
         </optional>
+        <optional>
+          <element name="v:background">
+            <ref name="BUILT_IN_ANY_TYPE"/>
+          </element>
+        </optional>
       </define>
       <define name="CT_Rel">
         <attribute name="r:id">
@@ -23949,11 +23960,12 @@
       <attribute name="shapeid" tokenid="ooxml:CT_Control_shapeid"/>
       <attribute name="r:id" tokenid="ooxml:CT_Control_r_id"/>
     </resource>
-    <resource name="CT_Background" resource="Properties">
+    <resource xmlns:v="urn:schemas-microsoft-com:vml" name="CT_Background" resource="Properties">
       <attribute name="color" tokenid="ooxml:CT_Background_color"/>
       <attribute name="themeColor" tokenid="ooxml:CT_Background_themeColor"/>
       <attribute name="themeTint" tokenid="ooxml:CT_Background_themeTint"/>
       <attribute name="themeShade" tokenid="ooxml:CT_Background_themeShade"/>
+      <element name="v:background" tokenid="ooxml:CT_Background_v_background"/>
     </resource>
     <resource xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" name="CT_Rel" resource="Properties">
       <attribute name="r:id" tokenid="ooxml:CT_Rel_id"/>


More information about the Libreoffice-commits mailing list