1b6fa61608
This hang happened when the user executed Tools -> Language -> Hyphenation -> Hyphenate All. This problem is visible only if all of these conditions are met: - a line in a paragraph has a word that already contains a soft-hyphen, but not at the position where the automatic hyphenation would insert it - the last line ends with a word that can be hyphenated - there is a fly frame in the document In this case it happens during hyphenation that the layout has an additional empty line at the end (which is removed by the time the layout finishes), so we hit the case when SwTextFormatter::Hyphenate() skips the "if( m_pCurr->PrtWidth() && m_pCurr->GetLen() )" block. Normally hyphenation terminates when it iterates over the portions of the line and no overrun nor any existing hyphen portion are seen, but in this case that never happened. Fix the problem by terminating not only when we reach the end of the portion iteration, but also when the portion list is non-existing (has zero length). Change-Id: I71d4b040a2d4692ae6eb92807dbbbb42b077a0f8 Reviewed-on: https://gerrit.libreoffice.org/33303 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> |
||
---|---|---|
.. | ||
complex | ||
core | ||
extras | ||
python | ||
unit | ||
unoapi | ||
README |
You can find different types of Writer tests here, the following directories are available: - core: - filters-test: loads different file types (see SwFiltersTest::testCVEs() for the list of supported filter types), and only makes sure Writer does not crash. To add new tests, you just need to drop in the test files to the relevant directory, no code change is necessary. - uwriter: this test has access to private Writer symbols, add new tests here if you need that. - extras: - see its own README -- executes import and export filters and asserts the UNO model to verify the resulting document is the expected one. - also, any new C++ test that links to libsw (but does not need access to private Writer symbols) should go in this directory, whether using the UNO API or the internal one. - complex: JUnit-based tests using the UNO API - unoapi: JUnit-based test trying to get/set every UNO property, etc.