summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx16
-rw-r--r--writerfilter/source/dmapper/PropertyMap.hxx2
2 files changed, 12 insertions, 6 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 5b7ad99166ea..f5de4506242c 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1018,7 +1018,7 @@ uno::Reference<beans::XPropertySet> lcl_GetRangeProperties(bool bIsFirstSection,
return xRangeProperties;
}
-void SectionPropertyMap::HandleMarginsHeaderFooter(DomainMapper_Impl& rDM_Impl)
+void SectionPropertyMap::HandleMarginsHeaderFooter(bool bFirstPage, DomainMapper_Impl& rDM_Impl)
{
if( m_nDzaGutter > 0 )
{
@@ -1040,8 +1040,8 @@ void SectionPropertyMap::HandleMarginsHeaderFooter(DomainMapper_Impl& rDM_Impl)
/*** if headers/footers are available then the top/bottom margins of the
header/footer are copied to the top/bottom margin of the page
*/
- CopyLastHeaderFooter( false, rDM_Impl );
- PrepareHeaderFooterProperties( false );
+ CopyLastHeaderFooter( bFirstPage, rDM_Impl );
+ PrepareHeaderFooterProperties( bFirstPage );
}
bool SectionPropertyMap::FloatingTableConversion(FloatingTableInfo& rInfo)
@@ -1164,9 +1164,15 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
xRangeProperties->setPropertyValue(getPropertyName(PROP_PAGE_DESC_NAME), uno::makeAny(aName));
uno::Reference<beans::XPropertySet> xPageStyle (rDM_Impl.GetPageStyles()->getByName(aName), uno::UNO_QUERY_THROW);
- HandleMarginsHeaderFooter(rDM_Impl);
+ HandleMarginsHeaderFooter(false, rDM_Impl);
+ if( m_bTitlePage )
+ HandleMarginsHeaderFooter(true, rDM_Impl);
if (rDM_Impl.IsNewDoc())
+ {
ApplyProperties_(xPageStyle);
+ if( m_bTitlePage && m_aFollowPageStyle.is() )
+ ApplyProperties_(m_aFollowPageStyle);
+ }
}
catch( const uno::Exception& )
{
@@ -1197,7 +1203,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
//get the properties and create appropriate page styles
uno::Reference< beans::XPropertySet > xFollowPageStyle = GetPageStyle( rDM_Impl.GetPageStyles(), rDM_Impl.GetTextFactory(), false );
- HandleMarginsHeaderFooter(rDM_Impl);
+ HandleMarginsHeaderFooter(/*bFirstPage=*/false, rDM_Impl);
const OUString sTrayIndex = getPropertyName( PROP_PRINTER_PAPER_TRAY_INDEX );
if( m_nPaperBin >= 0 )
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index 75508008d5e8..88aee8a3c1cb 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -338,7 +338,7 @@ public:
void CloseSectionGroup( DomainMapper_Impl& rDM_Impl );
/// Handling of margins, header and footer for any kind of sections breaks.
- void HandleMarginsHeaderFooter(DomainMapper_Impl& rDM_Impl);
+ void HandleMarginsHeaderFooter(bool bFirstPage, DomainMapper_Impl& rDM_Impl);
void ClearHeaderFooterLinkToPrevious( bool bHeader, PageType eType );
};