editeng/source/editeng/impedit3.cxx | 3 +-- sd/qa/unit/TextFittingTest.cxx | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit 0aa479cf55b290283a1399cb71dfcdfb866d7052 Author: Balazs Varga <[email protected]> AuthorDate: Fri Apr 25 16:49:12 2025 +0200 Commit: Tomaž Vajngerl <[email protected]> CommitDate: Wed Jun 4 17:03:06 2025 +0200 tdf#165712 - sd: fix too small line spacing between text lines in placeholders with shrink text on overflow Allowing less Line spacing reduction in case of 0.925 scaling, which would make our texts more readable when we are trying to shrink text on overflow. Instead of decreasing the line spacing to 80%, should be enough to decrease them to 90% and the font size should be decreased a bit more. With that we are a bit more closer to mimics MSO text scaling. Change-Id: Ie5a143cf7c0eeda30682850c59c1e6449a19234b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184704 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <[email protected]> diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index b11dc06fbfe3..01159e457e21 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -365,11 +365,10 @@ tools::Long ImpEditEngine::FormatParagraphs(o3tl::sorted_vector<sal_Int32>& aRep namespace { -constexpr std::array<ScalingParameters, 13> constScaleLevels = +constexpr std::array<ScalingParameters, 12> constScaleLevels = { ScalingParameters{ 1.000, 1.000, 1.0, 0.9 }, ScalingParameters{ 0.925, 0.925, 1.0, 0.9 }, - ScalingParameters{ 0.925, 0.925, 1.0, 0.8 }, ScalingParameters{ 0.850, 0.850, 1.0, 0.9 }, ScalingParameters{ 0.850, 0.850, 1.0, 0.8 }, ScalingParameters{ 0.775, 0.775, 1.0, 0.8 }, diff --git a/sd/qa/unit/TextFittingTest.cxx b/sd/qa/unit/TextFittingTest.cxx index f01108704ef1..814b5063c7a3 100644 --- a/sd/qa/unit/TextFittingTest.cxx +++ b/sd/qa/unit/TextFittingTest.cxx @@ -73,8 +73,8 @@ CPPUNIT_TEST_FIXTURE(TextFittingTest, testTest) Scheduler::ProcessEventsToIdle(); CPPUNIT_ASSERT_EQUAL(sal_Int32(4), rEditEngine.GetParagraphCount()); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.925, rEditEngine.getScalingParameters().fFontY, 1E-4); - CPPUNIT_ASSERT_DOUBLES_EQUAL(0.8, rEditEngine.getScalingParameters().fSpacingY, 1E-4); + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.85, rEditEngine.getScalingParameters().fFontY, 1E-4); + CPPUNIT_ASSERT_DOUBLES_EQUAL(0.9, rEditEngine.getScalingParameters().fSpacingY, 1E-4); // Add paragraph 5 rEditView.SetSelection(ESelection(4, 0));
