[Libreoffice-commits] core.git: filter/source

Jianyuan Li lijiany at apache.org
Wed Jun 5 03:05:30 PDT 2013


 filter/source/msfilter/svdfppt.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit a05c0cfa40001aa1f4247a4e9f1fcefad7e7cf88
Author: Jianyuan Li <lijiany at apache.org>
Date:   Mon Sep 10 07:21:39 2012 +0000

    Resolves: #i119521# Layout is corrupted on opening PPT
    
    Reported by: Du Jing
    Patch by: Jianyuan Li
    Review by: sunying
    
    (cherry picked from commit 1231c27a8f1db5df57071d30e2105e25baf77730)
    
    Change-Id: Iaa02a98e0fe06a242d56a120ab5acb149ebb6045

diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 91891c9..5e28dfa 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -6234,6 +6234,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 = std::min(nTextOfs2, nTab);
             for ( i = 0; i < GetTabCount(); i++ )
             {
                 SvxTabAdjust eTabAdjust;
@@ -6245,8 +6247,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;
         }


More information about the Libreoffice-commits mailing list