Kaydet (Commit) a474559f authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst c7377102
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment