sw/source/core/text/pormulti.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
New commits: commit 7d63176bcfbc80fc4045a0f0580c5bf9ccea7a89 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Oct 27 20:07:51 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Thu Oct 27 21:03:05 2022 +0200 tdf#151736 writer direct formatting crash regression from commit 9a44807ff3a11afa8f7ce9857ae6a6144a61d481 Author: Noel Grandin <noel.gran...@collabora.co.uk> Date: Wed Mar 2 17:58:31 2022 +0200 use SfxItemSet::GetItemIfSet in sw/source/core/txt Change-Id: I9db016d608300c603d0b1386962b188dddc85125 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141943 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx index 8ca4b9c625ef..0f00db0d8c26 100644 --- a/sw/source/core/text/pormulti.cxx +++ b/sw/source/core/text/pormulti.cxx @@ -1040,17 +1040,26 @@ std::optional<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex &rP if (startPos.first->GetIndex() == pNode->GetIndex()) { iterAtStartOfNode.Assign(iter); - pNodeRotateItem = pNode->GetSwAttrSet().GetItemIfSet(RES_CHRATR_ROTATE); - if (pNodeRotateItem && pNodeRotateItem->GetValue()) + if (SfxItemState::SET == pNode->GetSwAttrSet().GetItemState( + RES_CHRATR_ROTATE, true, &pNodeRotateItem) && + pNodeRotateItem->GetValue()) { pActiveRotateItem = pNodeRotateItem; } - pNodeTwoLinesItem = startPos.first->GetSwAttrSet().GetItemIfSet( - RES_CHRATR_TWO_LINES); - if (pNodeTwoLinesItem && pNodeTwoLinesItem->GetValue()) + else + { + pNodeRotateItem = nullptr; + } + if (SfxItemState::SET == startPos.first->GetSwAttrSet().GetItemState( + RES_CHRATR_TWO_LINES, true, &pNodeTwoLinesItem) && + pNodeTwoLinesItem->GetValue()) { pActiveTwoLinesItem = pNodeTwoLinesItem; } + else + { + pNodeTwoLinesItem = nullptr; + } } } }