diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-04-02 16:56:54 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-04-02 21:00:21 +0100 |
commit | b89e0c5b56e50ff62d0e5defdf9fe92620cc877a (patch) | |
tree | bb3168c16fe347d82a0bdac9439fc8f9b8bc55f4 /sw | |
parent | 25db817c873bb7f2548d7f8d7fdc65194d306755 (diff) |
split out ContextualSpacing
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par.hxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 19 |
2 files changed, 15 insertions, 5 deletions
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index b86c5b678049..7b4ec8efd762 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -1588,6 +1588,7 @@ public: // eigentlich private, geht aber leider nur public void Read_UL( sal_uInt16 nId, const sal_uInt8*, short nLen ); void Read_ParaAutoBefore(sal_uInt16 , const sal_uInt8 *pData, short nLen); void Read_ParaAutoAfter(sal_uInt16 , const sal_uInt8 *pData, short nLen); + void Read_ParaContextualSpacing( sal_uInt16 nId, const sal_uInt8* pData, short nLen ); void Read_LineSpace( sal_uInt16, const sal_uInt8*, short nLen ); void Read_Justify(sal_uInt16, const sal_uInt8*, short nLen); void Read_IdctHint(sal_uInt16, const sal_uInt8*, short nLen); diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 65cea9d7d018..33baeb711629 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -4177,7 +4177,7 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_UL_SPACE ); return; } - short nPara = ((nId == 0x246D) ? SVBT16ToShort( pData ) : (0 != *pData)); + short nPara = SVBT16ToShort( pData ); if( nPara < 0 ) nPara = -nPara; @@ -4195,9 +4195,6 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe case 0xA414: aUL.SetLower( nPara ); break; - case 0x246D: - aUL.SetContextValue( nPara ); - break; default: return; }; @@ -4205,6 +4202,18 @@ void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLe NewAttr( aUL ); } +void SwWW8ImplReader::Read_ParaContextualSpacing( sal_uInt16, const sal_uInt8* pData, short nLen ) +{ + if( nLen < 0 ) + { + pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_UL_SPACE ); + return; + } + SvxULSpaceItem aUL( *(const SvxULSpaceItem*)GetFmtAttr( RES_UL_SPACE )); + aUL.SetContextValue(*pData); + NewAttr( aUL ); +} + void SwWW8ImplReader::Read_IdctHint( sal_uInt16, const sal_uInt8* pData, short nLen ) { if (nLen < 0) @@ -6076,7 +6085,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher() {0x303C, 0}, //undocumented {0x245B, &SwWW8ImplReader::Read_ParaAutoBefore},//undocumented, para {0x245C, &SwWW8ImplReader::Read_ParaAutoAfter},//undocumented, para - {0x246D, &SwWW8ImplReader::Read_UL} //"sprmPFContextualSpacing" + {0x246D, &SwWW8ImplReader::Read_ParaContextualSpacing} //"sprmPFContextualSpacing" }; static wwSprmDispatcher aSprmSrch(aSprms, SAL_N_ELEMENTS(aSprms)); |