diff options
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 32 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 3 |
2 files changed, 16 insertions, 19 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 2cf7058cabe3..342bd750215e 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -3230,10 +3230,22 @@ void DocxAttributeOutput::SectionPageBorders( const SwFrmFmt* pFmt, const SwFrmF FSNS( XML_w, XML_offsetFrom ), bExportDistanceFromPageEdge ? "page" : "text", FSEND ); - m_pSerializer->mark(); + OutputBorderOptions aOutputBorderOptions = lcl_getBoxBorderOptions(); + + // Check if the distance is larger than 31 points + aOutputBorderOptions.bCheckDistanceSize = true; + + // Check if there is a shadow item + const SfxPoolItem* pItem = GetExport().HasItem( RES_SHADOW ); + if ( pItem ) + { + const SvxShadowItem* pShadowItem = (const SvxShadowItem*)pItem; + aOutputBorderOptions.aShadowLocation = pShadowItem->GetLocation(); + } + + impl_borders( m_pSerializer, rBox, aOutputBorderOptions, &m_pageMargins ); m_pSerializer->endElementNS( XML_w, XML_pgBorders ); - m_pSerializer->mark(); } } @@ -5177,21 +5189,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox ) aOutputBorderOptions.aShadowLocation = pShadowItem->GetLocation(); } - - if ( m_bOpenedSectPr && GetWritingHeaderFooter() == false) - { - // Inside a section - - // Check if the distance is larger than 31 points - aOutputBorderOptions.bCheckDistanceSize = true; - - impl_borders( m_pSerializer, rBox, aOutputBorderOptions, &m_pageMargins ); - - // Special handling for pgBorder - m_pSerializer->mergeTopMarks( sax_fastparser::MERGE_MARKS_PREPEND ); - m_pSerializer->mergeTopMarks( ); - } - else + if ( !m_bOpenedSectPr || GetWritingHeaderFooter()) { // Not inside a section diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index 9f29d9132281..573e98a1bdcb 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -1664,8 +1664,6 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt const SfxItemSet* pOldI = pISet; - AttrOutput().SectionPageBorders( pPdFmt, pPdFirstPgFmt ); - const SfxPoolItem* pItem; if ( titlePage && SFX_ITEM_SET == pPdFirstPgFmt->GetItemState( RES_PAPER_BIN, true, &pItem ) ) @@ -1700,6 +1698,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt pISet = &pPdFmt->GetAttrSet(); AttrOutput().OutputStyleItemSet( pPdFmt->GetAttrSet(), true, false ); + AttrOutput().SectionPageBorders( pPdFmt, pPdFirstPgFmt ); pISet = pOldI; // then the rest of the settings from PageDesc |