Kaydet (Commit) 5fd73826 authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: fdo#73608 don't crash on missing table styles

Change-Id: I340b43b7afc4c5c4d6dc8e4ed182279240306540
üst cadc2cbe
...@@ -83,6 +83,10 @@ void DomainMapperTableHandler::startTable(unsigned int nRows, ...@@ -83,6 +83,10 @@ void DomainMapperTableHandler::startTable(unsigned int nRows,
PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntryPtr pStyleSheet, StyleSheetTablePtr pStyleSheetTable) PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntryPtr pStyleSheet, StyleSheetTablePtr pStyleSheetTable)
{ {
PropertyMapPtr pRet; PropertyMapPtr pRet;
if (!pStyleSheet)
return pRet;
if(!pStyleSheet->sBaseStyleIdentifier.isEmpty()) if(!pStyleSheet->sBaseStyleIdentifier.isEmpty())
{ {
const StyleSheetEntryPtr pParentStyleSheet = pStyleSheetTable->FindStyleSheetByISTD( pStyleSheet->sBaseStyleIdentifier ); const StyleSheetEntryPtr pParentStyleSheet = pStyleSheetTable->FindStyleSheetByISTD( pStyleSheet->sBaseStyleIdentifier );
...@@ -93,7 +97,10 @@ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntr ...@@ -93,7 +97,10 @@ PropertyMapPtr lcl_SearchParentStyleSheetAndMergeProperties(const StyleSheetEntr
pRet.reset( new PropertyMap ); pRet.reset( new PropertyMap );
} }
pRet->InsertProps(pStyleSheet->pProperties); if (pRet)
{
pRet->InsertProps(pStyleSheet->pProperties);
}
return pRet; return pRet;
} }
...@@ -254,6 +261,9 @@ namespace ...@@ -254,6 +261,9 @@ namespace
bool lcl_extractTableBorderProperty(PropertyMapPtr pTableProperties, const PropertyIds nId, TableInfo& rInfo, table::BorderLine2& rLine) bool lcl_extractTableBorderProperty(PropertyMapPtr pTableProperties, const PropertyIds nId, TableInfo& rInfo, table::BorderLine2& rLine)
{ {
if (!pTableProperties)
return false;
const boost::optional<PropertyMap::Property> aTblBorder = pTableProperties->getProperty(nId); const boost::optional<PropertyMap::Property> aTblBorder = pTableProperties->getProperty(nId);
if( aTblBorder ) if( aTblBorder )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment