Kaydet (Commit) c7fcf48e authored tarafından Michael Stahl's avatar Michael Stahl Kaydeden (comit) Thorsten Behrens

sw_redlinehide_4a: fix SwDoubleLinePortion/SwMultiCreator/SwBracket

Missing TextFrameIndex conversion.

Change-Id: Ie7b58b74aa6bb1e2ff8199031a9f59f5c3ba68c0
(cherry picked from commit fd04c73a)
üst fee1f9de
...@@ -285,7 +285,7 @@ SwDoubleLinePortion::SwDoubleLinePortion( ...@@ -285,7 +285,7 @@ SwDoubleLinePortion::SwDoubleLinePortion(
else else
{ {
const SwTextAttr& rAttr = *rCreate.pAttr; const SwTextAttr& rAttr = *rCreate.pAttr;
pBracket->nStart = rAttr.GetStart(); pBracket->nStart = rCreate.nStartOfAttr;
const SfxPoolItem * const pItem = const SfxPoolItem * const pItem =
CharFormat::GetItem( rAttr, RES_CHRATR_TWO_LINES ); CharFormat::GetItem( rAttr, RES_CHRATR_TWO_LINES );
...@@ -941,6 +941,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex & ...@@ -941,6 +941,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex &
std::unique_ptr<SwMultiCreator> pRet(new SwMultiCreator); std::unique_ptr<SwMultiCreator> pRet(new SwMultiCreator);
pRet->pItem = nullptr; pRet->pItem = nullptr;
pRet->pAttr = nullptr; pRet->pAttr = nullptr;
pRet->nStartOfAttr = TextFrameIndex(-1);
pRet->nId = SwMultiCreatorId::Bidi; pRet->nId = SwMultiCreatorId::Bidi;
pRet->nLevel = nCurrLevel + 1; pRet->nLevel = nCurrLevel + 1;
return pRet; return pRet;
...@@ -1046,6 +1047,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex & ...@@ -1046,6 +1047,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex &
std::unique_ptr<SwMultiCreator> pRet(new SwMultiCreator); std::unique_ptr<SwMultiCreator> pRet(new SwMultiCreator);
pRet->pItem = nullptr; pRet->pItem = nullptr;
pRet->pAttr = pRuby; pRet->pAttr = pRuby;
pRet->nStartOfAttr = m_pFrame->MapModelToView(startPos.first, pRet->pAttr->GetStart());
pRet->nId = SwMultiCreatorId::Ruby; pRet->nId = SwMultiCreatorId::Ruby;
pRet->nLevel = GetTextFrame()->IsRightToLeft() ? 1 : 0; pRet->nLevel = GetTextFrame()->IsRightToLeft() ? 1 : 0;
return pRet; return pRet;
...@@ -1069,6 +1071,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex & ...@@ -1069,6 +1071,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex &
{ {
pRet->pItem = nullptr; pRet->pItem = nullptr;
pRet->pAttr = pActiveTwoLinesHint; pRet->pAttr = pActiveTwoLinesHint;
pRet->nStartOfAttr = m_pFrame->MapModelToView(startPos.first, pRet->pAttr->GetStart());
if (pNodeTwoLinesItem) if (pNodeTwoLinesItem)
{ {
aEnd.push_front(m_pFrame->MapModelToView(startPos.first, startPos.first->Len())); aEnd.push_front(m_pFrame->MapModelToView(startPos.first, startPos.first->Len()));
...@@ -1086,6 +1089,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex & ...@@ -1086,6 +1089,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex &
{ {
pRet->pItem = pNodeTwoLinesItem; pRet->pItem = pNodeTwoLinesItem;
pRet->pAttr = nullptr; pRet->pAttr = nullptr;
pRet->nStartOfAttr = TextFrameIndex(-1);
aEnd.push_front(m_pFrame->MapModelToView(startPos.first, startPos.first->Len())); aEnd.push_front(m_pFrame->MapModelToView(startPos.first, startPos.first->Len()));
} }
pRet->nId = SwMultiCreatorId::Double; pRet->nId = SwMultiCreatorId::Double;
...@@ -1298,6 +1302,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex & ...@@ -1298,6 +1302,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex &
{ {
pRet->pItem = nullptr; pRet->pItem = nullptr;
pRet->pAttr = pActiveRotateHint; pRet->pAttr = pActiveRotateHint;
pRet->nStartOfAttr = m_pFrame->MapModelToView(startPos.first, pRet->pAttr->GetStart());
if (pNodeRotateItem) if (pNodeRotateItem)
{ {
aEnd.push_front(m_pFrame->MapModelToView(startPos.first, startPos.first->Len())); aEnd.push_front(m_pFrame->MapModelToView(startPos.first, startPos.first->Len()));
...@@ -1313,6 +1318,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex & ...@@ -1313,6 +1318,7 @@ std::unique_ptr<SwMultiCreator> SwTextSizeInfo::GetMultiCreator(TextFrameIndex &
{ {
pRet->pItem = pNodeRotateItem; pRet->pItem = pNodeRotateItem;
pRet->pAttr = nullptr; pRet->pAttr = nullptr;
pRet->nStartOfAttr = TextFrameIndex(-1);
aEnd.push_front(m_pFrame->MapModelToView(startPos.first, startPos.first->Len())); aEnd.push_front(m_pFrame->MapModelToView(startPos.first, startPos.first->Len()));
} }
for (sw::MergedAttrIterMulti iter = iterAtStartOfNode; ; ) for (sw::MergedAttrIterMulti iter = iterAtStartOfNode; ; )
......
...@@ -52,6 +52,7 @@ enum class RubyPosition : sal_uInt16 ...@@ -52,6 +52,7 @@ enum class RubyPosition : sal_uInt16
struct SwMultiCreator struct SwMultiCreator
{ {
TextFrameIndex nStartOfAttr;
const SwTextAttr* pAttr; const SwTextAttr* pAttr;
const SfxPoolItem* pItem; const SfxPoolItem* pItem;
SwMultiCreatorId nId; SwMultiCreatorId nId;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment