summaryrefslogtreecommitdiffstats
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-08-30 09:11:17 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-08-30 09:12:11 +0200
commita474559ff1e560b83952f00595dbd8ae7fde88b6 (patch)
tree7de16c2ddaba62f9a5c0bc37b9593241f98cad32 /writerfilter
parentAdd note about terminology (diff)
downloadcore-a474559ff1e560b83952f00595dbd8ae7fde88b6.tar.gz
core-a474559ff1e560b83952f00595dbd8ae7fde88b6.zip
n#777337 fix DOCX import of title page top/bottom margin with headers/footers
SectionPropertyMap::PrepareHeaderFooterProperties() already backed up m_nTopMargin to have the same result when that method is called multiple times. Do the same for the header footer height values as well to match the WW8 behaviour. Change-Id: Ib2347abc3db39308900c7721c0e15de040d9a01f
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 70bb53b65f18..aceba89b7684 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -712,6 +712,7 @@ void SectionPropertyMap::CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Imp
void SectionPropertyMap::PrepareHeaderFooterProperties( bool bFirstPage )
{
sal_Int32 nTopMargin = m_nTopMargin;
+ sal_Int32 nHeaderTop = m_nHeaderTop;
if(HasHeader(bFirstPage))
{
m_nTopMargin = m_nHeaderTop;
@@ -745,6 +746,7 @@ void SectionPropertyMap::PrepareHeaderFooterProperties( bool bFirstPage )
}
sal_Int32 nBottomMargin = m_nBottomMargin;
+ sal_Int32 nHeaderBottom = m_nHeaderBottom;
if( HasFooter( bFirstPage ) )
{
m_nBottomMargin = m_nHeaderBottom;
@@ -779,6 +781,8 @@ void SectionPropertyMap::PrepareHeaderFooterProperties( bool bFirstPage )
// Restore original top margin, so we don't end up with a smaller margin in case we have to produce two page styles from one Word section.
m_nTopMargin = nTopMargin;
+ m_nHeaderTop = nHeaderTop;
+ m_nHeaderBottom = nHeaderBottom;
}
uno::Reference<beans::XPropertySet> lcl_GetRangeProperties(bool bIsFirstSection, DomainMapper_Impl& rDM_Impl, uno::Reference<text::XTextRange> xStartingRange)