diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-02-17 17:50:57 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-07-17 11:43:37 +0000 |
commit | b0dae2115364ae1644203c046765f10ccfe9a8ac (patch) | |
tree | f023b3b60554e4063c8b420e9ea9c8f580605ec0 | |
parent | fdo#81214 - tolerate exceptions thrown inside XFastParser callbacks. (diff) | |
download | core-b0dae2115364ae1644203c046765f10ccfe9a8ac.tar.gz core-b0dae2115364ae1644203c046765f10ccfe9a8ac.zip |
fdo#81173 abi#3623 RTF import: missing null pointer check
(cherry picked from commit 08fb25ab7941c52d4eed0435a45a38b03aff588c)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
Change-Id: I5861e5fec0d822f42dfeb994500a818a968e69fb
(cherry picked from commit 50df6263ccde24874191812950dcccd8f839754b)
Reviewed-on: https://gerrit.libreoffice.org/10358
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | writerfilter/qa/cppunittests/rtftok/data/pass/abi3623.rtf | 7 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/writerfilter/qa/cppunittests/rtftok/data/pass/abi3623.rtf b/writerfilter/qa/cppunittests/rtftok/data/pass/abi3623.rtf new file mode 100644 index 000000000000..a47161a2fb1c --- /dev/null +++ b/writerfilter/qa/cppunittests/rtftok/data/pass/abi3623.rtf @@ -0,0 +1,7 @@ +{\rtf1 +{\stylesheet +{\s2\ls1\sbasedon0 heading 2;} +} +\s2 +foo\par +} diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index ff8428f3e136..b9b1adfd520c 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -3261,7 +3261,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType { const StyleSheetEntryPtr pParent = pStyleTable->FindStyleSheetByISTD(pEntry->sBaseStyleIdentifier); const StyleSheetPropertyMap* pParentProperties = dynamic_cast<const StyleSheetPropertyMap*>(pParent ? pParent->pProperties.get() : 0); - if (pParentProperties->find(PROP_PARA_RIGHT_MARGIN) != pParentProperties->end()) + if (pParentProperties && pParentProperties->find(PROP_PARA_RIGHT_MARGIN) != pParentProperties->end()) nParaRightMargin = pParentProperties->find(PROP_PARA_RIGHT_MARGIN)->second.getValue().get<sal_Int32>(); } if (nParaRightMargin != 0) |