[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - sw/source
Michael Stahl
mstahl at redhat.com
Wed Oct 26 11:09:33 UTC 2016
sw/source/filter/ww8/wrtw8sty.cxx | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
New commits:
commit 1bfa382b4af649ff2b56b988d89bada156e29078
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Oct 25 17:35:59 2016 +0200
tdf#101814 sw: MSWord export: don't override first-page with heuristics
Revert commit dcea8ba3b4fc347e7b6d9e0d5ec2fd99bd77ce6f, and do the
opposite. The added "titlePage" check makes no sense, because in that
case there is already an explicit first-page style in the PageDesc, and
overriding that cannot be right.
The test added in that commit still succeeds, which suggests that the
root cause of that bug was elsewhere and was fixed in the meantime.
Change-Id: I9b21b6dc115be28cb0ee3360615c538d4cfee3cb
(cherry picked from commit 36e390eaa55ae302dc5a64fa7098ec43e2009748)
Reviewed-on: https://gerrit.libreoffice.org/30276
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index bc52d44..d16c9fd 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1624,18 +1624,19 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
{
// if a Follow is set and it does not point to itself,
// then there is a page chain.
- // Falls damit eine "Erste Seite" simuliert werden soll, so
- // koennen wir das auch als solches schreiben.
- // Anders sieht es mit Links/Rechts wechseln aus. Dafuer muss
- // erkannt werden, wo der Seitenwechsel statt findet. Hier ist
- // es aber dafuer zuspaet!
- if ( pPd->GetFollow() && pPd != pPd->GetFollow() &&
+ // If this emulates a "first page", we can detect it here and write
+ // it as title page.
+ // With Left/Right changes it's different - we have to detect where
+ // the change of pages is, but here it's too late for that!
+ // tdf#101814 if there is already a explicit first-page, no point
+ // in checking heuristics here.
+ if ( !titlePage && pPd->GetFollow() && pPd != pPd->GetFollow() &&
pPd->GetFollow()->GetFollow() == pPd->GetFollow() &&
( !rSepInfo.pPDNd || pPd->IsFollowNextPageOfNode( *rSepInfo.pPDNd ) ) )
{
const SwPageDesc *pFollow = pPd->GetFollow();
const SwFrameFormat& rFollowFormat = pFollow->GetMaster();
- if ( sw::util::IsPlausableSingleWordSection( *pPdFirstPgFormat, rFollowFormat ) || titlePage )
+ if (sw::util::IsPlausableSingleWordSection(*pPdFirstPgFormat, rFollowFormat))
{
if (rSepInfo.pPDNd)
pPdFirstPgFormat = pPd->GetPageFormatOfNode( *rSepInfo.pPDNd );
More information about the Libreoffice-commits
mailing list