Kaydet (Commit) a05c0cfa authored tarafından Jianyuan Li's avatar Jianyuan Li Kaydeden (comit) Caolán McNamara

Resolves: #i119521# Layout is corrupted on opening PPT

Reported by: Du Jing
Patch by: Jianyuan Li
Review by: sunying

(cherry picked from commit 1231c27a)

Change-Id: Iaa02a98e0fe06a242d56a120ab5acb149ebb6045
üst 4450d6bb
...@@ -6234,6 +6234,8 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& ...@@ -6234,6 +6234,8 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
SvxTabStopItem aTabItem( 0, 0, SVX_TAB_ADJUST_DEFAULT, EE_PARA_TABS ); SvxTabStopItem aTabItem( 0, 0, SVX_TAB_ADJUST_DEFAULT, EE_PARA_TABS );
if ( GetTabCount() ) if ( GetTabCount() )
{ {
//paragraph offset = MIN(first_line_offset, hanging_offset)
sal_uInt32 nParaOffset = std::min(nTextOfs2, nTab);
for ( i = 0; i < GetTabCount(); i++ ) for ( i = 0; i < GetTabCount(); i++ )
{ {
SvxTabAdjust eTabAdjust; SvxTabAdjust eTabAdjust;
...@@ -6245,8 +6247,8 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >& ...@@ -6245,8 +6247,8 @@ void PPTParagraphObj::ApplyTo( SfxItemSet& rSet, boost::optional< sal_Int16 >&
case 3 : eTabAdjust = SVX_TAB_ADJUST_DECIMAL; break; case 3 : eTabAdjust = SVX_TAB_ADJUST_DECIMAL; break;
default : eTabAdjust = SVX_TAB_ADJUST_LEFT; default : eTabAdjust = SVX_TAB_ADJUST_LEFT;
} }
if ( nTab > nTextOfs2 ) if ( nTab > nParaOffset )//If tab stop greater than paragraph offset
aTabItem.Insert( SvxTabStop( (sal_uInt16)( ( ( nTab - nTextOfs2 ) * 2540 ) / 576 ), eTabAdjust ) ); aTabItem.Insert( SvxTabStop( ( ( (long( nTab - nTextOfs2 )) * 2540 ) / 576 ), eTabAdjust ) );
} }
nLatestManTab = nTab; nLatestManTab = nTab;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment