diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-02-11 14:51:54 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-02-13 12:58:53 +0100 |
commit | 08aa1c83c7c5b1a244f0d70c9cfe368b99e0d5d2 (patch) | |
tree | 79241b7b580877a6cfeac2f1543bbe67785cec2e | |
parent | cc1c838942d4b2ae395ae7429271e48335fdee80 (diff) |
writerfilter: No need to namespace these constants, they have prefix already.
Change-Id: I5590adbf0f60b10d309ddf2a6b9e50231245a659
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 26 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper_Impl.cxx | 14 | ||||
-rw-r--r-- | writerfilter/source/dmapper/TablePropertiesHandler.cxx | 8 | ||||
-rw-r--r-- | writerfilter/source/dmapper/TrackChangesHandler.cxx | 8 | ||||
-rw-r--r-- | writerfilter/source/ooxml/fasttokens.xsl | 8 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfdocumentimpl.cxx | 2 |
6 files changed, 34 insertions, 32 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 61d32d80655a..900b95fb109a 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3152,23 +3152,23 @@ void DomainMapper::HandleRedline( Sprm& rSprm ) if (nSprmId == NS_ooxml::LN_CT_PPr_pPrChange) { - m_pImpl->SetCurrentRedlineToken( ooxml::OOXML_ParagraphFormat ); + m_pImpl->SetCurrentRedlineToken(OOXML_ParagraphFormat); } else if (nSprmId == NS_ooxml::LN_CT_TrPr_ins) { - m_pImpl->SetCurrentRedlineToken( ooxml::OOXML_tableRowInsert ); + m_pImpl->SetCurrentRedlineToken(OOXML_tableRowInsert); } else if (nSprmId == NS_ooxml::LN_CT_TrPr_del) { - m_pImpl->SetCurrentRedlineToken( ooxml::OOXML_tableRowDelete ); + m_pImpl->SetCurrentRedlineToken(OOXML_tableRowDelete); } else if (nSprmId == NS_ooxml::LN_CT_TcPrBase_cellIns) { - m_pImpl->SetCurrentRedlineToken( ooxml::OOXML_tableCellInsert ); + m_pImpl->SetCurrentRedlineToken(OOXML_tableCellInsert); } else if (nSprmId == NS_ooxml::LN_CT_TcPrBase_cellDel) { - m_pImpl->SetCurrentRedlineToken( ooxml::OOXML_tableCellDelete ); + m_pImpl->SetCurrentRedlineToken(OOXML_tableCellDelete); } resolveSprmProps(*this, rSprm ); @@ -3176,14 +3176,14 @@ void DomainMapper::HandleRedline( Sprm& rSprm ) sal_Int32 nToken = m_pImpl->GetCurrentRedlineToken(); switch( nToken & 0xffff ) { - case ooxml::OOXML_mod : - case ooxml::OOXML_ins : - case ooxml::OOXML_del : - case ooxml::OOXML_ParagraphFormat : - case ooxml::OOXML_tableRowInsert: - case ooxml::OOXML_tableRowDelete: - case ooxml::OOXML_tableCellInsert: - case ooxml::OOXML_tableCellDelete: + case OOXML_mod: + case OOXML_ins: + case OOXML_del: + case OOXML_ParagraphFormat: + case OOXML_tableRowInsert: + case OOXML_tableRowDelete: + case OOXML_tableCellInsert: + case OOXML_tableCellDelete: break; default: OSL_FAIL( "redline token other than mod, ins, del or table row" ); break; } diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx index 3e0c57971eaf..2cbc7374425c 100644 --- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx +++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx @@ -1508,16 +1508,16 @@ void DomainMapper_Impl::CreateRedline( uno::Reference< text::XTextRange > xRange PropertyNameSupplier & rPropNameSupplier = PropertyNameSupplier::GetPropertyNameSupplier( ); switch ( pRedline->m_nToken & 0xffff ) { - case ooxml::OOXML_mod: + case OOXML_mod: sType = rPropNameSupplier.GetName( PROP_FORMAT ); break; - case ooxml::OOXML_ins: + case OOXML_ins: sType = rPropNameSupplier.GetName( PROP_INSERT ); break; - case ooxml::OOXML_del: + case OOXML_del: sType = rPropNameSupplier.GetName( PROP_DELETE ); break; - case ooxml::OOXML_ParagraphFormat: + case OOXML_ParagraphFormat: sType = rPropNameSupplier.GetName( PROP_PARAGRAPH_FORMAT ); break; default: @@ -1561,8 +1561,8 @@ void DomainMapper_Impl::CheckRedline( uno::Reference< text::XTextRange > xRange // Adding the non-mod redlines to the temporary vector if ( pIt->get( ) ) { - if ( ( ( *pIt )->m_nToken & 0xffff ) != ooxml::OOXML_mod && ( ( *pIt )->m_nToken & 0xffff ) != ooxml::OOXML_ParagraphFormat) - aCleaned.push_back( *pIt ); + if (((*pIt)->m_nToken & 0xffff) != OOXML_mod && ((*pIt)->m_nToken & 0xffff) != OOXML_ParagraphFormat) + aCleaned.push_back(*pIt); } } @@ -3949,7 +3949,7 @@ bool DomainMapper_Impl::ExecuteFrameConversion() void DomainMapper_Impl::AddNewRedline( ) { RedlineParamsPtr pNew( new RedlineParams ); - pNew->m_nToken = ooxml::OOXML_mod; + pNew->m_nToken = OOXML_mod; if ( !m_bIsParaMarkerChange ) { m_aRedlines.top().push_back( pNew ); diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx index dcb0b76705c8..d8bcd0575a6f 100644 --- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx +++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx @@ -117,10 +117,10 @@ namespace dmapper { switch( nSprmId ) { case NS_ooxml::LN_CT_TrPr_ins: - nToken = ooxml::OOXML_tableRowInsert; + nToken = OOXML_tableRowInsert; break; case NS_ooxml::LN_CT_TrPr_del: - nToken = ooxml::OOXML_tableRowDelete; + nToken = OOXML_tableRowDelete; break; default: throw ::com::sun::star::lang::IllegalArgumentException("illegal redline token type", NULL, 0); @@ -148,10 +148,10 @@ namespace dmapper { switch( nSprmId ) { case NS_ooxml::LN_CT_TcPrBase_cellIns: - nToken = ooxml::OOXML_tableCellInsert; + nToken = OOXML_tableCellInsert; break; case NS_ooxml::LN_CT_TcPrBase_cellDel: - nToken = ooxml::OOXML_tableCellDelete; + nToken = OOXML_tableCellDelete; break; default: throw ::com::sun::star::lang::IllegalArgumentException("illegal redline token type", NULL, 0); diff --git a/writerfilter/source/dmapper/TrackChangesHandler.cxx b/writerfilter/source/dmapper/TrackChangesHandler.cxx index 0773fdc9f35b..383ce1442dbc 100644 --- a/writerfilter/source/dmapper/TrackChangesHandler.cxx +++ b/writerfilter/source/dmapper/TrackChangesHandler.cxx @@ -69,16 +69,16 @@ uno::Sequence<beans::PropertyValue> TrackChangesHandler::getRedlineProperties() OUString sType; switch ( m_pRedlineParams->m_nToken & 0xffff ) { - case ooxml::OOXML_tableRowInsert: + case OOXML_tableRowInsert: sType = rPropNameSupplier.GetName( PROP_TABLE_ROW_INSERT ); break; - case ooxml::OOXML_tableRowDelete: + case OOXML_tableRowDelete: sType = rPropNameSupplier.GetName( PROP_TABLE_ROW_DELETE ); break; - case ooxml::OOXML_tableCellInsert: + case OOXML_tableCellInsert: sType = rPropNameSupplier.GetName( PROP_TABLE_CELL_INSERT ); break; - case ooxml::OOXML_tableCellDelete: + case OOXML_tableCellDelete: sType = rPropNameSupplier.GetName( PROP_TABLE_CELL_DELETE ); break; } diff --git a/writerfilter/source/ooxml/fasttokens.xsl b/writerfilter/source/ooxml/fasttokens.xsl index c87fc923164a..7a8cae3883b2 100644 --- a/writerfilter/source/ooxml/fasttokens.xsl +++ b/writerfilter/source/ooxml/fasttokens.xsl @@ -83,18 +83,20 @@ const Token_t OOXML_FAST_TOKENS_END =</xsl:text> #include <resourcemodel/WW8ResourceModel.hxx> -namespace writerfilter { -namespace ooxml { using namespace ::std; using namespace ::com::sun::star; </xsl:text> <xsl:call-template name="fasttokens"/> <xsl:text> +namespace writerfilter { +namespace ooxml { + string fastTokenToId(sal_uInt32 nToken); +}} + static const sal_uInt32 F_Attribute = 1U << 31; -}} #endif //INCLUDED_OOXML_FAST_TOKENS_HXX
</xsl:text></out></xsl:template> <xsl:template match="*"/> diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 05f4860d47f6..2533eaaa98cd 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -3856,7 +3856,7 @@ int RTFDocumentImpl::dispatchToggle(RTFKeyword nKeyword, bool bParam, int nParam case RTF_DELETED: case RTF_REVISED: { - RTFValue::Pointer_t pValue(new RTFValue(nKeyword == RTF_DELETED ? ooxml::OOXML_del : ooxml::OOXML_ins)); + RTFValue::Pointer_t pValue(new RTFValue(nKeyword == RTF_DELETED ? OOXML_del : OOXML_ins)); lcl_putNestedAttribute(m_aStates.top().aCharacterSprms, NS_ooxml::LN_trackchange, NS_ooxml::LN_token, pValue); } |