summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx8
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx13
2 files changed, 14 insertions, 7 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index b8193c733a3a..fdf292de3f63 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -921,6 +921,12 @@ bool lcl_emptyRow(TableSequence_t& rTableSeq, sal_Int32 nRow)
}
RowSequence_t rRowSeq = rTableSeq[nRow];
+ if (rRowSeq.getLength() == 0)
+ {
+ SAL_WARN("writerfilter", "m_aCellProperties not in sync with m_pTableSeq?");
+ return false;
+ }
+
uno::Reference<text::XTextRangeCompare> xTextRangeCompare(rRowSeq[0][0]->getText(), uno::UNO_QUERY);
try
{
@@ -931,7 +937,7 @@ bool lcl_emptyRow(TableSequence_t& rTableSeq, sal_Int32 nRow)
if (xTextRangeCompare->compareRegionStarts(rRowSeq[nCell][0], rRowSeq[nCell][1]) != 0)
return false;
}
- catch (lang::IllegalArgumentException& e)
+ catch (const lang::IllegalArgumentException& e)
{
SAL_WARN("writerfilter", "compareRegionStarts() failed: " << e.Message);
return false;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 31ff8b83a1c3..be561618d1e8 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -5789,12 +5789,13 @@ int RTFDocumentImpl::popState()
case DESTINATION_SHAPEPROPERTYNAME:
case DESTINATION_SHAPEPROPERTYVALUE:
case DESTINATION_SHAPEPROPERTY:
- {
- m_aStates.top().aShape = aState.aShape;
- m_aStates.top().aPicture = aState.aPicture;
- m_aStates.top().aCharacterAttributes = aState.aCharacterAttributes;
- }
- break;
+ if (!m_aStates.empty())
+ {
+ m_aStates.top().aShape = aState.aShape;
+ m_aStates.top().aPicture = aState.aPicture;
+ m_aStates.top().aCharacterAttributes = aState.aCharacterAttributes;
+ }
+ break;
case DESTINATION_FLYMAINCONTENT:
case DESTINATION_SHPPICT:
case DESTINATION_SHAPE: