Kaydet (Commit) bcf42665 authored tarafından Michael Stahl's avatar Michael Stahl

sw: simplify and remove special case in SwHTMLParser::AddParSpace()

Change-Id: Ia64935bcc957cc5730f8cd67ec374c548a46b531
üst 104ed86c
...@@ -2415,29 +2415,20 @@ void SwHTMLParser::AddParSpace() ...@@ -2415,29 +2415,20 @@ void SwHTMLParser::AddParSpace()
} }
else else
{ {
if (!pTxtNode->HasHints())
{
pTxtNode->SetAttr(
SvxULSpaceItem( rULSpace.GetUpper(), HTML_PARSPACE, RES_UL_SPACE ) );
return;
}
//What I do here, is that I examine the attributes, and if //What I do here, is that I examine the attributes, and if
//I find out, that it's CJK/CTL, then I set the paragraph space //I find out, that it's CJK/CTL, then I set the paragraph space
//to the value set in HTML_CJK_PARSPACE/HTML_CTL_PARSPACE. //to the value set in HTML_CJK_PARSPACE/HTML_CTL_PARSPACE.
bool bIsCJK = false; bool bIsCJK = false;
bool bIsCTL = false; bool bIsCTL = false;
SwpHints& rHints = pTxtNode->GetSwpHints();
sal_uInt16 nWhich;
SwTxtAttr *pHt;
const size_t nCntAttr = (pTxtNode && pTxtNode->GetpSwpHints()) const size_t nCntAttr = (pTxtNode && pTxtNode->GetpSwpHints())
? pTxtNode->GetSwpHints().Count() : 0; ? pTxtNode->GetSwpHints().Count() : 0;
for(size_t i = 0; i < nCntAttr; ++i) for(size_t i = 0; i < nCntAttr; ++i)
{ {
pHt = rHints.GetTextHint(i); SwTxtAttr *const pHt = pTxtNode->GetSwpHints().GetTextHint(i);
nWhich = pHt->Which(); sal_uInt16 const nWhich = pHt->Which();
if (RES_CHRATR_CJK_FONT == nWhich || if (RES_CHRATR_CJK_FONT == nWhich ||
RES_CHRATR_CJK_FONTSIZE == nWhich || RES_CHRATR_CJK_FONTSIZE == nWhich ||
RES_CHRATR_CJK_LANGUAGE == nWhich || RES_CHRATR_CJK_LANGUAGE == nWhich ||
......
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