writerfilter/source/dmapper/DomainMapper.cxx | 22 ++-- writerfilter/source/dmapper/NumberingManager.cxx | 2 writerfilter/source/doctok/resources.xmi | 124 ----------------------- writerfilter/source/ooxml/model.xml | 8 - writerfilter/source/rtftok/rtfdocumentimpl.cxx | 8 - 5 files changed, 20 insertions(+), 144 deletions(-)
New commits: commit 1107ddf30b62f60471978b3128d8ea2b2546aecd Author: Miklos Vajna <vmik...@collabora.co.uk> Date: Thu Feb 27 21:31:49 2014 +0100 writerfilter: convert sprm:C{Hps,HpsBi,Highlight,SfxText} Change-Id: I7092bd2b99460f083da0ef1515929c41bca6e9b9 diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 7a51057..00b23ad 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1298,7 +1298,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType if (pSectionContext != NULL) pSectionContext->Insert(PROP_WRITING_MODE, uno::makeAny( text::WritingMode2::RL_TB)); break; - case NS_sprm::LN_CHighlight: + case NS_ooxml::LN_EG_RPrBase_highlight: { sal_Int32 nColor = 0; if( (mbIsHighlightSet = getColorFromIndex(nIntValue, nColor)) ) @@ -1306,7 +1306,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType else if (mnBackgroundColor) rContext->Insert(PROP_CHAR_BACK_COLOR, uno::makeAny( mnBackgroundColor )); } - break; // sprmCHighlight + break; case NS_sprm::LN_CKcd: rContext->Insert(PROP_CHAR_EMPHASIS, uno::makeAny ( getEmphasisValue (nIntValue))); break; // sprmCKcd @@ -1473,13 +1473,13 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType rContext->Insert(PROP_CHAR_COLOR, uno::makeAny( nColor ) ); } break; // sprmCIco - case NS_sprm::LN_CHpsBi: // sprmCHpsBi - case NS_sprm::LN_CHps: // sprmCHps + case NS_ooxml::LN_EG_RPrBase_sz: + case NS_ooxml::LN_EG_RPrBase_szCs: { //multiples of half points (12pt == 24) double fVal = double(nIntValue) / 2.; uno::Any aVal = uno::makeAny( fVal ); - if( NS_sprm::LN_CHpsBi == nSprmId ) + if( NS_ooxml::LN_EG_RPrBase_szCs == nSprmId ) { rContext->Insert( PROP_CHAR_HEIGHT_COMPLEX, aVal ); } @@ -1507,7 +1507,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType // Make sure char sizes defined in the stylesheets don't affect char props from direct formatting. if (!m_pImpl->IsStyleSheetImport()) m_pImpl->deferCharacterProperty( nSprmId, uno::makeAny( nIntValue )); - m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, (nSprmId == NS_sprm::LN_CHps ? OUString("sz") : OUString("szCs")), OUString::number(nIntValue)); + m_pImpl->appendGrabBag(m_pImpl->m_aInteropGrabBag, (nSprmId == NS_ooxml::LN_EG_RPrBase_sz ? OUString("sz") : OUString("szCs")), OUString::number(nIntValue)); } break; case NS_ooxml::LN_EG_RPrBase_position: @@ -1582,14 +1582,14 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType rContext->Insert(PROP_CHAR_RELIEF, uno::makeAny( nIntValue ? awt::FontRelief::ENGRAVED : awt::FontRelief::NONE )); break; - case NS_sprm::LN_CSfxText: + case NS_ooxml::LN_EG_RPrBase_effect: // The file-format has many character animations. We have only // one, so we use it always. Suboptimal solution though. if (nIntValue) rContext->Insert(PROP_CHAR_FLASH, uno::makeAny( true )); else rContext->Insert(PROP_CHAR_FLASH, uno::makeAny( false )); - break; // sprmCSfxText + break; case NS_sprm::LN_CFBiDi: break; // sprmCFBiDi case NS_sprm::LN_CShd: @@ -2397,8 +2397,8 @@ void DomainMapper::processDeferredCharacterProperties( const std::map< sal_Int32 it->second >>= sStringValue; switch( Id ) { - case NS_sprm::LN_CHps: - case NS_sprm::LN_CHpsBi: + case NS_ooxml::LN_EG_RPrBase_sz: + case NS_ooxml::LN_EG_RPrBase_szCs: break; // only for use by other properties, ignore here case NS_ooxml::LN_EG_RPrBase_position: { @@ -2408,7 +2408,7 @@ void DomainMapper::processDeferredCharacterProperties( const std::map< sal_Int32 nProp = 0; else { - std::map< sal_Int32, uno::Any >::const_iterator font = deferredCharacterProperties.find( NS_sprm::LN_CHps ); + std::map< sal_Int32, uno::Any >::const_iterator font = deferredCharacterProperties.find( NS_ooxml::LN_EG_RPrBase_sz ); PropertyMapPtr pDefaultCharProps = m_pImpl->GetStyleSheetTable()->GetDefaultCharProps(); PropertyMap::iterator aDefaultFont = pDefaultCharProps->find(PROP_CHAR_HEIGHT); if( font != deferredCharacterProperties.end()) diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx index c868c11..384ada9 100644 --- a/writerfilter/source/dmapper/NumberingManager.cxx +++ b/writerfilter/source/dmapper/NumberingManager.cxx @@ -1060,7 +1060,7 @@ void ListsManager::lcl_sprm( Sprm& rSprm ) case NS_ooxml::LN_EG_RPrBase_rFonts: //contains font properties case NS_ooxml::LN_EG_RPrBase_color: case NS_ooxml::LN_EG_RPrBase_u: - case NS_sprm::LN_CHps: // sprmCHps + case NS_ooxml::LN_EG_RPrBase_sz: case NS_ooxml::LN_EG_RPrBase_lang: case NS_ooxml::LN_EG_RPrBase_eastAsianLayout: //no break! diff --git a/writerfilter/source/doctok/resources.xmi b/writerfilter/source/doctok/resources.xmi index 6152078..2a9e933 100644 --- a/writerfilter/source/doctok/resources.xmi +++ b/writerfilter/source/doctok/resources.xmi @@ -224,37 +224,6 @@ </UML:ModelElement.taggedValue> </UML:Class> <!--SPRM sprmPFWidowControl--> - <!--SPRM sprmCHighlight--> - <UML:Class xmi.id="sprmCHighlight" name="sprmCHighlight"> - <UML:ModelElement.stereotype> - <UML:Stereotype xmi.idref="ww8sprm"/> - </UML:ModelElement.stereotype> - <UML:ModelElement.taggedValue> - <UML:TaggedValue> - <UML:TaggedValue.dataValue>0x2A0C</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:sprmCHighlight</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 sprmCHighlight--> <!--SPRM sprmCKcd--> <UML:Class xmi.id="sprmCKcd" name="sprmCKcd"> <UML:ModelElement.stereotype> @@ -379,37 +348,6 @@ </UML:ModelElement.taggedValue> </UML:Class> <!--SPRM sprmCIco--> - <!--SPRM sprmCHps--> - <UML:Class xmi.id="sprmCHps" name="sprmCHps"> - <UML:ModelElement.stereotype> - <UML:Stereotype xmi.idref="ww8sprm"/> - </UML:ModelElement.stereotype> - <UML:ModelElement.taggedValue> - <UML:TaggedValue> - <UML:TaggedValue.dataValue>0x4A43</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:sprmCHps</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 sprmCHps--> <!--SPRM sprmCRgFtc0--> <UML:Class xmi.id="sprmCRgFtc0" name="sprmCRgFtc0"> <UML:ModelElement.stereotype> @@ -565,37 +503,6 @@ </UML:ModelElement.taggedValue> </UML:Class> <!--SPRM sprmCComplexScript--> - <!--SPRM sprmCSfxText--> - <UML:Class xmi.id="sprmCSfxText" name="sprmCSfxText"> - <UML:ModelElement.stereotype> - <UML:Stereotype xmi.idref="ww8sprm"/> - </UML:ModelElement.stereotype> - <UML:ModelElement.taggedValue> - <UML:TaggedValue> - <UML:TaggedValue.dataValue>0x2859</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:sprmCSfxText</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 sprmCSfxText--> <!--SPRM sprmCFBiDi--> <UML:Class xmi.id="sprmCFBiDi" name="sprmCFBiDi"> <UML:ModelElement.stereotype> @@ -658,37 +565,6 @@ </UML:ModelElement.taggedValue> </UML:Class> <!--SPRM sprmCLidBi--> - <!--SPRM sprmCHpsBi--> - <UML:Class xmi.id="sprmCHpsBi" name="sprmCHpsBi"> - <UML:ModelElement.stereotype> - <UML:Stereotype xmi.idref="ww8sprm"/> - </UML:ModelElement.stereotype> - <UML:ModelElement.taggedValue> - <UML:TaggedValue> - <UML:TaggedValue.dataValue>0x4A61</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:sprmCHpsBi</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 sprmCHpsBi--> <!--SPRM sprmCShd--> <UML:Class xmi.id="sprmCShd" name="sprmCShd"> <UML:ModelElement.stereotype> diff --git a/writerfilter/source/ooxml/model.xml b/writerfilter/source/ooxml/model.xml index 9850e3c..09648ca 100644 --- a/writerfilter/source/ooxml/model.xml +++ b/writerfilter/source/ooxml/model.xml @@ -24349,11 +24349,11 @@ <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"/> + <element name="sz" tokenid="ooxml:EG_RPrBase_sz"/> + <element name="szCs" tokenid="ooxml:EG_RPrBase_szCs"/> + <element name="highlight" tokenid="ooxml:EG_RPrBase_highlight"/> <element name="u" tokenid="ooxml:EG_RPrBase_u"/> - <element name="effect" tokenid="sprm:CSfxText"/> + <element name="effect" tokenid="ooxml:EG_RPrBase_effect"/> <element name="bdr" tokenid="ooxml:EG_RPrBase_bdr"/> <element name="shd" tokenid="sprm:CShd"/> <element name="fitText" tokenid="ooxml:EG_RPrBase_fitText"/> diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index cc1ceef..b70784a 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2954,9 +2954,9 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) // Trivial character sprms. switch (nKeyword) { - 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_FS: nSprm = NS_ooxml::LN_EG_RPrBase_sz; break; + case RTF_AFS: nSprm = NS_ooxml::LN_EG_RPrBase_szCs; break; + case RTF_ANIMTEXT: nSprm = NS_ooxml::LN_EG_RPrBase_effect; 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; @@ -3227,7 +3227,7 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) case RTF_HIGHLIGHT: { RTFValue::Pointer_t pValue(new RTFValue(getColorTable(nParam))); - m_aStates.top().aCharacterSprms.set(NS_sprm::LN_CHighlight, pValue); + m_aStates.top().aCharacterSprms.set(NS_ooxml::LN_EG_RPrBase_highlight, pValue); } break; case RTF_UP: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits