diff options
author | Khaled Hosny <khaled@libreoffice.org> | 2023-05-31 17:37:27 +0300 |
---|---|---|
committer | خالد حسني <khaled@libreoffice.org> | 2023-06-01 07:09:45 +0200 |
commit | 99d22fd79c5532fd6c1b167996e1c27216b92469 (patch) | |
tree | 1a521f04e5c7fe12ffa9658ec854fd99764311ff /vcl | |
parent | 70fd835b4cf75e386ee115c705241a4059fb68a8 (diff) |
tdf#155557: Fix drawing mixed direction underlined text
The code here first unsets the underline style, draws the text, then
measures the text size, change the text to two blank spaces, sets the
measured width back and tries to guess how much space was added by
justification, sets the underline style back and then draws again.
I have no idea why it is doing it in this highly convoluted way, but
this code goes all way back to the initial import. However, it currently
fails to account for Arabic justification when the Arabic text does not
have any space characters.
Instead of trying to guess more how much width the Arabic justification
adds, I’m removing this code altogether to let the normal drawing code
handle the underline drawing.
Lets see what will break.
Update text expectation because we now do one-less drawing.
Change-Id: I8158bd15370005a78b866c8192414e4b46af2727
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152452
Tested-by: Jenkins
Reviewed-by: خالد حسني <khaled@libreoffice.org>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/qa/cppunit/pdfexport/pdfexport.cxx | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 0739cd25cd8a..5f8cce35e69e 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -1338,13 +1338,6 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf145274) int nPageObjectCount = pPage->getObjectCount(); - // Without the fix in place, this test would have failed with - // - Expected: 6 - // - Actual : 4 - CPPUNIT_ASSERT_EQUAL(6, nPageObjectCount); - - auto pTextPage = pPage->getTextPage(); - for (int i = 0; i < nPageObjectCount; ++i) { std::unique_ptr<vcl::pdf::PDFiumPageObject> pPageObject = pPage->getObject(i); |