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

New commits:
commit 62b950dc7705bd7979bb3793e81845ae99b8964d
Author: David Tardon <dtar...@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 <dtar...@redhat.com>
    Signed-off-by: Michael Meeks <michael.me...@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 );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to