summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJianyuan Li <lijiany@apache.org>2012-09-10 07:21:39 +0000
committerJianyuan Li <lijiany@apache.org>2012-09-10 07:21:39 +0000
commit1231c27a8f1db5df57071d30e2105e25baf77730 (patch)
tree316714939f895e6a09d3b0cab43764f55287ea34
parenteb86e4a8ebcc8e105bd4950ed94c2e529320de4c (diff)
#119521# Layout is corrupted in PPT when open in AOO3.4
Reported by: Du Jing Patch by: Jianyuan Li Review by: sunying
Notes
-rw-r--r--filter/source/msfilter/svdfppt.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 6ae2bf383dab..434a44e9c20b 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -6562,6 +6562,8 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
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( SfxItemSet& rSet, boost::optional< sal_Int16 >&
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;
}