summaryrefslogtreecommitdiffstats
path: root/writerfilter
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-08-15 12:39:05 -0400
committerJustin Luth <justin_luth@sil.org>2017-08-15 21:50:21 +0200
commit73e7619d903d5fc79ea339ab2c5b4c1ef3cf326e (patch)
tree4ef802462291822f96bc31e91ad4911d6ff5e7c4 /writerfilter
parentdeb#872001: stop shipping mimelnk desktop files (diff)
downloadcore-73e7619d903d5fc79ea339ab2c5b4c1ef3cf326e.tar.gz
core-73e7619d903d5fc79ea339ab2c5b4c1ef3cf326e.zip
tdf#109319 writerfilter: set DropCap.Distance
Change-Id: I3ec06e9a196897c095f227e9f765243c6c188898 Reviewed-on: https://gerrit.libreoffice.org/41185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 2c282ecc394a..589dbf1b6770 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1124,7 +1124,8 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap )
sal_Int32 nLines = rAppendContext.pLastParagraphProperties->GetLines();
aDrop.Lines = nLines > 0 && nLines < SAL_MAX_INT8 ? (sal_Int8)nLines : 2;
aDrop.Count = rAppendContext.pLastParagraphProperties->GetDropCapLength();
- aDrop.Distance = 0; //TODO: find distance value
+ sal_Int32 nHSpace = rAppendContext.pLastParagraphProperties->GethSpace();
+ aDrop.Distance = nHSpace > 0 && nHSpace < SAL_MAX_INT16 ? (sal_Int16)nHSpace : 0;
//completes (5)
if( pParaContext->IsFrameMode() )
pToBeSavedProperties.reset( new ParagraphProperties(*pParaContext) );