diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2020-06-04 10:56:27 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2020-06-04 10:56:27 +0200 |
commit | 4ada77ac455ba99085838c380c9e275956405342 (patch) | |
tree | 1608aaf32413d188bf04453e61697fe52e193a15 /sw/source/filter | |
parent | a91f20addcfaabeb168f1dd2aeec730aefc44873 (diff) | |
parent | bf5e0dc9bd54069f57f41de8746dc29d0ec41061 (diff) |
Merge branch 'libreoffice-6-4' into
distro/lhm/libreoffice-6-4+backports
Change-Id: I6c4e4dc74df1a1ce0455526a067c5286534922be
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 11 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8sty.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.hxx | 1 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8atr.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmlfmt.cxx | 11 |
5 files changed, 36 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 604ca13102c2..ec1837d16917 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -8252,6 +8252,17 @@ void DocxAttributeOutput::FormatULSpace( const SvxULSpaceItem& rULSpace ) sal_Int32 nHeader = 0; if ( aDistances.HasHeader() ) nHeader = sal_Int32( aDistances.dyaHdrTop ); + else if (m_rExport.m_pFirstPageFormat) + { + HdFtDistanceGlue aFirstPageDistances(m_rExport.m_pFirstPageFormat->GetAttrSet()); + if (aFirstPageDistances.HasHeader()) + { + // The follow page style has no header, but the first page style has. In Word terms, + // this means that the header margin of "the" section is coming from the first page + // style. + nHeader = sal_Int32(aFirstPageDistances.dyaHdrTop); + } + } // Page top m_pageMargins.nTop = aDistances.dyaTop; diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx index d04cfeb8e6f8..eb06b97195bb 100644 --- a/sw/source/filter/ww8/wrtw8sty.cxx +++ b/sw/source/filter/ww8/wrtw8sty.cxx @@ -1700,7 +1700,19 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt m_pISet = &pPdFormat->GetAttrSet(); if (!bOutputStyleItemSet) + { + if (titlePage) + { + m_pFirstPageFormat = pPdFirstPgFormat; + } + AttrOutput().OutputStyleItemSet( pPdFormat->GetAttrSet(), false ); + + if (titlePage) + { + m_pFirstPageFormat = nullptr; + } + } AttrOutput().SectionPageBorders( pPdFormat, pPdFirstPgFormat ); m_pISet = pOldI; diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx index 45c444c1f0b3..3f64071e2120 100644 --- a/sw/source/filter/ww8/wrtww8.hxx +++ b/sw/source/filter/ww8/wrtww8.hxx @@ -458,6 +458,7 @@ public: OUString const m_aMainStg; std::vector<const SwTOXType*> m_aTOXArr; const SfxItemSet* m_pISet; // for double attributes + const SwFrameFormat* m_pFirstPageFormat = nullptr; WW8_WrPct* m_pPiece; // Pointer to Piece-Table std::unique_ptr<SwNumRuleTable> m_pUsedNumTable; // all used NumRules /// overriding numdef index -> (existing numdef index, abstractnumdef index) diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 0aad9bd083ef..0ccb31c3dbb0 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -510,7 +510,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode } } } - else if (m_pCurrentPageDesc->GetPoolFormatId() != RES_POOLPAGE_FIRST || !sw::util::IsPlausableSingleWordSection(m_pCurrentPageDesc->GetFirstMaster(), pPageDesc->GetMaster())) + else if (!sw::util::IsPlausableSingleWordSection(m_pCurrentPageDesc->GetFirstMaster(), pPageDesc->GetMaster())) { bBreakSet = true; bNewPageDesc = true; diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx index 34ec1dde8ab7..9929975a3b44 100644 --- a/sw/source/filter/xml/xmlfmt.cxx +++ b/sw/source/filter/xml/xmlfmt.cxx @@ -49,6 +49,8 @@ #include <xmloff/XMLTextMasterStylesContext.hxx> #include <xmloff/XMLTextShapeStyleContext.hxx> #include <xmloff/XMLGraphicsDefaultStyle.hxx> +#include <xmloff/XMLDrawingPageStyleContext.hxx> +#include <xmloff/XMLTextMasterPageContext.hxx> #include <xmloff/table/XMLTableImport.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include "xmlimp.hxx" @@ -828,6 +830,10 @@ SvXMLStyleContext *SwXMLStylesContext_Impl::CreateStyleStyleChildContext( pStyle = new XMLTextShapeStyleContext( GetImport(), nPrefix, rLocalName, xAttrList, *this, nFamily ); break; + case XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID: + pStyle = new XMLDrawingPageStyleContext(GetImport(), nPrefix, rLocalName, + xAttrList, *this, g_MasterPageContextIDs, g_MasterPageFamilies); + break; default: pStyle = SvXMLStylesContext::CreateStyleStyleChildContext( nFamily, nPrefix, @@ -927,6 +933,11 @@ rtl::Reference < SvXMLImportPropertyMapper > SwXMLStylesContext_Impl::GetImportP else if( nFamily == XML_STYLE_FAMILY_TABLE_CELL ) xMapper = XMLTextImportHelper::CreateTableCellExtPropMapper( const_cast<SwXMLStylesContext_Impl*>( this )->GetImport() ); + else if (nFamily == XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID) + { + xMapper = XMLTextImportHelper::CreateDrawingPageExtPropMapper( + const_cast<SwXMLStylesContext_Impl*>(this)->GetImport()); + } else xMapper = SvXMLStylesContext::GetImportPropertyMapper( nFamily ); return xMapper; |