diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-09-30 21:24:14 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-10-01 12:38:05 +0200 |
commit | 03edb42acfceb93016decfd3adb1c9350796eac8 (patch) | |
tree | fc125f3d34aaf9961fc6e1dc628bba2dbc7c045a | |
parent | 8da3586cff9cc11cf5db985d19851f21f0d42eb8 (diff) |
sw: simplify DocxAttributeOutput::CharBorder()
pInherited is already nullptr at that point, so need to only change it
when pPoolItem is not nullptr.
Addresses
<https://gerrit.libreoffice.org/c/core/+/122790/2#message-054924f056e40364c82cc92987cb7ca7d981c564>.
Change-Id: I456d4efba5b1d621c1b31bb2a2ec834c04cc62ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122901
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 43fa8e773b73..9c374c31ef17 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -8071,8 +8071,10 @@ void DocxAttributeOutput::CharBorder( pInherited = GetExport().m_pCurrentStyle->DerivedFrom()->GetAttrSet().GetItem<SvxBoxItem>(RES_CHRATR_BOX); else if ( m_rExport.m_pChpIter ) // incredibly undocumented, but this is the character-style info, right? { - const SfxPoolItem* pPoolItem = GetExport().m_pChpIter->HasTextItem(RES_CHRATR_BOX); - pInherited = pPoolItem ? &pPoolItem->StaticWhichCast(RES_CHRATR_BOX) : nullptr; + if (const SfxPoolItem* pPoolItem = GetExport().m_pChpIter->HasTextItem(RES_CHRATR_BOX)) + { + pInherited = &pPoolItem->StaticWhichCast(RES_CHRATR_BOX); + } } if ( pInherited ) |