[Libreoffice-commits] core.git: Branch 'libreoffice-6-0' - 2 commits - sw/qa sw/source
Patrick Jaap
patrick.jaap at tu-dresden.de
Tue Apr 17 07:07:36 UTC 2018
sw/qa/extras/ooxmlimport/data/tdf116486.docx |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 6 ++++++
sw/source/core/layout/tabfrm.cxx | 4 ----
sw/source/core/text/itrform2.cxx | 12 ++++++++++++
4 files changed, 18 insertions(+), 4 deletions(-)
New commits:
commit ae910b993f69205866f94ac8928f13f57e94560b
Author: Patrick Jaap <patrick.jaap at tu-dresden.de>
Date: Tue Apr 10 13:24:04 2018 +0200
tdf#116486 Consider upper margin in paragraph positioning with flys
The problem was the following:
There is a paragraph with an upper margin defined. Also, there
is a flyframe intersecting this upper margin. The desired behavior
is to reposition the parapgraph, such that it (including it's upper
margin) is located below the flyframe.
This patch increases the bounding rectangle of the paragraph by the
upper margin.
For compatibility, there is a compat-flag query. I re-used a related one.
Change-Id: I9dbc75e07e2ba0658fdbbfa9989be24a68660713
Reviewed-on: https://gerrit.libreoffice.org/52685
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
(cherry picked from commit d07fc485d46f431405a3f6a002f951a08c559677)
Reviewed-on: https://gerrit.libreoffice.org/52938
diff --git a/sw/qa/extras/ooxmlimport/data/tdf116486.docx b/sw/qa/extras/ooxmlimport/data/tdf116486.docx
new file mode 100644
index 000000000000..c6a4891b0cf4
Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tdf116486.docx differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 3af5a063c002..22bf0b01f752 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1602,6 +1602,12 @@ DECLARE_OOXMLIMPORT_TEST(testTdf114217, "tdf114217.docx")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), xDrawPage->getCount());
}
+DECLARE_OOXMLIMPORT_TEST(testTdf116486, "tdf116486.docx")
+{
+ OUString aTop = parseDump("/root/page/body/txt/Special", "nHeight");
+ CPPUNIT_ASSERT_EQUAL( OUString("4006"), aTop );
+}
+
// tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 6421eedca0be..e762ab1f5842 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -2314,12 +2314,24 @@ void SwTextFormatter::CalcFlyWidth( SwTextFormatInfo &rInf )
SwRect aLine( rInf.X() + nLeftMin, nTop, rInf.RealWidth() - rInf.X()
+ nLeftMar - nLeftMin , nHeight );
+ // tdf#116486: consider also the upper margin from getFramePrintArea because intersections
+ // with this additional space should lead to repositioning of paragraphs
+ // For compatibility we grab a related compat flag:
+ if ( GetTextFrame()->GetTextNode()->getIDocumentSettingAccess()->get(DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS) )
+ {
+ const long nUpper = m_pFrame->getFramePrintArea().Top();
+ // Increase the rectangle
+ if( nUpper > 0 && nTop >= nUpper )
+ aLine.SubTop( nUpper );
+ }
SwRect aLineVert( aLine );
if ( m_pFrame->IsRightToLeft() )
m_pFrame->SwitchLTRtoRTL( aLineVert );
if ( m_pFrame->IsVertical() )
m_pFrame->SwitchHorizontalToVertical( aLineVert );
+
+ // GetFrame(...) determines and returns the intersection rectangle
SwRect aInter( rTextFly.GetFrame( aLineVert ) );
if ( m_pFrame->IsRightToLeft() )
commit e68518d230eee6f69e4cc2ed90e99aaab268946b
Author: Michael Stahl <Michael.Stahl at cib.de>
Date: Mon Apr 16 10:34:09 2018 +0200
Revert "sw-table-join-fix-i99267.diff:"
This reverts commit 6b1204329ad365a46214472bcff335e63c51bdf4.
The comment has nothing to do with the code around it,
and it turns out the commit is utter nonsense:
The actual intended change was done in CWS sw32bf02 at a different
place in SwTabFrame::MakeAll(), see commit
4439427aadeaa0cb611011b46f0fa14bfa196f33.
This was then apparently extracted as a patch and added to ooo-build:
https://cgit.freedesktop.org/libreoffice/build/commit/?id=d33db589f6e7814df84f71506539f6f89448d9fd
And then there was a rebase on top of a DEV300 that includes
the CWS and that moved the patch to apply in this incorrect location:
https://cgit.freedesktop.org/libreoffice/build/commit/?id=d91410b81a02ce9b970ebd838fda0b28f6d8a5f8
Change-Id: I89db4ea0d1b06450c8fd8618cc824612e225fffe
Reviewed-on: https://gerrit.libreoffice.org/52945
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
(cherry picked from commit 8885ffd9702f72047d9fc94c82ee57221e4e927c)
Reviewed-on: https://gerrit.libreoffice.org/52975
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index a02236b905fa..52cb1fdb91ff 100755
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1984,10 +1984,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
pPre->GetAttrSet()->GetKeep().GetValue()) )
{
m_bCalcLowers = true;
- // #i99267#
- // reset <bSplit> after forward move to assure that follows
- // can be joined, if further space is available.
- bSplit = false;
}
}
More information about the Libreoffice-commits
mailing list