diff options
Diffstat (limited to 'sw/source/uibase/app/docstyle.cxx')
-rw-r--r-- | sw/source/uibase/app/docstyle.cxx | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 7bc284a4824f..c374d4c79767 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -1980,8 +1980,10 @@ bool SwDocStyleSheet::FillStyleSheet( { nPoolId = m_pDesc->GetPoolFormatId(); nHelpId = m_pDesc->GetPoolHelpId(); - if( m_pDesc->GetPoolHlpFileId() != UCHAR_MAX ) - aHelpFile = *m_rDoc.GetDocPattern( m_pDesc->GetPoolHlpFileId() ); + if (const OUString* pattern = m_pDesc->GetPoolHlpFileId() != UCHAR_MAX + ? m_rDoc.GetDocPattern(m_pDesc->GetPoolHlpFileId()) + : nullptr) + aHelpFile = *pattern; else aHelpFile.clear(); } @@ -2009,8 +2011,10 @@ bool SwDocStyleSheet::FillStyleSheet( { nPoolId = m_pNumRule->GetPoolFormatId(); nHelpId = m_pNumRule->GetPoolHelpId(); - if( m_pNumRule->GetPoolHlpFileId() != UCHAR_MAX ) - aHelpFile = *m_rDoc.GetDocPattern( m_pNumRule->GetPoolHlpFileId() ); + if (const OUString* pattern = m_pNumRule->GetPoolHlpFileId() != UCHAR_MAX + ? m_rDoc.GetDocPattern(m_pNumRule->GetPoolHlpFileId()) + : nullptr) + aHelpFile = *pattern; else aHelpFile.clear(); } @@ -2065,8 +2069,10 @@ bool SwDocStyleSheet::FillStyleSheet( OSL_ENSURE( m_bPhysical, "Format not found" ); nHelpId = pFormat->GetPoolHelpId(); - if( pFormat->GetPoolHlpFileId() != UCHAR_MAX ) - aHelpFile = *m_rDoc.GetDocPattern( pFormat->GetPoolHlpFileId() ); + if (const OUString* pattern = pFormat->GetPoolHlpFileId() != UCHAR_MAX + ? m_rDoc.GetDocPattern(pFormat->GetPoolHlpFileId()) + : nullptr) + aHelpFile = *pattern; else aHelpFile.clear(); |