summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazunov <vg@openoffice.org>2011-03-22 17:38:22 +0100
committerVladimir Glazunov <vg@openoffice.org>2011-03-22 17:38:22 +0100
commit1afa44cf20db1eb301992d2a74e1273ba71d8ccc (patch)
treea1e7df56800bfcc8ce55bf62971d87f1b07ed272
parentdae2b218c44e8e4613e37b9a42aec251cae5fdec (diff)
parentd549a6090499cf8dbf187205cbd99cc8b95a1955 (diff)
CWS-TOOLING: integrate CWS sw34bf04
Notes
split repo tag: filters_ooo/DEV300_m104
-rw-r--r--unoxml/qa/complex/unoxml/RDFRepositoryTest.java18
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx3
-rw-r--r--writerfilter/source/ooxml/dummyannotate.xsl2
-rw-r--r--writerfilter/source/ooxml/model.xml54
-rw-r--r--writerfilter/source/ooxml/modelcleanup.xsl19
5 files changed, 83 insertions, 13 deletions
diff --git a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
index d047ef77440e..3cf203325a70 100644
--- a/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
+++ b/unoxml/qa/complex/unoxml/RDFRepositoryTest.java
@@ -172,14 +172,14 @@ public class RDFRepositoryTest
try {
xRep.createGraph(foo);
- assertFalse("creating duplicate graph was allowed", false);
+ fail("creating duplicate graph was allowed");
} catch (ElementExistException e) {
// ignore
}
try {
xRep.createGraph(null);
- assertFalse("invalid graph name was allowed", false);
+ fail("invalid graph name was allowed");
} catch (IllegalArgumentException e) {
// ignore
}
@@ -296,7 +296,7 @@ public class RDFRepositoryTest
xFooIn = new StreamSimulator(tempDir + "foo.rdf", true, param);
try {
xRep.importGraph(FileFormat.RDF_XML, xFooIn, bar, base);
- assertFalse("importing existing graph did not fail", false);
+ fail("importing existing graph did not fail");
} catch (ElementExistException e) {
// ignore
}
@@ -328,28 +328,28 @@ public class RDFRepositoryTest
try {
xBazGraph.clear();
- assertFalse("deleted graph not invalid (clear)", false);
+ fail("deleted graph not invalid (clear)");
} catch (NoSuchElementException e) {
// ignore
}
try {
xBazGraph.addStatement(foo, foo, foo);
- assertFalse("deleted graph not invalid (add)", false);
+ fail("deleted graph not invalid (add)");
} catch (NoSuchElementException e) {
// ignore
}
try {
xBazGraph.removeStatements(null, null, null);
- assertFalse("deleted graph not invalid (remove)", false);
+ fail("deleted graph not invalid (remove)");
} catch (NoSuchElementException e) {
// ignore
}
try {
xBazGraph.getStatements(null, null, null);
- assertFalse("deleted graph not invalid (get)", false);
+ fail("deleted graph not invalid (get)");
} catch (NoSuchElementException e) {
// ignore
}
@@ -473,14 +473,14 @@ public class RDFRepositoryTest
try {
xRep.setStatementRDFa(foo, new XURI[] {}, xM, "", null);
- assertFalse("RDFa: set: no predicate", false);
+ fail("RDFa: set: no predicate");
} catch (IllegalArgumentException e) {
// ignore
}
try {
xRep.setStatementRDFa(foo, new XURI[] {bar}, null, "", null);
- assertFalse("RDFa: set: null", false);
+ fail("RDFa: set: null");
} catch (IllegalArgumentException e) {
// ignore
}
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 11d03655b5db..96ad59830ade 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1201,7 +1201,8 @@ void DomainMapper_Impl::CreateRedline( uno::Reference< text::XTextRange > xRange
catch( const uno::Exception & rEx )
{
( void ) rEx;
- OSL_ENSURE( false, "Exception in makeRedline" );
+// disabled: current writer redline impl. rather primitive, so it gets annoying
+// OSL_ENSURE( false, "Exception in makeRedline" );
}
}
}
diff --git a/writerfilter/source/ooxml/dummyannotate.xsl b/writerfilter/source/ooxml/dummyannotate.xsl
index 0fcc1e0dcbc7..d457d0c0745b 100644
--- a/writerfilter/source/ooxml/dummyannotate.xsl
+++ b/writerfilter/source/ooxml/dummyannotate.xsl
@@ -838,7 +838,7 @@ sed "s/wml/</xsl:text>
<xsl:template match="/">
<out>
- <xsl:apply-templates select="//rng:define[@name='CT_DocGrid']"
+ <xsl:apply-templates select="//rng:define[@name='CT_SdtContentCell']"
mode='resourcesPropertySetValue'/>
</out>
</xsl:template>
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 49998622e65d..be239665b54a 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -21113,7 +21113,7 @@
<resource name="ST_EighthPointMeasure" resource="Integer"/>
<resource name="ST_PointMeasure" resource="Integer"/>
<resource name="ST_String" resource="String"/>
- <resource name="CT_String" resource="Value" tag="attribute" >
+ <resource name="CT_String" resource="Value" tag="attribute">
<attribute name="val" tokenid="ooxml:CT_String_val" action="setValue"/>
<action name="start" action="setDefaultStringValue"/>
</resource>
@@ -21642,6 +21642,7 @@
<value name="bestFit" tokenid="ooxml:Value_wordprocessingml_ST_Zoom_bestFit">bestFit</value>
<value name="textFit" tokenid="ooxml:Value_wordprocessingml_ST_Zoom_textFit">textFit</value>
</resource>
+ <resource name="ST_Percentage" resource="Integer" generated="yes"/>
<resource name="CT_Zoom" resource="Properties" tag="settings">
<attribute name="val" tokenid="ooxml:CT_Zoom_val"/>
<attribute name="percent" tokenid="ooxml:CT_Zoom_percent"/>
@@ -22552,7 +22553,56 @@
<attribute name="val" tokenid="ooxml:CT_CalendarType_val" action="setValue"/>
<action name="start" action="setDefaultStringValue"/>
</resource>
- <resource name="CT_SdtContentRun" resource="Properties" tag="content"/>
+ <resource name="CT_SdtPr" resource="Properties" tag="field">
+ <element name="rPr" tokenid="ooxml:CT_SdtPr_rPr"/>
+ <element name="alias" tokenid="ooxml:CT_SdtPr_alias"/>
+ <element name="lock" tokenid="ooxml:CT_SdtPr_lock"/>
+ <element name="placeholder" tokenid="ooxml:CT_SdtPr_placeholder"/>
+ <element name="showingPlcHdr" tokenid="ooxml:CT_SdtPr_showingPlcHdr"/>
+ <element name="dataBinding" tokenid="ooxml:CT_SdtPr_dataBinding"/>
+ <element name="temporary" tokenid="ooxml:CT_SdtPr_temporary"/>
+ <element name="id" tokenid="ooxml:CT_SdtPr_id"/>
+ <element name="tag" tokenid="ooxml:CT_SdtPr_tag"/>
+ <element name="equation" tokenid="ooxml:CT_SdtPr_equation"/>
+ <element name="comboBox" tokenid="ooxml:CT_SdtPr_comboBox"/>
+ <element name="date" tokenid="ooxml:CT_SdtPr_date"/>
+ <element name="docPartObj" tokenid="ooxml:CT_SdtPr_docPartObj"/>
+ <element name="docPartList" tokenid="ooxml:CT_SdtPr_docPartList"/>
+ <element name="dropDownList" tokenid="ooxml:CT_SdtPr_dropDownList"/>
+ <element name="picture" tokenid="ooxml:CT_SdtPr_picture"/>
+ <element name="richText" tokenid="ooxml:CT_SdtPr_richText"/>
+ <element name="text" tokenid="ooxml:CT_SdtPr_text"/>
+ <element name="citation" tokenid="ooxml:CT_SdtPr_citation"/>
+ <element name="group" tokenid="ooxml:CT_SdtPr_group"/>
+ <element name="bibliography" tokenid="ooxml:CT_SdtPr_bibliography"/>
+ </resource>
+ <resource name="CT_SdtEndPr" resource="Properties" tag="field">
+ <element name="rPr" tokenid="ooxml:CT_SdtEndPr_rPr"/>
+ </resource>
+ <resource name="CT_SdtContentRun" resource="Stream" tag="field"/>
+ <resource name="CT_SdtContentBlock" resource="Stream" tag="field"/>
+ <resource name="CT_SdtContentRow" resource="Stream" tag="field"/>
+ <resource name="CT_SdtContentCell" resource="Stream" tag="field"/>
+ <resource name="CT_SdtBlock" resource="Stream" tag="field">
+ <element name="sdtPr" tokenid="ooxml:CT_SdtBlock_sdtPr"/>
+ <element name="sdtEndPr" tokenid="ooxml:CT_SdtBlock_sdtEndPr"/>
+ <element name="sdtContent" tokenid="ooxml:CT_SdtBlock_sdtContent"/>
+ </resource>
+ <resource name="CT_SdtRun" resource="Stream" tag="field">
+ <element name="sdtPr" tokenid="ooxml:CT_SdtRun_sdtPr"/>
+ <element name="sdtEndPr" tokenid="ooxml:CT_SdtRun_sdtEndPr"/>
+ <element name="sdtContent" tokenid="ooxml:CT_SdtRun_sdtContent"/>
+ </resource>
+ <resource name="CT_SdtCell" resource="Stream" tag="field">
+ <element name="sdtPr" tokenid="ooxml:CT_SdtCell_sdtPr"/>
+ <element name="sdtEndPr" tokenid="ooxml:CT_SdtCell_sdtEndPr"/>
+ <element name="sdtContent" tokenid="ooxml:CT_SdtCell_sdtContent"/>
+ </resource>
+ <resource name="CT_SdtRow" resource="Stream" tag="field">
+ <element name="sdtPr" tokenid="ooxml:CT_SdtRow_sdtPr"/>
+ <element name="sdtEndPr" tokenid="ooxml:CT_SdtRow_sdtEndPr"/>
+ <element name="sdtContent" tokenid="ooxml:CT_SdtRow_sdtContent"/>
+ </resource>
<resource name="CT_Attr" resource="Properties" tag="content">
<attribute name="uri" tokenid="ooxml:CT_Attr_uri"/>
<attribute name="name" tokenid="ooxml:CT_Attr_name"/>
diff --git a/writerfilter/source/ooxml/modelcleanup.xsl b/writerfilter/source/ooxml/modelcleanup.xsl
index d7a9aec40100..69e73d868c2d 100644
--- a/writerfilter/source/ooxml/modelcleanup.xsl
+++ b/writerfilter/source/ooxml/modelcleanup.xsl
@@ -40,6 +40,9 @@
<xsl:key name="resources"
match="resource[not(@generated)]" use="@name" />
+ <xsl:key name="resourcetags"
+ match="resource/@tag" use="ancestor::resource/@name"/>
+
<xsl:template name="generateresource">
<xsl:param name="resource"/>
<xsl:element name="resource">
@@ -52,6 +55,11 @@
<xsl:attribute name="generated">
<xsl:text>yes</xsl:text>
</xsl:attribute>
+ <xsl:for-each select="key('resourcetags', @name)">
+ <xsl:attribute name="tag">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:for-each>
</xsl:element>
</xsl:template>
@@ -66,6 +74,11 @@
</xsl:attribute>
<xsl:attribute name="resource">List</xsl:attribute>
<xsl:attribute name="generated">yes</xsl:attribute>
+ <xsl:for-each select="key('resourcetags', @name)">
+ <xsl:attribute name="tag">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:for-each>
<xsl:for-each select=".//rng:value">
<xsl:element name="value">
<xsl:attribute name="name">
@@ -148,12 +161,18 @@
<xsl:template name="generatevalueresource">
<xsl:variable name="name" select="@name"/>
+ <xsl:variable name="ns_id" select="generate-id(ancestor::namespace)"/>
<resource>
<xsl:attribute name="name">
<xsl:value-of select="@name"/>
</xsl:attribute>
<xsl:attribute name="resource">Value</xsl:attribute>
<xsl:attribute name="generated">yes</xsl:attribute>
+ <xsl:for-each select="key('resourcetags', @name)[generate-id(ancestor::namespace) = $ns_id]">
+ <xsl:attribute name="tag">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:for-each>
<xsl:for-each select=".//rng:attribute">
<xsl:variable name="type">
<xsl:choose>