summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/txtnode/txatritr.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/sw/source/core/txtnode/txatritr.cxx b/sw/source/core/txtnode/txatritr.cxx
index 883c09760c33..91aed778c157 100644
--- a/sw/source/core/txtnode/txatritr.cxx
+++ b/sw/source/core/txtnode/txatritr.cxx
@@ -126,13 +126,8 @@ bool SwLanguageIterator::Next()
m_nChgPos = nEndPos;
m_nAttrPos = nSavePos;
- if( RES_TXTATR_CHARFMT == pHt->Which() )
- {
- const sal_uInt16 nWId = GetWhichOfScript( RES_CHRATR_LANGUAGE, m_aScriptIter.GetCurrScript() );
- m_pCurrentItem = &pHt->GetCharFormat().GetCharFormat()->GetFormatAttr(nWId);
- }
- else
- m_pCurrentItem = &pHt->GetAttr();
+ const sal_uInt16 nWId = GetWhichOfScript( RES_CHRATR_LANGUAGE, m_aScriptIter.GetCurrScript() );
+ m_pCurrentItem = CharFormat::GetItem(*pHt, nWId);
m_aStack.pop_front();
}