summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-12-20 17:58:12 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-21 16:19:51 +0000
commit283b76abeafe28c335de2d7cdc2fde04a55d4192 (patch)
tree6e80598b2082238b4818e35d80b6b21b23beb194 /sw/source/filter
parente839c779a1a6b5a80d5e7368c457ba9620ecd6bb (diff)
fdo#69065: sw: fix mirrored page style with first-page
If a mirrored page style is used with first-page on both a right page and a left page the current design cannot work because the margins in the SwPageDesc::aFirst cannot be right for both cases. So split that up so we get a first-master and first-left format and copy the headers/footers and margins as appropriate... which is really adding epicycles to a flawed design; probably this would be better with just a single SwFrmFmt that has different items for master/left/first headers. (cherry picked from commit e936ecc92a7e362f57ce72a955697840920636b8) Conflicts: sw/source/core/doc/docdesc.cxx sw/source/core/doc/poolfmt.cxx Change-Id: I0889a4ab5959b5a71172203bb64d185960a07d73 Reviewed-on: https://gerrit.libreoffice.org/7158 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx2
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx8
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx8
4 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 097a8a7eac5a..bc08a72158f7 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1614,7 +1614,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
// The latter method was previously used by the doc/docx import filter.
// In both of these cases, we emit a single Word section with different
// first page header/footer.
- const SwFrmFmt* pPdFirstPgFmt = &pPd->GetFirst();
+ const SwFrmFmt* pPdFirstPgFmt = &pPd->GetFirstMaster();
bool titlePage = !pPd->IsFirstShared();
if ( bOutPgDscSet )
{
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index d2dae7ce0599..d21134459d4b 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -371,7 +371,7 @@ bool MSWordExportBase::SetAktPageDescFromNode(const SwNode &rNd)
bNewPageDesc = true;
else
{
- const SwFrmFmt& rTitleFmt = pAktPageDesc->GetFirst();
+ const SwFrmFmt& rTitleFmt = pAktPageDesc->GetFirstMaster();
const SwFrmFmt& rFollowFmt = pCurrent->GetMaster();
bNewPageDesc = !IsPlausableSingleWordSection(rTitleFmt,
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 223de68f417d..b34b96600055 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2001,7 +2001,7 @@ void SwWW8ImplReader::Read_HdFt(int nSect, const SwPageDesc *pPrev,
= (nI & ( WW8_FOOTER_EVEN | WW8_FOOTER_ODD | WW8_FOOTER_FIRST )) ? true: false;
SwFrmFmt& rFmt = bUseLeft ? pPD->GetLeft()
- : bUseFirst ? pPD->GetFirst()
+ : bUseFirst ? pPD->GetFirstMaster()
: pPD->GetMaster();
SwFrmFmt* pHdFtFmt;
@@ -2016,7 +2016,7 @@ void SwWW8ImplReader::Read_HdFt(int nSect, const SwPageDesc *pPrev,
if (bUseLeft)
pPD->GetLeft().SetFmtAttr(SwFmtFooter(true));
if (bUseFirst || (rSection.maSep.fTitlePage && bNoFirst))
- pPD->GetFirst().SetFmtAttr(SwFmtFooter(true));
+ pPD->GetFirstMaster().SetFmtAttr(SwFmtFooter(true));
pHdFtFmt = const_cast<SwFrmFmt*>(rFmt.GetFooter().GetFooterFmt());
}
else
@@ -2028,7 +2028,7 @@ void SwWW8ImplReader::Read_HdFt(int nSect, const SwPageDesc *pPrev,
if (bUseLeft)
pPD->GetLeft().SetFmtAttr(SwFmtHeader(true));
if (bUseFirst || (rSection.maSep.fTitlePage && bNoFirst))
- pPD->GetFirst().SetFmtAttr(SwFmtHeader(true));
+ pPD->GetFirstMaster().SetFmtAttr(SwFmtHeader(true));
pHdFtFmt = const_cast<SwFrmFmt*>(rFmt.GetHeader().GetHeaderFmt());
}
@@ -3853,7 +3853,7 @@ void wwSectionManager::SetSegmentToPageDesc(const wwSection &rSection,
if (!(rSection.maSep.pgbApplyTo & 1))
mrReader.SetPageBorder(rFmt, rSection);
if (!(rSection.maSep.pgbApplyTo & 2))
- mrReader.SetPageBorder(rPage.GetFirst(), rSection);
+ mrReader.SetPageBorder(rPage.GetFirstMaster(), rSection);
mrReader.SetDocumentGrid(rFmt, rSection);
}
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 0d9a6388d992..49fd40e070bb 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -1183,14 +1183,14 @@ void SwWW8ImplReader::CopyPageDescHdFt(const SwPageDesc* pOrgPageDesc,
// copy first page header content section
if( nCode & WW8_HEADER_FIRST )
{
- rDoc.CopyHeader(pOrgPageDesc->GetFirst(),
- pNewPageDesc->GetFirst());
+ rDoc.CopyHeader(pOrgPageDesc->GetFirstMaster(),
+ pNewPageDesc->GetFirstMaster());
}
// copy first page footer content section
if( nCode & WW8_FOOTER_FIRST )
{
- rDoc.CopyFooter(pOrgPageDesc->GetFirst(),
- pNewPageDesc->GetFirst());
+ rDoc.CopyFooter(pOrgPageDesc->GetFirstMaster(),
+ pNewPageDesc->GetFirstMaster());
}
}