diff options
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.cxx | 7 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableManager.hxx | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.cxx b/writerfilter/source/dmapper/DomainMapperTableManager.cxx index 93b4d9266db4..613282e39683 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.cxx @@ -386,6 +386,11 @@ std::shared_ptr< vector<sal_Int32> > const & DomainMapperTableManager::getCurren return m_aTableGrid.back( ); } +bool DomainMapperTableManager::hasCurrentSpans() const +{ + return !m_aGridSpans.empty(); +} + std::shared_ptr< vector< sal_Int32 > > const & DomainMapperTableManager::getCurrentSpans( ) { return m_aGridSpans.back( ); @@ -499,6 +504,8 @@ void DomainMapperTableManager::endOfCellAction() TagLogger::getInstance().element("endOFCellAction"); #endif + if (!hasCurrentSpans()) + throw std::out_of_range("empty spans"); getCurrentSpans()->push_back(m_nGridSpan); m_nGridSpan = 1; ++m_nCell.back( ); diff --git a/writerfilter/source/dmapper/DomainMapperTableManager.hxx b/writerfilter/source/dmapper/DomainMapperTableManager.hxx index 4729c7c65b69..538fa94cc4d2 100644 --- a/writerfilter/source/dmapper/DomainMapperTableManager.hxx +++ b/writerfilter/source/dmapper/DomainMapperTableManager.hxx @@ -95,6 +95,7 @@ public: virtual void endOfRowAction() override; IntVectorPtr const & getCurrentGrid( ); + bool hasCurrentSpans() const; IntVectorPtr const & getCurrentSpans( ); IntVectorPtr const & getCurrentCellWidths( ); |