diff options
-rw-r--r-- | sw/source/core/text/pormulti.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
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; + } } } } |