diff options
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapperTableManager.cxx')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.cxx | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 7d050ae545a3..68db4d01ec81 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -47,7 +47,6 @@ DomainMapperTableManager::DomainMapperTableManager() : m_nRow(0), m_nCell(), m_nGridSpan(1), - m_aGridBefore(), m_nGridAfter(0), m_nHeaderRepeat(0), m_nTableWidth(0), @@ -367,7 +366,7 @@ bool DomainMapperTableManager::sprm(Sprm & rSprm) } break; case NS_ooxml::LN_CT_TrPrBase_gridBefore: - m_aGridBefore.back( ) = nIntValue; + setCurrentGridBefore( nIntValue ); break; case NS_ooxml::LN_CT_TrPrBase_gridAfter: m_nGridAfter = nIntValue; @@ -407,11 +406,6 @@ std::shared_ptr< vector<sal_Int32> > const & DomainMapperTableManager::getCurren return m_aTableGrid.back( ); } -sal_uInt32 DomainMapperTableManager::getCurrentGridBefore( ) -{ - return m_aGridBefore.back( ); -} - bool DomainMapperTableManager::hasCurrentSpans() const { return !m_aGridSpans.empty(); @@ -474,7 +468,6 @@ void DomainMapperTableManager::startLevel( ) m_aTmpPosition.push_back( pTmpPosition ); m_aTmpTableProperties.push_back( pTmpProperties ); m_nCell.push_back( 0 ); - m_aGridBefore.push_back( 0 ); m_nTableWidth = 0; m_nLayoutType = 0; @@ -504,7 +497,6 @@ void DomainMapperTableManager::endLevel( ) m_aCellWidths.back()->push_back(*oCurrentWidth); m_nCell.pop_back( ); - m_aGridBefore.pop_back( ); m_nTableWidth = 0; m_nLayoutType = 0; @@ -560,7 +552,6 @@ void DomainMapperTableManager::endOfRowAction() IntVectorPtr pTmpGridSpans = m_aGridSpans.back(); IntVectorPtr pTmpCellWidths = m_aCellWidths.back(); sal_uInt32 nTmpCell = m_nCell.back(); - sal_uInt32 nTmpGridBefore = m_aGridBefore.back(); // endLevel and startLevel are taking care of the non finished row // to carry it over to the next table @@ -573,12 +564,10 @@ void DomainMapperTableManager::endOfRowAction() m_aGridSpans.pop_back(); m_aCellWidths.pop_back(); m_nCell.pop_back(); - m_aGridBefore.pop_back(); m_aTableGrid.push_back(pTmpTableGrid); m_aGridSpans.push_back(pTmpGridSpans); m_aCellWidths.push_back(pTmpCellWidths); m_nCell.push_back(nTmpCell); - m_aGridBefore.push_back(nTmpGridBefore); } // Push the tmp position now that we compared it @@ -620,15 +609,15 @@ void DomainMapperTableManager::endOfRowAction() IntVectorPtr pCurrentSpans = getCurrentSpans( ); - if( m_aGridBefore.back() > 0 ) + if ( getCurrentGridBefore() ) { //fill missing gridBefore elements with '1' - pCurrentSpans->insert( pCurrentSpans->begin( ), m_aGridBefore.back(), 1 ); + pCurrentSpans->insert( pCurrentSpans->begin(), getCurrentGridBefore(), 1 ); } - if( pCurrentSpans->size() < m_aGridBefore.back() + m_nCell.back( )) + if ( pCurrentSpans->size() < getCurrentGridBefore() + m_nCell.back() ) { //fill missing elements with '1' - pCurrentSpans->insert( pCurrentSpans->end( ), m_aGridBefore.back() + m_nCell.back( ) - pCurrentSpans->size(), 1 ); + pCurrentSpans->insert( pCurrentSpans->end(), getCurrentGridBefore() + m_nCell.back() - pCurrentSpans->size(), 1 ); } #ifdef DEBUG_WRITERFILTER @@ -677,12 +666,12 @@ void DomainMapperTableManager::endOfRowAction() pTablePropMap->setValue(TablePropertyMap::TABLE_WIDTH_TYPE, text::SizeType::FIX); } } - uno::Sequence< text::TableColumnSeparator > aSeparators( m_aGridBefore.back() + m_nCell.back( ) - 1 ); + uno::Sequence< text::TableColumnSeparator > aSeparators( getCurrentGridBefore() + m_nCell.back() - 1 ); text::TableColumnSeparator* pSeparators = aSeparators.getArray(); sal_Int16 nLastRelPos = 0; sal_uInt32 nBorderGridIndex = 0; - size_t nWidthsBound = m_aGridBefore.back() + m_nCell.back() - 1; + size_t nWidthsBound = getCurrentGridBefore() + m_nCell.back() - 1; if (nWidthsBound) { if (nFullWidthRelative == 0) @@ -770,7 +759,6 @@ void DomainMapperTableManager::endOfRowAction() ++m_nRow; m_nCell.back( ) = 0; - m_aGridBefore.back( ) = 0; getCurrentGrid()->clear(); pCurrentSpans->clear(); pCellWidths->clear(); |