diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-25 16:59:56 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-25 17:32:36 +0100 |
commit | 74bf915fb48c660bd1e3a04bec6c3a20c754b6af (patch) | |
tree | b8d253c03e97329d4ae26d28bca80e55f4cb52fe /writerfilter/source/dmapper/DomainMapperTableHandler.cxx | |
parent | 1581b1fc3ac82a7bd62df968226e98604a4ca52d (diff) |
DOCX import: tblHeader implies firstRow
If a table row is marked as tblHeader, then the firstRow section of the
table style should be applied, even if that row is in fact not the first
row.
Change-Id: I10605f404160e72c620e9204503203fea1c6d6d8
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapperTableHandler.cxx')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index a8e51b079cb5..1a9ad2d063dc 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -562,6 +562,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl //it's a uno::Sequence< beans::PropertyValues >* RowPropertyValuesSeq_t* pCellProperties = aCellProperties.getArray(); + PropertyMapVector1::const_iterator aRowIter = m_aRowProperties.begin(); while( aRowOfCellsIterator != aRowOfCellsIteratorEnd ) { //aRowOfCellsIterator points to a vector of PropertyMapPtr @@ -580,6 +581,8 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl if(rInfo.nTblLook&0x40) nRowStyleMask |= CNF_LAST_ROW; // last row style used } + else if (aRowIter->get() && aRowIter->get()->find(PROP_TBL_HEADER) != aRowIter->get()->end()) + nRowStyleMask |= CNF_FIRST_ROW; // table header implies first row if(!nRowStyleMask) // if no row style used yet { // banding used only if not first and or last row style used @@ -729,6 +732,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl #endif ++nRow; ++aRowOfCellsIterator; + ++aRowIter; } #ifdef DEBUG_DMAPPER_TABLE_HANDLER @@ -758,6 +762,10 @@ RowPropertyValuesSeq_t DomainMapperTableHandler::endTableGetRowProperties() //set default to 'break across pages" if( aRowIter->get()->find(PROP_IS_SPLIT_ALLOWED) == aRowIter->get()->end()) aRowIter->get()->Insert( PROP_IS_SPLIT_ALLOWED, uno::makeAny(sal_True ) ); + // tblHeader is only our property, remove before the property map hits UNO + PropertyMap::const_iterator aIter = aRowIter->get()->find(PROP_TBL_HEADER); + if (aIter != aRowIter->get()->end()) + aRowIter->get()->erase(aIter); aRowProperties[nRow] = (*aRowIter)->GetPropertyValues(); #ifdef DEBUG_DMAPPER_TABLE_HANDLER |