[Libreoffice-commits] .: Branch 'libreoffice-3-6' - sd/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Dec 19 01:25:07 PST 2012


 sd/source/filter/eppt/epptso.cxx |   11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 62b950dc7705bd7979bb3793e81845ae99b8964d
Author: David Tardon <dtardon at redhat.com>
Date:   Mon Dec 17 09:59:42 2012 +0100

    fdo#49277 use correct default tab size
    
    Change-Id: If8e1936b897bfe0f3ae0d791c573267df3381954
    Signed-off-by: David Tardon <dtardon at redhat.com>
    Signed-off-by: Michael Meeks <michael.meeks at suse.com>

diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 70cf9a4..86d8fd5 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1316,7 +1316,16 @@ void PPTWriter::ImplWriteTextStyleAtom( SvStream& rOut, int nTextInstance, sal_u
             }
             nParaFlags >>= 16;
 
-            sal_uInt32  nDefaultTabSize = MapSize( ::com::sun::star::awt::Size( 2011, 1 ) ).Width;
+            sal_Int32 nDefaultTabSizeSrc = 2011; // I've no idea where this number came from, honestly
+            const uno::Reference< beans::XPropertySet > xPropSet( mXModel, uno::UNO_QUERY );
+            if ( xPropSet.is() )
+            {
+                ImplGetPropertyValue( xPropSet, rtl::OUString( "TabStop" ) );
+                sal_Int32 nTabStop( 0 );
+                if ( mAny >>= nTabStop )
+                    nDefaultTabSizeSrc = nTabStop;
+            }
+            const sal_uInt32 nDefaultTabSize = MapSize( awt::Size( nDefaultTabSizeSrc, 1 ) ).Width;
             sal_uInt32  nDefaultTabs = abs( maRect.GetWidth() ) / nDefaultTabSize;
             if ( nTabs )
                 nDefaultTabs -= (sal_Int32)( ( ( pTabStop[ nTabs - 1 ].Position / 4.40972 ) + nTextOfs ) / nDefaultTabSize );


More information about the Libreoffice-commits mailing list