summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/PropertyMap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/dmapper/PropertyMap.cxx')
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index fc0f2d5f30b5..fe5df467e739 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1134,6 +1134,16 @@ throw ( css::beans::UnknownPropertyException,
// otherwise apply this section's settings to the new style.
// Ensure that FollowPage is inherited first - otherwise GetPageStyle may auto-create a follow when checking FirstPage.
SectionPropertyMap* pLastContext = rDM_Impl.GetLastSectionContext();
+ if( pLastContext && m_sFirstPageStyleName.isEmpty() )
+ m_sFirstPageStyleName = pLastContext->GetPageStyleName( /*bFirst=*/true );
+ else
+ {
+ HandleMarginsHeaderFooter( /*bFirst=*/true, rDM_Impl );
+ GetPageStyle( xPageStyles, xTextFactory, /*bFirst=*/true );
+ if( rDM_Impl.IsNewDoc() && m_aFirstPageStyle.is() )
+ ApplyProperties_( m_aFirstPageStyle );
+ }
+
if( pLastContext && m_sFollowPageStyleName.isEmpty() )
m_sFollowPageStyleName = pLastContext->GetPageStyleName();
else