Kaydet (Commit) 3e857b06 authored tarafından Lei De Bin's avatar Lei De Bin

#119576# fix indent and spacing between bullets and text are inconsistent with MS word

Reported by: Yan Ji
Patch by: Lei De Bin
Review by: Chen Zuo Jun 
üst 720fc775
...@@ -3995,6 +3995,18 @@ void SwWW8ImplReader::Read_NoLineNumb(sal_uInt16 , const sal_uInt8* pData, short ...@@ -3995,6 +3995,18 @@ void SwWW8ImplReader::Read_NoLineNumb(sal_uInt16 , const sal_uInt8* pData, short
NewAttr( aLN ); NewAttr( aLN );
} }
bool lcl_HasExplicitLeft(const WW8PLCFMan *pPlcxMan, bool bVer67)
{
WW8PLCFx_Cp_FKP *pPap = pPlcxMan ? pPlcxMan->GetPapPLCF() : 0;
if (pPap)
{
if (bVer67)
return pPap->HasSprm(17);
else
return (pPap->HasSprm(0x840F) || pPap->HasSprm(0x845E));
}
return false;
}
// Sprm 16, 17 // Sprm 16, 17
void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLen ) void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{ {
...@@ -4088,6 +4100,28 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe ...@@ -4088,6 +4100,28 @@ void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLe
} }
aLR.SetTxtFirstLineOfst(nPara); aLR.SetTxtFirstLineOfst(nPara);
if (!pAktColl)
{
if (const SwTxtNode* pNode = pPaM->GetNode()->GetTxtNode())
{
if ( const SwNumFmt *pNumFmt = GetNumFmtFromTxtNode(*pNode) )
{
if (!lcl_HasExplicitLeft(pPlcxMan, bVer67))
{
int tmp = pNumFmt->GetIndentAt();
aLR.SetTxtLeft(pNumFmt->GetIndentAt());
// If have not explicit left, set number format list tab position is doc default tab
const SvxTabStopItem *pDefaultStopItem = (const SvxTabStopItem *)rDoc.GetAttrPool().GetPoolDefaultItem(RES_PARATR_TABSTOP);
if ( pDefaultStopItem && pDefaultStopItem->Count() > 0 )
((SwNumFmt*)(pNumFmt))->SetListtabPos( ((SvxTabStop&)(*pDefaultStopItem)[0]).GetTabPos() );
}
}
}
}
if (pAktColl) if (pAktColl)
{ {
pCollA[nAktColl].bListReleventIndentSet = true; pCollA[nAktColl].bListReleventIndentSet = true;
......
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