diff options
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 536a00c075e9..ac02e6284b08 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -675,18 +675,18 @@ void SectionPropertyMap::SetBorderDistance( uno::Reference< beans::XPropertySet PropertyIds eMarginId, PropertyIds eDistId, sal_Int32 nDistance, sal_Int32 nOffsetFrom, sal_uInt32 nLineWidth ) { sal_Int32 nDist = nDistance; - if( nOffsetFrom == 1 ) + if( nOffsetFrom == 1 ) // From page { const OUString sMarginName = getPropertyName( eMarginId ); uno::Any aMargin = xStyle->getPropertyValue( sMarginName ); sal_Int32 nMargin = 0; aMargin >>= nMargin; - // Change the margins with the ( border distance - line width ) - xStyle->setPropertyValue( sMarginName, uno::makeAny( nDistance - nLineWidth ) ); + // Change the margins with the border distance + xStyle->setPropertyValue( sMarginName, uno::makeAny( nDistance ) ); - // Set the distance to ( Margin - distance ) - nDist = nMargin - nDistance; + // Set the distance to ( Margin - distance - nLineWidth ) + nDist = nMargin - nDistance - nLineWidth; } const OUString sBorderDistanceName = getPropertyName( eDistId ); if (xStyle.is()) |