You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by li...@apache.org on 2012/09/10 10:21:39 UTC
svn commit: r1382688 -
/incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx
Author: lijiany
Date: Mon Sep 10 08:21:39 2012
New Revision: 1382688
URL: http://svn.apache.org/viewvc?rev=1382688&view=rev
Log:
#119521# Layout is corrupted in PPT when open in AOO3.4
Reported by: Du Jing
Patch by: Jianyuan Li
Review by: sunying
Modified:
incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.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=1382688&r1=1382687&r2=1382688&view=diff
==============================================================================
--- incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx (original)
+++ incubator/ooo/trunk/main/filter/source/msfilter/svdfppt.cxx Mon Sep 10 08:21:39 2012
@@ -6562,6 +6562,8 @@ void PPTParagraphObj::ApplyTo( SfxItemSe
SvxTabStopItem aTabItem( 0, 0, SVX_TAB_ADJUST_DEFAULT, EE_PARA_TABS );
if ( GetTabCount() )
{
+ //paragraph offset = MIN(first_line_offset, hanging_offset)
+ sal_uInt32 nParaOffset = Min( nTextOfs2, nTab );
for ( i = 0; i < GetTabCount(); i++ )
{
SvxTabAdjust eTabAdjust;
@@ -6573,8 +6575,8 @@ void PPTParagraphObj::ApplyTo( SfxItemSe
case 3 : eTabAdjust = SVX_TAB_ADJUST_DECIMAL; break;
default : eTabAdjust = SVX_TAB_ADJUST_LEFT;
}
- if ( nTab > nTextOfs2 )
- aTabItem.Insert( SvxTabStop( (sal_uInt16)( ( ( nTab - nTextOfs2 ) * 2540 ) / 576 ), eTabAdjust ) );
+ if ( nTab > nParaOffset )//If tab stop greater than paragraph offset
+ aTabItem.Insert( SvxTabStop( ( ( (long( nTab - nTextOfs2 )) * 2540 ) / 576 ), eTabAdjust ) );
}
nLatestManTab = nTab;
}