[Libreoffice-commits] core.git: writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Feb 26 12:43:06 PST 2014
writerfilter/source/dmapper/DomainMapper.cxx | 16 +--
writerfilter/source/doctok/resources.xmi | 124 -------------------------
writerfilter/source/ooxml/model.xml | 8 -
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 10 +-
4 files changed, 16 insertions(+), 142 deletions(-)
New commits:
commit 273fae4032464d8caa1bd0b957e4e5ebe25ba0c0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Feb 26 21:38:14 2014 +0100
writerfilter: convert sprm:C{DxaSpace,CharScale,HpsKern,HpsPos}
Change-Id: I880569a283d0776a7dec51994a001d20153f86d9
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index d5f2517..7daac77 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -1510,14 +1510,12 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, (nSprmId == NS_sprm::LN_CHps ? OUString("sz") : OUString("szCs")), OUString::number(nIntValue));
}
break;
- case NS_sprm::LN_CHpsPos:
+ case NS_ooxml::LN_EG_RPrBase_position:
// The spec says 0 is the same as the lack of the value, so don't parse that.
if (nIntValue)
m_pImpl->deferCharacterProperty( nSprmId, uno::makeAny( nIntValue ));
- break; // sprmCHpsPos
- case 71 : //"sprmCDxaSpace"
- case 96 : //"sprmCDxaSpace"
- case NS_sprm::LN_CDxaSpace: // sprmCDxaSpace
+ break;
+ case NS_ooxml::LN_EG_RPrBase_spacing:
{
//Kerning half point values
//TODO: there are two kerning values -
@@ -1531,7 +1529,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, "spacing", OUString::number(nIntValue));
}
break;
- case NS_sprm::LN_CHpsKern: // sprmCHpsKern auto kerning is bound to a minimum font size in Word - but not in Writer :-(
+ case NS_ooxml::LN_EG_RPrBase_kern: // auto kerning is bound to a minimum font size in Word - but not in Writer :-(
rContext->Insert(PROP_CHAR_AUTO_KERNING, uno::makeAny( sal_Bool(nIntValue) ) );
break;
case NS_sprm::LN_CRgFtc0: // sprmCRgFtc0 //ascii font index
@@ -1575,7 +1573,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
}
}
break;
- case NS_sprm::LN_CCharScale: // sprmCCharScale
+ case NS_ooxml::LN_EG_RPrBase_w:
rContext->Insert(PROP_CHAR_SCALE_WIDTH,
uno::makeAny( sal_Int16(nIntValue) ));
break;
@@ -2403,7 +2401,7 @@ void DomainMapper::processDeferredCharacterProperties( const std::map< sal_Int32
case NS_sprm::LN_CHps:
case NS_sprm::LN_CHpsBi:
break; // only for use by other properties, ignore here
- case NS_sprm::LN_CHpsPos:
+ case NS_ooxml::LN_EG_RPrBase_position:
{
sal_Int16 nEscapement = 0;
sal_Int8 nProp = 100;
@@ -2438,7 +2436,7 @@ void DomainMapper::processDeferredCharacterProperties( const std::map< sal_Int32
rContext->Insert(PROP_CHAR_ESCAPEMENT, uno::makeAny( nEscapement ) );
rContext->Insert(PROP_CHAR_ESCAPEMENT_HEIGHT, uno::makeAny( nProp ) );
}
- break; // sprmCHpsPos
+ break;
default:
SAL_WARN( "writerfilter", "Unhandled property in processDeferredCharacterProperty()" );
break;
diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi
index 7193b43..6152078 100644
--- a/writerfilter/source/doctok/resources.xmi
+++ b/writerfilter/source/doctok/resources.xmi
@@ -317,37 +317,6 @@
</UML:ModelElement.taggedValue>
</UML:Class>
<!--SPRM sprmCKul-->
- <!--SPRM sprmCDxaSpace-->
- <UML:Class xmi.id="sprmCDxaSpace" name="sprmCDxaSpace">
- <UML:ModelElement.stereotype>
- <UML:Stereotype xmi.idref="ww8sprm"/>
- </UML:ModelElement.stereotype>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>0x8840</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmcode"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>rtf:sprmCDxaSpace</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmid"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>character</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="kind"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- </UML:Class>
- <!--SPRM sprmCDxaSpace-->
<!--SPRM sprmCLid-->
<UML:Class xmi.id="sprmCLid" name="sprmCLid">
<UML:ModelElement.stereotype>
@@ -441,68 +410,6 @@
</UML:ModelElement.taggedValue>
</UML:Class>
<!--SPRM sprmCHps-->
- <!--SPRM sprmCHpsPos-->
- <UML:Class xmi.id="sprmCHpsPos" name="sprmCHpsPos">
- <UML:ModelElement.stereotype>
- <UML:Stereotype xmi.idref="ww8sprm"/>
- </UML:ModelElement.stereotype>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>0x4845</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmcode"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>rtf:sprmCHpsPos</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmid"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>character</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="kind"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- </UML:Class>
- <!--SPRM sprmCHpsPos-->
- <!--SPRM sprmCHpsKern-->
- <UML:Class xmi.id="sprmCHpsKern" name="sprmCHpsKern">
- <UML:ModelElement.stereotype>
- <UML:Stereotype xmi.idref="ww8sprm"/>
- </UML:ModelElement.stereotype>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>0x484B</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmcode"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>rtf:sprmCHpsKern</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmid"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>character</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="kind"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- </UML:Class>
- <!--SPRM sprmCHpsKern-->
<!--SPRM sprmCRgFtc0-->
<UML:Class xmi.id="sprmCRgFtc0" name="sprmCRgFtc0">
<UML:ModelElement.stereotype>
@@ -596,37 +503,6 @@
</UML:ModelElement.taggedValue>
</UML:Class>
<!--SPRM sprmCRgFtc2-->
- <!--SPRM sprmCCharScale-->
- <UML:Class xmi.id="sprmCCharScale" name="sprmCCharScale">
- <UML:ModelElement.stereotype>
- <UML:Stereotype xmi.idref="ww8sprm"/>
- </UML:ModelElement.stereotype>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>0x4852</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmcode"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>rtf:sprmCCharScale</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="sprmid"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>character</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="kind"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- </UML:Class>
- <!--SPRM sprmCCharScale-->
<!--SPRM sprmCFspecVanish-->
<UML:Class xmi.id="sprmCFspecVanish" name="sprmCFspecVanish">
<UML:ModelElement.stereotype>
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index cb0c805..786ab1e 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -23810,10 +23810,10 @@
<element name="vanish" tokenid="ooxml:EG_RPrBase_vanish"/>
<element name="webHidden" tokenid="ooxml:EG_RPrBase_webHidden"/>
<element name="color" tokenid="ooxml:EG_RPrBase_color"/>
- <element name="spacing" tokenid="sprm:CDxaSpace"/>
- <element name="w" tokenid="sprm:CCharScale"/>
- <element name="kern" tokenid="sprm:CHpsKern"/>
- <element name="position" tokenid="sprm:CHpsPos"/>
+ <element name="spacing" tokenid="ooxml:EG_RPrBase_spacing"/>
+ <element name="w" tokenid="ooxml:EG_RPrBase_w"/>
+ <element name="kern" tokenid="ooxml:EG_RPrBase_kern"/>
+ <element name="position" tokenid="ooxml:EG_RPrBase_position"/>
<element name="sz" tokenid="sprm:CHps"/>
<element name="szCs" tokenid="sprm:CHpsBi"/>
<element name="highlight" tokenid="sprm:CHighlight"/>
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 3ef54c9..174d31c 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2957,9 +2957,9 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_FS: nSprm = NS_sprm::LN_CHps; break;
case RTF_AFS: nSprm = NS_sprm::LN_CHpsBi; break;
case RTF_ANIMTEXT: nSprm = NS_sprm::LN_CSfxText; break;
- case RTF_EXPNDTW: nSprm = NS_sprm::LN_CDxaSpace; break;
- case RTF_KERNING: nSprm = NS_sprm::LN_CHpsKern; break;
- case RTF_CHARSCALEX: nSprm = NS_sprm::LN_CCharScale; break;
+ case RTF_EXPNDTW: nSprm = NS_ooxml::LN_EG_RPrBase_spacing; break;
+ case RTF_KERNING: nSprm = NS_ooxml::LN_EG_RPrBase_kern; break;
+ case RTF_CHARSCALEX: nSprm = NS_ooxml::LN_EG_RPrBase_w; break;
case RTF_LANG: nSprm = NS_sprm::LN_CRgLid0; break;
case RTF_LANGFE: nSprm = NS_sprm::LN_CRgLid1; break;
case RTF_ALANG: nSprm = NS_sprm::LN_CLidBi; break;
@@ -3234,7 +3234,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_DN:
{
RTFValue::Pointer_t pValue(new RTFValue(nParam * (nKeyword == RTF_UP ? 1 : -1)));
- m_aStates.top().aCharacterSprms.set(NS_sprm::LN_CHpsPos, pValue);
+ m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_position, pValue);
}
break;
case RTF_HORZVERT:
@@ -3249,7 +3249,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_EXPND:
{
RTFValue::Pointer_t pValue(new RTFValue(nParam/5));
- m_aStates.top().aCharacterSprms.set(NS_sprm::LN_CDxaSpace, pValue);
+ m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_spacing, pValue);
}
break;
case RTF_TWOINONE:
More information about the Libreoffice-commits
mailing list