[Libreoffice-commits] core.git: writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu Feb 20 10:09:52 PST 2014
writerfilter/source/dmapper/DomainMapper.cxx | 12 +-
writerfilter/source/doctok/resources.xmi | 124 -------------------------
writerfilter/source/ooxml/model.xml | 8 -
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 6 -
4 files changed, 13 insertions(+), 137 deletions(-)
New commits:
commit 52b6c17a7ac69fc645ae4e824533e08e3dc5d2f0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Feb 20 19:03:12 2014 +0100
writerfilter: convert sprm:P{FBiDi,ContextualSpacing,Jc,FrameTextFlow}
Change-Id: Id28eed2ecc177cf0724813dca29bd448f5c51d27
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index 9d8754a..acd7f8b 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -992,7 +992,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
case 2: // sprmPIstd
case 0x4600:
break; // sprmPIstd - style code
- case NS_sprm::LN_PJc: // sprmPJc
+ case NS_ooxml::LN_CT_PPrBase_jc:
handleParaJustification(nIntValue, rContext, ExchangeLeftRight( rContext, m_pImpl ));
break;
case NS_ooxml::LN_CT_PPrBase_keepLines:
@@ -1258,8 +1258,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
rContext->Insert( PROP_PARA_VERT_ALIGNMENT, uno::makeAny( nAlignment) );
}
break; // sprmPWAlignFont
- case NS_sprm::LN_PFrameTextFlow:
- break; // sprmPFrameTextFlow
+ case NS_ooxml::LN_CT_PPrBase_textDirection:
+ break;
case NS_sprm::LN_POutLvl:
{
sal_Int16 nLvl = static_cast< sal_Int16 >( nIntValue );
@@ -1276,7 +1276,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
}
}
break; // sprmPOutLvl
- case NS_sprm::LN_PFBiDi:
+ case NS_ooxml::LN_CT_PPrBase_bidi:
{
if (nIntValue != 0)
{
@@ -1290,7 +1290,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
}
}
- break; // sprmPFBiDi
+ break;
case NS_ooxml::LN_EG_SectPrContents_bidi:
if (pSectionContext != NULL)
pSectionContext->Insert(PROP_WRITING_MODE, uno::makeAny( text::WritingMode2::RL_TB));
@@ -2269,7 +2269,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType
break;
case NS_ooxml::LN_EG_RPrBase_snapToGrid: // "Use document grid settings for inter-paragraph spacing"
break;
- case NS_sprm::LN_PContextualSpacing:
+ case NS_ooxml::LN_CT_PPrBase_contextualSpacing:
rContext->Insert(PROP_PARA_CONTEXT_MARGIN, uno::makeAny( sal_Bool( nIntValue ) ));
break;
case NS_ooxml::LN_CT_PPrBase_mirrorIndents: // mirrorIndents
diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi
index 1905178..18d9e64 100644
--- a/writerfilter/source/doctok/resources.xmi
+++ b/writerfilter/source/doctok/resources.xmi
@@ -7,37 +7,6 @@
<UML:Model name="WW8Document">
<UML:Namespace.ownedElement>
<!--SPRMS-->
- <!--SPRM sprmPContextualSpacing-->
- <UML:Class xmi.id="sprmPContextualSpacing" name="sprmPContextualSpacing">
- <UML:ModelElement.stereotype>
- <UML:Stereotype xmi.idref="ww8sprm"/>
- </UML:ModelElement.stereotype>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>0x246D</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:sprmPIContextualSpacing</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>paragraph</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="kind"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- </UML:Class>
- <!--SPRM sprmPContextualSpacing-->
<!--SPRM sprmTCantSplit-->
<UML:Class xmi.id="sprmTCantSplit" name="sprmTCantSplit">
<UML:ModelElement.stereotype>
@@ -69,37 +38,6 @@
</UML:ModelElement.taggedValue>
</UML:Class>
<!--SPRM sprmTCantSplit-->
- <!--SPRM sprmPJc-->
- <UML:Class xmi.id="sprmPJc" name="sprmPJc">
- <UML:ModelElement.stereotype>
- <UML:Stereotype xmi.idref="ww8sprm"/>
- </UML:ModelElement.stereotype>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>0x2403</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:sprmPJc</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>paragraph</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="kind"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- </UML:Class>
- <!--SPRM sprmPJc-->
<!--SPRM sprmPDxaRight-->
<UML:Class xmi.id="sprmPDxaRight" name="sprmPDxaRight">
<UML:ModelElement.stereotype>
@@ -317,37 +255,6 @@
</UML:ModelElement.taggedValue>
</UML:Class>
<!--SPRM sprmPWAlignFont-->
- <!--SPRM sprmPFrameTextFlow-->
- <UML:Class xmi.id="sprmPFrameTextFlow" name="sprmPFrameTextFlow">
- <UML:ModelElement.stereotype>
- <UML:Stereotype xmi.idref="ww8sprm"/>
- </UML:ModelElement.stereotype>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>0x443A</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:sprmPFrameTextFlow</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>paragraph</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="kind"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- </UML:Class>
- <!--SPRM sprmPFrameTextFlow-->
<!--SPRM sprmPOutLvl-->
<UML:Class xmi.id="sprmPOutLvl" name="sprmPOutLvl">
<UML:ModelElement.stereotype>
@@ -379,37 +286,6 @@
</UML:ModelElement.taggedValue>
</UML:Class>
<!--SPRM sprmPOutLvl-->
- <!--SPRM sprmPFBiDi-->
- <UML:Class xmi.id="sprmPFBiDi" name="sprmPFBiDi">
- <UML:ModelElement.stereotype>
- <UML:Stereotype xmi.idref="ww8sprm"/>
- </UML:ModelElement.stereotype>
- <UML:ModelElement.taggedValue>
- <UML:TaggedValue>
- <UML:TaggedValue.dataValue>0x2441</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:sprmPFBiDi</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>paragraph</UML:TaggedValue.dataValue>
- <UML:TaggedValue.type>
- <UML:TagDefinition xmi.idref="kind"/>
- </UML:TaggedValue.type>
- </UML:TaggedValue>
- </UML:ModelElement.taggedValue>
- </UML:Class>
- <!--SPRM sprmPFBiDi-->
<!--SPRM sprmCHighlight-->
<UML:Class xmi.id="sprmCHighlight" name="sprmCHighlight">
<UML:ModelElement.stereotype>
diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml
index 52427ee..10ded76 100644
--- a/writerfilter/source/ooxml/model.xml
+++ b/writerfilter/source/ooxml/model.xml
@@ -22582,16 +22582,16 @@
<element name="topLinePunct" tokenid="ooxml:CT_PPrBase_topLinePunct"/>
<element name="autoSpaceDE" tokenid="ooxml:CT_PPrBase_autoSpaceDE"/>
<element name="autoSpaceDN" tokenid="ooxml:CT_PPrBase_autoSpaceDN"/>
- <element name="bidi" tokenid="sprm:PFBiDi"/>
+ <element name="bidi" tokenid="ooxml:CT_PPrBase_bidi"/>
<element name="adjustRightInd" tokenid="ooxml:CT_PPrBase_adjustRightInd"/>
<element name="snapToGrid" tokenid="ooxml:CT_PPrBase_snapToGrid"/>
<element name="spacing" tokenid="ooxml:CT_PPrBase_spacing"/>
<element name="ind" tokenid="ooxml:CT_PPrBase_ind"/>
- <element name="contextualSpacing" tokenid="sprm:PContextualSpacing"/>
+ <element name="contextualSpacing" tokenid="ooxml:CT_PPrBase_contextualSpacing"/>
<element name="mirrorIndents" tokenid="ooxml:CT_PPrBase_mirrorIndents"/>
<element name="suppressOverlap" tokenid="ooxml:CT_PPrBase_suppressOverlap"/>
- <element name="jc" tokenid="sprm:PJc"/>
- <element name="textDirection" tokenid="sprm:PFrameTextFlow"/>
+ <element name="jc" tokenid="ooxml:CT_PPrBase_jc"/>
+ <element name="textDirection" tokenid="ooxml:CT_PPrBase_textDirection"/>
<element name="textAlignment" tokenid="sprm:PWAlignFont"/>
<element name="textboxTightWrap" tokenid="sprm:PTightWrap"/>
<element name="outlineLvl" tokenid="sprm:POutLvl"/>
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 4c3502e..b761328 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2107,7 +2107,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
if (nParam >= 0)
{
RTFValue::Pointer_t pValue(new RTFValue(nParam));
- m_aStates.top().aParagraphSprms.set(NS_sprm::LN_PJc, pValue);
+ m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_jc, pValue);
m_bNeedPap = true;
return 0;
}
@@ -2396,7 +2396,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
case RTF_RTLPAR:
{
RTFValue::Pointer_t pValue(new RTFValue(nKeyword == RTF_LTRPAR ? 0 : 1));
- m_aStates.top().aParagraphSprms.set(NS_sprm::LN_PFrameTextFlow, pValue);
+ m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_textDirection, pValue);
}
break;
case RTF_LTRROW:
@@ -2738,7 +2738,7 @@ int RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
case RTF_CONTEXTUALSPACE:
{
RTFValue::Pointer_t pValue(new RTFValue(1));
- m_aStates.top().aParagraphSprms.set(NS_sprm::LN_PContextualSpacing, pValue);
+ m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_contextualSpacing, pValue);
}
break;
case RTF_LINKSTYLES:
More information about the Libreoffice-commits
mailing list