diff options
author | Lei De Bin <leidb@apache.org> | 2012-08-29 04:44:52 +0000 |
---|---|---|
committer | Lei De Bin <leidb@apache.org> | 2012-08-29 04:44:52 +0000 |
commit | 3e857b06aa55660fdd49f04c560a0d2541b0199e (patch) | |
tree | 49d846af6b889e1286b23d177a8d2bcab2bfc3b6 /sw | |
parent | 720fc77527377968a45631d1c6a711b4cae02d39 (diff) |
#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
Notes
Notes:
merged as: b858429f2495fceb820de20815318cff8882ed78
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index af3e8edb14c2..558b54369d04 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3995,6 +3995,18 @@ void SwWW8ImplReader::Read_NoLineNumb(sal_uInt16 , const sal_uInt8* pData, short 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 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 } 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) { pCollA[nAktColl].bListReleventIndentSet = true; |