summaryrefslogtreecommitdiffstats
path: root/sd
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:10:04 +0100
commitcd69be65786cb49d0748433360b05db8c4f6d890 (patch)
tree450e3f48922cdb124ea37751f82b5f6a84b655a1 /sd
parent/p:VisualStudioVersion=11.0 here, too (diff)
downloadcore-cd69be65786cb49d0748433360b05db8c4f6d890.tar.gz
core-cd69be65786cb49d0748433360b05db8c4f6d890.zip
fdo#49277 use correct default tab size
Change-Id: If8e1936b897bfe0f3ae0d791c573267df3381954
Diffstat (limited to 'sd')
-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 );