summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/TablePropertiesHandler.cxx
diff options
context:
space:
mode:
authorAdam Co <rattles2013@gmail.com>2014-02-05 13:46:08 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-02-12 09:57:40 +0000
commita8db386ad206029ab8c769856f8c452db8712c2b (patch)
treed11347ef36fca270313f0f146e4d623066929112 /writerfilter/source/dmapper/TablePropertiesHandler.cxx
parent9010336d0eab3cd0d4f1ac17126900e12ffa846c (diff)
DOCX import sends 'table cell redline' to SW core, and core stores it
This patch adds support in the DOCX importer for the 'table cell redline' to be sent from the DOCX importer, using UNO (as a property of the table cell) to the SW core. Once it reaches the 'table cell' - the 'set property' detects this property - and creates an 'SwTableCellRedline' object for it, and adds it to the 'SwExtraRedlineTbl' object. Change-Id: Iba038f4109d5505b94cea548e73c614b5cc1b637 Reviewed-on: https://gerrit.libreoffice.org/7875 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'writerfilter/source/dmapper/TablePropertiesHandler.cxx')
-rw-r--r--writerfilter/source/dmapper/TablePropertiesHandler.cxx31
1 files changed, 31 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/TablePropertiesHandler.cxx b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
index 0500ddbde295..dcb0b76705c8 100644
--- a/writerfilter/source/dmapper/TablePropertiesHandler.cxx
+++ b/writerfilter/source/dmapper/TablePropertiesHandler.cxx
@@ -138,6 +138,37 @@ namespace dmapper {
}
}
break;
+ case NS_ooxml::LN_CT_TcPrBase_cellIns:
+ case NS_ooxml::LN_CT_TcPrBase_cellDel:
+ {
+ writerfilter::Reference<Properties>::Pointer_t pProperties = rSprm.getProps();
+ if( pProperties.get())
+ {
+ sal_Int32 nToken;
+ switch( nSprmId )
+ {
+ case NS_ooxml::LN_CT_TcPrBase_cellIns:
+ nToken = ooxml::OOXML_tableCellInsert;
+ break;
+ case NS_ooxml::LN_CT_TcPrBase_cellDel:
+ nToken = ooxml::OOXML_tableCellDelete;
+ break;
+ default:
+ throw ::com::sun::star::lang::IllegalArgumentException("illegal redline token type", NULL, 0);
+ break;
+ };
+ TrackChangesHandlerPtr pTrackChangesHandler( new TrackChangesHandler( nToken ) );
+ pProperties->resolve(*pTrackChangesHandler);
+ TablePropertyMapPtr pPropMap( new TablePropertyMap );
+
+ // Add the 'track changes' properties to the 'table row' via UNO.
+ // This way - in the SW core - when it receives this - it will create a new 'Table Redline' object for that row
+ uno::Sequence<beans::PropertyValue> aTableRedlineProperties = pTrackChangesHandler->getRedlineProperties();
+ pPropMap->Insert( PROP_TABLE_REDLINE_PARAMS , uno::makeAny( aTableRedlineProperties ));
+ cellProps(pPropMap);
+ }
+ }
+ break;
case 0x3403: // sprmTFCantSplit
case NS_sprm::LN_TCantSplit: // 0x3644
{