summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorLei De Bin <leidb@apache.org>2012-08-29 04:44:52 +0000
committerXisco Fauli <anistenis@gmail.com>2013-05-16 01:44:44 +0200
commitb858429f2495fceb820de20815318cff8882ed78 (patch)
treea705288fd5912ea585fbc793cb4922b0228c536c /sw/source/filter
parent78123a504b5215d061935d7b2771ba51e68cae0e (diff)
Related:#119576# fix indent and spacing between bullets and text
they are inconsistent with MS word Reported by: Yan Ji Patch by: Lei De Bin Review by: Chen Zuo Jun Conflicts: sw/source/filter/ww8/ww8par6.cxx Change-Id: I48a6761a8e8fb1c052aa4f2a261aefb850d6c112
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 78733af81e0c..d8523588a4ec 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -3822,6 +3822,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 )
{
@@ -3931,6 +3943,26 @@ 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 && nAktColl < vColl.size())
{
vColl[nAktColl].bListReleventIndentSet = true;