[Libreoffice-commits] core.git: sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 1 10:38:38 UTC 2021
sw/source/filter/ww8/docxattributeoutput.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 03edb42acfceb93016decfd3adb1c9350796eac8
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Sep 30 21:24:14 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Oct 1 12:38:05 2021 +0200
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 at collabora.com>
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 )
More information about the Libreoffice-commits
mailing list