summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-12-17 09:59:42 +0100
committerDavid Tardon <dtardon@redhat.com>2012-12-18 16:12:16 +0100
commit6488c424654cd5d6872f40c15dcdd72071843efd (patch)
treeca20f5d8bf9e846ad3578e85ef6e5d16d41a3b26
parentc237369bc2f4a1931e241c8f6efd7c2854ee657b (diff)
fdo#49277 use correct default tab size
Change-Id: If8e1936b897bfe0f3ae0d791c573267df3381954 Signed-off-by: David Tardon <dtardon@redhat.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 b216a88628de..201f1f16249f 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -1310,7 +1310,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 );