summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-12-17 09:59:42 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-12-19 09:25:44 +0000
commit62b950dc7705bd7979bb3793e81845ae99b8964d (patch)
treec819b00fbd344a698c7cd5371fa4923236673a52
parent664baba931bafd4e36fb822291b1d42c4554b88b (diff)
fdo#49277 use correct default tab size
Change-Id: If8e1936b897bfe0f3ae0d791c573267df3381954 Signed-off-by: David Tardon <dtardon@redhat.com> Signed-off-by: Michael Meeks <michael.meeks@suse.com>
-rw-r--r--sd/source/filter/eppt/epptso.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 70cf9a420e2b..86d8fd565af1 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 );