diff options
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo70812.docx | bin | 0 -> 5530 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 8 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapper.cxx | 9 |
3 files changed, 14 insertions, 3 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo70812.docx b/sw/qa/extras/ooxmlexport/data/fdo70812.docx Binary files differnew file mode 100644 index 000000000000..b9b5d52c2086 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo70812.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 798336000437..c1bb45e40de4 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -76,6 +76,7 @@ public: void testFdo60990(); void testBnc834035(); void testCp1000015(); + void testFdo70812(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -136,6 +137,7 @@ void Test::run() {"fdo60990.odt", &Test::testFdo60990}, {"bnc834035.odt", &Test::testBnc834035}, {"cp1000015.odt", &Test::testCp1000015}, + {"fdo70812.docx", &Test::testFdo70812}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -781,6 +783,12 @@ void Test::testCp1000015() getParagraph(2, "http://www.google.com/"); } +void Test::testFdo70812() +{ + // Import just crashed. + getParagraph(1, "Sample pages document."); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx index 5ac4b058ad9a..dfcf3a734b41 100644 --- a/writerfilter/source/dmapper/DomainMapper.cxx +++ b/writerfilter/source/dmapper/DomainMapper.cxx @@ -1561,7 +1561,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType { //style sheets cannot have a numbering rule attached StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() ); - pStyleSheetPropertyMap->SetListLevel( (sal_Int16)nIntValue ); + if (pStyleSheetPropertyMap) + pStyleSheetPropertyMap->SetListLevel( (sal_Int16)nIntValue ); } else rContext->Insert( PROP_NUMBERING_LEVEL, true, uno::makeAny( (sal_Int16)nIntValue )); @@ -1575,7 +1576,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType { //style sheets cannot have a numbering rule attached StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() ); - pStyleSheetPropertyMap->SetListId( nIntValue ); + if (pStyleSheetPropertyMap) + pStyleSheetPropertyMap->SetListId( nIntValue ); } if( pList.get( ) ) { @@ -1593,7 +1595,8 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext, SprmType { // set the number id for AbstractNum references StyleSheetPropertyMap* pStyleSheetPropertyMap = dynamic_cast< StyleSheetPropertyMap* >( rContext.get() ); - pStyleSheetPropertyMap->SetNumId( nIntValue ); + if (pStyleSheetPropertyMap) + pStyleSheetPropertyMap->SetNumId( nIntValue ); } else { |