Author: leidb
Date: Wed Aug 29 05:44:52 2012
New Revision: 1378446

URL: http://svn.apache.org/viewvc?rev=1378446&view=rev
Log:
#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 

Modified:
    incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par6.cxx

Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par6.cxx
URL: 
http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par6.cxx?rev=1378446&r1=1378445&r2=1378446&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par6.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/ww8par6.cxx Wed Aug 29 
05:44:52 2012
@@ -3995,6 +3995,18 @@ void SwWW8ImplReader::Read_NoLineNumb(sa
     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_uInt1
             }
 
             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;


Reply via email to