You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by su...@apache.org on 2012/08/16 07:20:45 UTC
svn commit: r1373731 - in /incubator/ooo/trunk/main:
filter/source/msfilter/svdfppt.cxx sd/source/filter/eppt/epptso.cxx
Author: sunying
Date: Thu Aug 16 05:20:44 2012
New Revision: 1373731
URL: http://svn.apache.org/viewvc?rev=1373731&view=rev
Log:
#119523# fix the indent and left margin attribute lost when save .ppt file and open .ppt file
Reported by: liupingtan
Patch by: Ying Sun
Review by: Jian Yuan Li
Modified:
incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
incubator/ooo/trunk/main/sd/source/filter/eppt/epptso.cxx
Modified: incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx?rev=1373731&r1=1373730&r2=1373731&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx Thu Aug 16 05:20:44 2012
@@ -5165,9 +5165,15 @@ void PPTStyleTextPropReader::ReadParaPro
if ( nMask & 0x4000 ) // pfSpaceAfter
rIn >> aSet.mpArry[ PPT_ParaAttr_LowerDist ];
if ( nMask & 0x100 ) // pfLeftMargin
- rIn >> nDummy16;
+ {
+ rIn >> aSet.mpArry[ PPT_ParaAttr_TextOfs ];
+ aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs;
+ }
if ( nMask & 0x400 ) // pfIndent
- rIn >> nDummy16;
+ {
+ rIn >> aSet.mpArry[ PPT_ParaAttr_BulletOfs ];
+ aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs;
+ }
if ( nMask & 0x8000 ) // pfDefaultTabSize
rIn >> nDummy16;
if ( nMask & 0x100000 ) // pfTabStops
@@ -5199,9 +5205,10 @@ void PPTStyleTextPropReader::ReadParaPro
else
nCharCount = nStringLen;
- if ( rRuler.GetTextOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_TextOfs ] ) )
+ //if the textofs attr has been read at above, need not to reset.
+ if ( ( !( aSet.mnAttrSet & 1 << PPT_ParaAttr_TextOfs ) ) && rRuler.GetTextOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_TextOfs ] ) )
aSet.mnAttrSet |= 1 << PPT_ParaAttr_TextOfs;
- if ( rRuler.GetBulletOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) )
+ if ( ( !( aSet.mnAttrSet & 1 << PPT_ParaAttr_BulletOfs ) ) && rRuler.GetBulletOfs( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_BulletOfs ] ) )
aSet.mnAttrSet |= 1 << PPT_ParaAttr_BulletOfs;
if ( rRuler.GetDefaultTab( aParaPropSet.pParaSet->mnDepth, aSet.mpArry[ PPT_ParaAttr_DefaultTab ] ) )
aSet.mnAttrSet |= 1 << PPT_ParaAttr_DefaultTab;
Modified: incubator/ooo/trunk/main/sd/source/filter/eppt/epptso.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sd/source/filter/eppt/epptso.cxx?rev=1373731&r1=1373730&r2=1373731&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sd/source/filter/eppt/epptso.cxx (original)
+++ incubator/ooo/trunk/main/sd/source/filter/eppt/epptso.cxx Thu Aug 16 05:20:44 2012
@@ -1406,6 +1406,13 @@ void PPTWriter::ImplWriteParagraphs( SvS
nPropertyFlags |= 1; // turn off bullet explicit
nBulletFlags = 0;
}
+
+ // Write nTextOfs and nBullets
+ if ( mpStyleSheet->IsHardAttribute( nInstance, nDepth, ParaAttr_TextOfs, pPara->nTextOfs ) )
+ nPropertyFlags |= 0x100;
+ if ( mpStyleSheet->IsHardAttribute( nInstance, nDepth, ParaAttr_BulletOfs, pPara->nBulletOfs ))
+ nPropertyFlags |= 0x400;
+
FontCollectionEntry aFontDescEntry( pPara->aFontDesc.Name, pPara->aFontDesc.Family, pPara->aFontDesc.Pitch, pPara->aFontDesc.CharSet );
sal_uInt16 nFontId = (sal_uInt16)maFontCollection.GetId( aFontDescEntry );
@@ -1444,6 +1451,10 @@ void PPTWriter::ImplWriteParagraphs( SvS
rOut << (sal_uInt16)( pPara->mnLineSpacingTop );
if ( nPropertyFlags & 0x00004000 )
rOut << (sal_uInt16)( pPara->mnLineSpacingBottom );
+ if ( nPropertyFlags & 0x100 )
+ rOut << (sal_uInt16)(pPara->nTextOfs);
+ if ( nPropertyFlags & 0x400 )
+ rOut << (sal_uInt16)(pPara->nBulletOfs);
if ( nPropertyFlags & 0x000e0000 )
{
sal_uInt16 nAsianSettings = 0;