summaryrefslogtreecommitdiffstats
path: root/writerfilter/source
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2017-02-24 07:16:00 +0300
committerJustin Luth <justin_luth@sil.org>2017-02-24 05:29:16 +0000
commit1dadd312e5cb3c95f1e3cd5a1776830b7056bc6b (patch)
tree20e80ccd2615a073836302008d1762caf867c8cd /writerfilter/source
parentClosing popup menu should close the parent toolbox (diff)
downloadcore-1dadd312e5cb3c95f1e3cd5a1776830b7056bc6b.tar.gz
core-1dadd312e5cb3c95f1e3cd5a1776830b7056bc6b.zip
tdf#105490: writerfilter exception - ULSpace must be >= 0
Instead of a minimal margin, default margins were being applied because an exception was thrown when trying to set a negative value to top and bottom margins in SvxULSpaceItem::PutValue Change-Id: I0a9fc2c7cb996efbd26abfdbed27ea0bcb86d9a5 Reviewed-on: https://gerrit.libreoffice.org/34598 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 7cba5a1a3a8a..354be3488b04 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1005,8 +1005,8 @@ void SectionPropertyMap::PrepareHeaderFooterProperties( bool bFirstPage )
}
//now set the top/bottom margin for the follow page style
- Insert(PROP_TOP_MARGIN, uno::makeAny( nTopMargin ));
- Insert(PROP_BOTTOM_MARGIN, uno::makeAny( nBottomMargin ));
+ Insert(PROP_TOP_MARGIN, uno::makeAny( nTopMargin > 0 ? nTopMargin : 0 ));
+ Insert(PROP_BOTTOM_MARGIN, uno::makeAny( nBottomMargin > 0 ? nBottomMargin : 0 ));
}
uno::Reference<beans::XPropertySet> lcl_GetRangeProperties(bool bIsFirstSection,