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

Miklos Vajna vmiklos at collabora.co.uk
Thu Aug 7 10:54:18 PDT 2014


 writerfilter/source/filter/ImportFilter.cxx |   34 +++++++++-------------------
 writerfilter/source/ooxml/model.xml         |   16 ++++++-------
 2 files changed, 20 insertions(+), 30 deletions(-)

New commits:
commit 2b54e4a616582a190a0bdc22f18b434321925dfe
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Aug 7 19:52:36 2014 +0200

    Use comphelper::SequenceAsHashMap
    
    Change-Id: I50e32d275c99c445033fc5f9ecfcaf2a9bbc72c8

diff --git a/writerfilter/source/filter/ImportFilter.cxx b/writerfilter/source/filter/ImportFilter.cxx
index c149648..2a49e97 100644
--- a/writerfilter/source/filter/ImportFilter.cxx
+++ b/writerfilter/source/filter/ImportFilter.cxx
@@ -113,43 +113,33 @@ sal_Bool WriterFilter::filter( const uno::Sequence< beans::PropertyValue >& aDes
         pDocument->resolve(*pStream);
 
         // Adding some properties to the document's grab bag for interoperability purposes:
-        uno::Sequence<beans::PropertyValue> aGrabBagProperties(10);
+        comphelper::SequenceAsHashMap aGrabBagProperties;
 
         // Adding the saved Theme DOM
-        aGrabBagProperties[0].Name = "OOXTheme";
-        aGrabBagProperties[0].Value = uno::makeAny( pDocument->getThemeDom() );
+        aGrabBagProperties["OOXTheme"] = uno::makeAny( pDocument->getThemeDom() );
 
         // Adding the saved custom xml DOM
-        aGrabBagProperties[1].Name = "OOXCustomXml";
-        aGrabBagProperties[1].Value = uno::makeAny( pDocument->getCustomXmlDomList() );
-        aGrabBagProperties[2].Name = "OOXCustomXmlProps";
-        aGrabBagProperties[2].Value = uno::makeAny( pDocument->getCustomXmlDomPropsList() );
+        aGrabBagProperties["OOXCustomXml"] = uno::makeAny( pDocument->getCustomXmlDomList() );
+        aGrabBagProperties["OOXCustomXmlProps"] = uno::makeAny( pDocument->getCustomXmlDomPropsList() );
 
         // Adding the saved ActiveX DOM
-        aGrabBagProperties[3].Name = "OOXActiveX";
-        aGrabBagProperties[3].Value = uno::makeAny( pDocument->getActiveXDomList() );
-        aGrabBagProperties[4].Name = "OOXActiveXBin";
-        aGrabBagProperties[4].Value = uno::makeAny( pDocument->getActiveXBinList() );
+        aGrabBagProperties["OOXActiveX"] = uno::makeAny( pDocument->getActiveXDomList() );
+        aGrabBagProperties["OOXActiveXBin"] = uno::makeAny( pDocument->getActiveXBinList() );
 
         // Adding the saved w:themeFontLang setting
-        aGrabBagProperties[5].Name = "ThemeFontLangProps";
-        aGrabBagProperties[5].Value = uno::makeAny( aDomainMapper->GetThemeFontLangProperties() );
+        aGrabBagProperties["ThemeFontLangProps"] = uno::makeAny( aDomainMapper->GetThemeFontLangProperties() );
 
         // Adding the saved Glossary Documnet DOM to the document's grab bag
-        aGrabBagProperties[6].Name = "OOXGlossary";
-        aGrabBagProperties[6].Value = uno::makeAny( pDocument->getGlossaryDocDom() );
-        aGrabBagProperties[7].Name = "OOXGlossaryDom";
-        aGrabBagProperties[7].Value = uno::makeAny( pDocument->getGlossaryDomList() );
+        aGrabBagProperties["OOXGlossary"] = uno::makeAny( pDocument->getGlossaryDocDom() );
+        aGrabBagProperties["OOXGlossaryDom"] = uno::makeAny( pDocument->getGlossaryDomList() );
 
         // Adding the saved embedding document to document's grab bag
-        aGrabBagProperties[8].Name = "OOXEmbeddings";
-        aGrabBagProperties[8].Value = uno::makeAny( pDocument->getEmbeddingsList() );
+        aGrabBagProperties["OOXEmbeddings"] = uno::makeAny( pDocument->getEmbeddingsList() );
 
         // Adding the saved compat settings
-        aGrabBagProperties[9].Name = "CompatSettings";
-        aGrabBagProperties[9].Value = uno::makeAny( aDomainMapper->GetCompatSettings() );
+        aGrabBagProperties["CompatSettings"] = uno::makeAny( aDomainMapper->GetCompatSettings() );
 
-        putPropertiesToDocumentGrabBag( aGrabBagProperties );
+        putPropertiesToDocumentGrabBag( aGrabBagProperties.getAsConstPropertyValueList() );
 
         writerfilter::ooxml::OOXMLStream::Pointer_t  pVBAProjectStream(writerfilter::ooxml::OOXMLDocumentFactory::createStream( pDocStream, writerfilter::ooxml::OOXMLStream::VBAPROJECT ));
         oox::StorageRef xVbaPrjStrg( new ::oox::ole::OleStorage( m_xContext, pVBAProjectStream->getDocumentStream(), false ) );
commit 5b606654158a06f3fab1a266c02ca6da953a3d0a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Aug 7 19:52:06 2014 +0200

    Unused todo attributes
    
    Change-Id: I598081eab191087c0d64f71059da7b5f00e82c62

diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 0173cf2..e2479ab 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -847,7 +847,7 @@
       <value name="perspectiveRelaxedModerately" tokenid="ooxml:Value_drawingml_ST_PresetCameraType_perspectiveRelaxedModerately">perspectiveRelaxedModerately</value>
     </resource>
   </namespace>
-  <namespace name="dml-baseStylesheet" file="dml-baseStylesheet.rng" todo="ignore">
+  <namespace name="dml-baseStylesheet" file="dml-baseStylesheet.rng">
     <grammar xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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" ns="http://schemas.openxmlformats.org/drawingml/2006/main" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
       <!-- ISO RELAX NG Schema -->
       <define name="ST_StyleMatrixColumnIndex">
@@ -1157,7 +1157,7 @@
       <element name="extLst" tokenid="ooxml:CT_BaseStyles_extLst"/>
     </resource>
   </namespace>
-  <namespace name="dml-textCharacter" file="dml-textCharacter.rng" todo="ignore">
+  <namespace name="dml-textCharacter" file="dml-textCharacter.rng">
     <grammar xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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" ns="http://schemas.openxmlformats.org/drawingml/2006/main" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
       <!-- ISO RELAX NG Schema -->
       <include href="dml-shapeEffects.rng"/>
@@ -1502,7 +1502,7 @@
       <value name="all" tokenid="ooxml:Value_drawingml_ST_TextCapsType_all">all</value>
     </resource>
   </namespace>
-  <namespace name="dml-shapeEffects" file="dml-shapeEffects.rng" todo="ignore">
+  <namespace name="dml-shapeEffects" file="dml-shapeEffects.rng">
     <grammar xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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" ns="http://schemas.openxmlformats.org/drawingml/2006/main" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
       <!-- start = blip -->
       <define name="CT_AlphaBiLevelEffect">
@@ -2711,7 +2711,7 @@
       <attribute name="name" tokenid="ooxml:CT_EffectContainer_name"/>
     </resource>
   </namespace>
-  <namespace name="dml-shapeLineProperties" file="dml-shapeLineProperties.rng" todo="ignore">
+  <namespace name="dml-shapeLineProperties" file="dml-shapeLineProperties.rng">
     <grammar xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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" ns="http://schemas.openxmlformats.org/drawingml/2006/main">
       <!-- ISO RELAX NG Schema -->
       <include href="dml-shapeEffects.rng"/>
@@ -3020,7 +3020,7 @@
       <attribute name="algn" tokenid="ooxml:CT_LineProperties_algn"/>
     </resource>
   </namespace>
-  <namespace name="dml-shapeProperties" file="dml-shapeProperties.rng" todo="ignore">
+  <namespace name="dml-shapeProperties" file="dml-shapeProperties.rng">
     <grammar xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://relaxng.org/ns/structure/1.0" ns="http://schemas.openxmlformats.org/drawingml/2006/main">
       <!-- ISO RELAX NG Schema -->
       <include href="dml-shape3DStyles.rng"/>
@@ -4382,7 +4382,7 @@
     </resource>
     <resource name="ST_DrawingElementId" resource="Integer"/>
   </namespace>
-  <namespace name="dml-documentProperties" file="dml-documentProperties.rng" todo="ignore">
+  <namespace name="dml-documentProperties" file="dml-documentProperties.rng">
     <grammar xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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" ns="http://schemas.openxmlformats.org/drawingml/2006/main" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
       <!-- ISO RELAX NG Schema -->
       <include href="dml-shapeGeometry.rng"/>
@@ -6653,7 +6653,7 @@
       </define>
     </grammar>
   </namespace>
-  <namespace name="dml-shapeGeometry" file="dml-shapeGeometry.rng" todo="ignore">
+  <namespace name="dml-shapeGeometry" file="dml-shapeGeometry.rng">
     <grammar xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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" ns="http://schemas.openxmlformats.org/drawingml/2006/main" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
       <define name="ST_ShapeType">
           <choice>
@@ -9843,7 +9843,7 @@
     </resource>
 
   </namespace>
-  <namespace name="vml-main" file="vml-main.rng" todo="ignore">
+  <namespace name="vml-main" file="vml-main.rng">
     <start name="shape"/>
     <start name="shapetype"/>
     <start name="group"/>


More information about the Libreoffice-commits mailing list