summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf142404_tabSpacing.docxbin0 -> 9287 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport16.cxx6
-rw-r--r--sw/source/core/text/porlay.cxx4
3 files changed, 8 insertions, 2 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf142404_tabSpacing.docx b/sw/qa/extras/ooxmlexport/data/tdf142404_tabSpacing.docx
new file mode 100644
index 000000000000..c819c55416fb
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf142404_tabSpacing.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
index 1ce0a14556f3..c0bca8ebfb7b 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport16.cxx
@@ -212,6 +212,12 @@ DECLARE_OOXMLEXPORT_TEST(testTdf141173_missingFrames, "tdf141173_missingFrames.r
CPPUNIT_ASSERT_EQUAL(13, getShapes());
}
+DECLARE_OOXMLEXPORT_TEST(testTdf142404_tabSpacing, "tdf142404_tabSpacing.docx")
+{
+ // The tabstops should be laid out as triple-spaced when the paragraph takes multiple lines.
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("too big for one page", 2, getPages());
+}
+
DECLARE_OOXMLEXPORT_TEST(testTdf139580, "tdf139580.odt")
{
// Without the fix in place, this test would have crashed at export time
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index ae4f499992b2..aeb12501ce4d 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+ignore/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -410,7 +410,7 @@ void SwLineLayout::CalcLine( SwTextFormatter &rLine, SwTextFormatInfo &rInf )
AddPrtWidth( pPos->Width() );
// #i3952#
- if ( bIgnoreBlanksAndTabsForLineHeightCalculation )
+ if (bIgnoreBlanksAndTabsForLineHeightCalculation && !rInf.GetLineStart())
{
if ( pPos->InTabGrp() || pPos->IsHolePortion() ||
( pPos->IsTextPortion() &&