dictionaries.git: Changes to 'refs/tags/cp-23.05.15-1'
Tag 'cp-23.05.15-1' created by Andras Timar at 2024-07-16 06:08 + cp-23.05.15-1 Changes since co-23.05.10-1-24: --- 0 files changed ---
core.git: Branch 'libreoffice-24-8' - extras/source
extras/source/autocorr/lang/el/DocumentList.xml |2 ++ 1 file changed, 2 insertions(+) New commits: commit 8e0c6d6533155c8e04704ecd84a117f5816e08d7 Author: László Németh AuthorDate: Thu Jun 27 13:30:07 2024 +0200 Commit: Xisco Fauli CommitDate: Fri Jun 28 10:10:55 2024 +0200 tdf#158051 AutoCorrect: don't apply final sigma before apostrophe Don't change Greek sigma with final sigma, if the sigma is followed by an apostrophe, which means removed word part (vowel) here. Follow-up to commit 5ecc0cad3f0aeb1c7643fae7b414b1a2316ed59f "tdf#116387 Autocorrect greek character σ (sigma) to ς (final sigma)". Change-Id: I6b7045502c04993cbad92f21f96ca5799abd1fd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169637 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 7f593484a1f929663ec9ec7def76b63ec3a832b2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169598 Reviewed-by: Xisco Fauli diff --git a/extras/source/autocorr/lang/el/DocumentList.xml b/extras/source/autocorr/lang/el/DocumentList.xml index 1cc23c2b3132..1d9bbeb7efae 100644 --- a/extras/source/autocorr/lang/el/DocumentList.xml +++ b/extras/source/autocorr/lang/el/DocumentList.xml @@ -1,5 +1,7 @@ http://openoffice.org/2001/block-list;> + +
core.git: Branch 'libreoffice-24-2' - extras/source
extras/source/autocorr/lang/el/DocumentList.xml |2 ++ 1 file changed, 2 insertions(+) New commits: commit 0309281387afb43c7f57709ad18f38e01c70edbc Author: László Németh AuthorDate: Thu Jun 27 13:30:07 2024 +0200 Commit: Xisco Fauli CommitDate: Fri Jun 28 10:11:06 2024 +0200 tdf#158051 AutoCorrect: don't apply final sigma before apostrophe Don't change Greek sigma with final sigma, if the sigma is followed by an apostrophe, which means removed word part (vowel) here. Follow-up to commit 5ecc0cad3f0aeb1c7643fae7b414b1a2316ed59f "tdf#116387 Autocorrect greek character σ (sigma) to ς (final sigma)". Change-Id: I6b7045502c04993cbad92f21f96ca5799abd1fd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169637 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 7f593484a1f929663ec9ec7def76b63ec3a832b2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169599 Reviewed-by: Xisco Fauli diff --git a/extras/source/autocorr/lang/el/DocumentList.xml b/extras/source/autocorr/lang/el/DocumentList.xml index 1cc23c2b3132..1d9bbeb7efae 100644 --- a/extras/source/autocorr/lang/el/DocumentList.xml +++ b/extras/source/autocorr/lang/el/DocumentList.xml @@ -1,5 +1,7 @@ http://openoffice.org/2001/block-list;> + +
core.git: extras/source
extras/source/autocorr/lang/nl-BE/DocumentList.xml |4 extras/source/autocorr/lang/nl/DocumentList.xml|4 2 files changed, 8 insertions(+) New commits: commit 8fc2fd284bca88d491ff5975a7110c188344976b Author: László Németh AuthorDate: Thu Jun 27 14:22:43 2024 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Thu Jun 27 23:07:29 2024 +0200 tdf#92029 AutoCorrect: correct 's and 't in Dutch to apostrophe “In Dutch (in Belgium as in the Netherlands), when you type "'s" or "'t" in sentences like: "Ik ben 's morgens opgestaan", the apostrophe is changed into an opening quote by the autocorrect feature, which is incorrect and requires a manual correction.” The bug reported with the suggested AutoCorrect extension by Pierre François. The difference here is always to use the de facto standard typographic apostrophe in the replacement. Change-Id: I2ede612f72145abcca2bc1477ffae3cabc9e5641 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169645 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/extras/source/autocorr/lang/nl-BE/DocumentList.xml b/extras/source/autocorr/lang/nl-BE/DocumentList.xml index aad43a2ac536..76521b3fc5b1 100644 --- a/extras/source/autocorr/lang/nl-BE/DocumentList.xml +++ b/extras/source/autocorr/lang/nl-BE/DocumentList.xml @@ -10,6 +10,10 @@ + + + + diff --git a/extras/source/autocorr/lang/nl/DocumentList.xml b/extras/source/autocorr/lang/nl/DocumentList.xml index b96d88166d7b..cea1f26bccca 100644 --- a/extras/source/autocorr/lang/nl/DocumentList.xml +++ b/extras/source/autocorr/lang/nl/DocumentList.xml @@ -10,6 +10,10 @@ + + + +
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/core/text/portxt.cxx | 69 + 1 file changed, 36 insertions(+), 33 deletions(-) New commits: commit ef201bb390aca42a3d8c1c6018c4d3e6201a64c5 Author: László Németh AuthorDate: Tue Jun 11 20:23:22 2024 +0200 Commit: Christian Lohmaier CommitDate: Thu Jun 27 18:35:02 2024 +0200 tdf#160170 sw: fix overshrunk justified lines at hyphenation Smart justify uses 2 SwTextGuess::Guess() calls to break a line, but using the same SwTextGuess object resulted overshrunk lines, if the first call resulted hyphenation, because of the bad state of the object for the second call. If we need a second call, now instantiate a new object for it. Regression from commit 36bfc86e27fa03ee16f87819549ab126c5a68cac "tdf#119908 tdf#158776 sw smart justify: shrink only spaces". Note: the reported test document was already fixed by commit f050103c3324d878b310f37429ea3580a8230905 "stale hyphenation data after skipping blanks". Change-Id: I478407dc7650206d3feb72d5b89e78b1194590c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168693 Reviewed-by: László Németh Tested-by: Jenkins (cherry picked from commit ca540209a8c20a2734f180d4706d5153bdf64523) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168723 Reviewed-by: Christian Lohmaier diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index e58021ef0963..45c04123e12e 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -301,14 +301,14 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) return bFull; } -SwTextGuess aGuess; -bool bFull = !aGuess.Guess( *this, rInf, Height() ); +std::unique_ptr pGuess(new SwTextGuess()); +bool bFull = !pGuess->Guess( *this, rInf, Height() ); // tdf#158776 for the last full text portion, call Guess() again to allow more text in the // adjusted line by shrinking spaces using the know space count from the first Guess() call const SvxAdjust& rAdjust = rInf.GetTextFrame()->GetTextNodeForParaProps()->GetSwAttrSet().GetAdjust().GetAdjust(); if ( bFull && rAdjust == SvxAdjust::Block && - aGuess.BreakPos() != TextFrameIndex(COMPLETE_STRING) && + pGuess->BreakPos() != TextFrameIndex(COMPLETE_STRING) && rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess().get( DocumentSettingId::JUSTIFY_LINES_WITH_SHRINKING) && // tdf#158436 avoid shrinking at underflow, e.g. no-break space after a @@ -316,7 +316,7 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) !rInf.IsUnderflow() ) { sal_Int32 nSpacesInLine(0); -for (sal_Int32 i = sal_Int32(rInf.GetLineStart()); i < sal_Int32(aGuess.BreakPos()); ++i) +for (sal_Int32 i = sal_Int32(rInf.GetLineStart()); i < sal_Int32(pGuess->BreakPos()); ++i) { sal_Unicode cChar = rInf.GetText()[i]; if ( cChar == CH_BLANK ) @@ -329,16 +329,19 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) // TODO: handle the case, if the line contains extra amount of spaces if ( // no automatic hyphenation - !aGuess.HyphWord().is() && + !pGuess->HyphWord().is() && // no hyphenation at soft hyphen - aGuess.BreakPos() < TextFrameIndex(rInf.GetText().getLength()) && - rInf.GetText()[sal_Int32(aGuess.BreakPos())] != CHAR_SOFTHYPHEN ) + pGuess->BreakPos() < TextFrameIndex(rInf.GetText().getLength()) && + rInf.GetText()[sal_Int32(pGuess->BreakPos())] != CHAR_SOFTHYPHEN ) { ++nSpacesInLine; } if ( nSpacesInLine > 0 ) -bFull = !aGuess.Guess( *this, rInf, Height(), nSpacesInLine ); +{ +pGuess.reset(new SwTextGuess()); +bFull = !pGuess->Guess( *this, rInf, Height(), nSpacesInLine ); +} } // these are the possible cases: @@ -357,8 +360,8 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) // case A: line not yet full if ( !bFull ) { -Width( aGuess.BreakWidth() ); -ExtraBlankWidth(aGuess.ExtraBlankWidth()); +Width( pGuess->BreakWidth() ); +ExtraBlankWidth(pGuess->ExtraBlankWidth()); // Caution! if( !InExpGrp() || InFieldGrp() ) SetLen( rInf.GetLen() ); @@ -374,22 +377,22 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) new SwKernPortion( *this, nKern ); } // special case: hanging portion -else if( aGuess.GetHangingPortion() ) +else if( pGuess->GetHangingPortion() ) { -Width( aGuess.BreakWidth() ); -SetLen( aGuess.BreakPos() - rInf.GetIdx() ); -aGuess.Get
core.git: Branch 'libreoffice-24-2' - include/svtools svtools/source sw/qa sw/source
include/svtools/ruler.hxx | 11 ++ svtools/source/control/ruler.cxx| 20 ++--- sw/qa/extras/uiwriter/uiwriter6.cxx | 134 sw/source/core/frmedt/fetab.cxx | 43 +++ sw/source/uibase/docvw/edtwin3.cxx | 10 +- 5 files changed, 187 insertions(+), 31 deletions(-) New commits: commit 03b53833c09a3870306034cd084f106d02966b34 Author: László Németh AuthorDate: Sat Jun 8 23:39:13 2024 +0200 Commit: Christian Lohmaier CommitDate: Thu Jun 27 18:29:06 2024 +0200 tdf#157833 tdf#155692 sw: fix hit area to resize row/col Fix 1) missing or too narrow hit area (tdf#157833), and 2) not recognized click inside hit area (tdf#155692). It was impossible or very hard to resize text table columns and rows using the mouse: 1) Double arrow, i.e. "resize row/col" mouse pointer shows the hit area of text table row/column borders. This was missing or was very narrow with normal zoom, because of an obsolete constant for low resolution displays. Change this constant used in IsSame() with scale-dependent values to support the same hit area on different zoom levels and with different screen resolutions. 2) Especially on bigger zoom, "resize row/col" mouse pointer, i. e. the visible hit area didn't guarantee drag & drop any more because of too small hit area in pixels in the svruler code base: clicking on not exactly center of the hit area resulted selection of cells or the cell content instead of drag & drop the border, violating WYSIWYG. Enlarge the default 1 pixel to 5 pixels to cover the whole hit area. Note: only for resizing table borders inside the document, not on the horizontal and vertical rulers. Change-Id: I398a0de782040b0ad18835658ed625117a6e0e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168605 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit b285cf49dffe8a74f0ba54b88b781db6a68a4f3b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168617 Reviewed-by: Christian Lohmaier diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 8acc70aa14c1..a7a0a581f941 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -691,8 +691,12 @@ private: SVT_DLLPRIVATE bool ImplDoHitTest( const Point& rPosition, RulerSelection* pHitTest, bool bRequiredStyle = false, - RulerIndentStyle nRequiredStyle = RulerIndentStyle::Top ) const; -SVT_DLLPRIVATE bool ImplDocHitTest( const Point& rPos, RulerType eDragType, RulerSelection* pHitTest ) const; + RulerIndentStyle nRequiredStyle = RulerIndentStyle::Top, + tools::Long nTolerance = 1 ) const; +SVT_DLLPRIVATE bool ImplDocHitTest( const Point& rPos, + RulerType eDragType, + RulerSelection* pHitTest, + tools::Long nTolerance = 1 ) const; SVT_DLLPRIVATE bool ImplStartDrag( RulerSelection const * pHitTest, sal_uInt16 nModifier ); SVT_DLLPRIVATE void ImplDrag( const Point& rPos ); SVT_DLLPRIVATE void ImplEndDrag(); @@ -743,7 +747,8 @@ public: voidSetExtraType( RulerExtra eNewExtraType, sal_uInt16 nStyle = 0 ); boolStartDocDrag( const MouseEvent& rMEvt, - RulerType eDragType ); + RulerType eDragType, + tools::Long nTolerance = 1 ); RulerType GetDragType() const { return meDragType; } tools::LongGetDragPos() const { return mnDragPos; } sal_uInt16 GetDragAryPos() const { return mnDragAryPos; } diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 6ddac0ccd7d3..5916f537f032 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -1417,7 +1417,8 @@ void Ruler::ImplUpdate( bool bMustCalc ) } bool Ruler::ImplDoHitTest( const Point& rPos, RulerSelection* pHitTest, - bool bRequireStyle, RulerIndentStyle nRequiredStyle ) const + bool bRequireStyle, RulerIndentStyle nRequiredStyle, + tools::Long nTolerance ) const { sal_Int32 i; sal_uInt16 nStyle; @@ -1558,7 +1559,7 @@ bool Ruler::ImplDoHitTest( const Point& rPos, RulerSelection* pHitTest, } // test the borders -int nBorderTolerance = 1; +int nBorderTolerance = nTolerance; if(pHitTest->bExpandTest) { nBorderTolerance++; @@ -1574,7 +1575,6 @@ bool Ruler::ImplDoHitTest( const Point&am
core.git: extras/source
extras/source/autocorr/lang/el/DocumentList.xml |2 ++ 1 file changed, 2 insertions(+) New commits: commit 7f593484a1f929663ec9ec7def76b63ec3a832b2 Author: László Németh AuthorDate: Thu Jun 27 13:30:07 2024 +0200 Commit: László Németh CommitDate: Thu Jun 27 18:24:27 2024 +0200 tdf#158051 AutoCorrect: don't apply final sigma before apostrophe Don't change Greek sigma with final sigma, if the sigma is followed by an apostrophe, which means removed word part (vowel) here. Follow-up to commit 5ecc0cad3f0aeb1c7643fae7b414b1a2316ed59f "tdf#116387 Autocorrect greek character σ (sigma) to ς (final sigma)". Change-Id: I6b7045502c04993cbad92f21f96ca5799abd1fd5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169637 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/extras/source/autocorr/lang/el/DocumentList.xml b/extras/source/autocorr/lang/el/DocumentList.xml index 1cc23c2b3132..1d9bbeb7efae 100644 --- a/extras/source/autocorr/lang/el/DocumentList.xml +++ b/extras/source/autocorr/lang/el/DocumentList.xml @@ -1,5 +1,7 @@ http://openoffice.org/2001/block-list;> + +
core.git: i18npool/qa i18npool/source
i18npool/qa/cppunit/test_breakiterator.cxx | 30 i18npool/source/breakiterator/data/dict_word_hu.txt |2 - i18npool/source/breakiterator/data/edit_word.txt|8 +++-- i18npool/source/breakiterator/data/edit_word_hu.txt |8 +++-- 4 files changed, 41 insertions(+), 7 deletions(-) New commits: commit 2b9fee5a3e9d1eae65932fb0f08f0216f8a30cf7 Author: László Németh AuthorDate: Thu Jun 27 11:06:35 2024 +0200 Commit: László Németh CommitDate: Thu Jun 27 16:49:51 2024 +0200 tdf#161737 i18npool: fix bad word selection with NNBSP Fix word breaking rules also for editing. Previously the word was selected with the following narrow no-break space, e.g. at French words before exclamation and question marks (where narrow no-break space allows to get correct typography, if the OpenType/Graphite font doesn't have this feature). Add this and the previous fixes for Hungarian, which handled by extra word-breaking rule files. Follow-up to commit 6e002da1615b52cda4e9331e87878458b1fe9677 "tdf#161737 i18npool: fix fake spelling alarms with NNBSP". Change-Id: I7230bd356e5f0360172b652e615a61d96131d336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169624 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index 6fbde026f565..7e9f47ad22f1 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -1022,6 +1022,36 @@ void TestBreakIterator::testWordBoundaries() // This was 8 (word + NNBSP) CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aBounds.endPos); } + +// tdf#161737: narrow no-break space at the end of words resulted spelling mistakes +{ +aLocale.Language = "hu"; +aLocale.Country = "HU"; + +OUString aTest(u"L’espace fine insécable\u202F!"_ustr); +aBounds += m_xBreak->getWordBoundary(aTest, 14, aLocale, i18n::WordType::DICTIONARY_WORD, false); +CPPUNIT_ASSERT_EQUAL(sal_Int32(14), aBounds.startPos); +// This was 24 (word + NNBSP) +CPPUNIT_ASSERT_EQUAL(sal_Int32(23), aBounds.endPos); +} + +// tdf#161737: narrow no-break space between digits resulted spelling mistakes +// as a quick fix, limit NBSP as word-part character only for editing, and not for spell checking +// TODO: remove NBSP by the linguistic module or by the spell checking dictionaries to allow +// to check numbers with thousand separators and with correct suffix +{ +aLocale.Language = "hu"; +aLocale.Country = "HU"; + +OUString aTest(u"1\u202F000\u202F000"_ustr); +aBounds += m_xBreak->getWordBoundary(aTest, 2, aLocale, i18n::WordType::DICTIONARY_WORD, false); +// This was 0 (word + NNBSP) +CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aBounds.startPos); +// This was 8 (word + NNBSP) +CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aBounds.endPos); +} } void TestBreakIterator::testSentenceBoundaries() diff --git a/i18npool/source/breakiterator/data/dict_word_hu.txt b/i18npool/source/breakiterator/data/dict_word_hu.txt index 88648e6e5716..4ba426c8c7db 100644 --- a/i18npool/source/breakiterator/data/dict_word_hu.txt +++ b/i18npool/source/breakiterator/data/dict_word_hu.txt @@ -53,7 +53,7 @@ $Double_Quote = [\p{Word_Break = Double_Quote}]; $MidNumLet = [\p{Word_Break = MidNumLet}]; $MidNum = [\p{Word_Break = MidNum}]; $Numeric= [\p{Word_Break = Numeric}]; -$ExtendNumLet = [\p{Word_Break = ExtendNumLet}]; +$ExtendNumLet = [\p{Word_Break = ExtendNumLet}-[:name = NARROW NO-BREAK SPACE:]]; $WSegSpace = [\p{Word_Break = WSegSpace}]; $Extended_Pict = [\p{Extended_Pictographic}]; diff --git a/i18npool/source/breakiterator/data/edit_word.txt b/i18npool/source/breakiterator/data/edit_word.txt index 14fc221aa96e..1e3bcd15b20d 100644 --- a/i18npool/source/breakiterator/data/edit_word.txt +++ b/i18npool/source/breakiterator/data/edit_word.txt @@ -65,7 +65,7 @@ $Extended_Pict = [\p{Extended_Pictographic}]; $MidNumLet = [\p{Word_Break = MidNumLet}-[:name= FULL STOP:]]; # $ExtendNumLet = [\p{Word_Break = ExtendNumLet}]; -$ExtendNumLet = [\p{Word_Break = ExtendNumLet}-[:name= LOW LINE:]]; +$ExtendNumLet = [\p{Word_Break = ExtendNumLet}-[:name= LOW LINE:]-[:name = NARROW NO-BREAK SPACE:]]; ### END CUSTOMIZATION @@ -164,16 +164,18 @@ $Numeric $ExFm* ($MidNum | $MidNumLet | $Single_Quote) $ExFm* $Numeric; $Katakana $ExFm* $Katakana {400}; # rule 13a/b +# allow to select numbers with narrow no-break spaces as thousand separators +$ExtendNumLetNNBSP = [\p{Word_Break = ExtendNumLet}]; $ALetterPlus $ExFm* $ExtendNumLet {200};
core.git: i18npool/qa i18npool/source
i18npool/qa/cppunit/test_breakiterator.cxx | 30 +++ i18npool/source/breakiterator/data/dict_word.txt |2 - 2 files changed, 31 insertions(+), 1 deletion(-) New commits: commit 6e002da1615b52cda4e9331e87878458b1fe9677 Author: László Németh AuthorDate: Thu Jun 27 10:06:03 2024 +0200 Commit: László Németh CommitDate: Thu Jun 27 16:48:41 2024 +0200 tdf#161737 i18npool: fix fake spelling alarms with NNBSP Fix word break by excluding narrow no-break space at the end of the words for spell checking. This was a problem e.g. for French, where (automatically? or manually) inserted narrow no-break space is used to get correct typography before exclamation and question marks, also after and before guillemets, if the OpenType/Graphite font doesn't have this feature). Regression from commit 44699b3de37f07090ac6fee1cd97aa76036e9700 "tdf#49885 BreakIterator rule upgrades". Note: this fixes also the problem, when digits separated by NNBSP thousand separator weren't handled by spell checking, alarming fake spelling mistakes, when "Check words with numbers" was enabled in Tools->Options->Languages and Locales->Writing Aids. (TODO: at the case of thousand separators, remove NBSP by the linguistic module or by the spell checking dictionaries to allow to check numbers with thousand separators and with correct suffix.) Change-Id: I36e10add7e0ba840f207a375ccc8668dbfef9572 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169618 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index e790c17e1155..6fbde026f565 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -992,6 +992,36 @@ void TestBreakIterator::testWordBoundaries() CPPUNIT_ASSERT_EQUAL(sal_Int32(8), aBounds.startPos); CPPUNIT_ASSERT_EQUAL(sal_Int32(11), aBounds.endPos); } + +// tdf#161737: narrow no-break space at the end of words resulted spelling mistakes +{ +aLocale.Language = "en"; +aLocale.Country = "US"; + +OUString aTest(u"L’espace fine insécable\u202F!"_ustr); +aBounds += m_xBreak->getWordBoundary(aTest, 14, aLocale, i18n::WordType::DICTIONARY_WORD, false); +CPPUNIT_ASSERT_EQUAL(sal_Int32(14), aBounds.startPos); +// This was 24 (word + NNBSP) +CPPUNIT_ASSERT_EQUAL(sal_Int32(23), aBounds.endPos); +} + +// tdf#161737: narrow no-break space between digits resulted spelling mistakes +// as a quick fix, limit NBSP as word-part character only for editing, and not for spell checking +// TODO: remove NBSP by the linguistic module or by the spell checking dictionaries to allow +// to check numbers with thousand separators and with correct suffix +{ +aLocale.Language = "en"; +aLocale.Country = "US"; + +OUString aTest(u"1\u202F000\u202F000"_ustr); +aBounds += m_xBreak->getWordBoundary(aTest, 2, aLocale, i18n::WordType::DICTIONARY_WORD, false); +// This was 0 (word + NNBSP) +CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aBounds.startPos); +// This was 8 (word + NNBSP) +CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aBounds.endPos); +} } void TestBreakIterator::testSentenceBoundaries() diff --git a/i18npool/source/breakiterator/data/dict_word.txt b/i18npool/source/breakiterator/data/dict_word.txt index f804b0eec214..deeec7dd659e 100644 --- a/i18npool/source/breakiterator/data/dict_word.txt +++ b/i18npool/source/breakiterator/data/dict_word.txt @@ -54,7 +54,7 @@ $Double_Quote = [\p{Word_Break = Double_Quote}]; $MidNumLet = [\p{Word_Break = MidNumLet}]; $MidNum = [\p{Word_Break = MidNum}]; $Numeric= [\p{Word_Break = Numeric}]; -$ExtendNumLet = [\p{Word_Break = ExtendNumLet}]; +$ExtendNumLet = [\p{Word_Break = ExtendNumLet}-[:name = NARROW NO-BREAK SPACE:]]; $WSegSpace = [\p{Word_Break = WSegSpace}]; $Extended_Pict = [\p{Extended_Pictographic}];
core.git: i18npool/qa i18npool/source
i18npool/qa/cppunit/test_textsearch.cxx | 88 i18npool/source/search/textsearch.cxx | 40 +++--- 2 files changed, 120 insertions(+), 8 deletions(-) New commits: commit 3a02490e1a04c32e18ce5bad5f3c3cb70501a7a4 Author: László Németh AuthorDate: Wed Jun 26 17:53:21 2024 +0200 Commit: László Németh CommitDate: Thu Jun 27 10:22:11 2024 +0200 tdf#138258 i18npool: allow ASCII double quote to match typographic quote Similar to the straight (typewriter or ASCII) apostrophe, straight double quotation mark (") matches its typographic variants now, like other word processors do. Note: regex search doesn't use this matching, similar to the apostrophe search. Follow-up to commit d40f2d02df26e216f367b5da3f9546b73f250469 "tdf#117643 Writer: fix apostrophe search regression". Change-Id: If6a3ee00750828583cd0cfc4aa7f7b656ea9bd1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169605 Reviewed-by: László Németh Tested-by: Jenkins diff --git a/i18npool/qa/cppunit/test_textsearch.cxx b/i18npool/qa/cppunit/test_textsearch.cxx index 269380a90910..38cc099b7c95 100644 --- a/i18npool/qa/cppunit/test_textsearch.cxx +++ b/i18npool/qa/cppunit/test_textsearch.cxx @@ -38,6 +38,7 @@ public: void testSearches(); void testWildcardSearch(); void testApostropheSearch(); +void testQuotationMarkSearch(); void testTdf138410(); CPPUNIT_TEST_SUITE(TestTextSearch); @@ -45,6 +46,7 @@ public: CPPUNIT_TEST(testSearches); CPPUNIT_TEST(testWildcardSearch); CPPUNIT_TEST(testApostropheSearch); +CPPUNIT_TEST(testQuotationMarkSearch); CPPUNIT_TEST(testTdf138410); CPPUNIT_TEST_SUITE_END(); private: @@ -404,6 +406,92 @@ void TestTextSearch::testApostropheSearch() CPPUNIT_ASSERT( aRes.subRegExpressions > 0 ); } +void TestTextSearch::testQuotationMarkSearch() +{ +// A) find typographic quotation marks also by using ASCII ones +OUString str( u"“x”, „y‟, ‘z’, ‚a‛"_ustr ); +sal_Int32 startPos = 0, endPos = str.getLength(); + +// set options +util::SearchOptions aOptions; +aOptions.algorithmType = util::SearchAlgorithms_ABSOLUTE; +aOptions.searchFlag = util::SearchFlags::ALL_IGNORE_CASE; +aOptions.searchString = "\"x\""; +aOptions.transliterateFlags = static_cast(TransliterationFlags::IGNORE_CASE +| TransliterationFlags::IGNORE_WIDTH); +m_xSearch->setOptions( aOptions ); + +util::SearchResult aRes; + +// search forward +aRes = m_xSearch->searchForward( str, startPos, endPos ); +// This was 0. +CPPUNIT_ASSERT( aRes.subRegExpressions > 0 ); +CPPUNIT_ASSERT_EQUAL( static_cast(0), aRes.startOffset[0] ); +CPPUNIT_ASSERT_EQUAL( static_cast(3), aRes.endOffset[0] ); + +// search backwards +aRes = m_xSearch->searchBackward( str, endPos, startPos ); +// This was 0. +CPPUNIT_ASSERT( aRes.subRegExpressions > 0 ); +CPPUNIT_ASSERT_EQUAL( static_cast(3), aRes.startOffset[0] ); +CPPUNIT_ASSERT_EQUAL( static_cast(0), aRes.endOffset[0] ); + +// B) +aOptions.searchString = "\"y\""; +m_xSearch->setOptions( aOptions ); + +// search forward +aRes = m_xSearch->searchForward( str, startPos, endPos ); +// This was 0. +CPPUNIT_ASSERT( aRes.subRegExpressions > 0 ); +CPPUNIT_ASSERT_EQUAL( static_cast(5), aRes.startOffset[0] ); +CPPUNIT_ASSERT_EQUAL( static_cast(8), aRes.endOffset[0] ); + +// search backwards +aRes = m_xSearch->searchBackward( str, endPos, startPos ); +// This was 0. +CPPUNIT_ASSERT( aRes.subRegExpressions > 0 ); +CPPUNIT_ASSERT_EQUAL( static_cast(8), aRes.startOffset[0] ); +CPPUNIT_ASSERT_EQUAL( static_cast(5), aRes.endOffset[0] ); + +// C) +aOptions.searchString = "'z'"; +m_xSearch->setOptions( aOptions ); + +// search forward +aRes = m_xSearch->searchForward( str, startPos, endPos ); +// This was 0. +CPPUNIT_ASSERT( aRes.subRegExpressions > 0 ); +CPPUNIT_ASSERT_EQUAL( static_cast(10), aRes.startOffset[0] ); +CPPUNIT_ASSERT_EQUAL( static_cast(13), aRes.endOffset[0] ); + +// search backwards +aRes = m_xSearch->searchBackward( str, endPos, startPos ); +// This was 0. +CPPUNIT_ASSERT( aRes.subRegExpressions > 0 ); +CPPUNIT_ASSERT_EQUAL( static_cast(13), aRes.startOffset[0] ); +CPPUNIT_ASSERT_EQUAL( static_cast(10), aRes.endOffset[0] ); + +// D) +aOptions.searchString = "'a'"; +m_xSearch->setOptions( aOptions ); + +// search forward +aRes = m_xSearch->searchForward( str, startPos, endPos ); +// This was 0. +CPPUNIT_ASSERT( aRes.subRegExpressions > 0 ); +CPPUNIT_ASSERT_EQUAL( static_cast(15), aRes.startOffset[0] ); +CPPUNIT_ASSERT_EQUAL( stati
dictionaries.git: Changes to 'refs/tags/cp-23.05.14-1'
Tag 'cp-23.05.14-1' created by Andras Timar at 2024-06-25 11:57 + cp-23.05.14-1 Changes since co-23.05.10-1-24: --- 0 files changed ---
core.git: Branch 'libreoffice-24-8' - linguistic/source
linguistic/source/spelldsp.cxx | 41 ++--- 1 file changed, 18 insertions(+), 23 deletions(-) New commits: commit 01c6b99f5836d36f4b8d11320b8ae62ccda814b2 Author: László Németh AuthorDate: Tue Jun 18 14:43:05 2024 +0200 Commit: Xisco Fauli CommitDate: Fri Jun 21 12:49:22 2024 +0200 tdf#161637 linguistic: fix apostrophe in spelling suggestions Use the correct typographic (curly) apostrophe instead of the obsolete straight (typewriter or ASCII) apostrophe. Follow-up to commit e6fade1ce133039d28369751b77ac8faff6e40cb "tdf#38395 enable smart apostrophe replacement by default" and commit 8de1941fe61b461be617e1e88bb362bbd8315654 "tdf#150582 linguistic: fix always rejected words with U+2019 apostrophe". Change-Id: Ic0e9aabcce7e95703601dd74e039f2838c89c769 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169087 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit ee6bf912d615d0afa438f743ddf3e4f6f5f890aa) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169106 Reviewed-by: Xisco Fauli diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index cf83b3a2e3b7..d4f6712a710c 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -59,8 +59,6 @@ class ProposalList { std::vector< OUString > aVec; -boolHasEntry( std::u16string_view rText ) const; - public: ProposalList() {} ProposalList(const ProposalList&) = delete; @@ -68,7 +66,7 @@ public: size_t Count() const; voidPrepend( const OUString ); -voidAppend( const OUString ); +voidAppend( const OUString , bool bPrepend = false ); voidAppend( const std::vector< OUString > ); voidAppend( const Sequence< OUString > ); std::vector< OUString > GetVector() const; @@ -76,28 +74,29 @@ public: } -bool ProposalList::HasEntry( std::u16string_view rText ) const +void ProposalList::Prepend( const OUString ) +{ +Append( rText, /*bPrepend=*/true ); +} + +void ProposalList::Append( const OUString , bool bPrepend ) { bool bFound = false; +// convert ASCII apostrophe to the typographic one +const OUString ( rOrig.indexOf( '\'' ) > -1 ? rOrig.replace('\'', u'’') : rOrig ); size_t nCnt = aVec.size(); for (size_t i = 0; !bFound && i < nCnt; ++i) { if (aVec[i] == rText) bFound = true; } -return bFound; -} - -void ProposalList::Prepend( const OUString ) -{ -if (!HasEntry( rText )) -aVec.insert( aVec.begin(), rText ); -} - -void ProposalList::Append( const OUString ) -{ -if (!HasEntry( rText )) -aVec.push_back( rText ); +if (!bFound) +{ +if ( bPrepend ) +aVec.insert( aVec.begin(), rText ); +else +aVec.push_back( rText ); +} } void ProposalList::Append( const std::vector< OUString > ) @@ -106,18 +105,14 @@ void ProposalList::Append( const std::vector< OUString > ) for ( size_t i = 0; i < nLen; ++i) { const OUString = rNew[i]; -if (!HasEntry( rText )) -Append( rText ); +Append( rText ); } } void ProposalList::Append( const Sequence< OUString > ) { for (const OUString& rText : rNew) -{ -if (!HasEntry( rText )) -Append( rText ); -} +Append( rText ); } size_t ProposalList::Count() const
core.git: Branch 'libreoffice-24-8' - sw/qa sw/source
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 11 +++ sw/source/filter/ww8/docxexport.cxx |4 sw/source/writerfilter/dmapper/SettingsTable.cxx | 15 +++ sw/source/writerfilter/dmapper/SettingsTable.hxx |1 + 4 files changed, 31 insertions(+) New commits: commit a7a57f408628fd6c87d5b3d20d3f1564d5eb15ae Author: László Németh AuthorDate: Wed Jun 19 00:14:21 2024 +0200 Commit: Xisco Fauli CommitDate: Fri Jun 21 12:48:48 2024 +0200 tdf#161643 sw DOCX import/export of maximum consecutive hyphenated lines Fix line break interoperability by importing w:consecutiveHyphenLimit to ParaHyphenationMaxHyphens, and exporting ParaHyphenationMacHyphens to w:consecutiveHyphenLimit in OOXML import/export filters. Change-Id: I5f40bcff34ebebeabc0de9898955abda4dc34cde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169127 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 64365dfa67d5a1d8fbc710238a4ea9c492645de4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169131 Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index 47ac22113db4..0ed377d84726 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -801,6 +801,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf161628, "tdf132599_frames_on_right_pages_no_hyph CPPUNIT_ASSERT_EQUAL( static_cast(0), getProperty(xStyle, u"ParaHyphenationZone"_ustr)); } +CPPUNIT_TEST_FIXTURE(Test, testTdf161643) +{ +loadAndSave("fdo76163.docx"); +xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr); +assertXPath(pXmlSettings, "/w:settings/w:consecutiveHyphenLimit"_ostr, "val"_ostr, u"1"_ustr); + +uno::Reference xStyle(getStyles(u"ParagraphStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY); +// This was false (value 0) +CPPUNIT_ASSERT_EQUAL( static_cast(1), getProperty(xStyle, u"ParaHyphenationMaxHyphens"_ustr)); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf121658) { loadAndSave("tdf121658.docx"); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 149c52f4d6fa..911b2cddc50f 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1220,6 +1220,10 @@ void DocxExport::WriteSettings() bHyphenationZone = true; } +if ( sal_Int16 nMaxHyphens = pZoneItem->GetMaxHyphens() ) +pFS->singleElementNS(XML_w, XML_consecutiveHyphenLimit, FSNS(XML_w, XML_val), + OString::number(nMaxHyphens)); + if ( pZoneItem->IsKeep() && pZoneItem->GetKeepType() ) bHyphenationKeep = true; } diff --git a/sw/source/writerfilter/dmapper/SettingsTable.cxx b/sw/source/writerfilter/dmapper/SettingsTable.cxx index 5d4642f0cb33..fa67518ced65 100644 --- a/sw/source/writerfilter/dmapper/SettingsTable.cxx +++ b/sw/source/writerfilter/dmapper/SettingsTable.cxx @@ -93,6 +93,7 @@ struct SettingsTable_Impl boolm_bAutoHyphenation; boolm_bNoHyphenateCaps; sal_Int16 m_nHyphenationZone; +sal_Int16 m_nConsecutiveHyphenLimit; sal_Int16 m_nUseWord2013TrackBottomHyphenation; sal_Int16 m_nAllowHyphenationAtTrackBottom; boolm_bWidowControl; @@ -142,6 +143,7 @@ struct SettingsTable_Impl , m_bAutoHyphenation(false) , m_bNoHyphenateCaps(false) , m_nHyphenationZone( 360 ) // default is 1/4 in +, m_nConsecutiveHyphenLimit(0) , m_nUseWord2013TrackBottomHyphenation(-1) , m_nAllowHyphenationAtTrackBottom(-1) , m_bWidowControl(false) @@ -298,6 +300,9 @@ void SettingsTable::lcl_sprm(Sprm& rSprm) case NS_ooxml::LN_CT_Settings_hyphenationZone: // 92508; m_pImpl->m_nHyphenationZone = nIntValue; break; +case NS_ooxml::LN_CT_Settings_consecutiveHyphenLimit: +m_pImpl->m_nConsecutiveHyphenLimit = nIntValue; +break; case NS_ooxml::LN_CT_Compat_useFELayout: // 92422; // useFELayout (Do Not Bypass East Asian/Complex Script Layout Code - support of old versions of Word - ignored) break; @@ -556,6 +561,11 @@ sal_Int16 SettingsTable::GetHyphenationZone() const return m_pImpl->m_nHyphenationZone; } +sal_Int16 SettingsTable::GetConsecutiveHyphenLimit() const +{ +return m_pImpl->m_nConsecutiveHyphenLimit; +} + bool SettingsTable::GetHyphenationKeep() const { // if allowHyphenationAtTrackBottom is not true and useWord2013TrackBottomHyphenation is @@ -716,6 +726,11 @@ void SettingsTable::ApplyProperties(rtl::Reference const& xDoc) uno::Reference xPropertySet(xDefau
core.git: Branch 'libreoffice-24-8' - sw/qa sw/source
sw/qa/extras/ooxmlexport/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt | 224 ++ sw/qa/extras/ooxmlexport/ooxmlexport14.cxx |7 sw/source/filter/ww8/docxexport.cxx |8 3 files changed, 239 insertions(+) New commits: commit c494d2129881508ffed6e7eeea3e9afdd62cd393 Author: László Németh AuthorDate: Tue Jun 18 09:32:24 2024 +0200 Commit: Xisco Fauli CommitDate: Fri Jun 21 12:48:26 2024 +0200 tdf#161628 sw DOCX: export zero hyphenation zone, if it's not defined To keep the layout of the document, export zero hyphenation zone instead of nothing, otherwise it would be 360 twips after importing the document with the default hyphenation zone. Follow-up to commit 8d8bc48b5efacde6f99d78a557cd052ce9e0ed07 "tdf#161628 DOCX import: set default hyphenation zone (1/4 inch)". Change-Id: I7be4a001f894bcdf10fff5f1b2e211a5a45566d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169078 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 89a80d637e2831d49cdf48921f961b04fd03cffc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169105 Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/ooxmlexport/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt b/sw/qa/extras/ooxmlexport/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt new file mode 100644 index ..c3df7b605f3a --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt @@ -0,0 +1,224 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + false + true + true + + false + 0 + false + true + true + false + false + 0 + true + false + false + false + false + false + true + false + false + true + false + true + true + false + true + false + false + false + false + true + true + false + false + false + false + false + false + high-resolution + false + 595440 + false + true + false + + + true + + false + false + false + true + true + true + false + 0 + true + false + false + true + true + true + false + true + false + false + false + false + false + true + true + false + + true + false + false + 0 + false + true + + false + false + true + true + false + false
core.git: Branch 'libreoffice-24-8' - sw/qa sw/source
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx |7 +++ sw/source/writerfilter/dmapper/SettingsTable.cxx |2 +- 2 files changed, 8 insertions(+), 1 deletion(-) New commits: commit 4bdb612ae56b0cf30f5e6c40fcfae360260ddd52 Author: László Németh AuthorDate: Tue Jun 18 02:45:30 2024 +0200 Commit: Xisco Fauli CommitDate: Fri Jun 21 12:47:55 2024 +0200 tdf#161628 DOCX import: set default hyphenation zone (1/4 inch) Default value of hyphenationZone is 360 twips (0.25"). Apply this value, if hyphenationZone is not defined, according to the OOXML standard. Follow-up to commit 5a079652c1b1f968a851f47995b0a65b84d2d192 "tdf#149421 DOCX: import/export hyphenation zone". Change-Id: Idadae973d93a14fbbe828fa74562db6262c40904 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169070 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 8d8bc48b5efacde6f99d78a557cd052ce9e0ed07) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169104 Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index ccd4c69d9757..d0e84df71295 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -787,6 +787,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf149421, "tdf121661.docx") } } +DECLARE_OOXMLEXPORT_TEST(testTdf149421_default, "tdf146171.docx") +{ +uno::Reference xStyle(getStyles(u"ParagraphStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY); +// This was 0 (not the default OOXML hyphenationZone) +CPPUNIT_ASSERT_EQUAL( static_cast(360), getProperty(xStyle, u"ParaHyphenationZone"_ustr)); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf121658) { loadAndSave("tdf121658.docx"); diff --git a/sw/source/writerfilter/dmapper/SettingsTable.cxx b/sw/source/writerfilter/dmapper/SettingsTable.cxx index 4003eeed90d2..5d4642f0cb33 100644 --- a/sw/source/writerfilter/dmapper/SettingsTable.cxx +++ b/sw/source/writerfilter/dmapper/SettingsTable.cxx @@ -141,7 +141,7 @@ struct SettingsTable_Impl , m_bNoColumnBalance(false) , m_bAutoHyphenation(false) , m_bNoHyphenateCaps(false) -, m_nHyphenationZone(0) +, m_nHyphenationZone( 360 ) // default is 1/4 in , m_nUseWord2013TrackBottomHyphenation(-1) , m_nAllowHyphenationAtTrackBottom(-1) , m_bWidowControl(false)
core.git: Branch 'libreoffice-24-8' - linguistic/source
linguistic/source/spelldsp.cxx | 32 ++-- linguistic/source/spelldsp.hxx |2 +- 2 files changed, 27 insertions(+), 7 deletions(-) New commits: commit 7b04c29e0fb27064cb6b72ad72570eb1675bd5f1 Author: László Németh AuthorDate: Fri Jun 14 11:26:22 2024 +0200 Commit: Xisco Fauli CommitDate: Fri Jun 21 12:46:34 2024 +0200 tdf#150582 linguistic: fix always rejected words with U+2019 apostrophe During spell checking, words added to the user dictionaries still weren't recognized by Calc, Impress and Draw because of the unnecessary conversion their typographic apostrophes to ASCII apostrophes. Note: Writer has no such problem because of its (obsolete) apostrophe conversion for the user dictionary. First skip the obsolete apostrophe conversion in isValid(), but keep it as a fallback for Writer users. Change-Id: I09870a35d7a91017281ba4b228d338336e7bd9c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168858 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 8de1941fe61b461be617e1e88bb362bbd8315654) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168877 Reviewed-by: Xisco Fauli diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index 92b2d4c3efbd..cf83b3a2e3b7 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -199,10 +199,19 @@ sal_Bool SAL_CALL const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) { MutexGuard aGuard( GetLinguMutex() ); -return isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties ); +// for historical reasons, the word can be only with ASCII apostrophe in the dictionaries, +// so as a fallback, convert typographical apostrophes to avoid annoying users, if they +// have old (user) dictionaries only with the obsolete ASCII apostrophe. +bool bConvert = false; +bool bRet = isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, bConvert ); +if (!bRet && bConvert) +{ +// fallback: convert the apostrophes +bRet = isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, bConvert ); +} +return bRet; } - Reference< XSpellAlternatives > SAL_CALL SpellCheckerDispatcher::spell( const OUString& rWord, const Locale& rLocale, const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) @@ -249,7 +258,8 @@ static Reference< XDictionaryEntry > lcl_GetRulingDictionaryEntry( bool SpellCheckerDispatcher::isValid_Impl( const OUString& rWord, LanguageType nLanguage, -const PropertyValues& rProperties) +const PropertyValues& rProperties, +bool& rConvertApostrophe) { MutexGuard aGuard( GetLinguMutex() ); @@ -267,11 +277,21 @@ bool SpellCheckerDispatcher::isValid_Impl( OUString aChkWord( rWord ); Locale aLocale( LanguageTag::convertToLocale( nLanguage ) ); -// replace typographical apostroph by ascii apostroph +// replace typographical apostrophe by ASCII apostrophe only as a fallback +// for old user dictionaries before the time of the default typographical apostrophe +// (Note: otherwise also no problem with non-Unicode Hunspell dictionaries, because +// the character conversion converts also the typographical apostrophe to the ASCII one) OUString aSingleQuote( GetLocaleDataWrapper( nLanguage ).getQuotationMarkEnd() ); DBG_ASSERT( 1 == aSingleQuote.getLength(), "unexpected length of quotation mark" ); -if (!aSingleQuote.isEmpty()) -aChkWord = aChkWord.replace( aSingleQuote[0], '\'' ); +if (!aSingleQuote.isEmpty() && aChkWord.indexOf(aSingleQuote[0]) > -1) +{ +// tdf#150582 first check with the original typographical apostrophe, +// and convert it only on the second try +if (rConvertApostrophe) +aChkWord = aChkWord.replace( aSingleQuote[0], '\'' ); +else +rConvertApostrophe = true; +} RemoveHyphens( aChkWord ); if (IsIgnoreControlChars( rProperties, GetPropSet() )) diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx index 73fe59579ff3..c05676e1c9f0 100644 --- a/linguistic/source/spelldsp.hxx +++ b/linguistic/source/spelldsp.hxx @@ -69,7 +69,7 @@ class SpellCheckerDispatcher : /// @throws css::uno::RuntimeException /// @throws css::lang::IllegalArgumentException boolisValid_Impl(const OUString& aWord, LanguageType nLanguage, -const css::beans::PropertyValues& aProperties); +const css::beans::PropertyValues& aProperties, bool& rConvertApostrophe); /// @throws css::uno::RuntimeException /// @throws css::lang::IllegalArgumentException
core.git: sw/qa sw/source
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 11 +++ sw/source/filter/ww8/docxexport.cxx |4 sw/source/writerfilter/dmapper/SettingsTable.cxx | 15 +++ sw/source/writerfilter/dmapper/SettingsTable.hxx |1 + 4 files changed, 31 insertions(+) New commits: commit 64365dfa67d5a1d8fbc710238a4ea9c492645de4 Author: László Németh AuthorDate: Wed Jun 19 00:14:21 2024 +0200 Commit: László Németh CommitDate: Wed Jun 19 09:08:56 2024 +0200 tdf#161643 sw DOCX import/export of maximum consecutive hyphenated lines Fix line break interoperability by importing w:consecutiveHyphenLimit to ParaHyphenationMaxHyphens, and exporting ParaHyphenationMacHyphens to w:consecutiveHyphenLimit in OOXML import/export filters. Change-Id: I5f40bcff34ebebeabc0de9898955abda4dc34cde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169127 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index d1e3647b9826..9a19ca827700 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -801,6 +801,17 @@ DECLARE_OOXMLEXPORT_TEST(testTdf161628, "tdf132599_frames_on_right_pages_no_hyph CPPUNIT_ASSERT_EQUAL( static_cast(0), getProperty(xStyle, u"ParaHyphenationZone"_ustr)); } +CPPUNIT_TEST_FIXTURE(Test, testTdf161643) +{ +loadAndSave("fdo76163.docx"); +xmlDocUniquePtr pXmlSettings = parseExport(u"word/settings.xml"_ustr); +assertXPath(pXmlSettings, "/w:settings/w:consecutiveHyphenLimit"_ostr, "val"_ostr, u"1"_ustr); + +uno::Reference xStyle(getStyles(u"ParagraphStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY); +// This was false (value 0) +CPPUNIT_ASSERT_EQUAL( static_cast(1), getProperty(xStyle, u"ParaHyphenationMaxHyphens"_ustr)); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf121658) { loadAndSave("tdf121658.docx"); diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 149c52f4d6fa..911b2cddc50f 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -1220,6 +1220,10 @@ void DocxExport::WriteSettings() bHyphenationZone = true; } +if ( sal_Int16 nMaxHyphens = pZoneItem->GetMaxHyphens() ) +pFS->singleElementNS(XML_w, XML_consecutiveHyphenLimit, FSNS(XML_w, XML_val), + OString::number(nMaxHyphens)); + if ( pZoneItem->IsKeep() && pZoneItem->GetKeepType() ) bHyphenationKeep = true; } diff --git a/sw/source/writerfilter/dmapper/SettingsTable.cxx b/sw/source/writerfilter/dmapper/SettingsTable.cxx index 5d4642f0cb33..fa67518ced65 100644 --- a/sw/source/writerfilter/dmapper/SettingsTable.cxx +++ b/sw/source/writerfilter/dmapper/SettingsTable.cxx @@ -93,6 +93,7 @@ struct SettingsTable_Impl boolm_bAutoHyphenation; boolm_bNoHyphenateCaps; sal_Int16 m_nHyphenationZone; +sal_Int16 m_nConsecutiveHyphenLimit; sal_Int16 m_nUseWord2013TrackBottomHyphenation; sal_Int16 m_nAllowHyphenationAtTrackBottom; boolm_bWidowControl; @@ -142,6 +143,7 @@ struct SettingsTable_Impl , m_bAutoHyphenation(false) , m_bNoHyphenateCaps(false) , m_nHyphenationZone( 360 ) // default is 1/4 in +, m_nConsecutiveHyphenLimit(0) , m_nUseWord2013TrackBottomHyphenation(-1) , m_nAllowHyphenationAtTrackBottom(-1) , m_bWidowControl(false) @@ -298,6 +300,9 @@ void SettingsTable::lcl_sprm(Sprm& rSprm) case NS_ooxml::LN_CT_Settings_hyphenationZone: // 92508; m_pImpl->m_nHyphenationZone = nIntValue; break; +case NS_ooxml::LN_CT_Settings_consecutiveHyphenLimit: +m_pImpl->m_nConsecutiveHyphenLimit = nIntValue; +break; case NS_ooxml::LN_CT_Compat_useFELayout: // 92422; // useFELayout (Do Not Bypass East Asian/Complex Script Layout Code - support of old versions of Word - ignored) break; @@ -556,6 +561,11 @@ sal_Int16 SettingsTable::GetHyphenationZone() const return m_pImpl->m_nHyphenationZone; } +sal_Int16 SettingsTable::GetConsecutiveHyphenLimit() const +{ +return m_pImpl->m_nConsecutiveHyphenLimit; +} + bool SettingsTable::GetHyphenationKeep() const { // if allowHyphenationAtTrackBottom is not true and useWord2013TrackBottomHyphenation is @@ -716,6 +726,11 @@ void SettingsTable::ApplyProperties(rtl::Reference const& xDoc) uno::Reference xPropertySet(xDefault, uno::UNO_QUERY); xPropertySet->setPropertyValue(u"ParaHyphenationZone"_ustr, uno::Any(GetHyphenationZone())); } +if (m_pImpl->m_nConsecutive
core.git: linguistic/source
linguistic/source/spelldsp.cxx | 41 ++--- 1 file changed, 18 insertions(+), 23 deletions(-) New commits: commit ee6bf912d615d0afa438f743ddf3e4f6f5f890aa Author: László Németh AuthorDate: Tue Jun 18 14:43:05 2024 +0200 Commit: László Németh CommitDate: Tue Jun 18 17:27:21 2024 +0200 tdf#161637 linguistic: fix apostrophe in spelling suggestions Use the correct typographic (curly) apostrophe instead of the obsolete straight (typewriter or ASCII) apostrophe. Follow-up to commit e6fade1ce133039d28369751b77ac8faff6e40cb "tdf#38395 enable smart apostrophe replacement by default" and commit 8de1941fe61b461be617e1e88bb362bbd8315654 "tdf#150582 linguistic: fix always rejected words with U+2019 apostrophe". Change-Id: Ic0e9aabcce7e95703601dd74e039f2838c89c769 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169087 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index cf83b3a2e3b7..d4f6712a710c 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -59,8 +59,6 @@ class ProposalList { std::vector< OUString > aVec; -boolHasEntry( std::u16string_view rText ) const; - public: ProposalList() {} ProposalList(const ProposalList&) = delete; @@ -68,7 +66,7 @@ public: size_t Count() const; voidPrepend( const OUString ); -voidAppend( const OUString ); +voidAppend( const OUString , bool bPrepend = false ); voidAppend( const std::vector< OUString > ); voidAppend( const Sequence< OUString > ); std::vector< OUString > GetVector() const; @@ -76,28 +74,29 @@ public: } -bool ProposalList::HasEntry( std::u16string_view rText ) const +void ProposalList::Prepend( const OUString ) +{ +Append( rText, /*bPrepend=*/true ); +} + +void ProposalList::Append( const OUString , bool bPrepend ) { bool bFound = false; +// convert ASCII apostrophe to the typographic one +const OUString ( rOrig.indexOf( '\'' ) > -1 ? rOrig.replace('\'', u'’') : rOrig ); size_t nCnt = aVec.size(); for (size_t i = 0; !bFound && i < nCnt; ++i) { if (aVec[i] == rText) bFound = true; } -return bFound; -} - -void ProposalList::Prepend( const OUString ) -{ -if (!HasEntry( rText )) -aVec.insert( aVec.begin(), rText ); -} - -void ProposalList::Append( const OUString ) -{ -if (!HasEntry( rText )) -aVec.push_back( rText ); +if (!bFound) +{ +if ( bPrepend ) +aVec.insert( aVec.begin(), rText ); +else +aVec.push_back( rText ); +} } void ProposalList::Append( const std::vector< OUString > ) @@ -106,18 +105,14 @@ void ProposalList::Append( const std::vector< OUString > ) for ( size_t i = 0; i < nLen; ++i) { const OUString = rNew[i]; -if (!HasEntry( rText )) -Append( rText ); +Append( rText ); } } void ProposalList::Append( const Sequence< OUString > ) { for (const OUString& rText : rNew) -{ -if (!HasEntry( rText )) -Append( rText ); -} +Append( rText ); } size_t ProposalList::Count() const
core.git: sw/qa sw/source
sw/qa/extras/ooxmlexport/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt | 224 ++ sw/qa/extras/ooxmlexport/ooxmlexport14.cxx |7 sw/source/filter/ww8/docxexport.cxx |8 3 files changed, 239 insertions(+) New commits: commit 89a80d637e2831d49cdf48921f961b04fd03cffc Author: László Németh AuthorDate: Tue Jun 18 09:32:24 2024 +0200 Commit: László Németh CommitDate: Tue Jun 18 13:14:21 2024 +0200 tdf#161628 sw DOCX: export zero hyphenation zone, if it's not defined To keep the layout of the document, export zero hyphenation zone instead of nothing, otherwise it would be 360 twips after importing the document with the default hyphenation zone. Follow-up to commit 8d8bc48b5efacde6f99d78a557cd052ce9e0ed07 "tdf#161628 DOCX import: set default hyphenation zone (1/4 inch)". Change-Id: I7be4a001f894bcdf10fff5f1b2e211a5a45566d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169078 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/ooxmlexport/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt b/sw/qa/extras/ooxmlexport/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt new file mode 100644 index ..c3df7b605f3a --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt @@ -0,0 +1,224 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + false + true + true + + false + 0 + false + true + true + false + false + 0 + true + false + false + false + false + false + true + false + false + true + false + true + true + false + true + false + false + false + false + true + true + false + false + false + false + false + false + high-resolution + false + 595440 + false + true + false + + + true + + false + false + false + true + true + true + false + 0 + true + false + false + true + true + true + false + true + false + false + false + false + false + true + true + false + + true + false + false + 0 + false + true + + false + false + true + true + false + false
core.git: sw/qa sw/source
sw/qa/extras/ooxmlexport/ooxmlexport14.cxx |7 +++ sw/source/writerfilter/dmapper/SettingsTable.cxx |2 +- 2 files changed, 8 insertions(+), 1 deletion(-) New commits: commit 8d8bc48b5efacde6f99d78a557cd052ce9e0ed07 Author: László Németh AuthorDate: Tue Jun 18 02:45:30 2024 +0200 Commit: László Németh CommitDate: Tue Jun 18 13:13:17 2024 +0200 tdf#161628 DOCX import: set default hyphenation zone (1/4 inch) Default value of hyphenationZone is 360 twips (0.25"). Apply this value, if hyphenationZone is not defined, according to the OOXML standard. Follow-up to commit 5a079652c1b1f968a851f47995b0a65b84d2d192 "tdf#149421 DOCX: import/export hyphenation zone". Change-Id: Idadae973d93a14fbbe828fa74562db6262c40904 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169070 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index ccd4c69d9757..d0e84df71295 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -787,6 +787,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf149421, "tdf121661.docx") } } +DECLARE_OOXMLEXPORT_TEST(testTdf149421_default, "tdf146171.docx") +{ +uno::Reference xStyle(getStyles(u"ParagraphStyles"_ustr)->getByName(u"Standard"_ustr), uno::UNO_QUERY); +// This was 0 (not the default OOXML hyphenationZone) +CPPUNIT_ASSERT_EQUAL( static_cast(360), getProperty(xStyle, u"ParaHyphenationZone"_ustr)); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf121658) { loadAndSave("tdf121658.docx"); diff --git a/sw/source/writerfilter/dmapper/SettingsTable.cxx b/sw/source/writerfilter/dmapper/SettingsTable.cxx index 4003eeed90d2..5d4642f0cb33 100644 --- a/sw/source/writerfilter/dmapper/SettingsTable.cxx +++ b/sw/source/writerfilter/dmapper/SettingsTable.cxx @@ -141,7 +141,7 @@ struct SettingsTable_Impl , m_bNoColumnBalance(false) , m_bAutoHyphenation(false) , m_bNoHyphenateCaps(false) -, m_nHyphenationZone(0) +, m_nHyphenationZone( 360 ) // default is 1/4 in , m_nUseWord2013TrackBottomHyphenation(-1) , m_nAllowHyphenationAtTrackBottom(-1) , m_bWidowControl(false)
core.git: Branch 'libreoffice-24-2' - linguistic/source
linguistic/source/spelldsp.cxx | 32 ++-- linguistic/source/spelldsp.hxx |2 +- 2 files changed, 27 insertions(+), 7 deletions(-) New commits: commit f3958668003a8aae1ce0ff0473b2b3e75d285739 Author: László Németh AuthorDate: Fri Jun 14 11:26:22 2024 +0200 Commit: Michael Stahl CommitDate: Tue Jun 18 11:21:41 2024 +0200 tdf#150582 linguistic: fix always rejected words with U+2019 apostrophe During spell checking, words added to the user dictionaries still weren't recognized by Calc, Impress and Draw because of the unnecessary conversion their typographic apostrophes to ASCII apostrophes. Note: Writer has no such problem because of its (obsolete) apostrophe conversion for the user dictionary. First skip the obsolete apostrophe conversion in isValid(), but keep it as a fallback for Writer users. Change-Id: I09870a35d7a91017281ba4b228d338336e7bd9c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168858 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 8de1941fe61b461be617e1e88bb362bbd8315654) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168878 Reviewed-by: Michael Stahl diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index 92b2d4c3efbd..cf83b3a2e3b7 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -199,10 +199,19 @@ sal_Bool SAL_CALL const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) { MutexGuard aGuard( GetLinguMutex() ); -return isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties ); +// for historical reasons, the word can be only with ASCII apostrophe in the dictionaries, +// so as a fallback, convert typographical apostrophes to avoid annoying users, if they +// have old (user) dictionaries only with the obsolete ASCII apostrophe. +bool bConvert = false; +bool bRet = isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, bConvert ); +if (!bRet && bConvert) +{ +// fallback: convert the apostrophes +bRet = isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, bConvert ); +} +return bRet; } - Reference< XSpellAlternatives > SAL_CALL SpellCheckerDispatcher::spell( const OUString& rWord, const Locale& rLocale, const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) @@ -249,7 +258,8 @@ static Reference< XDictionaryEntry > lcl_GetRulingDictionaryEntry( bool SpellCheckerDispatcher::isValid_Impl( const OUString& rWord, LanguageType nLanguage, -const PropertyValues& rProperties) +const PropertyValues& rProperties, +bool& rConvertApostrophe) { MutexGuard aGuard( GetLinguMutex() ); @@ -267,11 +277,21 @@ bool SpellCheckerDispatcher::isValid_Impl( OUString aChkWord( rWord ); Locale aLocale( LanguageTag::convertToLocale( nLanguage ) ); -// replace typographical apostroph by ascii apostroph +// replace typographical apostrophe by ASCII apostrophe only as a fallback +// for old user dictionaries before the time of the default typographical apostrophe +// (Note: otherwise also no problem with non-Unicode Hunspell dictionaries, because +// the character conversion converts also the typographical apostrophe to the ASCII one) OUString aSingleQuote( GetLocaleDataWrapper( nLanguage ).getQuotationMarkEnd() ); DBG_ASSERT( 1 == aSingleQuote.getLength(), "unexpected length of quotation mark" ); -if (!aSingleQuote.isEmpty()) -aChkWord = aChkWord.replace( aSingleQuote[0], '\'' ); +if (!aSingleQuote.isEmpty() && aChkWord.indexOf(aSingleQuote[0]) > -1) +{ +// tdf#150582 first check with the original typographical apostrophe, +// and convert it only on the second try +if (rConvertApostrophe) +aChkWord = aChkWord.replace( aSingleQuote[0], '\'' ); +else +rConvertApostrophe = true; +} RemoveHyphens( aChkWord ); if (IsIgnoreControlChars( rProperties, GetPropSet() )) diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx index 73fe59579ff3..c05676e1c9f0 100644 --- a/linguistic/source/spelldsp.hxx +++ b/linguistic/source/spelldsp.hxx @@ -69,7 +69,7 @@ class SpellCheckerDispatcher : /// @throws css::uno::RuntimeException /// @throws css::lang::IllegalArgumentException boolisValid_Impl(const OUString& aWord, LanguageType nLanguage, -const css::beans::PropertyValues& aProperties); +const css::beans::PropertyValues& aProperties, bool& rConvertApostrophe); /// @throws css::uno::RuntimeException /// @throws css::lang::IllegalArgumentException
dictionaries.git: Changes to 'refs/tags/cp-24.04.3-6'
Tag 'cp-24.04.3-6' created by Andras Timar at 2024-06-17 15:58 + cp-24.04.3-6 Changes since cp-24.04.1-2-3: --- 0 files changed ---
core.git: sw/source
sw/source/core/crsr/swcrsr.cxx | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) New commits: commit 41916d9fb045654fa19b4eac90a3099550a890f7 Author: László Németh AuthorDate: Fri Jun 14 23:21:00 2024 +0200 Commit: László Németh CommitDate: Sat Jun 15 02:13:36 2024 +0200 tdf#161563 sw: show "No Break" context menu only on a whole word It's possible to set CharNoHyphenation on shorter character sequences, than a word, but the result is not correct (use soft hyphens for alternative hyphenation within words), so limit "No Break" menu item only for selected words. (Not completely, because only Point() is checked for word boundary yet, not also Mark().) If no selection, cursor position must be within the hyphenated word (where "No Break" applied for the whole word automatically). This fixes also the assert in SwTextFrame::IsInHyphenatedWord(), when multiple nodes were selected. Follow-up to commit 2f0c7d5691acd4010443856788a54b0abc03098b "tdf#161563 tdf#161565 sw: add No Break to word context menu & visualize". Change-Id: I41b64e6a2eb0daf08f488420fc1eaba2045a28db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168898 Reviewed-by: László Németh Tested-by: Jenkins diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 3a986d37ddc0..2405aaf63eff 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -2370,6 +2370,19 @@ void SwCursor::RestoreSavePos() bool SwCursor::IsInHyphenatedWord(SwRootFrame const& rLayout) const { +// skip, if the selected text contains multiple nodes, long text or space, +// or not in word starting or word ending positions +if ( HasMark() && ( GetPoint()->GetNode() != GetMark()->GetNode() || +abs(GetPoint()->GetContentIndex() - GetMark()->GetContentIndex()) > 100 || +GetText().indexOf(' ') > -1 || +!( IsStartWordWT(css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, ) || + IsEndWordWT(css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, ) ) ) ) +return false; + +// skip, if no selection and the cursor is not in a word +if ( !HasMark() && !IsInWordWT(css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, ) ) +return false; + bool bRet = false; Point aPt; std::pair const tmp(aPt, true); @@ -2377,7 +2390,7 @@ bool SwCursor::IsInHyphenatedWord(SwRootFrame const& rLayout) const , GetPoint(), ); if( pFrame && pFrame->IsTextFrame() ) { -SwPaM aPam( *GetPoint(), *GetMark() ); +SwPaM aPam( *GetPoint() ); bRet = static_cast(pFrame)->IsInHyphenatedWord( , HasMark() ); } return bRet;
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/core/layout/paintfrm.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 2a15e5839c399b312a53da80c983503368a8ac47 Author: László Németh AuthorDate: Mon Jun 3 16:27:55 2024 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Fri Jun 14 19:26:22 2024 +0200 tdf#77388 sw: fix missing table border at cropped images At images cropped by the bottom or right cell boundaries, or at images with zero padding in table cells (e.g, in test document of tdf#160836), table borders were hovered by the image, resulting missing table borders. First paint the cell content, and after that the DOCX-like "collapsing" cell borders in SwTabFrame::PaintSwFrame. Note: this doesn't modify painting of the objects anchored to characters (which still hovers the cell borders), and painting of the text content of the cells (which are still hovered by the cell borders at zero padding, despite their non-transparent background color). Change-Id: Ie41ab275fd101bb9e26d4165362063f0332ac3c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168384 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 03aa8a1d9bfe4af2f37df0bde42193c2cf90ffb4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168320 Reviewed-by: Adolfo Jayme Barrientos diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 5472695e9732..2375fae0db3c 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4645,6 +4645,8 @@ void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& const SwViewOption* pViewOption = gProp.pSGlobalShell->GetViewOptions(); if (pViewOption->IsTable()) { +SwLayoutFrame::PaintSwFrame( rRenderContext, rRect ); + // #i29550# if ( IsCollapsingBorders() ) { @@ -4662,8 +4664,6 @@ void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& SwTabFramePainter aHelper(*this); aHelper.PaintLines(rRenderContext, rRect); } - -SwLayoutFrame::PaintSwFrame( rRenderContext, rRect ); } // #i6467# - no light grey rectangle for page preview else if ( gProp.pSGlobalShell->GetWin() && !gProp.pSGlobalShell->IsPreview() )
core.git: linguistic/source
linguistic/source/spelldsp.cxx | 32 ++-- linguistic/source/spelldsp.hxx |2 +- 2 files changed, 27 insertions(+), 7 deletions(-) New commits: commit 8de1941fe61b461be617e1e88bb362bbd8315654 Author: László Németh AuthorDate: Fri Jun 14 11:26:22 2024 +0200 Commit: László Németh CommitDate: Fri Jun 14 18:44:11 2024 +0200 tdf#150582 linguistic: fix always rejected words with U+2019 apostrophe During spell checking, words added to the user dictionaries still weren't recognized by Calc, Impress and Draw because of the unnecessary conversion their typographic apostrophes to ASCII apostrophes. Note: Writer has no such problem because of its (obsolete) apostrophe conversion for the user dictionary. First skip the obsolete apostrophe conversion in isValid(), but keep it as a fallback for Writer users. Change-Id: I09870a35d7a91017281ba4b228d338336e7bd9c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168858 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx index 92b2d4c3efbd..cf83b3a2e3b7 100644 --- a/linguistic/source/spelldsp.cxx +++ b/linguistic/source/spelldsp.cxx @@ -199,10 +199,19 @@ sal_Bool SAL_CALL const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) { MutexGuard aGuard( GetLinguMutex() ); -return isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties ); +// for historical reasons, the word can be only with ASCII apostrophe in the dictionaries, +// so as a fallback, convert typographical apostrophes to avoid annoying users, if they +// have old (user) dictionaries only with the obsolete ASCII apostrophe. +bool bConvert = false; +bool bRet = isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, bConvert ); +if (!bRet && bConvert) +{ +// fallback: convert the apostrophes +bRet = isValid_Impl( rWord, LinguLocaleToLanguage( rLocale ), rProperties, bConvert ); +} +return bRet; } - Reference< XSpellAlternatives > SAL_CALL SpellCheckerDispatcher::spell( const OUString& rWord, const Locale& rLocale, const css::uno::Sequence< ::css::beans::PropertyValue >& rProperties ) @@ -249,7 +258,8 @@ static Reference< XDictionaryEntry > lcl_GetRulingDictionaryEntry( bool SpellCheckerDispatcher::isValid_Impl( const OUString& rWord, LanguageType nLanguage, -const PropertyValues& rProperties) +const PropertyValues& rProperties, +bool& rConvertApostrophe) { MutexGuard aGuard( GetLinguMutex() ); @@ -267,11 +277,21 @@ bool SpellCheckerDispatcher::isValid_Impl( OUString aChkWord( rWord ); Locale aLocale( LanguageTag::convertToLocale( nLanguage ) ); -// replace typographical apostroph by ascii apostroph +// replace typographical apostrophe by ASCII apostrophe only as a fallback +// for old user dictionaries before the time of the default typographical apostrophe +// (Note: otherwise also no problem with non-Unicode Hunspell dictionaries, because +// the character conversion converts also the typographical apostrophe to the ASCII one) OUString aSingleQuote( GetLocaleDataWrapper( nLanguage ).getQuotationMarkEnd() ); DBG_ASSERT( 1 == aSingleQuote.getLength(), "unexpected length of quotation mark" ); -if (!aSingleQuote.isEmpty()) -aChkWord = aChkWord.replace( aSingleQuote[0], '\'' ); +if (!aSingleQuote.isEmpty() && aChkWord.indexOf(aSingleQuote[0]) > -1) +{ +// tdf#150582 first check with the original typographical apostrophe, +// and convert it only on the second try +if (rConvertApostrophe) +aChkWord = aChkWord.replace( aSingleQuote[0], '\'' ); +else +rConvertApostrophe = true; +} RemoveHyphens( aChkWord ); if (IsIgnoreControlChars( rProperties, GetPropSet() )) diff --git a/linguistic/source/spelldsp.hxx b/linguistic/source/spelldsp.hxx index 73fe59579ff3..c05676e1c9f0 100644 --- a/linguistic/source/spelldsp.hxx +++ b/linguistic/source/spelldsp.hxx @@ -69,7 +69,7 @@ class SpellCheckerDispatcher : /// @throws css::uno::RuntimeException /// @throws css::lang::IllegalArgumentException boolisValid_Impl(const OUString& aWord, LanguageType nLanguage, -const css::beans::PropertyValues& aProperties); +const css::beans::PropertyValues& aProperties, bool& rConvertApostrophe); /// @throws css::uno::RuntimeException /// @throws css::lang::IllegalArgumentException
core.git: officecfg/registry sw/inc sw/sdi sw/source sw/uiconfig
officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |8 + sw/inc/cmdid.h |3 sw/inc/swcrsr.hxx |2 sw/sdi/_textsh.sdi |6 + sw/sdi/swriter.sdi | 17 sw/source/core/crsr/swcrsr.cxx | 15 +++ sw/source/core/inc/txtfrm.hxx |2 sw/source/core/text/atrstck.cxx | 24 + sw/source/core/text/frmcrsr.cxx | 42 ++ sw/source/uibase/shells/txtattr.cxx | 26 ++ sw/uiconfig/swriter/popupmenu/table.xml |2 sw/uiconfig/swriter/popupmenu/text.xml |2 12 files changed, 147 insertions(+), 2 deletions(-) New commits: commit 2f0c7d5691acd4010443856788a54b0abc03098b Author: László Németh AuthorDate: Thu Jun 13 20:25:57 2024 +0200 Commit: László Németh CommitDate: Fri Jun 14 10:10:38 2024 +0200 tdf#161563 tdf#161565 sw: add No Break to word context menu & visualize Add No Break option to context menu of words hyphenated automatically, giving as easy access to fix paragraph layout, as context menu of misspelled words – like DTP software do. Also add this option to context menu of words with enabled "No Break" to disable it. To avoid unwanted paragraph layout during further text editing or formatting, visualize words excluded from hyphenation with a light gray dotted underline, when Formatting Marks is enabled. Follow-up to commit b5e275f47a54bd7fee39dad516a433fde5be872d "tdf#106733 sw: implement CharNoHyphenation" and commit 73bd04a71e741788a2f2f3b26cc46ddb6a361372 "tdf#106733 xmloff: keep fo:hyphenate in character formatting". Change-Id: I81bb410abcf999c8d9a3dca28acfc5c21aa0f260 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168827 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu index b383eb189ec6..c0fdc8887338 100644 --- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu +++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu @@ -3039,6 +3039,14 @@ 9 + + + No Break + + + 8 + + Vertical Scroll Bar diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index 2a7df327eca6..c99e8da6d3f7 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -526,7 +526,8 @@ class SwUINumRuleItem; // Region: Extras #define FN_LINE_NUMBERING_DLG (FN_EXTRA + 2 ) /* */ #define FN_HYPHENATE_OPT_DLG(FN_EXTRA + 5 ) /* */ -#define FN_ADD_UNKNOWN (FN_EXTRA + 6 ) /* learn words */ +#define FN_NO_BREAK (FN_EXTRA + 6 ) /* do not hyphenate */ +#define FN_ADD_UNKNOWN (FN_EXTRA + 7 ) /* learn words */ #define FN_NUMBERING_OUTLINE_DLG(FN_EXTRA + 12) /* */ #define FN_SORTING_DLG (FN_EXTRA + 14) /* */ #define FN_CALCULATE(FN_EXTRA + 15) /* */ diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 33b5ea8d226c..2b424db27de0 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -223,6 +223,8 @@ public: const SwCursor* GetNext() const { return dynamic_cast(GetNextInRing()); } SwCursor* GetPrev() { return dynamic_cast(GetPrevInRing()); } const SwCursor* GetPrev() const { return dynamic_cast(GetPrevInRing()); } + +bool IsInHyphenatedWord( SwRootFrame const& rLayout ) const; }; /** diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi index 4c5a48b7d697..fa5809bd29c0 100644 --- a/sw/sdi/_textsh.sdi +++ b/sw/sdi/_textsh.sdi @@ -1412,6 +1412,12 @@ interface BaseText StateMethod = GetTextCtrlState; DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; ] +FN_NO_BREAK // status(final|play) +[ +ExecMethod = ExecCharAttr; +StateMethod = GetAttrState ; +DisableFlags="SfxDisableFlags::SwOnProtectedCursor"; +] SID_ATTR_CHAR_RELIEF [ ExecMethod = ExecTextCtrl ; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index 03c949ad6ae9..ed49dc200ed9 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -2415,6 +2415,23 @@ SfxVoidItem Hyphenate FN_HYPHENATE_OPT_DLG GroupId = SfxGroupId::Options; ] +SfxVoidItem NoBreak FN_NO_BREAK +() +[ +AutoUpdate = FALSE, +FastCall = FALSE, +ReadOnlyDoc = FALSE, +Toggle = TRUE, +Container = FALSE, +RecordAbsolute = FALSE, +Recor
core.git: Branch 'libreoffice-24-8' - sw/source
sw/source/core/text/portxt.cxx | 69 + 1 file changed, 36 insertions(+), 33 deletions(-) New commits: commit 3fdbc6083336f84ed7fa55fb0ec3fd0288382967 Author: László Németh AuthorDate: Tue Jun 11 20:23:22 2024 +0200 Commit: László Németh CommitDate: Thu Jun 13 11:43:17 2024 +0200 tdf#160170 sw: fix overshrunk justified lines at hyphenation Smart justify uses 2 SwTextGuess::Guess() calls to break a line, but using the same SwTextGuess object resulted overshrunk lines, if the first call resulted hyphenation, because of the bad state of the object for the second call. If we need a second call, now instantiate a new object for it. Regression from commit 36bfc86e27fa03ee16f87819549ab126c5a68cac "tdf#119908 tdf#158776 sw smart justify: shrink only spaces". Note: the reported test document was already fixed by commit f050103c3324d878b310f37429ea3580a8230905 "stale hyphenation data after skipping blanks". Change-Id: I478407dc7650206d3feb72d5b89e78b1194590c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168693 Reviewed-by: László Németh Tested-by: Jenkins (cherry picked from commit ca540209a8c20a2734f180d4706d5153bdf64523) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168724 diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 8dcf75dc0019..b82936d4c1d4 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -301,14 +301,14 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) return bFull; } -SwTextGuess aGuess; -bool bFull = !aGuess.Guess( *this, rInf, Height() ); +std::unique_ptr pGuess(new SwTextGuess()); +bool bFull = !pGuess->Guess( *this, rInf, Height() ); // tdf#158776 for the last full text portion, call Guess() again to allow more text in the // adjusted line by shrinking spaces using the know space count from the first Guess() call const SvxAdjust& rAdjust = rInf.GetTextFrame()->GetTextNodeForParaProps()->GetSwAttrSet().GetAdjust().GetAdjust(); if ( bFull && rAdjust == SvxAdjust::Block && - aGuess.BreakPos() != TextFrameIndex(COMPLETE_STRING) && + pGuess->BreakPos() != TextFrameIndex(COMPLETE_STRING) && rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess().get( DocumentSettingId::JUSTIFY_LINES_WITH_SHRINKING) && // tdf#158436 avoid shrinking at underflow, e.g. no-break space after a @@ -316,7 +316,7 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) !rInf.IsUnderflow() ) { sal_Int32 nSpacesInLine(0); -for (sal_Int32 i = sal_Int32(rInf.GetLineStart()); i < sal_Int32(aGuess.BreakPos()); ++i) +for (sal_Int32 i = sal_Int32(rInf.GetLineStart()); i < sal_Int32(pGuess->BreakPos()); ++i) { sal_Unicode cChar = rInf.GetText()[i]; if ( cChar == CH_BLANK ) @@ -329,16 +329,19 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) // TODO: handle the case, if the line contains extra amount of spaces if ( // no automatic hyphenation - !aGuess.HyphWord().is() && + !pGuess->HyphWord().is() && // no hyphenation at soft hyphen - aGuess.BreakPos() < TextFrameIndex(rInf.GetText().getLength()) && - rInf.GetText()[sal_Int32(aGuess.BreakPos())] != CHAR_SOFTHYPHEN ) + pGuess->BreakPos() < TextFrameIndex(rInf.GetText().getLength()) && + rInf.GetText()[sal_Int32(pGuess->BreakPos())] != CHAR_SOFTHYPHEN ) { ++nSpacesInLine; } if ( nSpacesInLine > 0 ) -bFull = !aGuess.Guess( *this, rInf, Height(), nSpacesInLine ); +{ +pGuess.reset(new SwTextGuess()); +bFull = !pGuess->Guess( *this, rInf, Height(), nSpacesInLine ); +} } // these are the possible cases: @@ -357,8 +360,8 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) // case A: line not yet full if ( !bFull ) { -Width( aGuess.BreakWidth() ); -ExtraBlankWidth(aGuess.ExtraBlankWidth()); +Width( pGuess->BreakWidth() ); +ExtraBlankWidth(pGuess->ExtraBlankWidth()); // Caution! if( !InExpGrp() || InFieldGrp() ) SetLen( rInf.GetLen() ); @@ -374,22 +377,22 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) new SwKernPortion( *this, nKern ); } // special case: hanging portion -else if( aGuess.GetHangingPortion() ) +else if( pGuess->GetHangingPortion() ) { -Width( aGuess.BreakWidth() ); -SetLen( aGuess.BreakPos() - rInf.GetIdx() ); -aGuess.GetHangingPortion()->SetAscent( Ge
core.git: sw/source
sw/source/core/text/portxt.cxx | 69 + 1 file changed, 36 insertions(+), 33 deletions(-) New commits: commit ca540209a8c20a2734f180d4706d5153bdf64523 Author: László Németh AuthorDate: Tue Jun 11 20:23:22 2024 +0200 Commit: László Németh CommitDate: Wed Jun 12 23:13:39 2024 +0200 tdf#160170 sw: fix overshrunk justified lines at hyphenation Smart justify uses 2 SwTextGuess::Guess() calls to break a line, but using the same SwTextGuess object resulted overshrunk lines, if the first call resulted hyphenation, because of the bad state of the object for the second call. If we need a second call, now instantiate a new object for it. Regression from commit 36bfc86e27fa03ee16f87819549ab126c5a68cac "tdf#119908 tdf#158776 sw smart justify: shrink only spaces". Note: the reported test document was already fixed by commit f050103c3324d878b310f37429ea3580a8230905 "stale hyphenation data after skipping blanks". Change-Id: I478407dc7650206d3feb72d5b89e78b1194590c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168693 Reviewed-by: László Németh Tested-by: Jenkins diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 8dcf75dc0019..b82936d4c1d4 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -301,14 +301,14 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) return bFull; } -SwTextGuess aGuess; -bool bFull = !aGuess.Guess( *this, rInf, Height() ); +std::unique_ptr pGuess(new SwTextGuess()); +bool bFull = !pGuess->Guess( *this, rInf, Height() ); // tdf#158776 for the last full text portion, call Guess() again to allow more text in the // adjusted line by shrinking spaces using the know space count from the first Guess() call const SvxAdjust& rAdjust = rInf.GetTextFrame()->GetTextNodeForParaProps()->GetSwAttrSet().GetAdjust().GetAdjust(); if ( bFull && rAdjust == SvxAdjust::Block && - aGuess.BreakPos() != TextFrameIndex(COMPLETE_STRING) && + pGuess->BreakPos() != TextFrameIndex(COMPLETE_STRING) && rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess().get( DocumentSettingId::JUSTIFY_LINES_WITH_SHRINKING) && // tdf#158436 avoid shrinking at underflow, e.g. no-break space after a @@ -316,7 +316,7 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) !rInf.IsUnderflow() ) { sal_Int32 nSpacesInLine(0); -for (sal_Int32 i = sal_Int32(rInf.GetLineStart()); i < sal_Int32(aGuess.BreakPos()); ++i) +for (sal_Int32 i = sal_Int32(rInf.GetLineStart()); i < sal_Int32(pGuess->BreakPos()); ++i) { sal_Unicode cChar = rInf.GetText()[i]; if ( cChar == CH_BLANK ) @@ -329,16 +329,19 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) // TODO: handle the case, if the line contains extra amount of spaces if ( // no automatic hyphenation - !aGuess.HyphWord().is() && + !pGuess->HyphWord().is() && // no hyphenation at soft hyphen - aGuess.BreakPos() < TextFrameIndex(rInf.GetText().getLength()) && - rInf.GetText()[sal_Int32(aGuess.BreakPos())] != CHAR_SOFTHYPHEN ) + pGuess->BreakPos() < TextFrameIndex(rInf.GetText().getLength()) && + rInf.GetText()[sal_Int32(pGuess->BreakPos())] != CHAR_SOFTHYPHEN ) { ++nSpacesInLine; } if ( nSpacesInLine > 0 ) -bFull = !aGuess.Guess( *this, rInf, Height(), nSpacesInLine ); +{ +pGuess.reset(new SwTextGuess()); +bFull = !pGuess->Guess( *this, rInf, Height(), nSpacesInLine ); +} } // these are the possible cases: @@ -357,8 +360,8 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) // case A: line not yet full if ( !bFull ) { -Width( aGuess.BreakWidth() ); -ExtraBlankWidth(aGuess.ExtraBlankWidth()); +Width( pGuess->BreakWidth() ); +ExtraBlankWidth(pGuess->ExtraBlankWidth()); // Caution! if( !InExpGrp() || InFieldGrp() ) SetLen( rInf.GetLen() ); @@ -374,22 +377,22 @@ bool SwTextPortion::Format_( SwTextFormatInfo ) new SwKernPortion( *this, nKern ); } // special case: hanging portion -else if( aGuess.GetHangingPortion() ) +else if( pGuess->GetHangingPortion() ) { -Width( aGuess.BreakWidth() ); -SetLen( aGuess.BreakPos() - rInf.GetIdx() ); -aGuess.GetHangingPortion()->SetAscent( GetAscent() ); -Insert( aGuess.ReleaseHangingPortion() ); +Width( pGuess->BreakWidth() ); +SetLen( pGuess->BreakPos()
dictionaries.git: Changes to 'refs/tags/cp-24.04.3-5'
Tag 'cp-24.04.3-5' created by Andras Timar at 2024-06-12 10:09 + cp-24.04.3-5 Changes since cp-24.04.1-2-3: --- 0 files changed ---
core.git: include/svtools svtools/source sw/qa sw/source
include/svtools/ruler.hxx | 11 ++ svtools/source/control/ruler.cxx| 20 ++--- sw/qa/extras/uiwriter/uiwriter6.cxx | 134 sw/source/core/frmedt/fetab.cxx | 43 +++ sw/source/uibase/docvw/edtwin3.cxx | 10 +- 5 files changed, 187 insertions(+), 31 deletions(-) New commits: commit b285cf49dffe8a74f0ba54b88b781db6a68a4f3b Author: László Németh AuthorDate: Sat Jun 8 23:39:13 2024 +0200 Commit: László Németh CommitDate: Mon Jun 10 23:22:20 2024 +0200 tdf#157833 tdf#155692 sw: fix hit area to resize row/col Fix 1) missing or too narrow hit area (tdf#157833), and 2) not recognized click inside hit area (tdf#155692). It was impossible or very hard to resize text table columns and rows using the mouse: 1) Double arrow, i.e. "resize row/col" mouse pointer shows the hit area of text table row/column borders. This was missing or was very narrow with normal zoom, because of an obsolete constant for low resolution displays. Change this constant used in IsSame() with scale-dependent values to support the same hit area on different zoom levels and with different screen resolutions. 2) Especially on bigger zoom, "resize row/col" mouse pointer, i. e. the visible hit area didn't guarantee drag & drop any more because of too small hit area in pixels in the svruler code base: clicking on not exactly center of the hit area resulted selection of cells or the cell content instead of drag & drop the border, violating WYSIWYG. Enlarge the default 1 pixel to 5 pixels to cover the whole hit area. Note: only for resizing table borders inside the document, not on the horizontal and vertical rulers. Change-Id: I398a0de782040b0ad18835658ed625117a6e0e06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168605 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 8acc70aa14c1..a7a0a581f941 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -691,8 +691,12 @@ private: SVT_DLLPRIVATE bool ImplDoHitTest( const Point& rPosition, RulerSelection* pHitTest, bool bRequiredStyle = false, - RulerIndentStyle nRequiredStyle = RulerIndentStyle::Top ) const; -SVT_DLLPRIVATE bool ImplDocHitTest( const Point& rPos, RulerType eDragType, RulerSelection* pHitTest ) const; + RulerIndentStyle nRequiredStyle = RulerIndentStyle::Top, + tools::Long nTolerance = 1 ) const; +SVT_DLLPRIVATE bool ImplDocHitTest( const Point& rPos, + RulerType eDragType, + RulerSelection* pHitTest, + tools::Long nTolerance = 1 ) const; SVT_DLLPRIVATE bool ImplStartDrag( RulerSelection const * pHitTest, sal_uInt16 nModifier ); SVT_DLLPRIVATE void ImplDrag( const Point& rPos ); SVT_DLLPRIVATE void ImplEndDrag(); @@ -743,7 +747,8 @@ public: voidSetExtraType( RulerExtra eNewExtraType, sal_uInt16 nStyle = 0 ); boolStartDocDrag( const MouseEvent& rMEvt, - RulerType eDragType ); + RulerType eDragType, + tools::Long nTolerance = 1 ); RulerType GetDragType() const { return meDragType; } tools::LongGetDragPos() const { return mnDragPos; } sal_uInt16 GetDragAryPos() const { return mnDragAryPos; } diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index b5b49047a064..074df6afabcc 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -1416,7 +1416,8 @@ void Ruler::ImplUpdate( bool bMustCalc ) } bool Ruler::ImplDoHitTest( const Point& rPos, RulerSelection* pHitTest, - bool bRequireStyle, RulerIndentStyle nRequiredStyle ) const + bool bRequireStyle, RulerIndentStyle nRequiredStyle, + tools::Long nTolerance ) const { sal_Int32 i; sal_uInt16 nStyle; @@ -1557,7 +1558,7 @@ bool Ruler::ImplDoHitTest( const Point& rPos, RulerSelection* pHitTest, } // test the borders -int nBorderTolerance = 1; +int nBorderTolerance = nTolerance; if(pHitTest->bExpandTest) { nBorderTolerance++; @@ -1573,7 +1574,6 @@ bool Ruler::ImplDoHitTest( const Point& rPos, RulerSelection* pHitTest, { n1 -= nBorderTolerance; n2 += nBorderTolerance; - } if ( (nX >= n1) && (nX &
dictionaries.git: Changes to 'refs/tags/cp-24.04.3-4'
Tag 'cp-24.04.3-4' created by Andras Timar at 2024-06-10 15:03 + cp-24.04.3-4 Changes since cp-24.04.1-2-3: --- 0 files changed ---
dictionaries.git: Changes to 'refs/tags/cp-23.05.13-1'
Tag 'cp-23.05.13-1' created by Andras Timar at 2024-06-06 11:48 + cp-23.05.13-1 Changes since co-23.05.10-1-24: --- 0 files changed ---
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf161426.fodt | 197 ++ sw/qa/extras/uiwriter/uiwriter6.cxx | 155 +++ sw/source/core/frmedt/feshview.cxx| 26 +-- 3 files changed, 363 insertions(+), 15 deletions(-) New commits: commit e15a11679a3e0b4e67a0a27cd42f7fc5567e725f Author: László Németh AuthorDate: Wed Jun 5 14:29:29 2024 +0200 Commit: Michael Stahl CommitDate: Thu Jun 6 10:46:00 2024 +0200 tdf#161426 sw: fix selection in multicolumn floating table It was not possible to select text content of a cell, if one of the previous cells in the same row contains a cropped image hovering this cell, too. Follow-up to commit f3b899655018397e71300dbb32cdf4f82940a68b "tdf#160842 sw: select cell content instead of cropped part of image". Also clean-up to commit 2f7bb481c57458a38769ebd961f07cc45767f1f7 "tdf#161332 sw: fix missing selection of floating table". Change-Id: Ib033f7238d9513c8ed18c472ce4afbd4d6ad1172 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168475 Reviewed-by: László Németh Tested-by: Jenkins (cherry picked from commit 886cbcd7627985692d4d2ad3197b1af08378d430) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168437 Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/uiwriter/data/tdf161426.fodt b/sw/qa/extras/uiwriter/data/tdf161426.fodt new file mode 100644 index ..473921880e39 --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf161426.fodt @@ -0,0 +1,197 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + 2024-06-05T12:36:26.032955294PT4M18S2LibreOfficeDev/24.8.0.0.alpha1$Linux_X86_64 LibreOffice_project/57c56b7b826c02868e48120432363fcb8f9e394a + + + 226 + 0 + 35696 + 20736 + true + false + + + view2 + 18053 + 2501 + 0 + 226 + 35694 + 20960 + 0 + 1 + false + 110 + false + false + false + false + false + false + + + + + + + http://openoffice.org/2004/office; xmlns:xlink="http://www.w3.org/1999/xlink"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
core.git: sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf161426.fodt | 197 ++ sw/qa/extras/uiwriter/uiwriter6.cxx | 155 +++ sw/source/core/frmedt/feshview.cxx| 26 +-- 3 files changed, 363 insertions(+), 15 deletions(-) New commits: commit 886cbcd7627985692d4d2ad3197b1af08378d430 Author: László Németh AuthorDate: Wed Jun 5 14:29:29 2024 +0200 Commit: László Németh CommitDate: Wed Jun 5 22:22:00 2024 +0200 tdf#161426 sw: fix selection in multicolumn floating table It was not possible to select text content of a cell, if one of the previous cells in the same row contains a cropped image hovering this cell, too. Follow-up to commit f3b899655018397e71300dbb32cdf4f82940a68b "tdf#160842 sw: select cell content instead of cropped part of image". Also clean-up to commit 2f7bb481c57458a38769ebd961f07cc45767f1f7 "tdf#161332 sw: fix missing selection of floating table". Change-Id: Ib033f7238d9513c8ed18c472ce4afbd4d6ad1172 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168475 Reviewed-by: László Németh Tested-by: Jenkins diff --git a/sw/qa/extras/uiwriter/data/tdf161426.fodt b/sw/qa/extras/uiwriter/data/tdf161426.fodt new file mode 100644 index ..473921880e39 --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf161426.fodt @@ -0,0 +1,197 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + 2024-06-05T12:36:26.032955294PT4M18S2LibreOfficeDev/24.8.0.0.alpha1$Linux_X86_64 LibreOffice_project/57c56b7b826c02868e48120432363fcb8f9e394a + + + 226 + 0 + 35696 + 20736 + true + false + + + view2 + 18053 + 2501 + 0 + 226 + 35694 + 20960 + 0 + 1 + false + 110 + false + false + false + false + false + false + + + + + + + http://openoffice.org/2004/office; xmlns:xlink="http://www.w3.org/1999/xlink"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf157533.fodt | 438 ++ sw/qa/extras/uiwriter/uiwriter6.cxx | 56 +++ sw/source/core/frmedt/feshview.cxx| 20 + 3 files changed, 511 insertions(+), 3 deletions(-) New commits: commit a6c7a66d862dad2c78378b9da4febf184b052368 Author: László Németh AuthorDate: Wed Jun 5 01:39:48 2024 +0200 Commit: Michael Stahl CommitDate: Wed Jun 5 11:15:04 2024 +0200 tdf#157533 sw: fix cursor position deselecting formula in table Fix lost cursor by deselecting formula object anchored as character as single content of table cells. In this case, the cursor was positioned inside the frame of the formula, disappeared in a flash. Fix also bad cursor position by deselecting formula object anchored as character at beginning of text lines in table content. Follow-up to commit 014e5f559a9acf319af24c721dbe6b0bc3bc5882 "tdf#161360 sw: fix cursor position deselecting image in table". Change-Id: Ia1a96359f473071c4cead580322aa9c1af1d3f24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168416 Reviewed-by: László Németh Tested-by: Jenkins (cherry picked from commit 3e0650fb166cac116a43f6ce5d03bd69830e37b8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168431 Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/uiwriter/data/tdf157533.fodt b/sw/qa/extras/uiwriter/data/tdf157533.fodt new file mode 100644 index ..a35061acc4bf --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf157533.fodt @@ -0,0 +1,438 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + 2023-09-30T17:41:02.606002023-09-30T23:03:25.64100PT7M1S2LibreOfficeDev/24.8.0.0.alpha1$Linux_X86_64 LibreOffice_project/57c56b7b826c02868e48120432363fcb8f9e394a + + + 0 + 0 + 39266 + 22809 + true + false
core.git: sw/source
sw/source/core/layout/paintfrm.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 78a9afc5ea493a703467b72475a9d80a9fa8a6db Author: László Németh AuthorDate: Wed Jun 5 02:01:17 2024 +0200 Commit: László Németh CommitDate: Wed Jun 5 10:06:28 2024 +0200 tdf#77388 sw: add missing comment Change-Id: Ie288374f7d14171b84488adf5573915d8a5e6f36 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168417 Tested-by: László Németh Reviewed-by: László Németh diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index fd426234a652..7bcd14b396f3 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4667,6 +4667,7 @@ void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& const SwViewOption* pViewOption = gProp.pSGlobalShell->GetViewOptions(); if (pViewOption->IsTable()) { +// tdf#77388 first paint the cell content to avoid of removing own border SwLayoutFrame::PaintSwFrame( rRenderContext, rRect ); // #i29550#
core.git: sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf157533.fodt | 438 ++ sw/qa/extras/uiwriter/uiwriter6.cxx | 56 +++ sw/source/core/frmedt/feshview.cxx| 20 + 3 files changed, 511 insertions(+), 3 deletions(-) New commits: commit 3e0650fb166cac116a43f6ce5d03bd69830e37b8 Author: László Németh AuthorDate: Wed Jun 5 01:39:48 2024 +0200 Commit: László Németh CommitDate: Wed Jun 5 10:04:58 2024 +0200 tdf#157533 sw: fix cursor position deselecting formula in table Fix lost cursor by deselecting formula object anchored as character as single content of table cells. In this case, the cursor was positioned inside the frame of the formula, disappeared in a flash. Fix also bad cursor position by deselecting formula object anchored as character at beginning of text lines in table content. Follow-up to commit 014e5f559a9acf319af24c721dbe6b0bc3bc5882 "tdf#161360 sw: fix cursor position deselecting image in table". Change-Id: Ia1a96359f473071c4cead580322aa9c1af1d3f24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168416 Reviewed-by: László Németh Tested-by: Jenkins diff --git a/sw/qa/extras/uiwriter/data/tdf157533.fodt b/sw/qa/extras/uiwriter/data/tdf157533.fodt new file mode 100644 index ..a35061acc4bf --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf157533.fodt @@ -0,0 +1,438 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + 2023-09-30T17:41:02.606002023-09-30T23:03:25.64100PT7M1S2LibreOfficeDev/24.8.0.0.alpha1$Linux_X86_64 LibreOffice_project/57c56b7b826c02868e48120432363fcb8f9e394a + + + 0 + 0 + 39266 + 22809 + true + false
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/uiwriter/uiwriter6.cxx | 62 sw/source/core/frmedt/feshview.cxx | 24 + 2 files changed, 86 insertions(+) New commits: commit 96a4b71bc39ab4f16dd9cc609d4d218dd36dd8d6 Author: László Németh AuthorDate: Fri May 31 12:38:12 2024 +0200 Commit: Michael Stahl CommitDate: Tue Jun 4 11:58:46 2024 +0200 tdf#161360 sw: fix cursor position deselecting image in table In tables, when the selected image was anchored as character at beginning of the table row, pressing Escape resulted completely lost text cursor (after a short blinking, not visible, missing typing etc.) or – in the case of floating tables – cursor in a bad position (after the table instead of before the image). Change-Id: Ib49211ec3531110fc8f5f65fb700318884519666 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168289 Reviewed-by: László Németh Tested-by: Jenkins (cherry picked from commit 014e5f559a9acf319af24c721dbe6b0bc3bc5882) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168312 Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index 7ef7a1df186e..4b994cc9322c 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -1687,6 +1687,68 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161332) CPPUNIT_ASSERT_EQUAL(SelectionType::Frame, eType2); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161360) +{ +createSwDoc("tdf160842.fodt"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); +// the cursor is not in the table +CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable()); + +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); +auto pPage = dynamic_cast(pLayout->Lower()); +CPPUNIT_ASSERT(pPage); +const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs.size()); +auto pPageFly = dynamic_cast(rPageObjs[0]); +CPPUNIT_ASSERT(pPageFly); +auto pTable = dynamic_cast(pPageFly->GetLower()); +CPPUNIT_ASSERT(pTable); +auto pRow1 = pTable->GetLower(); +CPPUNIT_ASSERT(pRow1->IsRowFrame()); +auto pCellA1 = pRow1->GetLower(); +CPPUNIT_ASSERT(pCellA1); +const SwRect& rCellA1Rect = pCellA1->getFrameArea(); +auto nRowHeight = rCellA1Rect.Height(); + +// select image by clicking on it at the center of the upper cell +Point ptFrom(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() + nRowHeight / 2); +vcl::Window& rEditWin = pDoc->GetDocShell()->GetView()->GetEditWin(); +Point aFrom = rEditWin.LogicToPixel(ptFrom); +MouseEvent aClickEvent(aFrom, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent); +rEditWin.MouseButtonUp(aClickEvent); + +// Then make sure that the image is selected: +SelectionType eType = pWrtShell->GetSelectionType(); +CPPUNIT_ASSERT_EQUAL(SelectionType::Graphic, eType); + +// select the text frame instead of the image +// by pressing Escape +dispatchCommand(mxComponent, ".uno:Escape", {}); + +// Then make sure that the cursor in the table: +SelectionType eType2 = pWrtShell->GetSelectionType(); +// This was false (only SelectionType::Text) +bool bCursorInTable = eType2 == (SelectionType::Text | SelectionType::Table); +CPPUNIT_ASSERT(bCursorInTable); + +// select the text frame by pressing Escape again +dispatchCommand(mxComponent, ".uno:Escape", {}); + +eType2 = pWrtShell->GetSelectionType(); +CPPUNIT_ASSERT_EQUAL(SelectionType::Frame, eType2); + +// deselect the text frame by pressing Escape again +dispatchCommand(mxComponent, ".uno:Escape", {}); + +eType2 = pWrtShell->GetSelectionType(); +// The text cursor is after the floating table +CPPUNIT_ASSERT_EQUAL(SelectionType::Text, eType2); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115132) { createSwDoc(); diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index 45229e3b9ff9..e24574371ad6 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -191,6 +191,7 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) ( pOldSelFly->GetFormat()->GetProtect().IsContentProtected() && !IsReadOnlyAvailable() )) { +SdrObject *pOldObj = rMrkList.GetMark(0)->GetMarkedSdrObj(); // If a fly is deselected, which contains graphic, OLE or // otherwise, the cursor should be removed from it. // Sim
core.git: Branch 'libreoffice-24-2' - sw/inc sw/qa sw/source
sw/inc/fesh.hxx |2 - sw/qa/extras/uiwriter/uiwriter6.cxx | 65 ++-- sw/source/core/frmedt/feshview.cxx | 30 ++-- sw/source/uibase/docvw/edtwin.cxx | 11 +- 4 files changed, 101 insertions(+), 7 deletions(-) New commits: commit d6fad3920cda937e18690738b3fae17d548d8f04 Author: László Németh AuthorDate: Thu May 30 01:22:59 2024 +0200 Commit: Michael Stahl CommitDate: Tue Jun 4 11:51:03 2024 +0200 tdf#161332 sw: fix missing selection of floating table A fixed-height cell can contain a bigger image, which is cropped by cell boundaries. In this case, it was not possible to select the floating table by clicking on its right border. Note: fix also tests of tdf#44773 and tdf#160836 related to DPI-dependent platforms, see tdf#160992. Follow-up to commit 30de13743f144aced83bc43d310592f82788c910 "tdf#160836 sw: resize rows at images cropped by row height" and commit f3b899655018397e71300dbb32cdf4f82940a68b "tdf#160842 sw: select cell content instead of cropped part of image". Change-Id: I22c3e34f4c8147736c29b62722f7fc43c862ba48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168237 Reviewed-by: László Németh Tested-by: Jenkins (cherry picked from commit 2f7bb481c57458a38769ebd961f07cc45767f1f7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168205 Reviewed-by: Michael Stahl diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index a0a3a64176d7..3d2ba0308ce2 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -297,7 +297,7 @@ public: /** Test if there is a draw object at that position and if it should be selected. The 'should' is aimed at Writer text fly frames which may be in front of the draw object. */ -bool ShouldObjectBeSelected(const Point& rPt); +bool ShouldObjectBeSelected(const Point& rPt, bool *pSelectFrameInsteadOfCroppedImage = nullptr); bool MoveAnchor( SwMove nDir ); diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index 0dfb0076ef1a..7ef7a1df186e 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -1474,7 +1474,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf44773) rEditWin.ReleaseMouse(); // this was 396 (not modified row height previously) -CPPUNIT_ASSERT_EQUAL(tools::Long(810), pCellA1->getFrameArea().Height()); +CPPUNIT_ASSERT_GREATER(tools::Long(750), pCellA1->getFrameArea().Height()); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160842) @@ -1561,7 +1561,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160836) rEditWin.ReleaseMouse(); // this was 3910 (not modified row height previously) -CPPUNIT_ASSERT_EQUAL(tools::Long(1980), pCellA1->getFrameArea().Height()); +CPPUNIT_ASSERT_LESS(tools::Long(2000), pCellA1->getFrameArea().Height()); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161261) @@ -1626,6 +1626,67 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161261) CPPUNIT_ASSERT_GREATER(sal_Int32(8000), xShape->getSize().Height); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161332) +{ +createSwDoc("tdf160842.fodt"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); +// the cursor is not in the table +CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable()); + +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); +auto pPage = dynamic_cast(pLayout->Lower()); +CPPUNIT_ASSERT(pPage); +const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs.size()); +auto pPageFly = dynamic_cast(rPageObjs[0]); +CPPUNIT_ASSERT(pPageFly); +auto pTable = dynamic_cast(pPageFly->GetLower()); +CPPUNIT_ASSERT(pTable); +auto pRow1 = pTable->GetLower(); +CPPUNIT_ASSERT(pRow1->IsRowFrame()); +auto pCellA1 = pRow1->GetLower(); +CPPUNIT_ASSERT(pCellA1); +const SwRect& rCellA1Rect = pCellA1->getFrameArea(); +auto nRowHeight = rCellA1Rect.Height(); + +// select text frame by clicking on it at the right side of the upper cell +Point ptFrom(rCellA1Rect.Left() + rCellA1Rect.Width(), rCellA1Rect.Top() + nRowHeight / 2); +vcl::Window& rEditWin = pDoc->GetDocShell()->GetView()->GetEditWin(); +Point aFrom = rEditWin.LogicToPixel(ptFrom); +MouseEvent aClickEvent(aFrom, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent); +rEditWin.MouseButtonUp(aClickEvent); + +// Then make sure that the text frame is selected: +SelectionType eType = pWrtShell->GetSelectionType(); +// This was false (SelectionType::Graphic) +CPPUNIT_ASSERT
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/uiwriter/uiwriter6.cxx | 63 sw/source/core/layout/flylay.cxx| 38 ++--- 2 files changed, 96 insertions(+), 5 deletions(-) New commits: commit c7402930ed73602bfbaefd86abb1571458ff6cca Author: László Németh AuthorDate: Tue May 21 13:20:24 2024 +0200 Commit: Michael Stahl CommitDate: Tue Jun 4 11:15:34 2024 +0200 tdf#161261 sw: fix lost size of image resized in fixed-height cell A fixed-height cell can contain a bigger image, which is cropped by cell boundaries. It was not possible to resize this image with a simple drag & drop, because its size changed to the cell size immediately. Now it's possible, like MSO does. Follow-up to commit 30de13743f144aced83bc43d310592f82788c910 "tdf#160836 sw: resize rows at images cropped by row height". Change-Id: I6b4e911432e784a96d393ee225ce69a1f2986d56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168186 Tested-by: Jenkins Reviewed-by: László Németh Tested-by: László Németh (cherry picked from commit dece7d80c31c3c489859200bc93d9c948a535cbf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168196 Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index 8e67d26e4652..0dfb0076ef1a 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -1563,6 +1564,68 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160836) CPPUNIT_ASSERT_EQUAL(tools::Long(1980), pCellA1->getFrameArea().Height()); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161261) +{ +createSwDoc("tdf160842.fodt"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); +// the cursor is not in the table +CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable()); + +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); +auto pPage = dynamic_cast(pLayout->Lower()); +CPPUNIT_ASSERT(pPage); +const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs.size()); +auto pPageFly = dynamic_cast(rPageObjs[0]); +CPPUNIT_ASSERT(pPageFly); +auto pTable = dynamic_cast(pPageFly->GetLower()); +CPPUNIT_ASSERT(pTable); +auto pRow1 = pTable->GetLower(); +CPPUNIT_ASSERT(pRow1->IsRowFrame()); +auto pCellA1 = pRow1->GetLower(); +CPPUNIT_ASSERT(pCellA1); +const SwRect& rCellA1Rect = pCellA1->getFrameArea(); +auto nRowHeight = rCellA1Rect.Height(); + +// select image by clicking on it at the center of the upper cell +Point ptFrom(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() + nRowHeight / 2); +vcl::Window& rEditWin = pDoc->GetDocShell()->GetView()->GetEditWin(); +Point aFrom = rEditWin.LogicToPixel(ptFrom); +MouseEvent aClickEvent(aFrom, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent); +rEditWin.MouseButtonUp(aClickEvent); + +// Then make sure that the image is selected: +SelectionType eType = pWrtShell->GetSelectionType(); +CPPUNIT_ASSERT_EQUAL(SelectionType::Graphic, eType); + +uno::Reference xShape = getShape(2); +CPPUNIT_ASSERT(xShape.is()); + +// zoom image by drag & drop using right bottom handle of the image +const SwRect& rSelRect = pWrtShell->GetAnyCurRect(CurRectType::Frame); +Point ptFromHandle(rSelRect.Right(), rSelRect.Bottom()); +Point aFromHandle = rEditWin.LogicToPixel(ptFromHandle); +Point ptTo(rSelRect.Left() + rSelRect.Width() * 1.5, rSelRect.Top() + rSelRect.Height() * 1.5); +Point aTo = rEditWin.LogicToPixel(ptTo); +MouseEvent aClickEvent2(aFromHandle, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent2); +MouseEvent aClickEvent3(aTo, 0, MouseEventModifiers::SIMPLEMOVE, MOUSE_LEFT); +rEditWin.MouseMove(aClickEvent3); +rEditWin.MouseMove(aClickEvent3); +MouseEvent aClickEvent4(aTo, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonUp(aClickEvent4); +Scheduler::ProcessEventsToIdle(); + +// Make sure image is greater than before, instead of minimizing it to the cell size +// This was 8707 and 6509 +CPPUNIT_ASSERT_GREATER(sal_Int32(1), xShape->getSize().Width); +CPPUNIT_ASSERT_GREATER(sal_Int32(8000), xShape->getSize().Height); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115132) { createSwDoc(); diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index b0ef08a01f75..0162ca6d76d7 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout
core.git: sw/source
sw/source/core/layout/paintfrm.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 03aa8a1d9bfe4af2f37df0bde42193c2cf90ffb4 Author: László Németh AuthorDate: Mon Jun 3 16:27:55 2024 +0200 Commit: László Németh CommitDate: Mon Jun 3 21:50:26 2024 +0200 tdf#77388 sw: fix missing table border at cropped images At images cropped by the bottom or right cell boundaries, or at images with zero padding in table cells (e.g, in test document of tdf#160836), table borders were hovered by the image, resulting missing table borders. First paint the cell content, and after that the DOCX-like "collapsing" cell borders in SwTabFrame::PaintSwFrame. Note: this doesn't modify painting of the objects anchored to characters (which still hovers the cell borders), and painting of the text content of the cells (which are still hovered by the cell borders at zero padding, despite their non-transparent background color). Change-Id: Ie41ab275fd101bb9e26d4165362063f0332ac3c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168384 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index c572585e597a..fd426234a652 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -4667,6 +4667,8 @@ void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& const SwViewOption* pViewOption = gProp.pSGlobalShell->GetViewOptions(); if (pViewOption->IsTable()) { +SwLayoutFrame::PaintSwFrame( rRenderContext, rRect ); + // #i29550# if ( IsCollapsingBorders() ) { @@ -4684,8 +4686,6 @@ void SwTabFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& SwTabFramePainter aHelper(*this); aHelper.PaintLines(rRenderContext, rRect); } - -SwLayoutFrame::PaintSwFrame( rRenderContext, rRect ); } // #i6467# - no light grey rectangle for page preview else if ( gProp.pSGlobalShell->GetWin() && !gProp.pSGlobalShell->IsPreview() )
core.git: sw/qa sw/source
sw/qa/extras/uiwriter/uiwriter6.cxx | 62 sw/source/core/frmedt/feshview.cxx | 24 + 2 files changed, 86 insertions(+) New commits: commit 014e5f559a9acf319af24c721dbe6b0bc3bc5882 Author: László Németh AuthorDate: Fri May 31 12:38:12 2024 +0200 Commit: László Németh CommitDate: Fri May 31 20:46:16 2024 +0200 tdf#161360 sw: fix cursor position deselecting image in table In tables, when the selected image was anchored as character at beginning of the table row, pressing Escape resulted completely lost text cursor (after a short blinking, not visible, missing typing etc.) or – in the case of floating tables – cursor in a bad position (after the table instead of before the image). Change-Id: Ib49211ec3531110fc8f5f65fb700318884519666 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168289 Reviewed-by: László Németh Tested-by: Jenkins diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index aedec9304791..a27f506095b3 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -1683,6 +1683,68 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161332) CPPUNIT_ASSERT_EQUAL(SelectionType::Frame, eType2); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161360) +{ +createSwDoc("tdf160842.fodt"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); +// the cursor is not in the table +CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable()); + +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); +auto pPage = dynamic_cast(pLayout->Lower()); +CPPUNIT_ASSERT(pPage); +const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs.size()); +auto pPageFly = dynamic_cast(rPageObjs[0]); +CPPUNIT_ASSERT(pPageFly); +auto pTable = dynamic_cast(pPageFly->GetLower()); +CPPUNIT_ASSERT(pTable); +auto pRow1 = pTable->GetLower(); +CPPUNIT_ASSERT(pRow1->IsRowFrame()); +auto pCellA1 = pRow1->GetLower(); +CPPUNIT_ASSERT(pCellA1); +const SwRect& rCellA1Rect = pCellA1->getFrameArea(); +auto nRowHeight = rCellA1Rect.Height(); + +// select image by clicking on it at the center of the upper cell +Point ptFrom(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() + nRowHeight / 2); +vcl::Window& rEditWin = pDoc->GetDocShell()->GetView()->GetEditWin(); +Point aFrom = rEditWin.LogicToPixel(ptFrom); +MouseEvent aClickEvent(aFrom, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent); +rEditWin.MouseButtonUp(aClickEvent); + +// Then make sure that the image is selected: +SelectionType eType = pWrtShell->GetSelectionType(); +CPPUNIT_ASSERT_EQUAL(SelectionType::Graphic, eType); + +// select the text frame instead of the image +// by pressing Escape +dispatchCommand(mxComponent, ".uno:Escape", {}); + +// Then make sure that the cursor in the table: +SelectionType eType2 = pWrtShell->GetSelectionType(); +// This was false (only SelectionType::Text) +bool bCursorInTable = eType2 == (SelectionType::Text | SelectionType::Table); +CPPUNIT_ASSERT(bCursorInTable); + +// select the text frame by pressing Escape again +dispatchCommand(mxComponent, ".uno:Escape", {}); + +eType2 = pWrtShell->GetSelectionType(); +CPPUNIT_ASSERT_EQUAL(SelectionType::Frame, eType2); + +// deselect the text frame by pressing Escape again +dispatchCommand(mxComponent, ".uno:Escape", {}); + +eType2 = pWrtShell->GetSelectionType(); +// The text cursor is after the floating table +CPPUNIT_ASSERT_EQUAL(SelectionType::Text, eType2); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115132) { createSwDoc(); diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index c10a87110d8e..9a8d7304b4cc 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -191,6 +191,7 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) ( pOldSelFly->GetFormat()->GetProtect().IsContentProtected() && !IsReadOnlyAvailable() )) { +SdrObject *pOldObj = rMrkList.GetMark(0)->GetMarkedSdrObj(); // If a fly is deselected, which contains graphic, OLE or // otherwise, the cursor should be removed from it. // Similar if a fly with protected content is deselected. @@ -201,6 +202,29 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj )
core.git: sw/inc sw/qa sw/source
sw/inc/fesh.hxx |2 - sw/qa/extras/uiwriter/uiwriter6.cxx | 65 ++-- sw/source/core/frmedt/feshview.cxx | 30 ++-- sw/source/uibase/docvw/edtwin.cxx | 11 +- 4 files changed, 101 insertions(+), 7 deletions(-) New commits: commit 2f7bb481c57458a38769ebd961f07cc45767f1f7 Author: László Németh AuthorDate: Thu May 30 01:22:59 2024 +0200 Commit: László Németh CommitDate: Fri May 31 09:47:59 2024 +0200 tdf#161332 sw: fix missing selection of floating table A fixed-height cell can contain a bigger image, which is cropped by cell boundaries. In this case, it was not possible to select the floating table by clicking on its right border. Note: fix also tests of tdf#44773 and tdf#160836 related to DPI-dependent platforms, see tdf#160992. Follow-up to commit 30de13743f144aced83bc43d310592f82788c910 "tdf#160836 sw: resize rows at images cropped by row height" and commit f3b899655018397e71300dbb32cdf4f82940a68b "tdf#160842 sw: select cell content instead of cropped part of image". Change-Id: I22c3e34f4c8147736c29b62722f7fc43c862ba48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168237 Reviewed-by: László Németh Tested-by: Jenkins diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx index 1c2d917ffd7c..b032a0b05b7b 100644 --- a/sw/inc/fesh.hxx +++ b/sw/inc/fesh.hxx @@ -297,7 +297,7 @@ public: /** Test if there is a draw object at that position and if it should be selected. The 'should' is aimed at Writer text fly frames which may be in front of the draw object. */ -bool ShouldObjectBeSelected(const Point& rPt); +bool ShouldObjectBeSelected(const Point& rPt, bool *pSelectFrameInsteadOfCroppedImage = nullptr); bool MoveAnchor( SwMove nDir ); diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index 6322120748da..aedec9304791 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -1470,7 +1470,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf44773) rEditWin.ReleaseMouse(); // this was 396 (not modified row height previously) -CPPUNIT_ASSERT_EQUAL(tools::Long(810), pCellA1->getFrameArea().Height()); +CPPUNIT_ASSERT_GREATER(tools::Long(750), pCellA1->getFrameArea().Height()); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160842) @@ -1557,7 +1557,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160836) rEditWin.ReleaseMouse(); // this was 3910 (not modified row height previously) -CPPUNIT_ASSERT_EQUAL(tools::Long(1980), pCellA1->getFrameArea().Height()); +CPPUNIT_ASSERT_LESS(tools::Long(2000), pCellA1->getFrameArea().Height()); } CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161261) @@ -1622,6 +1622,67 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161261) CPPUNIT_ASSERT_GREATER(sal_Int32(8000), xShape->getSize().Height); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161332) +{ +createSwDoc("tdf160842.fodt"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); +// the cursor is not in the table +CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable()); + +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); +auto pPage = dynamic_cast(pLayout->Lower()); +CPPUNIT_ASSERT(pPage); +const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs.size()); +auto pPageFly = dynamic_cast(rPageObjs[0]); +CPPUNIT_ASSERT(pPageFly); +auto pTable = dynamic_cast(pPageFly->GetLower()); +CPPUNIT_ASSERT(pTable); +auto pRow1 = pTable->GetLower(); +CPPUNIT_ASSERT(pRow1->IsRowFrame()); +auto pCellA1 = pRow1->GetLower(); +CPPUNIT_ASSERT(pCellA1); +const SwRect& rCellA1Rect = pCellA1->getFrameArea(); +auto nRowHeight = rCellA1Rect.Height(); + +// select text frame by clicking on it at the right side of the upper cell +Point ptFrom(rCellA1Rect.Left() + rCellA1Rect.Width(), rCellA1Rect.Top() + nRowHeight / 2); +vcl::Window& rEditWin = pDoc->GetDocShell()->GetView()->GetEditWin(); +Point aFrom = rEditWin.LogicToPixel(ptFrom); +MouseEvent aClickEvent(aFrom, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent); +rEditWin.MouseButtonUp(aClickEvent); + +// Then make sure that the text frame is selected: +SelectionType eType = pWrtShell->GetSelectionType(); +// This was false (SelectionType::Graphic) +CPPUNIT_ASSERT_EQUAL(SelectionType::Frame, eType); + +// remove selection +dispatchCommand(mxComponent, ".uno:Escape", {}); + +// select text frame by clicking on it at the right
dictionaries.git: Changes to 'refs/tags/cp-23.05.12-1'
Tag 'cp-23.05.12-1' created by Andras Timar at 2024-05-30 08:39 + cp-23.05.12-1 Changes since co-23.05.10-1-24: --- 0 files changed ---
dictionaries.git: Changes to 'refs/tags/cp-24.04.3-2'
Tag 'cp-24.04.3-2' created by Andras Timar at 2024-05-30 05:55 + cp-24.04.3-2 Changes since cp-24.04.1-2-3: --- 0 files changed ---
core.git: sw/qa sw/source
sw/qa/extras/uiwriter/uiwriter6.cxx | 63 sw/source/core/layout/flylay.cxx| 38 ++--- 2 files changed, 96 insertions(+), 5 deletions(-) New commits: commit dece7d80c31c3c489859200bc93d9c948a535cbf Author: László Németh AuthorDate: Tue May 21 13:20:24 2024 +0200 Commit: László Németh CommitDate: Wed May 29 23:43:47 2024 +0200 tdf#161261 sw: fix lost size of image resized in fixed-height cell A fixed-height cell can contain a bigger image, which is cropped by cell boundaries. It was not possible to resize this image with a simple drag & drop, because its size changed to the cell size immediately. Now it's possible, like MSO does. Follow-up to commit 30de13743f144aced83bc43d310592f82788c910 "tdf#160836 sw: resize rows at images cropped by row height". Change-Id: I6b4e911432e784a96d393ee225ce69a1f2986d56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168186 Tested-by: Jenkins Reviewed-by: László Németh Tested-by: László Németh diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index fb3ecb357bcd..6322120748da 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -1559,6 +1560,68 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160836) CPPUNIT_ASSERT_EQUAL(tools::Long(1980), pCellA1->getFrameArea().Height()); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161261) +{ +createSwDoc("tdf160842.fodt"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); +// the cursor is not in the table +CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable()); + +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); +auto pPage = dynamic_cast(pLayout->Lower()); +CPPUNIT_ASSERT(pPage); +const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs.size()); +auto pPageFly = dynamic_cast(rPageObjs[0]); +CPPUNIT_ASSERT(pPageFly); +auto pTable = dynamic_cast(pPageFly->GetLower()); +CPPUNIT_ASSERT(pTable); +auto pRow1 = pTable->GetLower(); +CPPUNIT_ASSERT(pRow1->IsRowFrame()); +auto pCellA1 = pRow1->GetLower(); +CPPUNIT_ASSERT(pCellA1); +const SwRect& rCellA1Rect = pCellA1->getFrameArea(); +auto nRowHeight = rCellA1Rect.Height(); + +// select image by clicking on it at the center of the upper cell +Point ptFrom(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() + nRowHeight / 2); +vcl::Window& rEditWin = pDoc->GetDocShell()->GetView()->GetEditWin(); +Point aFrom = rEditWin.LogicToPixel(ptFrom); +MouseEvent aClickEvent(aFrom, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent); +rEditWin.MouseButtonUp(aClickEvent); + +// Then make sure that the image is selected: +SelectionType eType = pWrtShell->GetSelectionType(); +CPPUNIT_ASSERT_EQUAL(SelectionType::Graphic, eType); + +uno::Reference xShape = getShape(2); +CPPUNIT_ASSERT(xShape.is()); + +// zoom image by drag & drop using right bottom handle of the image +const SwRect& rSelRect = pWrtShell->GetAnyCurRect(CurRectType::Frame); +Point ptFromHandle(rSelRect.Right(), rSelRect.Bottom()); +Point aFromHandle = rEditWin.LogicToPixel(ptFromHandle); +Point ptTo(rSelRect.Left() + rSelRect.Width() * 1.5, rSelRect.Top() + rSelRect.Height() * 1.5); +Point aTo = rEditWin.LogicToPixel(ptTo); +MouseEvent aClickEvent2(aFromHandle, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent2); +MouseEvent aClickEvent3(aTo, 0, MouseEventModifiers::SIMPLEMOVE, MOUSE_LEFT); +rEditWin.MouseMove(aClickEvent3); +rEditWin.MouseMove(aClickEvent3); +MouseEvent aClickEvent4(aTo, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonUp(aClickEvent4); +Scheduler::ProcessEventsToIdle(); + +// Make sure image is greater than before, instead of minimizing it to the cell size +// This was 8707 and 6509 +CPPUNIT_ASSERT_GREATER(sal_Int32(1), xShape->getSize().Width); +CPPUNIT_ASSERT_GREATER(sal_Int32(8000), xShape->getSize().Height); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115132) { createSwDoc(); diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 1a39b735d2d8..42ea0332f6eb 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -1409,17 +1409,45 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect , bool bMove ) { const SwFrame *pUp = pFly->GetA
dictionaries.git: Changes to 'refs/tags/co-24.04.3-2'
Tag 'co-24.04.3-2' created by Andras Timar at 2024-05-28 11:29 + co-24.04.3-2 Changes since cp-24.04.1-2-3: --- 0 files changed ---
core.git: sw/qa sw/source
sw/qa/extras/uiwriter/uiwriter6.cxx | 63 sw/source/core/layout/flylay.cxx| 38 ++--- 2 files changed, 96 insertions(+), 5 deletions(-) New commits: commit 4da6f52f5fd164082fd42fc58fc7d31da567c924 Author: László Németh AuthorDate: Tue May 21 13:20:24 2024 +0200 Commit: László Németh CommitDate: Fri May 24 19:46:46 2024 +0200 tdf#161261 sw: fix lost size of image resized in fixed-height cell A fixed-height cell can contain a bigger image, which is cropped by cell boundaries. It was not possible to resize this image with a simple drag & drop, because its size changed to the cell size immediately. Now it's possible, like MSO does. Follow-up to commit 30de13743f144aced83bc43d310592f82788c910 "tdf#160836 sw: resize rows at images cropped by row height". Change-Id: I9d63e6e526135b6d8541f904c363b9186bb3cfc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168023 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index fb3ecb357bcd..6322120748da 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -1559,6 +1560,68 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160836) CPPUNIT_ASSERT_EQUAL(tools::Long(1980), pCellA1->getFrameArea().Height()); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf161261) +{ +createSwDoc("tdf160842.fodt"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); +// the cursor is not in the table +CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable()); + +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); +auto pPage = dynamic_cast(pLayout->Lower()); +CPPUNIT_ASSERT(pPage); +const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs.size()); +auto pPageFly = dynamic_cast(rPageObjs[0]); +CPPUNIT_ASSERT(pPageFly); +auto pTable = dynamic_cast(pPageFly->GetLower()); +CPPUNIT_ASSERT(pTable); +auto pRow1 = pTable->GetLower(); +CPPUNIT_ASSERT(pRow1->IsRowFrame()); +auto pCellA1 = pRow1->GetLower(); +CPPUNIT_ASSERT(pCellA1); +const SwRect& rCellA1Rect = pCellA1->getFrameArea(); +auto nRowHeight = rCellA1Rect.Height(); + +// select image by clicking on it at the center of the upper cell +Point ptFrom(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() + nRowHeight / 2); +vcl::Window& rEditWin = pDoc->GetDocShell()->GetView()->GetEditWin(); +Point aFrom = rEditWin.LogicToPixel(ptFrom); +MouseEvent aClickEvent(aFrom, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent); +rEditWin.MouseButtonUp(aClickEvent); + +// Then make sure that the image is selected: +SelectionType eType = pWrtShell->GetSelectionType(); +CPPUNIT_ASSERT_EQUAL(SelectionType::Graphic, eType); + +uno::Reference xShape = getShape(2); +CPPUNIT_ASSERT(xShape.is()); + +// zoom image by drag & drop using right bottom handle of the image +const SwRect& rSelRect = pWrtShell->GetAnyCurRect(CurRectType::Frame); +Point ptFromHandle(rSelRect.Right(), rSelRect.Bottom()); +Point aFromHandle = rEditWin.LogicToPixel(ptFromHandle); +Point ptTo(rSelRect.Left() + rSelRect.Width() * 1.5, rSelRect.Top() + rSelRect.Height() * 1.5); +Point aTo = rEditWin.LogicToPixel(ptTo); +MouseEvent aClickEvent2(aFromHandle, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent2); +MouseEvent aClickEvent3(aTo, 0, MouseEventModifiers::SIMPLEMOVE, MOUSE_LEFT); +rEditWin.MouseMove(aClickEvent3); +rEditWin.MouseMove(aClickEvent3); +MouseEvent aClickEvent4(aTo, 1, MouseEventModifiers::SIMPLECLICK, MOUSE_LEFT); +rEditWin.MouseButtonUp(aClickEvent4); +Scheduler::ProcessEventsToIdle(); + +// Make sure image is greater than before, instead of minimizing it to the cell size +// This was 8707 and 6509 +CPPUNIT_ASSERT_GREATER(sal_Int32(1), xShape->getSize().Width); +CPPUNIT_ASSERT_GREATER(sal_Int32(8000), xShape->getSize().Height); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115132) { createSwDoc(); diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx index 1a39b735d2d8..92ad07ba4481 100644 --- a/sw/source/core/layout/flylay.cxx +++ b/sw/source/core/layout/flylay.cxx @@ -1409,17 +1409,45 @@ bool CalcClipRect( const SdrObject *pSdrObj, SwRect , bool bMove ) { const SwFrame *pUp = pFly->GetAnchorFrame()->GetUpper();
dictionaries.git: Changes to 'refs/tags/cp-24.04.3-1'
Tag 'cp-24.04.3-1' created by Andras Timar at 2024-05-21 14:43 + cp-24.04.3-1 Changes since cp-24.04.1-2-3: --- 0 files changed ---
core.git: Branch 'libreoffice-24-2' - 2 commits - dictionaries
dictionaries |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 2f51031f05dec2f21b8f587eafa7c399d6e4b19e Author: László Németh AuthorDate: Mon May 20 11:21:29 2024 +0100 Commit: Gerrit Code Review CommitDate: Mon May 20 12:21:29 2024 +0200 Update git submodules * Update dictionaries from branch 'libreoffice-24-2' to 7081a63e0740588f7454bdd8c9d5bb3d64c69e2b - Updated Hungarian hyphenation dictionary to version v20240321 source: https://sourceforge.net/projects/magyarispell/files/OOo%20Huhyphn/v20240321-0.1/ Change-Id: If470f5854511cac6f0a355e4d006abf9e3976f90 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165166 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 491736b0e775f7d4a0bfd9ed9ce94ec296e3e988) Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/167821 Reviewed-by: Xisco Fauli Tested-by: Xisco Fauli diff --git a/dictionaries b/dictionaries index 597f89a149f2..7081a63e0740 16 --- a/dictionaries +++ b/dictionaries @@ -1 +1 @@ -Subproject commit 597f89a149f2c442df2bc68037e42b6caa4abdb3 +Subproject commit 7081a63e0740588f7454bdd8c9d5bb3d64c69e2b commit f4cc60aae383fc560060f1d261d71ce05bad862d Author: László Németh AuthorDate: Mon May 20 11:21:22 2024 +0100 Commit: Gerrit Code Review CommitDate: Mon May 20 12:21:22 2024 +0200 Update git submodules * Update dictionaries from branch 'libreoffice-24-2' to 597f89a149f2c442df2bc68037e42b6caa4abdb3 - Hungarian dictionary v1.8.1 Added new words, fixes, and decomposition data of ~6500 compound words for better hyphenation. See tdf#158885 for COMPOUNDLEFTHYPHENMIN implementation in LibreOffice, where Hunspell filters out compound word boundaries from libhyphen-based hyphenation breaks, restricting hyphenation near the compound boundary according to spelling and typography rules. Change-Id: I22a7b70513d0a59d7a31462fcb46efd53cfe8ad7 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165439 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit c5b2a36bde02841590b8ccc490ca88bfdb69f153) Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/167820 Tested-by: Xisco Fauli Reviewed-by: Xisco Fauli diff --git a/dictionaries b/dictionaries index 682575dfd5d3..597f89a149f2 16 --- a/dictionaries +++ b/dictionaries @@ -1 +1 @@ -Subproject commit 682575dfd5d336b1d42bbecbe46dddcec2c0e183 +Subproject commit 597f89a149f2c442df2bc68037e42b6caa4abdb3
dictionaries.git: Branch 'libreoffice-24-2' - 2 commits - hu_HU/hu_HU.aff hu_HU/hu_HU.dic hu_HU/hyph_hu_HU.dic hu_HU/README_hu_HU.txt hu_HU/README_hyph_hu_HU.txt
hu_HU/README_hu_HU.txt |8 hu_HU/README_hyph_hu_HU.txt |2 hu_HU/hu_HU.aff |58746 ++-- hu_HU/hu_HU.dic |126894 ++-- hu_HU/hyph_hu_HU.dic| 4614 + 5 files changed, 98102 insertions(+), 92162 deletions(-) New commits: commit 7081a63e0740588f7454bdd8c9d5bb3d64c69e2b Author: László Németh AuthorDate: Fri Mar 22 15:07:48 2024 +0100 Commit: Xisco Fauli CommitDate: Mon May 20 12:21:29 2024 +0200 Updated Hungarian hyphenation dictionary to version v20240321 source: https://sourceforge.net/projects/magyarispell/files/OOo%20Huhyphn/v20240321-0.1/ Change-Id: If470f5854511cac6f0a355e4d006abf9e3976f90 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165166 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit 491736b0e775f7d4a0bfd9ed9ce94ec296e3e988) Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/167821 Reviewed-by: Xisco Fauli Tested-by: Xisco Fauli diff --git a/hu_HU/README_hyph_hu_HU.txt b/hu_HU/README_hyph_hu_HU.txt index 3f86548..bca57ed 100644 --- a/hu_HU/README_hyph_hu_HU.txt +++ b/hu_HU/README_hyph_hu_HU.txt @@ -1,6 +1,6 @@ % Hungarian hyphenation patterns with non-standard hyphenation patch % -- -% Patch version: 2010-10-07 +% Patch version: 2024-03-21 % % Language: Hungarian (hu HU) % Origin: http://www.github.hu/bencenagy/huhyphn diff --git a/hu_HU/hyph_hu_HU.dic b/hu_HU/hyph_hu_HU.dic index d419ee1..0924dab 100644 --- a/hu_HU/hyph_hu_HU.dic +++ b/hu_HU/hyph_hu_HU.dic @@ -256,7 +256,6 @@ COMPOUNDRIGHTHYPHENMIN 3 .ba2b1a2rá .1ba .b2abar -.ba1ba .ba2bál .ba1bá .ba2b1e2 @@ -689,7 +688,6 @@ COMPOUNDRIGHTHYPHENMIN 3 .fa1i .fa2leg .fa1le -.fa2n1év .fa1né .fa2r1ont .fa1ro @@ -75142,7 +75140,6 @@ s1s1zé össz1e1gye összeg2y 1vi -vis6sz3e6rek vis2s2z vis1s1ze vissze1re @@ -91409,15 +91406,9 @@ expressz1ké .geron1to .geronto1fi .geron7t8ofil -pszichog6ráfi1a pszi1c2h pszi1c1ho pszichog1rá -pszichográ1fi -pszichog8ráfi1a -pszichográ1fi -pszichog6ráfi1á -pszichog8ráfi1á .tele6g7ráf .te1le .teleg1rá @@ -91455,15 +91446,12 @@ c5cs2é./cs=,1,1 c5cs2á./cs=,1,1 c5cse2l./cs=,1,1 c5csa2l./cs=,1,1 -.öc5c1sü/cs=,2,1 .öc2c2s .öc5c1se/cs=,2,1 .öc5c1sé/cs=,2,1 -aöc5c1sü/cs=,3,1 aöc2c2s aöc5c1se/cs=,3,1 aöc5c1sé/cs=,3,1 -söc5c1sü/cs=,3,1 söc2c2s söc5c1se/cs=,3,1 söc5c1sé/cs=,3,1 @@ -91486,7 +91474,6 @@ szkec5csem/cs=,5,1 szkec5csen/cs=,5,1 szkec5csed/cs=,5,1 szkec5cs2e./cs=,5,1 -szkec5c1sü/cs=,5,1 szkec5csetek/cs=,5,1 szkeccse1te sztrec5cse2t./cs=,6,1 @@ -91501,7 +91488,6 @@ sztrec5csem/cs=,6,1 sztrec5csen/cs=,6,1 sztrec5csed/cs=,6,1 sztrec5cs2e./cs=,6,1 -sztrec5c1sü/cs=,6,1 sztrec5csetek/cs=,6,1 sztreccse1te rec5c1se/cs=,3,1 @@ -91511,12 +91497,8 @@ puc2c2s puc1c1sa puc5c1so/cs=,3,1 puc5c1su/cs=,3,1 -puc5c1si/cs=,3,1 -puc5c1sé/cs=,3,1 pric5c1se/cs=,4,1 pric5c1sé/cs=,4,1 -pric5c1si/cs=,4,1 -pric5c1sü/cs=,4,1 fröc5csök/cs=,4,1 fröc2c2s fröc1c1sö @@ -91539,41 +91521,28 @@ fröc5csös/cs=,4,1 ffröc5csös/cs=,4,1 fröc5csöz/cs=,4,1 ffröc5csöz/cs=,4,1 -fröc5c1sü/cs=,4,1 -ffröc5c1sü/cs=,4,1 fröc5csen/cs=,4,1 fröc1c1se ffröc5csen/cs=,4,1 ffröc1c1se fröc5c1sé/cs=,4,1 ffröc5c1sé/cs=,4,1 -fröc5c1s1i/cs=,4,1 -ffröc5c1s1i/cs=,4,1 mec5cse2t./cs=,3,1 mec2c2s mec1c1se -mec5c1sé/cs=,3,1 mec5csér2t./cs=,3,1 mec5csi2g./cs=,3,1 mec1c1si -mec5csem/cs=,3,1 -mec5csen/cs=,3,1 -mec5csed/cs=,3,1 mec5cs2e./cs=,3,1 mec5csek/cs=,3,1 mec5cse1i/cs=,3,1 -mec5csét/cs=,3,1 mec5cséb/cs=,3,1 mec5csérő2l./cs=,3,1 meccsé1rő mec5csér2e./cs=,3,1 meccsé1re -mec5cséh/cs=,3,1 mec5csé1i/cs=,3,1 -mec5csén/cs=,3,1 -mec5csév/cs=,3,1 mec5cses/cs=,3,1 -mec5c1sü/cs=,3,1 mec5csetek/cs=,3,1 meccse1te nuc5c1se/cs=,3,1 @@ -91582,14 +91551,11 @@ glec5cser/cs=,4,1 g2lecc glec2c2s glec1c1se -gic5c1se/cs=,3,1 gic5cse2t./cs=,3,1 gic2c2s -gic5c1sé/cs=,3,1 gic5csér2t./cs=,3,1 gic5csi2g./cs=,3,1 gic1c1si -gic5c1sü/cs=,3,1 fuc5c1so/cs=,3,1 fuc2c2s ffuc5c1so/cs=,3,1 @@ -95870,7 +95836,6 @@ jes5szus/sz=,3,1 jes2s2z jes1s1zu dres5s1zú/sz=,4,1 -dres5s1zi/sz=,4,1 dos5szi1é/sz=,3,1 dos2s2z dos1s1zi @@ -95945,7 +95910,6 @@ asszis2z dres5s1zé/sz=,4,1 dres5sz2i2g./sz=,4,1 as5szonn/sz=,2,1 -proces5szor/sz=,6,1 proces2s2z proces1s1zo szeces5s1zi/sz=,6,1 @@ -95953,7 +95917,6 @@ s2ze1ce s2zeces2s2z stres5szek/sz=,5,1 stres1s1ze -stres5sze2l./sz=,5,1 stres5szelt/sz=,5,1 stres5szeln/sz=,5,1 stres5sze1lé/sz=,5,1 @@ -96022,7 +95985,6 @@ fos1s1zí ffos1s1zí pres5s1zé/sz=,4,1 dis5s1zo/sz=,3,1 -pres5s1zo/sz=,4,1 pres5s1zó/sz=,4,1 bas5s1zi/sz=,3,1 as5szonán/sz=,2,1 @@ -96121,9 +96083,7 @@ ps5sze2l./sz=,2,1 ps1s1ze rs5sz2á./sz=,2,1 rs5sza2l./sz=,2,1 -rs5sz2é./sz=,2,1 rs1s1zé -rs5sze2l./sz=,2,1 ús5sz2á./sz=,2,1 ús5sza2l./sz=,2,1 üs5sz2é./sz=,2,1 @@ -97294,7 +97254,6 @@ ra2ó1fi ős3sz1fi ős3sz1fl 2v1e2lefl -.rén3szarvas7szán
core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 0e40ccfa6749ab2fe86124a28e1ceee1462ba302 Author: László Németh AuthorDate: Sat May 18 00:12:07 2024 +0200 Commit: Gerrit Code Review CommitDate: Sat May 18 00:12:07 2024 +0200 Update git submodules * Update helpcontent2 from branch 'master' to 0d5b1a072e025a692cee803310d2ceff0296b083 - tdf#132599 add "Hyphenation across" -> Last full line of paragraph Document new option of LO 24.8 to control hyphenation in last full line of a paragraph. Fix also the changed IDs of the other "Hyphenation across" options. Follow-up to commit c8a99cb8dce54de506ba66d1cc0818b9b5f7858b "tdf#132599 sw schema xmloff: add hyphenation-keep-type='always'". Change-Id: If38c922c379506d3dc4a9c11cd428f7a28039b1d Reviewed-on: https://gerrit.libreoffice.org/c/help/+/167773 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/helpcontent2 b/helpcontent2 index 0672dfb42c29..0d5b1a072e02 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit 0672dfb42c298cc3411bfb74b2eaf662427a4e4c +Subproject commit 0d5b1a072e025a692cee803310d2ceff0296b083
help.git: source/text
source/text/swriter/01/05030200.xhp | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) New commits: commit 0d5b1a072e025a692cee803310d2ceff0296b083 Author: László Németh AuthorDate: Fri May 17 13:22:41 2024 +0200 Commit: Adolfo Jayme Barrientos CommitDate: Sat May 18 00:12:07 2024 +0200 tdf#132599 add "Hyphenation across" -> Last full line of paragraph Document new option of LO 24.8 to control hyphenation in last full line of a paragraph. Fix also the changed IDs of the other "Hyphenation across" options. Follow-up to commit c8a99cb8dce54de506ba66d1cc0818b9b5f7858b "tdf#132599 sw schema xmloff: add hyphenation-keep-type='always'". Change-Id: If38c922c379506d3dc4a9c11cd428f7a28039b1d Reviewed-on: https://gerrit.libreoffice.org/c/help/+/167773 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/source/text/swriter/01/05030200.xhp b/source/text/swriter/01/05030200.xhp index 6722ef29b4..38ef3df3ff 100644 --- a/source/text/swriter/01/05030200.xhp +++ b/source/text/swriter/01/05030200.xhp @@ -73,16 +73,19 @@ Hyphenate last word Hyphenate the last word of paragraphs. Disabling this feature prevents the creation of almost empty lines containing only half a word. Hyphenation across -Control hyphenation in the last line of a column, page or spread. - +Control hyphenation in the last line of a column, page or spread, and last full line of a paragraph, according to certain typographical rules to improve readability. + +Last full line of paragraph +Deselect this check box to prevent last full line of a paragraph from being hyphenated. The hyphenated word is moved to the next line if there is enough space for it. As a result, the last line of the paragraph becomes longer, reducing the blank space between paragraphs. + Column -Deselect this check box to prevent words from being hyphenated across a column or page. - +Deselect this check box to prevent words from being hyphenated across a column, linked frame or page. The hyphenated line is moved to the next column, frame or page. + Page -Deselect this check box to prevent words from being hyphenated across a page. - +Deselect this check box to prevent words from being hyphenated across a page. The hyphenated line is moved to the next page. + Spread -Deselect this check box to prevent words from being hyphenated across a spread. (A spread is a set of two pages that are visible to the reader at the same time.) +Deselect this check box to prevent words from being hyphenated across a spread. (A spread is a set of two pages that are visible to the reader at the same time.) The hyphenated line is moved to the next spread. Breaks Specify the page or column break options.
core.git: sw/qa sw/source
sw/qa/extras/odfexport/data/tdf160518_auto_in_default_paragraph_style.fodt | 42 sw/qa/extras/odfexport/data/tdf160518_auto_in_text_body_style.fodt | 42 sw/qa/extras/odfexport/data/tdf160518_page_in_default_paragraph_style.fodt | 42 sw/qa/extras/odfexport/data/tdf160518_page_in_text_body_style.fodt | 42 sw/qa/extras/odfexport/odfexport2.cxx| 48 +- sw/qa/extras/ooxmlexport/data/tdf160518_auto_in_default_paragraph_style.fodt | 42 sw/qa/extras/ooxmlexport/data/tdf160518_auto_in_text_body_style.fodt | 42 sw/qa/extras/ooxmlexport/data/tdf160518_page_in_default_paragraph_style.fodt | 42 sw/qa/extras/ooxmlexport/data/tdf160518_page_in_text_body_style.fodt | 42 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 48 +++--- sw/source/filter/ww8/docxexport.cxx | 26 + sw/source/writerfilter/dmapper/DomainMapper.cxx | 10 ++ sw/source/writerfilter/dmapper/SettingsTable.cxx | 31 +- sw/source/writerfilter/dmapper/SettingsTable.hxx | 1 14 files changed, 479 insertions(+), 21 deletions(-) New commits: commit b538729c90af470c33aeb3002750321ac8ac88be Author: László Németh AuthorDate: Thu May 16 14:45:43 2024 +0200 Commit: László Németh CommitDate: Fri May 17 01:49:36 2024 +0200 tdf#160518 sw: fix DOCX import/export of hyphenation-keep – export hyphenation-page="page" setting of native ODF documents, if hyphenation is enabled in the default paragraph or in the text body style with this setting. It's lossless for hyphenation-keep-type="column", while the other values are converted to hyphenation-keep-type="column", which is the default layout of MSO 2013 and later. – fix LO roundtrip of DOCX documents which were created in MSO originally: while the roundtrip kept useWord2013TrackBottomHyphenation and allowHyphenationAtTrackBottom, the exported redundant suppressAutoHyphen = "false" settings of the paragraph resulted broken layout in Writer, because the repeated import overwrote every paragraphs with bad hyphenation setting (hyphenation-keep = "auto" instead of hyphenation-keep = "page"). – export also "Hyphenate CAPS" and "Hyphenation zone" settings, if hyphenation is enabled in text body style with these settings, and not in the default paragraph style. Setting hyphenation only in "Text Body" is more common in documents created in LibreOffice. Follow-up to commit c8ee0e8f581b8a6e41b1a6b8aa4d40b442c1d463 "tdf160518 DOCX: import hyphenation-keep to fix layout". Change-Id: I9dbaf1e37416758388e3b2b19db3317f3f5652b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167749 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/odfexport/data/tdf160518_auto_in_default_paragraph_style.fodt b/sw/qa/extras/odfexport/data/tdf160518_auto_in_default_paragraph_style.fodt new file mode 100644 index ..6250cc0af3d5 --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf160518_auto_in_default_paragraph_style.fodt @@ -0,0 +1,42 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oas is:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-
core.git: editeng/source
editeng/source/misc/svxacorr.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 4c7686b7e1f4d012c00892f1cac1ae8a3298da5a Author: László Németh AuthorDate: Wed May 15 01:46:09 2024 +0200 Commit: László Németh CommitDate: Wed May 15 10:32:41 2024 +0200 tdf#156792 sw Catalan AutoCorrect: no superscript ordinal indicator According to the orthography, disable superscript for the Catalan ordinal indicators (only used for -a): 20a, 20è, 20ns, 20es. Change-Id: I2a3cd17b51a29300e9cfcacdcf0cb123d225248a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167652 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 1597e523a766..4cc64f90a766 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -474,6 +474,8 @@ bool SvxAutoCorrect::FnChgOrdinalNumber( // In some languages ordinal suffixes should never be // changed to superscript. Let's break for those languages. if (!eLang.anyOf( + LANGUAGE_CATALAN, // tdf#156792 + LANGUAGE_CATALAN_VALENCIAN, LANGUAGE_SWEDISH, LANGUAGE_SWEDISH_FINLAND)) {
core.git: editeng/source sw/qa
editeng/source/misc/svxacorr.cxx | 42 --- sw/qa/extras/uiwriter/data/tdf44293.fodt | 14 ++ sw/qa/extras/uiwriter/uiwriter8.cxx | 16 +++ 3 files changed, 68 insertions(+), 4 deletions(-) New commits: commit 7cc712eaa6757a461ac68532d77add2a49bd9181 Author: László Németh AuthorDate: Wed May 15 01:15:16 2024 +0200 Commit: László Németh CommitDate: Wed May 15 10:32:03 2024 +0200 tdf#44293 sw AutoCorrect: fix Portuguese ordinal indicators Add missing dot, support plural and alternative forms with 'r': – add missing dot: 1a -> 1.ª, 1o -> 1.º – support plural forms: 43as -> 43.ªˢ, 43os -> 43ºˢ - support alternative forms: 1ra -> 1.ª, 1ro -> 1.º, 43ras -> 43.ªˢ, 43ros -> 43.ºˢ Change-Id: Ibaeae958ca209edffb13f611ee8a71c80bf15a26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167649 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index 12c63fc5f272..1597e523a766 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -507,28 +508,61 @@ bool SvxAutoCorrect::FnChgOrdinalNumber( if (bFoundEnd && isValidNumber) { sal_Int32 nNum = o3tl::toInt32(rTxt.subView(nSttPos, nNumEnd - nSttPos + 1)); +std::u16string_view sEnd = rTxt.subView(nNumEnd + 1, nEndPos - nNumEnd - 1); // Check if the characters after that number correspond to the ordinal suffix uno::Reference< i18n::XOrdinalSuffix > xOrdSuffix = i18n::OrdinalSuffix::create(comphelper::getProcessComponentContext()); -const uno::Sequence< OUString > aSuffixes = xOrdSuffix->getOrdinalSuffix(nNum, rCC.getLanguageTag().getLocale()); -for (OUString const & sSuffix : aSuffixes) +uno::Sequence< OUString > aSuffixes = xOrdSuffix->getOrdinalSuffix(nNum, rCC.getLanguageTag().getLocale()); + +// add extra suffixes for languages not handled by i18npool/ICU +if ( primary(eLang) == primary(LANGUAGE_PORTUGUESE) && +( nEndPos == nNumEnd + 3 || nEndPos == nNumEnd + 4 ) && +( sEnd[0] == 'a' || sEnd[0] == 'o' || sEnd[0] == 'r' ) ) { -std::u16string_view sEnd = rTxt.subView(nNumEnd + 1, nEndPos - nNumEnd - 1); + auto aExtendedSuffixes = comphelper::sequenceToContainer< std::vector >(aSuffixes); + aExtendedSuffixes.push_back("as"); // plural form of 'a' + aExtendedSuffixes.push_back("os"); // plural form of 'o' + aExtendedSuffixes.push_back("ra"); // alternative form of 'a' + aExtendedSuffixes.push_back("ro"); // alternative form of 'o' + aExtendedSuffixes.push_back("ras"); // alternative form of "as" + aExtendedSuffixes.push_back("ros"); // alternative form of "os" + aSuffixes = comphelper::containerToSequence(aExtendedSuffixes); +} +for (OUString const & sSuffix : aSuffixes) +{ if (sSuffix == sEnd) { // Check if the ordinal suffix has to be set as super script if (rCC.isLetter(sSuffix)) { +sal_Int32 nNumberChanged = 0; +sal_Int32 nSuffixChanged = 0; +// exceptions for Portuguese +// add missing dot: 1a -> 1.ª +// and remove optional 'r': 1ro -> 1.º +if ( primary(eLang) == primary(LANGUAGE_PORTUGUESE) ) +{ +if ( sSuffix.startsWith("r") ) +{ +rDoc.Delete( nNumEnd + 1, nNumEnd + 2 ); +nSuffixChanged = -1; +} +rDoc.Insert( nNumEnd + 1, "." ); +nNumberChanged = 1; +} + // Do the change SvxEscapementItem aSvxEscapementItem(DFLT_ESC_AUTO_SUPER, DFLT_ESC_PROP, SID_ATTR_CHAR_ESCAPEMENT); -rDoc.SetAttr(nNumEnd + 1, nEndPos, +rDoc.SetAttr(nNumEnd + 1 + nNumberChanged, +nEndPos + nNumberChanged + nSuffixChanged, SID_ATTR_CHAR_ESCAPEMENT, aSvxEscapementItem);
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/uibase/docvw/edtwin.cxx |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) New commits: commit 95fdda2f027f2bcdd135b3f55c549d6f2339e086 Author: László Németh AuthorDate: Mon Apr 29 21:39:41 2024 +0200 Commit: Michael Stahl CommitDate: Tue May 14 11:06:09 2024 +0200 tdf#160836 sw: fix narrow selection area of cell border Remove ShouldObjectBeSelected() condition to fix the selection area around the horizontal border. (Its purpose was to avoid of selection of the border, when covered by an image: but that would be !ShouldObjectBeSelected(), with the same problem: halved selection area.) Clean-up commit commit 30de13743f144aced83bc43d310592f82788c910 "tdf#160836 sw: resize rows at images cropped by row height". Change-Id: I6c812a150b67431c7ea3131f29489bda919c1724 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166877 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 38b6e89c9483fdfe3d26bef3b25f890528aef84e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167211 Reviewed-by: Michael Stahl diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 9aa4862a43a4..c06276027582 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -3118,8 +3118,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SwTab::COL_NONE != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) && ( !rSh.IsObjSelectable( aDocPos ) || // allow resizing row height, if the image is anchored as character in the cell - ( rSh.ShouldObjectBeSelected(aDocPos) && - !( SwTab::COL_VERT == nMouseTabCol || SwTab::COL_HORI == nMouseTabCol ) ) ) ) + !( SwTab::COL_VERT == nMouseTabCol || SwTab::COL_HORI == nMouseTabCol ) ) ) { // Enhanced table selection if ( SwTab::SEL_HORI <= nMouseTabCol && SwTab::COLSEL_VERT >= nMouseTabCol ) @@ -3992,8 +3991,7 @@ bool SwEditWin::changeMousePointer(Point const & rDocPoint) if ( SwTab::COL_NONE != (nMouseTabCol = rShell.WhichMouseTabCol( rDocPoint ) ) && ( !rShell.IsObjSelectable( rDocPoint ) || // allow resizing row height, if the image is anchored as character in the cell - ( rShell.ShouldObjectBeSelected(rDocPoint) && - !( SwTab::COL_VERT == nMouseTabCol || SwTab::COL_HORI == nMouseTabCol ) ) ) ) + !( SwTab::COL_VERT == nMouseTabCol || SwTab::COL_HORI == nMouseTabCol ) ) ) { PointerStyle nPointer = PointerStyle::Null; bool bChkTableSel = false;
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/uiwriter/uiwriter6.cxx | 50 sw/source/uibase/docvw/edtwin.cxx | 12 +++- 2 files changed, 60 insertions(+), 2 deletions(-) New commits: commit 03d40ad9dea1629f55a1270d425a5995ed229ddb Author: László Németh AuthorDate: Fri Apr 26 22:03:53 2024 +0200 Commit: Michael Stahl CommitDate: Tue May 14 11:03:30 2024 +0200 tdf#160836 sw: resize rows at images cropped by row height Fixed row height can crop cell content, including images anchored as character. Resizing the row height with mouse was not possible there, because selection of the cropped image avoided to drag & drop the horizontal cell border. Change-Id: I6dde79e77563468059794548b6c058cad61586a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166795 Reviewed-by: László Németh Tested-by: Jenkins (cherry picked from commit 30de13743f144aced83bc43d310592f82788c910) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167210 Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index db0c8f6929c7..8e67d26e4652 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -1513,6 +1513,56 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160842) CPPUNIT_ASSERT(pWrtShell->IsCursorInTable()); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160836) +{ +createSwDoc("tdf160842.fodt"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); + +// set table row height by drag & drop at images cropped by the fixed row height +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); +auto pPage = dynamic_cast(pLayout->Lower()); +CPPUNIT_ASSERT(pPage); +const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs.size()); +auto pPageFly = dynamic_cast(rPageObjs[0]); +CPPUNIT_ASSERT(pPageFly); +auto pTable = dynamic_cast(pPageFly->GetLower()); +CPPUNIT_ASSERT(pTable); +auto pRow1 = pTable->GetLower(); +CPPUNIT_ASSERT(pRow1->IsRowFrame()); +auto pCellA1 = pRow1->GetLower(); +CPPUNIT_ASSERT(pCellA1); +const SwRect& rCellA1Rect = pCellA1->getFrameArea(); +auto nRowHeight = rCellA1Rect.Height(); +// select center of the bottom border of the first table cell +Point ptFrom(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() + nRowHeight); +// halve the row height +Point ptTo(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() + 0.5 * nRowHeight); +vcl::Window& rEditWin = pDoc->GetDocShell()->GetView()->GetEditWin(); +Point aFrom = rEditWin.LogicToPixel(ptFrom); +MouseEvent aClickEvent(aFrom, 1, MouseEventModifiers::SIMPLECLICK | MouseEventModifiers::SELECT, + MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent); +Point aTo = rEditWin.LogicToPixel(ptTo); +MouseEvent aMoveEvent(aTo, 1, MouseEventModifiers::SIMPLECLICK | MouseEventModifiers::SELECT, + MOUSE_LEFT); +TrackingEvent aTEvt(aMoveEvent, TrackingEventFlags::Repeat); +// drag & drop of cell border inside the document (and outside the table) +// still based on the ruler code, use that to simulate dragging +pDoc->GetDocShell()->GetView()->GetVRuler().Tracking(aTEvt); +TrackingEvent aTEvt2(aMoveEvent, TrackingEventFlags::End); +pDoc->GetDocShell()->GetView()->GetVRuler().Tracking(aTEvt2); +Scheduler::ProcessEventsToIdle(); +rEditWin.CaptureMouse(); +rEditWin.ReleaseMouse(); + +// this was 3910 (not modified row height previously) +CPPUNIT_ASSERT_EQUAL(tools::Long(1980), pCellA1->getFrameArea().Height()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115132) { createSwDoc(); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 073b6b59649e..9aa4862a43a4 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -3113,9 +3113,13 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SwTab nMouseTabCol = SwTab::COL_NONE; const bool bTmp = !rSh.IsDrawCreate() && !m_pApplyTempl && !rSh.IsInSelect() && aMEvt.GetClicks() == 1 && MOUSE_LEFT == aMEvt.GetButtons(); + if ( bTmp && SwTab::COL_NONE != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) && - !rSh.IsObjSelectable( aDocPos ) ) + ( !rSh.IsObjSelectable( aDocPos ) || + // allow resizing row height, if the image is anchored as character in the cell + ( rSh.ShouldObjectBeSelected(aDocPos) && + !( SwTab::COL_VERT =
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf160842.fodt | 75 ++ sw/qa/extras/uiwriter/uiwriter6.cxx | 41 sw/source/core/frmedt/feshview.cxx| 22 3 files changed, 138 insertions(+) New commits: commit 5ad48954250b9235f4381a756445c318d2d69f6c Author: László Németh AuthorDate: Sat Apr 27 00:26:54 2024 +0200 Commit: Michael Stahl CommitDate: Mon May 13 11:56:35 2024 +0200 tdf#160842 sw: select cell content instead of cropped part of image It was not possible to select and edit the content of the bottom cell, if an image cropped by the fixed row height "covered" it, i.e. the image was in the previous row, anchored as character. Note: table cells with fixed row height are usable to crop images easily, with a single drag & drop, according to the requirement of the text layout, while the cell above or bottom of the cell with image is for the caption of the image. This is very useful to adjust a book layout with sections with multiple columns and illustrations. Change-Id: I8683b4066db6ce43549ec3aa69b0e639a59e3681 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166794 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit f3b899655018397e71300dbb32cdf4f82940a68b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167089 Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/uiwriter/data/tdf160842.fodt b/sw/qa/extras/uiwriter/data/tdf160842.fodt new file mode 100644 index ..217b9c1a9570 --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf160842.fodt @@ -0,0 +1,75 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + iVBORw0KGgoNSUhEUgICCAIAAAD91JpzFklEQVQI12P2Ytilf46NeWX3 + a804HgAg7QTAqXPBTwBJRU5ErkJggg== + + + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing. + + + + + + + + diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index 9b8ae0244efe..db0c8f6929c7 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -55,6 +55,10 @@ #include #i
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/uiwriter/uiwriter6.cxx | 66 sw/source/uibase/uiview/viewtab.cxx |2 - 2 files changed, 67 insertions(+), 1 deletion(-) New commits: commit 5b3037e2caa5dc857f51dd0dd7f38646535ee232 Author: László Németh AuthorDate: Tue Apr 23 16:04:47 2024 +0200 Commit: Michael Stahl CommitDate: Mon May 13 11:54:01 2024 +0200 tdf#44773 sw: allow resizing table rows, if cursor outside the table If the cursor wasn't in the table, only column width of text tables was resizeable by dragging the horizontal cell borders: It was possible to drag the horizontal border, showing its preview, but the drop cancelled the operation instead of resizing the table row according to the selected position. Now it's possible to resize the height of the table rows without moving the text cursor inside the table. Note: This is important for floating tables containing images: here it's not possible to put the cursor inside the table, if the image is cropped only by the cell borders: so it was not possible to resize the row height. Change-Id: I181d79a28cdeefabb796b7b978ee1368a937 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166793 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 6c00a73348511b688be214439941e128fc430a34) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167088 Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index 5b4140e02967..9b8ae0244efe 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -1406,6 +1407,71 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf154771_MovingMultipleColumns) CPPUNIT_ASSERT_EQUAL(sal_Int32(4), xTable1->getColumns()->getCount()); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf44773) +{ +// allow resizing table rows, if cursor outside the table +createSwDoc(); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); + +// insert an empty paragraph +pWrtShell->SplitNode(); + +// create a table +SwInsertTableOptions TableOpt(SwInsertTableFlags::DefaultBorder, 0); +(void)>InsertTable(TableOpt, 2, 1); + +// the cursor is not inside the table +CPPUNIT_ASSERT(!pWrtShell->IsCursorInTable()); + +uno::Reference xTablesSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xTableNames = xTablesSupplier->getTextTables(); +CPPUNIT_ASSERT(xTableNames->hasByName("Table1")); +uno::Reference xTable1(xTableNames->getByName("Table1"), uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTable1->getRows()->getCount()); +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTable1->getColumns()->getCount()); + +Scheduler::ProcessEventsToIdle(); + +// set table row height by drag & drop +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); + +SwFrame* pPage = pLayout->Lower(); +SwFrame* pBody = pPage->GetLower(); +SwFrame* pTable = pBody->GetLower()->GetNext(); +SwFrame* pRow1 = pTable->GetLower(); +CPPUNIT_ASSERT(pRow1->IsRowFrame()); +SwFrame* pCellA1 = pRow1->GetLower(); +const SwRect& rCellA1Rect = pCellA1->getFrameArea(); +auto nRowHeight = rCellA1Rect.Height(); +// select center of the bottom border of the first table cell +Point ptFrom(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() + nRowHeight); +// double the row height +Point ptTo(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() + 2 * nRowHeight); +vcl::Window& rEditWin = pDoc->GetDocShell()->GetView()->GetEditWin(); +Point aFrom = rEditWin.LogicToPixel(ptFrom); +MouseEvent aClickEvent(aFrom, 1, MouseEventModifiers::SIMPLECLICK | MouseEventModifiers::SELECT, + MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent); +Point aTo = rEditWin.LogicToPixel(ptTo); +MouseEvent aMoveEvent(aTo, 1, MouseEventModifiers::SIMPLECLICK | MouseEventModifiers::SELECT, + MOUSE_LEFT); +TrackingEvent aTEvt(aMoveEvent, TrackingEventFlags::Repeat); +// drag & drop of cell border inside the document (and outside the table) +// still based on the ruler code, use that to simulate dragging +pDoc->GetDocShell()->GetView()->GetVRuler().Tracking(aTEvt); +TrackingEvent aTEvt2(aMoveEvent, TrackingEventFlags::End); +pDoc->GetDocShell()->GetView()->GetVRuler().Tracking(aTEvt2); +Scheduler::ProcessEventsToIdle(); +rEditWin.CaptureMouse(); +rEditWin.ReleaseMouse(); + +// this was 396 (not modif
core.git: sw/qa
sw/qa/extras/layout/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt | 6 +++--- sw/qa/extras/layout/data/tdf132599_frames_on_same_page_hyphenation.fodt | 6 +++--- sw/qa/extras/layout/data/tdf132599_frames_on_same_page_no_hyphenation.fodt | 6 +++--- sw/qa/extras/layout/data/tdf132599_frames_on_spread_hyphenation.fodt | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) New commits: commit 016d61f529f9d9ec2520fb7a808da41cf17d7295 Author: László Németh AuthorDate: Sat May 11 14:26:09 2024 +0200 Commit: René Engelhard CommitDate: Sat May 11 16:29:15 2024 +0200 tdf#132599 sw: fix unit tests for hyphenation-keep with frames Fix en_US language of the test documents to be consistent with the hyphenator condition in the related unit tests of commit d4304cd0a4fedd0117fea3625dff1fca2945a0e6 "tdf132599 sw: fix hyphenation-keep for linked frames, also for spreads". The problem was reported by René Engelhard. Change-Id: Iee7fd83aea294fb32c5f358cd25a1d1cb9a76d27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167512 Reviewed-by: René Engelhard Tested-by: Jenkins Tested-by: René Engelhard diff --git a/sw/qa/extras/layout/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt b/sw/qa/extras/layout/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt index 5d8f21a81c26..c3df7b605f3a 100644 --- a/sw/qa/extras/layout/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt +++ b/sw/qa/extras/layout/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt @@ -129,11 +129,11 @@ - + - + @@ -210,7 +210,7 @@ - out there in space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is space, except that it has an atmosphere. Earth is. The Earth is no different to any other celestial body + Space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is space, except that it has an atmosphere. Earth is. The Earth is no different to any other celestial body diff --git a/sw/qa/extras/layout/data/tdf132599_frames_on_same_page_hyphenation.fodt b/sw/qa/extras/layout/data/tdf132599_frames_on_same_page_hyphenation.fodt index 34933cba9007..f92358ad0ea3 100644 --- a/sw/qa/extras/layout/data/tdf132599_frames_on_same_page_hyphenation.fodt +++ b/sw/qa/extras/layout/data/tdf132599_frames_on_same_page_hyphenation.fodt @@ -124,11 +124,11 @@ - + - + @@ -198,7 +198,7 @@ - out there in space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is space, except that it has an atmosphere. Earth is. The Earth is no different to any other celestial body + Space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is space, except that it has an atmosphere. Earth is. The Earth is no different to any other celestial body diff --git a/sw/qa/extras/layout/data/tdf132599_frames_on_same_page_no_hyphenation.fodt b/sw/qa/extras/layout/data/tdf132599_frames_on_same_page_no_hyphenation.fodt index 75a0dc00ce6e..64bd33b5aada 100644 --- a/sw/qa/extras/layout/data/tdf132599_frames_on_same_page_no_hyphenation.fodt +++ b/sw/qa/extras/layout/data/tdf132599_frames_on_same_page_no_hyphenation.fodt @@ -124,11 +124,11 @@ - + - + @@ -198,7 +198,7 @@ - out there in space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is space, except that it has an atmosphere. Earth is. The Earth is no different to any other celestial body + Space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is space, except that it has an atmosphere. Earth is. The Earth is no different to any other celestial body diff --git a/sw/qa/extras/layout/data/tdf132599_frames_on_spread_hyphenation.fodt b/sw/qa/extras/layout/data/tdf132599_frames_on_spread_hyphenation.fodt index 92cf5ef4773b..b1c16ad6db59 100644 --- a/sw/qa/extras/layout/data/tdf132599_frames_on_spread_hyphenation.fodt +++ b/sw/qa/extras/layout/data/tdf132599_frames_on_spread_hyphenation.fodt @@ -129,11 +129,11 @@ - + - + @@ -213,7 +213,7 @@ - out there in space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is space, except that it has an atmosphere. Earth is. The Earth is no different to any other celestial body + Space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is space, except that it has an atmosphere. Earth is. The Earth is no different to
core.git: sw/qa
sw/qa/extras/odfexport/odfexport2.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9668c9b8fe1d4afba335ab1f9d3309ad91bd56da Author: László Németh AuthorDate: Sat May 11 13:27:24 2024 +0200 Commit: László Németh CommitDate: Sat May 11 13:58:57 2024 +0200 tdf#132599 sw: fix test of "fix hyphenation-keep for tables and no widow" Follow-up to commit a4970f4eeb94b8c405c5e3ec094d47061253efac "tdf#132599 sw: fix hyphenation-keep for tables and no widow". Change-Id: I94f2028fbc0f74b606fce2e921140ae9698955e0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167507 Tested-by: László Németh Reviewed-by: László Németh diff --git a/sw/qa/extras/odfexport/odfexport2.cxx b/sw/qa/extras/odfexport/odfexport2.cxx index 58e528e06df0..943f53d624d6 100644 --- a/sw/qa/extras/odfexport/odfexport2.cxx +++ b/sw/qa/extras/odfexport/odfexport2.cxx @@ -249,7 +249,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf132599_page_in_table) CPPUNIT_ASSERT_EQUAL(3, getPages()); xmlDocUniquePtr pXmlDoc = parseExport("content.xml"); -assertXPath(pXmlDoc, "//style:style[@style:family='paragraph']/style:paragraph-properties[@loext:hyphenation-keep-type='always']"_ostr, 1); +assertXPath(pXmlDoc, "//style:style[@style:family='paragraph']/style:paragraph-properties[@loext:hyphenation-keep-type='page']"_ostr, 1); } CPPUNIT_TEST_FIXTURE(Test, testTdf158885_compound_remain)
core.git: sw/qa sw/source
sw/qa/extras/odfexport/data/tdf132599_page_in_table.fodt | 225 +++ sw/qa/extras/odfexport/odfexport2.cxx| 16 + sw/source/core/text/widorp.cxx |6 3 files changed, 246 insertions(+), 1 deletion(-) New commits: commit a4970f4eeb94b8c405c5e3ec094d47061253efac Author: László Németh AuthorDate: Fri May 10 12:23:30 2024 +0200 Commit: László Németh CommitDate: Fri May 10 15:25:12 2024 +0200 tdf#132599 sw: fix hyphenation-keep for tables and no widow Now hyphenation-keep works without widow settings, too, e.g. in tables (where despite the existing widow settings, widow handling is always disabled). Follow-up to commit 6e8819f29b6051a0e551d77512830539913ec277 "tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type", commit c8a99cb8dce54de506ba66d1cc0818b9b5f7858b "tdf#132599 sw schema xmloff: add hyphenation-keep-type='always' commit d4304cd0a4fedd0117fea3625dff1fca2945a0e6 "tdf132599 sw: fix hyphenation-keep for linked frames, also for spreads". Change-Id: Id3db9631bb75d220e6fee7ebc9a5e7adad735273 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167447 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/odfexport/data/tdf132599_page_in_table.fodt b/sw/qa/extras/odfexport/data/tdf132599_page_in_table.fodt new file mode 100644 index ..4008fe10032c --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf132599_page_in_table.fodt @@ -0,0 +1,225 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + false + true + true + + false + 0 + false + true + true + false + false + 0 + true + false + false + false + false + false + true + false + false + true + false + true + true + false + true + false + false + false + false + true + true + false + false + false + false + false + false + high-resolution + false + 1243834 + false + true + false + + + true + + false + false + false + true + true + true + false + 0 + true + false + false + true + true + true + false + true + false + false + false + false + false + true + true + false + + tru
core.git: sw/qa sw/source
sw/qa/extras/layout/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt | 224 + sw/qa/extras/layout/data/tdf132599_frames_on_same_page_hyphenation.fodt | 210 + sw/qa/extras/layout/data/tdf132599_frames_on_same_page_no_hyphenation.fodt | 210 + sw/qa/extras/layout/data/tdf132599_frames_on_spread_hyphenation.fodt | 231 ++ sw/qa/extras/layout/layout3.cxx | 99 sw/source/core/text/widorp.cxx | 25 - 6 files changed, 983 insertions(+), 16 deletions(-) New commits: commit d4304cd0a4fedd0117fea3625dff1fca2945a0e6 Author: László Németh AuthorDate: Wed May 8 13:20:26 2024 +0200 Commit: László Németh CommitDate: Fri May 10 09:58:43 2024 +0200 tdf132599 sw: fix hyphenation-keep for linked frames, also for spreads Linked text frames are hyphenated as columns on the same page, i.e. do not shift the hyphenated line, if hyphenation-keep-type="page" or "spread". For "spread", check also that the hyphenated line is on the previous left page, because checking only right page wasn't enough for linked text frames and blank left pages. Follow-up to commit 6e8819f29b6051a0e551d77512830539913ec277 "tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type" and commit c8a99cb8dce54de506ba66d1cc0818b9b5f7858b "tdf#132599 sw schema xmloff: add hyphenation-keep-type='always'". Change-Id: I8965b42aa26c3c2571e07ad1b45dce6a9f61c633 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167390 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/layout/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt b/sw/qa/extras/layout/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt new file mode 100644 index ..5d8f21a81c26 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf132599_frames_on_right_pages_no_hyphenation.fodt @@ -0,0 +1,224 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + false + true + true + + false + 0 + false + true + true + false + false + 0 + true + false + false + false + false + false + true + false + false + true + false + true + true + false + true + false + false + false + false + true + true + false + false + false + false + false + false + high-resolution + false + 595440 + false + true + false
core.git: cui/source cui/uiconfig schema/libreoffice sw/qa sw/source xmloff/source
cui/source/inc/paragrph.hxx|3 cui/source/tabpages/paragrph.cxx | 38 + cui/uiconfig/ui/textflowpage.ui| 29 + schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng|2 sw/qa/extras/layout/data/tdf132599_always.fodt | 249 ++ sw/qa/extras/layout/layout3.cxx| 27 + sw/qa/extras/odfexport/data/tdf132599_always.fodt | 249 ++ sw/qa/extras/odfexport/data/tdf132599_column.fodt | 12 sw/qa/extras/odfexport/data/tdf132599_page_in_last_column.fodt | 12 sw/qa/extras/odfexport/data/tdf132599_page_in_not_last_column.fodt | 12 sw/qa/extras/odfexport/data/tdf132599_spread-left-page.fodt| 20 sw/qa/extras/odfexport/data/tdf132599_spread.fodt | 16 sw/qa/extras/odfexport/odfexport2.cxx | 15 sw/source/core/text/guess.cxx | 40 + xmloff/source/text/txtprhdl.cxx|1 xmloff/source/text/txtprmap.cxx|2 16 files changed, 678 insertions(+), 49 deletions(-) New commits: commit c8a99cb8dce54de506ba66d1cc0818b9b5f7858b Author: László Németh AuthorDate: Mon May 6 17:17:43 2024 +0200 Commit: László Németh CommitDate: Tue May 7 13:58:28 2024 +0200 tdf#132599 sw schema xmloff: add hyphenation-keep-type='always' Add new hyphenation option to limit hyphenation of the last full line of the hyphenated paragraph. Move also loext:hyphenation-keep-type to paragraph-properties, following the associated hyphenation-keep. Note: value "always" is defined by CSS 4 hyphenate-limit-last, see https://www.w3.org/TR/css-text-4/#hyphenate-line-limits. Follow-up to commit 6e8819f29b6051a0e551d77512830539913ec277 "tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type". Change-Id: I2121269205fc89fb5367dccdca00195aac68f3e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167232 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index b35111f43b33..e219aa622e07 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -221,6 +221,7 @@ private: weld::TriStateEnabled aKeepParaState; weld::TriStateEnabled aOrphanState; weld::TriStateEnabled aWidowState; +weld::TriStateEnabled aAcrossParagraphState; weld::TriStateEnabled aAcrossColumnState; weld::TriStateEnabled aAcrossPageState; weld::TriStateEnabled aAcrossSpreadState; @@ -272,6 +273,7 @@ private: // avoid hyphenation across std::unique_ptr m_xAcrossText; +std::unique_ptr m_xAcrossParagraphBox; std::unique_ptr m_xAcrossColumnBox; std::unique_ptr m_xAcrossPageBox; std::unique_ptr m_xAcrossSpreadBox; @@ -294,6 +296,7 @@ private: DECL_LINK(PageBreakTypeHdl_Impl, weld::ComboBox&, void); DECL_LINK(PageNumBoxClickHdl_Impl, weld::Toggleable&, void); DECL_LINK(KeepParaBoxClickHdl_Impl, weld::Toggleable&, void); +DECL_LINK(AcrossParagraphHdl_Impl, weld::Toggleable&, void); DECL_LINK(AcrossColumnHdl_Impl, weld::Toggleable&, void); DECL_LINK(AcrossPageHdl_Impl, weld::Toggleable&, void); DECL_LINK(AcrossSpreadHdl_Impl, weld::Toggleable&, void); diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 034983ea73ce..56b697a046a6 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1618,6 +1618,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) m_xMaxHyphenEdit->get_value_changed_from_saved() || m_xMinWordLength->get_value_changed_from_saved() || m_aHyphenZone.get_value_changed_from_saved() || + m_xAcrossParagraphBox->get_state_changed_from_saved() || m_xAcrossColumnBox->get_state_changed_from_saved() || m_xAcrossPageBox->get_state_changed_from_saved() || m_xAcrossSpreadBox->get_state_changed_from_saved() ) @@ -1643,6 +1644,7 @@ bool SvxExtParagraphTabPage::FillItemSet( SfxItemSet* rOutSet ) aHyphen.GetTextHyphenZone() = static_cast(m_aHyphenZone.GetCoreValue(eUnit)); aHyphen.SetHyphen( eHyphenState == TRISTATE_TRUE ); aHyphen.SetNoLastWordHyphenation(m_xHyphenNoLastWordBox->get_state() != TRISTATE_TRUE); +const TriState eAcrossParagraphState = m_xAcrossParagraphBox->get_state(); const TriState eAcrossColumnState = m_xAcrossColumnBox->get_state(); const TriState eAcrossPageState = m_xAcrossPageBox->get_state(); const TriState eAcrossSpreadState = m_xAcrossSpreadBox->get_state(); @@ -1
core.git: sw/source
sw/source/uibase/docvw/edtwin.cxx |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) New commits: commit 38b6e89c9483fdfe3d26bef3b25f890528aef84e Author: László Németh AuthorDate: Mon Apr 29 21:39:41 2024 +0200 Commit: László Németh CommitDate: Tue Apr 30 23:02:01 2024 +0200 tdf#160836 sw: fix narrow selection area of cell border Remove ShouldObjectBeSelected() condition to fix the selection area around the horizontal border. (Its purpose was to avoid of selection of the border, when covered by an image: but that would be !ShouldObjectBeSelected(), with the same problem: halved selection area.) Clean-up commit commit 30de13743f144aced83bc43d310592f82788c910 "tdf#160836 sw: resize rows at images cropped by row height". Change-Id: I6c812a150b67431c7ea3131f29489bda919c1724 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166877 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index c0d4a0837f17..b50c67811774 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -3159,8 +3159,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SwTab::COL_NONE != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) && ( !rSh.IsObjSelectable( aDocPos ) || // allow resizing row height, if the image is anchored as character in the cell - ( rSh.ShouldObjectBeSelected(aDocPos) && - !( SwTab::COL_VERT == nMouseTabCol || SwTab::COL_HORI == nMouseTabCol ) ) ) ) + !( SwTab::COL_VERT == nMouseTabCol || SwTab::COL_HORI == nMouseTabCol ) ) ) { // Enhanced table selection if ( SwTab::SEL_HORI <= nMouseTabCol && SwTab::COLSEL_VERT >= nMouseTabCol ) @@ -4033,8 +4032,7 @@ bool SwEditWin::changeMousePointer(Point const & rDocPoint) if ( SwTab::COL_NONE != (nMouseTabCol = rShell.WhichMouseTabCol( rDocPoint ) ) && ( !rShell.IsObjSelectable( rDocPoint ) || // allow resizing row height, if the image is anchored as character in the cell - ( rShell.ShouldObjectBeSelected(rDocPoint) && - !( SwTab::COL_VERT == nMouseTabCol || SwTab::COL_HORI == nMouseTabCol ) ) ) ) + !( SwTab::COL_VERT == nMouseTabCol || SwTab::COL_HORI == nMouseTabCol ) ) ) { PointerStyle nPointer = PointerStyle::Null; bool bChkTableSel = false;
core.git: sw/qa sw/source
sw/qa/extras/uiwriter/uiwriter6.cxx | 50 sw/source/uibase/docvw/edtwin.cxx | 12 +++- 2 files changed, 60 insertions(+), 2 deletions(-) New commits: commit 30de13743f144aced83bc43d310592f82788c910 Author: László Németh AuthorDate: Fri Apr 26 22:03:53 2024 +0200 Commit: László Németh CommitDate: Mon Apr 29 00:16:31 2024 +0200 tdf#160836 sw: resize rows at images cropped by row height Fixed row height can crop cell content, including images anchored as character. Resizing the row height with mouse was not possible there, because selection of the cropped image avoided to drag & drop the horizontal cell border. Change-Id: I6dde79e77563468059794548b6c058cad61586a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166795 Reviewed-by: László Németh Tested-by: Jenkins diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index e6cff1c8ae9a..ce525954ace9 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -1504,6 +1504,56 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160842) CPPUNIT_ASSERT(pWrtShell->IsCursorInTable()); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf160836) +{ +createSwDoc("tdf160842.fodt"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); + +// set table row height by drag & drop at images cropped by the fixed row height +SwRootFrame* pLayout = pDoc->getIDocumentLayoutAccess().GetCurrentLayout(); +auto pPage = dynamic_cast(pLayout->Lower()); +CPPUNIT_ASSERT(pPage); +const SwSortedObjs& rPageObjs = *pPage->GetSortedObjs(); +CPPUNIT_ASSERT_EQUAL(static_cast(1), rPageObjs.size()); +auto pPageFly = dynamic_cast(rPageObjs[0]); +CPPUNIT_ASSERT(pPageFly); +auto pTable = dynamic_cast(pPageFly->GetLower()); +CPPUNIT_ASSERT(pTable); +auto pRow1 = pTable->GetLower(); +CPPUNIT_ASSERT(pRow1->IsRowFrame()); +auto pCellA1 = pRow1->GetLower(); +CPPUNIT_ASSERT(pCellA1); +const SwRect& rCellA1Rect = pCellA1->getFrameArea(); +auto nRowHeight = rCellA1Rect.Height(); +// select center of the bottom border of the first table cell +Point ptFrom(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() + nRowHeight); +// halve the row height +Point ptTo(rCellA1Rect.Left() + rCellA1Rect.Width() / 2, rCellA1Rect.Top() + 0.5 * nRowHeight); +vcl::Window& rEditWin = pDoc->GetDocShell()->GetView()->GetEditWin(); +Point aFrom = rEditWin.LogicToPixel(ptFrom); +MouseEvent aClickEvent(aFrom, 1, MouseEventModifiers::SIMPLECLICK | MouseEventModifiers::SELECT, + MOUSE_LEFT); +rEditWin.MouseButtonDown(aClickEvent); +Point aTo = rEditWin.LogicToPixel(ptTo); +MouseEvent aMoveEvent(aTo, 1, MouseEventModifiers::SIMPLECLICK | MouseEventModifiers::SELECT, + MOUSE_LEFT); +TrackingEvent aTEvt(aMoveEvent, TrackingEventFlags::Repeat); +// drag & drop of cell border inside the document (and outside the table) +// still based on the ruler code, use that to simulate dragging +pDoc->GetDocShell()->GetView()->GetVRuler().Tracking(aTEvt); +TrackingEvent aTEvt2(aMoveEvent, TrackingEventFlags::End); +pDoc->GetDocShell()->GetView()->GetVRuler().Tracking(aTEvt2); +Scheduler::ProcessEventsToIdle(); +rEditWin.CaptureMouse(); +rEditWin.ReleaseMouse(); + +// this was 3910 (not modified row height previously) +CPPUNIT_ASSERT_EQUAL(tools::Long(1980), pCellA1->getFrameArea().Height()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest6, testTdf115132) { createSwDoc(); diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index 6bd10d4d580f..c0d4a0837f17 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -3154,9 +3154,13 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt) SwTab nMouseTabCol = SwTab::COL_NONE; const bool bTmp = !rSh.IsDrawCreate() && !m_pApplyTempl && !rSh.IsInSelect() && aMEvt.GetClicks() == 1 && MOUSE_LEFT == aMEvt.GetButtons(); + if ( bTmp && SwTab::COL_NONE != (nMouseTabCol = rSh.WhichMouseTabCol( aDocPos ) ) && - !rSh.IsObjSelectable( aDocPos ) ) + ( !rSh.IsObjSelectable( aDocPos ) || + // allow resizing row height, if the image is anchored as character in the cell + ( rSh.ShouldObjectBeSelected(aDocPos) && + !( SwTab::COL_VERT == nMouseTabCol || SwTab::COL_HORI == nMouseTabCol ) ) ) ) { // Enhanced table selection if ( SwTab::SEL_HORI <= nMouseTabCol &&
core.git: 2 commits - sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf160842.fodt | 75 + sw/qa/extras/uiwriter/uiwriter6.cxx | 107 ++ sw/source/core/frmedt/feshview.cxx| 22 ++ sw/source/uibase/uiview/viewtab.cxx |2 4 files changed, 205 insertions(+), 1 deletion(-) New commits: commit f3b899655018397e71300dbb32cdf4f82940a68b Author: László Németh AuthorDate: Sat Apr 27 00:26:54 2024 +0200 Commit: László Németh CommitDate: Mon Apr 29 00:16:21 2024 +0200 tdf#160842 sw: select cell content instead of cropped part of image It was not possible to select and edit the content of the bottom cell, if an image cropped by the fixed row height "covered" it, i.e. the image was in the previous row, anchored as character. Note: table cells with fixed row height are usable to crop images easily, with a single drag & drop, according to the requirement of the text layout, while the cell above or bottom of the cell with image is for the caption of the image. This is very useful to adjust a book layout with sections with multiple columns and illustrations. Change-Id: I8683b4066db6ce43549ec3aa69b0e639a59e3681 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166794 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/uiwriter/data/tdf160842.fodt b/sw/qa/extras/uiwriter/data/tdf160842.fodt new file mode 100644 index ..217b9c1a9570 --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf160842.fodt @@ -0,0 +1,75 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + iVBORw0KGgoNSUhEUgICCAIAAAD91JpzFklEQVQI12P2Ytilf46NeWX3 + a804HgAg7QTAqXPBTwBJRU5ErkJggg== + + + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing. + + + + + + + + diff --git a/sw/qa/extras/uiwriter/uiwriter6.cxx b/sw/qa/extras/uiwriter/uiwriter6.cxx index 51f15a09f2d8..e6cff1c8ae9a 100644 --- a/sw/qa/extras/uiwriter/uiwriter6.cxx +++ b/sw/qa/extras/uiwriter/uiwriter6.cxx @@ -55,6 +55,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include
dictionaries.git: Changes to 'refs/tags/cp-24.04.1-3'
Tag 'cp-24.04.1-3' created by Andras Timar at 2024-04-22 06:34 + cp-24.04.1-3 Changes since cp-24.04.1-2-3: --- 0 files changed ---
core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 11ed593acc339d848806cd263e1de9503965a53a Author: László Németh AuthorDate: Thu Apr 11 17:42:19 2024 +0200 Commit: Gerrit Code Review CommitDate: Thu Apr 11 17:42:19 2024 +0200 Update git submodules * Update helpcontent2 from branch 'master' to 58350a811a8001f72b13f6ca3def5f32ea904e72 - tdf#132599 add "Hyphenation across" options Document new options of LO 24.8 to control hyphenation in last line of a column, page or spread. Follow-up to core commit 6e8819f29b6051a0e551d77512830539913ec277 "tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type", core commit 9574a62add8e4901405e12117e75c86c2d2c2f21 "tdf#132599 cui offapi sw xmloff: implement hyphenate-keep" and core commit c8ee0e8f581b8a6e41b1a6b8aa4d40b442c1d463 "tdf160518 DOCX: import hyphenation-keep to fix layout". Change-Id: I1d7d6ef1b154f7c6dd55e99584d1d27ce46899ac Reviewed-on: https://gerrit.libreoffice.org/c/help/+/166009 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index c2b91a5c78e0..58350a811a80 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit c2b91a5c78e053498f5ff6a411c314e36eb4a859 +Subproject commit 58350a811a8001f72b13f6ca3def5f32ea904e72
help.git: source/text
source/text/swriter/01/05030200.xhp | 11 +++ 1 file changed, 11 insertions(+) New commits: commit 58350a811a8001f72b13f6ca3def5f32ea904e72 Author: László Németh AuthorDate: Thu Apr 11 13:38:42 2024 +0200 Commit: Olivier Hallot CommitDate: Thu Apr 11 17:42:19 2024 +0200 tdf#132599 add "Hyphenation across" options Document new options of LO 24.8 to control hyphenation in last line of a column, page or spread. Follow-up to core commit 6e8819f29b6051a0e551d77512830539913ec277 "tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type", core commit 9574a62add8e4901405e12117e75c86c2d2c2f21 "tdf#132599 cui offapi sw xmloff: implement hyphenate-keep" and core commit c8ee0e8f581b8a6e41b1a6b8aa4d40b442c1d463 "tdf160518 DOCX: import hyphenation-keep to fix layout". Change-Id: I1d7d6ef1b154f7c6dd55e99584d1d27ce46899ac Reviewed-on: https://gerrit.libreoffice.org/c/help/+/166009 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/swriter/01/05030200.xhp b/source/text/swriter/01/05030200.xhp index 9f0c9735a0..6722ef29b4 100644 --- a/source/text/swriter/01/05030200.xhp +++ b/source/text/swriter/01/05030200.xhp @@ -72,6 +72,17 @@ Hyphenate last word Hyphenate the last word of paragraphs. Disabling this feature prevents the creation of almost empty lines containing only half a word. +Hyphenation across +Control hyphenation in the last line of a column, page or spread. + +Column +Deselect this check box to prevent words from being hyphenated across a column or page. + +Page +Deselect this check box to prevent words from being hyphenated across a page. + +Spread +Deselect this check box to prevent words from being hyphenated across a spread. (A spread is a set of two pages that are visible to the reader at the same time.) Breaks Specify the page or column break options.
core.git: cui/source cui/uiconfig editeng/source include/editeng include/sfx2 include/unotools include/xmloff offapi/com schema/libreoffice svx/sdi sw/inc sw/qa sw/source writerfilter/source xmloff/in
cui/source/inc/paragrph.hxx| 13 cui/source/tabpages/paragrph.cxx | 102 +++- cui/uiconfig/ui/textflowpage.ui| 105 +++- editeng/source/items/paraitem.cxx | 82 +-- editeng/source/rtf/rtfitem.cxx |2 include/editeng/editrids.hrc |8 include/editeng/hyphenzoneitem.hxx | 12 include/editeng/memberids.h|3 include/sfx2/msg.hxx |1 include/unotools/linguprops.hxx|4 include/xmloff/xmltoken.hxx|2 include/xmloff/xmltypes.hxx|1 offapi/com/sun/star/style/ParagraphProperties.idl | 15 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng| 16 svx/sdi/svxitems.sdi |3 sw/inc/inspectorproperties.hrc |1 sw/inc/unoprnms.hxx|1 sw/qa/extras/odfexport/data/tdf132599_column.fodt | 198 +++ sw/qa/extras/odfexport/data/tdf132599_page_in_last_column.fodt | 196 +++ sw/qa/extras/odfexport/data/tdf132599_page_in_not_last_column.fodt | 198 +++ sw/qa/extras/odfexport/data/tdf132599_spread-left-page.fodt| 252 ++ sw/qa/extras/odfexport/data/tdf132599_spread.fodt | 241 + sw/qa/extras/odfexport/odfexport2.cxx | 65 ++ sw/qa/uitest/styleInspector/styleInspector.py | 20 sw/qa/uitest/styleInspector/tdf137513.py |2 sw/source/core/text/inftxt.cxx | 26 - sw/source/core/text/widorp.cxx | 32 + sw/source/core/unocore/unomapproperties.hxx|6 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx |1 writerfilter/source/dmapper/PropertyIds.cxx|1 writerfilter/source/dmapper/PropertyIds.hxx|1 writerfilter/source/dmapper/SettingsTable.cxx |3 xmloff/inc/xmlprop.hxx |1 xmloff/source/core/xmltoken.cxx|2 xmloff/source/text/txtprhdl.cxx| 13 xmloff/source/text/txtprmap.cxx|1 xmloff/source/token/tokens.txt |2 37 files changed, 1515 insertions(+), 117 deletions(-) New commits: commit 6e8819f29b6051a0e551d77512830539913ec277 Author: László Németh AuthorDate: Wed Apr 10 12:27:38 2024 +0200 Commit: László Németh CommitDate: Thu Apr 11 10:20:41 2024 +0200 tdf#132599 cui offapi sw xmloff: add hyphenation-keep-type Support XSL attribute "column" and CSS 4 attribute "spread", stored in loext:hyphenation-keep-type, to give better control over hyphenation-keep. E.g. spread: both parts of a hyphenated word shall lie within a single spread, i.e. when the next page is not visible at the same time (e.g. the next page is not a right page of a book). – css::style::ParaHyphenationKeep is a boolean property now, importing hyphenation-keep = "page" as true. – type of ParaHyphenationKeep, including the new non-ODF types is stored in the new ParagraphProperties::ParaHyphenationKeepType. – default value of ParaHyphenationKeepType is COLUMN for interoperability. – Add checkboxes to Text Flow -> Hyphenation Across in paragraph dialog: * Column (previously: Hyphenate across column and page) * Page * Spread – enabling/disabling them follows XSL/CSS 4/loext, i.e. possible combinations: * No Hyphenation across (hyphenation-keep = "page" and loext:hyphenation-keep-type = "column") * Hyphenation across [x] Column (hyphenation-keep = "page" and loext:hyphenation-keep-type = "page") * Hyphenation across [x] Column [x] Page (hyphenation-keep = "page" and loext:hyphenation-keep-type = "spread") * Hyphenation across [x] Column [x] Page [x] Spread (hyphenation-keep = "auto") – Add ODF import/export – Update DOCX import – Add ODF unit tests Note: recent implementation depends on widow settings: disabling widow handling allows hyphenation across columns and pages not o
core.git: Branch 'distro/collabora/co-23.05' - dictionaries
dictionaries |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 8df77099766c2fb56b0c9be9eef34c54f5011b6a Author: László Németh AuthorDate: Tue Apr 9 17:53:42 2024 +0100 Commit: Gerrit Code Review CommitDate: Tue Apr 9 18:53:42 2024 +0200 Update git submodules * Update dictionaries from branch 'distro/collabora/co-23.05' to 3564cb05559c1ea6c34ee89bfb02caee2637028a - Hungarian dictionary v1.8.1 Added new words, fixes, and decomposition data of ~6500 compound words for better hyphenation. See tdf#158885 for COMPOUNDLEFTHYPHENMIN implementation in LibreOffice, where Hunspell filters out compound word boundaries from libhyphen-based hyphenation breaks, restricting hyphenation near the compound boundary according to spelling and typography rules. Change-Id: I22a7b70513d0a59d7a31462fcb46efd53cfe8ad7 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165439 Tested-by: László Németh Reviewed-by: László Németh - Updated Hungarian hyphenation dictionary to version v20240321 source: https://sourceforge.net/projects/magyarispell/files/OOo%20Huhyphn/v20240321-0.1/ Change-Id: If470f5854511cac6f0a355e4d006abf9e3976f90 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165166 Tested-by: László Németh Reviewed-by: László Németh - use general label for Turkish dictionary to be consistent with labels for other dictionaries Change-Id: If01f9a9292fc15f3ff06f608b87273bc4e300e2f Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/162946 Reviewed-by: Kevin Suo Tested-by: Kevin Suo - update hunspell dictionaries for Turkish language This dictionary is more accurate and efficient than the current dictionary. It was benchmarked and compared to existing hunspell Turkish dictionaries. Please see: https://github.com/tdd-ai/hunspell-tr Edit: Updated the dictionary to include proper names. Change-Id: Ie23273274bc60ce6ac53a12ff92ad529bd0339a7 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/118649 Reviewed-by: Muhammet Kara Tested-by: Muhammet Kara - Updated Afrikaans dictionary Change-Id: Ief9cb53fdcbf794d1c54f4f5008f80b9975453d8 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/163265 Tested-by: Andras Timar Reviewed-by: Andras Timar (cherry picked from commit 55f4731d574aeec252379ac66326bcea6df2f823) Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/163280 Tested-by: Adolfo Jayme Barrientos Reviewed-by: Adolfo Jayme Barrientos - tdf#159164 Update the English dictionaries: GB+ZA+AU+CA+US Change-Id: I1ad3cb7a283f85cd8260d2d12f3abd78dfcf6206 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/162881 Tested-by: Ilmari Lauhakangas Reviewed-by: Ilmari Lauhakangas (cherry picked from commit 208a9fd80b2a182fe20f224cd615119c6323ae2e) Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/162899 - tdf#156723 False positives in pt-BR lightproof Salário mínimo Change-Id: I5d060d90b7915b91d44b8dd2cb9bd4cf79115012 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/161572 Tested-by: Olivier Hallot Reviewed-by: Olivier Hallot (cherry picked from commit fda9b47d9ce58f16441d6e0ec23f8aac655c1428) Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/161559 - Updated Slovenian thesaurus Change-Id: Ib3c9a0b4a36398b25def93bbbc62a9bcc8e3fa2c Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/161569 Tested-by: Andras Timar Reviewed-by: Andras Timar - Belarusian hunspell dictionary update Change-Id: I3d2a0f62fe59f46f201a4c7d596a22fd04efe017 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/159516 Tested-by: Vasily Melenchuk Reviewed-by: Vasily Melenchuk Reviewed-by: Thorsten Behrens (cherry picked from commit 15c78fe07964b0457639ff02cd8c15d0d2d844b6) Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/161108 - Update the Korean Dictionaries: ko-KR Update Korean dictionary file (ko_KR.dic) by DaeHyun Sung (2023.05.14) Also, update readme description Change-Id: Iebaad8c33d8a94bfa4e7427c0a3d218ea4d7c109 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/151732 Reviewed-by: Adolfo Jayme Barrientos Tested-by: Adolfo Jayme Barrientos - Updated the English dictionaries: GB Change-Id: I9950273688ccb0d9743d168b1a928e91942c38a3 Reviewed-on: https
dictionaries.git: Branch 'distro/collabora/co-23.05' - 25 commits - af_ZA/af_ZA.aff af_ZA/af_ZA.dic af_ZA/description.xml be_BY/be-official.aff be_BY/be-official.dic be_BY/description.xml ca/descripti
|6 sk_SK/release_sk.txt |5 sk_SK/sk_SK.aff | 788 sk_SK/sk_SK.dic |158099 ++ sk_SK/th_sk_SK_v2.dat | 692 sl_SI/README_th_sl_SI.txt |4 sl_SI/description.xml |2 sl_SI/package-description.txt |2 sl_SI/th_sl_SI_v2.dat | 1534 tr_TR/COPYING.MPL | 373 tr_TR/LICENSE |2 tr_TR/README.txt | 16 tr_TR/description.xml |4 tr_TR/tr_TR.aff |171333 +++ tr_TR/tr_TR.dic |447000 +- 110 files changed, 1196260 insertions(+), 1269558 deletions(-) New commits: commit 3564cb05559c1ea6c34ee89bfb02caee2637028a Author: László Németh AuthorDate: Thu Mar 28 00:19:22 2024 +0100 Commit: Andras Timar CommitDate: Tue Apr 9 18:53:27 2024 +0200 Hungarian dictionary v1.8.1 Added new words, fixes, and decomposition data of ~6500 compound words for better hyphenation. See tdf#158885 for COMPOUNDLEFTHYPHENMIN implementation in LibreOffice, where Hunspell filters out compound word boundaries from libhyphen-based hyphenation breaks, restricting hyphenation near the compound boundary according to spelling and typography rules. Change-Id: I22a7b70513d0a59d7a31462fcb46efd53cfe8ad7 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165439 Tested-by: László Németh Reviewed-by: László Németh diff --git a/hu_HU/README_hu_HU.txt b/hu_HU/README_hu_HU.txt index 8593ed0..468cdee 100644 --- a/hu_HU/README_hu_HU.txt +++ b/hu_HU/README_hu_HU.txt @@ -1,17 +1,17 @@ -Magyar Ispell helyesírási szótár – 1.8 szótárállományok morfológiai adatokkal +Magyar Ispell helyesírási szótár – 1.8.1 szótárállományok morfológiai adatokkal A szótárállományok a LibreOffice projekt részeként a következő nyílt forráskódú licencek bármelyike alapján szabadon felhasználhatóak, de mindenféle garancia nélkül: MPLv2 vagy LesserGPLv3+ -(c) Németh László és Godó Ferenc, 2023 +(c) Németh László és Godó Ferenc, 2024 Honlap: http://magyarispell.sf.net -- -Hungarian Hunspell dictionaries version 1.8 with morphological data +Hungarian Hunspell dictionaries version 1.8.1 with morphological data These files are part of the LibreOffice project. @@ -26,6 +26,6 @@ Software distributed under these licenses is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences for the specific language governing rights and limitations under the licenses. -2023 (c) László Németh & Ferenc Godó +2024 (c) László Németh & Ferenc Godó Home: http://magyarispell.sf.net diff --git a/hu_HU/hu_HU.aff b/hu_HU/hu_HU.aff index 4bddd3e..1812c72 100644 --- a/hu_HU/hu_HU.aff +++ b/hu_HU/hu_HU.aff @@ -6,11 +6,11 @@ # GPL/LGPL/MPL license as published by the FSF and Mozilla Foundation. # # -# Version: May 2023, 1.8 +# Version: March 2024, 1.8.1 # # Home page: http://magyarispell.sourceforge.net # -# 2002-2023 (c) L�szl� N�meth and Ferenc God� +# 2002-2024 (c) L�szl� N�meth and Ferenc God� # # Thanks to # Tam�s Sz�nt� , @@ -30,7 +30,7 @@ # amelyet N�meth L�szl� �s God� Ferenc k�sz�tett, �s a GPL/LGPL/MPL licenc # alatt k�zz�tett a http://magyarispell.sourceforge.net oldalon. # -# Magyar Ispell 1.8, 2023-05 +# Magyar Ispell 1.8.1, 2024-03 # # K�sz�net illeti a k�vetkez�ket: # @@ -52,7 +52,7 @@ NAME Magyar Ispell helyes�r�si sz�t�r LANG hu_HU HOME http://magyarispell.sourceforge.net -VERSION Magyar 1.8 +VERSION Magyar 1.8.1 SET UTF-8 KEY öüó|qwertzuiopőú|asdfghjkléáű|íyxcvbnm TRY íóútaeslzánorhgkiédmyőpvöbucfjüűxwq-.à @@ -157,7 +157,7 @@ ICONV fl fl # - multicharacter suggestions # - well-sorted suggestions -REP 170 +REP 171 REP í i REP i í REP ó o @@ -328,8 +328,9 @@ REP ssal$ sszal REP ssé$ sszé REP ssá$ sszá REP ^megfed megfedd +REP lengépszer legnépszer REP # lengépszerűbb->legnépszerűbb -AF 1548 +AF 1559 AF V˯j�L�n�TtYc��l # 1 AF Um��yiYc� # 2 AF �CWR̯j���y���Yc� # 3 @@ -369,7 +370,7 @@ AF uQ # 36 AF �AUʮi���yǿ�Yc� # 37 AF W̯j�M���RTtvc�� # 38 AF Uʮi�K�m�QYc��k # 39 -AF tV˯j�L�n�RYc��l # 40 +AF tV˯j�L�n��y���RTYc� # 40 AF wYUm���ic�k # 41 AF wYUʮi�K�m�Ssc��k # 42 AF VN˯j�L���TtYc�� # 43 @@ -546,1339 +547,1350 @@ AF KU AF A���UQ # 214 AF W�yjYc� # 215 AF Uʮi$s�m�QYc��k # 216 -AF Um�yiYc���K��ǿ�Ss� # 217 -AF UVʮ˯ij��KL��n�m�TtYcklSs # 218 -AF UVʮ˯ij��KL��n�m�QRYckl # 219 -AF Uʮi�K�m�q�Q,�k # 220 -AF W̯j�M���q�Tt,�l # 221 -AF �BVR˯j��q���,� # 222 -AF W̯j�B��q���R,�l # 223 -AF �CWR̯j��q�,� # 224 -AF V˯j�L�n�q�Tt,�l # 225 -AF ��mAFUKQ # 226 -AF �BVR˯j��q�,� # 227 -AF �AUQʮi��q�,� #
core.git: Branch 'distro/collabora/co-24.04' - dictionaries
dictionaries |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 64f98c67ad5b4e6a7c57c028a204ccc5c43de03c Author: László Németh AuthorDate: Tue Apr 9 17:24:11 2024 +0100 Commit: Gerrit Code Review CommitDate: Tue Apr 9 18:24:11 2024 +0200 Update git submodules * Update dictionaries from branch 'distro/collabora/co-24.04' to 12518d479bc574492d6da740e9176649725c - Hungarian dictionary v1.8.1 Added new words, fixes, and decomposition data of ~6500 compound words for better hyphenation. See tdf#158885 for COMPOUNDLEFTHYPHENMIN implementation in LibreOffice, where Hunspell filters out compound word boundaries from libhyphen-based hyphenation breaks, restricting hyphenation near the compound boundary according to spelling and typography rules. Change-Id: I22a7b70513d0a59d7a31462fcb46efd53cfe8ad7 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165439 Tested-by: László Németh Reviewed-by: László Németh - Updated Hungarian hyphenation dictionary to version v20240321 source: https://sourceforge.net/projects/magyarispell/files/OOo%20Huhyphn/v20240321-0.1/ Change-Id: If470f5854511cac6f0a355e4d006abf9e3976f90 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165166 Tested-by: László Németh Reviewed-by: László Németh - use general label for Turkish dictionary to be consistent with labels for other dictionaries Change-Id: If01f9a9292fc15f3ff06f608b87273bc4e300e2f Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/162946 Reviewed-by: Kevin Suo Tested-by: Kevin Suo - update hunspell dictionaries for Turkish language This dictionary is more accurate and efficient than the current dictionary. It was benchmarked and compared to existing hunspell Turkish dictionaries. Please see: https://github.com/tdd-ai/hunspell-tr Edit: Updated the dictionary to include proper names. Change-Id: Ie23273274bc60ce6ac53a12ff92ad529bd0339a7 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/118649 Reviewed-by: Muhammet Kara Tested-by: Muhammet Kara diff --git a/dictionaries b/dictionaries index a62f9b3e6b2d..12518d47 16 --- a/dictionaries +++ b/dictionaries @@ -1 +1 @@ -Subproject commit a62f9b3e6b2de1366d826a5bacf19ae63e527ead +Subproject commit 12518d479bc574492d6da740e9176649725c
dictionaries.git: Branch 'distro/collabora/co-24.04' - 4 commits - hu_HU/hu_HU.aff hu_HU/hu_HU.dic hu_HU/hyph_hu_HU.dic hu_HU/README_hu_HU.txt hu_HU/README_hyph_hu_HU.txt tr_TR/COPYING.MPL tr_TR/descr
hu_HU/README_hu_HU.txt |8 hu_HU/README_hyph_hu_HU.txt |2 hu_HU/hu_HU.aff |58746 ++--- hu_HU/hu_HU.dic |126894 ++-- hu_HU/hyph_hu_HU.dic| 4614 tr_TR/COPYING.MPL | 373 tr_TR/LICENSE |2 tr_TR/README.txt| 16 tr_TR/description.xml |4 tr_TR/tr_TR.aff |171333 tr_TR/tr_TR.dic |447000 +++- 11 files changed, 338854 insertions(+), 470138 deletions(-) New commits: commit 12518d479bc574492d6da740e9176649725c Author: László Németh AuthorDate: Thu Mar 28 00:19:22 2024 +0100 Commit: Andras Timar CommitDate: Tue Apr 9 18:23:25 2024 +0200 Hungarian dictionary v1.8.1 Added new words, fixes, and decomposition data of ~6500 compound words for better hyphenation. See tdf#158885 for COMPOUNDLEFTHYPHENMIN implementation in LibreOffice, where Hunspell filters out compound word boundaries from libhyphen-based hyphenation breaks, restricting hyphenation near the compound boundary according to spelling and typography rules. Change-Id: I22a7b70513d0a59d7a31462fcb46efd53cfe8ad7 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165439 Tested-by: László Németh Reviewed-by: László Németh diff --git a/hu_HU/README_hu_HU.txt b/hu_HU/README_hu_HU.txt index 8593ed0..468cdee 100644 --- a/hu_HU/README_hu_HU.txt +++ b/hu_HU/README_hu_HU.txt @@ -1,17 +1,17 @@ -Magyar Ispell helyesírási szótár – 1.8 szótárállományok morfológiai adatokkal +Magyar Ispell helyesírási szótár – 1.8.1 szótárállományok morfológiai adatokkal A szótárállományok a LibreOffice projekt részeként a következő nyílt forráskódú licencek bármelyike alapján szabadon felhasználhatóak, de mindenféle garancia nélkül: MPLv2 vagy LesserGPLv3+ -(c) Németh László és Godó Ferenc, 2023 +(c) Németh László és Godó Ferenc, 2024 Honlap: http://magyarispell.sf.net -- -Hungarian Hunspell dictionaries version 1.8 with morphological data +Hungarian Hunspell dictionaries version 1.8.1 with morphological data These files are part of the LibreOffice project. @@ -26,6 +26,6 @@ Software distributed under these licenses is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences for the specific language governing rights and limitations under the licenses. -2023 (c) László Németh & Ferenc Godó +2024 (c) László Németh & Ferenc Godó Home: http://magyarispell.sf.net diff --git a/hu_HU/hu_HU.aff b/hu_HU/hu_HU.aff index 4bddd3e..1812c72 100644 --- a/hu_HU/hu_HU.aff +++ b/hu_HU/hu_HU.aff @@ -6,11 +6,11 @@ # GPL/LGPL/MPL license as published by the FSF and Mozilla Foundation. # # -# Version: May 2023, 1.8 +# Version: March 2024, 1.8.1 # # Home page: http://magyarispell.sourceforge.net # -# 2002-2023 (c) L�szl� N�meth and Ferenc God� +# 2002-2024 (c) L�szl� N�meth and Ferenc God� # # Thanks to # Tam�s Sz�nt� , @@ -30,7 +30,7 @@ # amelyet N�meth L�szl� �s God� Ferenc k�sz�tett, �s a GPL/LGPL/MPL licenc # alatt k�zz�tett a http://magyarispell.sourceforge.net oldalon. # -# Magyar Ispell 1.8, 2023-05 +# Magyar Ispell 1.8.1, 2024-03 # # K�sz�net illeti a k�vetkez�ket: # @@ -52,7 +52,7 @@ NAME Magyar Ispell helyes�r�si sz�t�r LANG hu_HU HOME http://magyarispell.sourceforge.net -VERSION Magyar 1.8 +VERSION Magyar 1.8.1 SET UTF-8 KEY öüó|qwertzuiopőú|asdfghjkléáű|íyxcvbnm TRY íóútaeslzánorhgkiédmyőpvöbucfjüűxwq-.à @@ -157,7 +157,7 @@ ICONV fl fl # - multicharacter suggestions # - well-sorted suggestions -REP 170 +REP 171 REP í i REP i í REP ó o @@ -328,8 +328,9 @@ REP ssal$ sszal REP ssé$ sszé REP ssá$ sszá REP ^megfed megfedd +REP lengépszer legnépszer REP # lengépszerűbb->legnépszerűbb -AF 1548 +AF 1559 AF V˯j�L�n�TtYc��l # 1 AF Um��yiYc� # 2 AF �CWR̯j���y���Yc� # 3 @@ -369,7 +370,7 @@ AF uQ # 36 AF �AUʮi���yǿ�Yc� # 37 AF W̯j�M���RTtvc�� # 38 AF Uʮi�K�m�QYc��k # 39 -AF tV˯j�L�n�RYc��l # 40 +AF tV˯j�L�n��y���RTYc� # 40 AF wYUm���ic�k # 41 AF wYUʮi�K�m�Ssc��k # 42 AF VN˯j�L���TtYc�� # 43 @@ -546,1339 +547,1350 @@ AF KU AF A���UQ # 214 AF W�yjYc� # 215 AF Uʮi$s�m�QYc��k # 216 -AF Um�yiYc���K��ǿ�Ss� # 217 -AF UVʮ˯ij��KL��n�m�TtYcklSs # 218 -AF UVʮ˯ij��KL��n�m�QRYckl # 219 -AF Uʮi�K�m�q�Q,�k # 220 -AF W̯j�M���q�Tt,�l # 221 -AF �BVR˯j��q���,� # 222 -AF W̯j�B��q���R,�l # 223 -AF �CWR̯j��q�,� # 224 -AF V˯j�L�n�q�Tt,�l # 225 -AF ��mAFUKQ # 226 -AF �BVR˯j��q�,� # 227 -AF �AUQʮi��q�,� # 228 -AF Uʮi�K�m�q�Ss,� # 229 -AF Uʮi�A��qǿ�Q,�k # 230 -AF Uʮi�K�m�q�Ss,�k # 231 -AF V˯j�L�n�q�R,�l # 232 -AF V˯j�L�n�q���Tt,�l # 233 -AF V˯j�L�n�q���R,�l� # 234 -AF ��nBGVLR # 235 -AF ���BGVLTt # 236 -AF W̯j�M���q���R,�l # 237 -AF �BVR˯j��q���,�� # 238 -AF W̯j�M���q���Tt,�� # 239 -AF V˯j�B��q
core.git: editeng/source sw/qa writerfilter/source
editeng/source/items/paraitem.cxx |2 sw/qa/extras/ooxmlexport/data/tdf160518_allowHyphenationAtTrackBottom.docx |binary sw/qa/extras/ooxmlexport/data/tdf160518_useWord2013TrackBottomHyphenation.docx |binary sw/qa/extras/ooxmlexport/ooxmlexport14.cxx | 64 ++ writerfilter/source/dmapper/DomainMapperTableHandler.cxx |3 writerfilter/source/dmapper/PropertyIds.cxx |1 writerfilter/source/dmapper/PropertyIds.hxx |1 writerfilter/source/dmapper/SettingsTable.cxx | 17 ++ writerfilter/source/dmapper/SettingsTable.hxx |2 9 files changed, 85 insertions(+), 5 deletions(-) New commits: commit c8ee0e8f581b8a6e41b1a6b8aa4d40b442c1d463 Author: László Németh AuthorDate: Thu Apr 4 14:08:23 2024 +0200 Commit: László Németh CommitDate: Thu Apr 4 22:46:12 2024 +0200 tdf160518 DOCX: import hyphenation-keep to fix layout To fix layout interoperability, import DOCX compatSettings allowHyphenationAtTrackBottom and useWord2013TrackBottomHyphenation as hyphenation-keep setting "COLUMN", shifting last hyphenated lines of pages and columns, like MSO does. Follow-up to commit 9574a62add8e4901405e12117e75c86c2d2c2f21 "tdf#132599 cui offapi sw xmloff: implement hyphenate-keep". Change-Id: Ib2a06efc22a4f30d8f8be8a752460b09d09e97a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165798 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/editeng/source/items/paraitem.cxx b/editeng/source/items/paraitem.cxx index 3e99813f628d..4103fe2ea521 100644 --- a/editeng/source/items/paraitem.cxx +++ b/editeng/source/items/paraitem.cxx @@ -616,7 +616,7 @@ boolSvxHyphenZoneItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) con bool SvxHyphenZoneItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) { nMemberId &= ~CONVERT_TWIPS; -sal_Int16 nNewVal = 0; +sal_Int32 nNewVal = 0; // sal_Int32 needs for MID_HYPHEN_KEEP if( nMemberId != MID_IS_HYPHEN && nMemberId != MID_HYPHEN_NO_CAPS && nMemberId != MID_HYPHEN_NO_LAST_WORD ) diff --git a/sw/qa/extras/ooxmlexport/data/tdf160518_allowHyphenationAtTrackBottom.docx b/sw/qa/extras/ooxmlexport/data/tdf160518_allowHyphenationAtTrackBottom.docx new file mode 100644 index ..61e81cf1f539 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf160518_allowHyphenationAtTrackBottom.docx differ diff --git a/sw/qa/extras/ooxmlexport/data/tdf160518_useWord2013TrackBottomHyphenation.docx b/sw/qa/extras/ooxmlexport/data/tdf160518_useWord2013TrackBottomHyphenation.docx new file mode 100644 index ..26acacc462b3 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf160518_useWord2013TrackBottomHyphenation.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx index a045a03407ff..c33275b62394 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include #include @@ -1424,6 +1426,68 @@ DECLARE_OOXMLEXPORT_TEST(testTdf159032, "tdf124795-5.docx") CPPUNIT_ASSERT_EQUAL(57, getPages()); } +DECLARE_OOXMLEXPORT_TEST(testTdf160518, "tdf160518_useWord2013TrackBottomHyphenation.docx") +{ +uno::Reference xHyphenator = LinguMgr::GetHyphenator(); +if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString( +return; + +// TODO: fix export too +if (isExported()) +return; +// This was 2 (without shifting last hyphenated line of the page) +CPPUNIT_ASSERT_EQUAL(3, getPages()); +} + +DECLARE_OOXMLEXPORT_TEST(testTdf160518_compatible, "tdf160518_allowHyphenationAtTrackBottom.docx") +{ +uno::Reference xHyphenator = LinguMgr::GetHyphenator(); +if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString( +return; + +// TODO: fix export too +if (isExported()) +return; +// This is still 2 +CPPUNIT_ASSERT_EQUAL(2, getPages()); +} + +DECLARE_OOXMLEXPORT_TEST(testTdf160518_ODT, "tdf160518_useWord2013TrackBottomHyphenation.docx") +{ +uno::Reference xHyphenator = LinguMgr::GetHyphenator(); +if (!xHyphenator->hasLocale(lang::Locale("en", "US", OUString( +return; + +// TODO: fix export too +if (isExported()) +return; +// This was 2 (without shifting last hyphenated line of the page) +CPPUNIT_ASSERT_EQUAL(3, getPages()); + +// check compatibility option in
core.git: helpcontent2
helpcontent2 |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c7582ceae710c1a81f75c63541f332052ca7aab0 Author: László Németh AuthorDate: Mon Apr 1 14:33:06 2024 +0100 Commit: Gerrit Code Review CommitDate: Mon Apr 1 15:33:06 2024 +0200 Update git submodules * Update helpcontent2 from branch 'master' to c2349a58a8e43f44a796f8e21053f4ca6de6fb4c - tdf#106733 tdf#158885 add "Exclude from hyphenation, Compound characters... Document new and updated hyphenation options of LO 24.8: New options: – "Exclude from hyphenation" (Character->Position); – "Compound constituent characters at line end" (Paragraph->Text Flow). Updated (moved and negated) options (Paragraph->Text Flow): – "Hyphenate words in CAPS" and – "Hyphenate last word". Follow-up to core commit 3a332d9f1cacb3c6f81fcf6c08afa51d091ddff4 "tdf#158885 cui offapi sw xmloff: fix hyphenation at stem boundary", core commit 03c5a31a0f374a90fbc821718c14dc5f8a385adf "tdf#106733 sw cui: add CharNoHyphenation checkbox", core commit b5e275f47a54bd7fee39dad516a433fde5be872d "tdf#106733 sw: implement CharNoHyphenation" and core commit 73bd04a71e741788a2f2f3b26cc46ddb6a361372 "tdf#106733 xmloff: keep fo:hyphenate in character formatting". Change-Id: Ief37df057bec1ea286c7334a200fe6abcc8995d3 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/165565 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/helpcontent2 b/helpcontent2 index cff8d0c49290..c2349a58a8e4 16 --- a/helpcontent2 +++ b/helpcontent2 @@ -1 +1 @@ -Subproject commit cff8d0c49290f86a40af8e258e37ace0d067afeb +Subproject commit c2349a58a8e43f44a796f8e21053f4ca6de6fb4c
help.git: source/text
source/text/shared/01/05020500.xhp |5 + source/text/swriter/01/05030200.xhp | 18 ++ 2 files changed, 15 insertions(+), 8 deletions(-) New commits: commit c2349a58a8e43f44a796f8e21053f4ca6de6fb4c Author: László Németh AuthorDate: Sat Mar 30 02:26:06 2024 +0100 Commit: Olivier Hallot CommitDate: Mon Apr 1 15:33:06 2024 +0200 tdf#106733 tdf#158885 add "Exclude from hyphenation, Compound characters... Document new and updated hyphenation options of LO 24.8: New options: – "Exclude from hyphenation" (Character->Position); – "Compound constituent characters at line end" (Paragraph->Text Flow). Updated (moved and negated) options (Paragraph->Text Flow): – "Hyphenate words in CAPS" and – "Hyphenate last word". Follow-up to core commit 3a332d9f1cacb3c6f81fcf6c08afa51d091ddff4 "tdf#158885 cui offapi sw xmloff: fix hyphenation at stem boundary", core commit 03c5a31a0f374a90fbc821718c14dc5f8a385adf "tdf#106733 sw cui: add CharNoHyphenation checkbox", core commit b5e275f47a54bd7fee39dad516a433fde5be872d "tdf#106733 sw: implement CharNoHyphenation" and core commit 73bd04a71e741788a2f2f3b26cc46ddb6a361372 "tdf#106733 xmloff: keep fo:hyphenate in character formatting". Change-Id: Ief37df057bec1ea286c7334a200fe6abcc8995d3 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/165565 Tested-by: Jenkins Reviewed-by: Olivier Hallot diff --git a/source/text/shared/01/05020500.xhp b/source/text/shared/01/05020500.xhp index 903a8f9a33..bc091094a4 100644 --- a/source/text/shared/01/05020500.xhp +++ b/source/text/shared/01/05020500.xhp @@ -108,6 +108,11 @@ Pair kerning Automatically adjust the character spacing for specific letter combinations. Kerning is only available for certain font types and requires that your printer support this option. +Hyphenation +Skip hyphenation for selected words. + +Exclude from hyphenation +It prevents hyphenation of the selected word or words in a paragraph hyphenated automatically. diff --git a/source/text/swriter/01/05030200.xhp b/source/text/swriter/01/05030200.xhp index 8b7e3e0527..9f0c9735a0 100644 --- a/source/text/swriter/01/05030200.xhp +++ b/source/text/swriter/01/05030200.xhp @@ -48,18 +48,15 @@ Automatically Automatically inserts hyphens where they are needed in a paragraph. - -Don't hyphenate words in CAPS -Avoids hyphenating words written entirely in capital letters, such as initialisms. - -Don't hyphenate the last word -Avoids hyphenating the last word of paragraphs. This feature can help prevent these words from being split up across pages, affecting readability. Characters at line end Enter the minimum number of characters to leave at the end of the line before a hyphen is inserted. Characters at line begin Enter the minimum number of characters that must appear at the beginning of the line after the hyphen. + +Compound constituent characters at line end +Set 3 (or more) characters to improve the hyphenation in Danish, Dutch, German, Hungarian, Norwegian and Swedish by preferring the hyphenation between constituents of a compound word instead of breaking the second (third etc.) constituent right after its first 2 characters. Maximum consecutive hyphenated lines Enter the maximum number of consecutive lines that can be hyphenated. @@ -68,8 +65,13 @@ Enter the minimum word length in characters that can be hyphenated. Hyphenation zone -To reduce hyphenation, enter the length of the hyphenation zone. Instead of the possible hyphenation, the line will break between words, if the remaining horizontal space does not exceed the hyphenation zone. Hyphenation zone results in enlarged spaces between words in justified text, and greater distance from paragraph margins in non-justified text. - +To reduce hyphenation, enter the length of the hyphenation zone. Instead of the possible hyphenation, the line will break between words, if the remaining horizontal space does not exceed the hyphenation zone. Hyphenation zone results in enlarged spaces between words in justified text, and greater distance from paragraph margins in non-justified text. + +Hyphenate words in CAPS +Hyphenate words written entirely in capital letters, such as initialisms. + +Hyphenate last word +Hyphenate the last word of paragraphs. Disabling this feature prevents the creation of almost empty lines containing only half a word. Breaks Specify the page or column break options.
core.git: dictionaries
dictionaries |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 28d1744552fc7d2144b77a07993918ef33905f1f Author: László Németh AuthorDate: Thu Mar 28 10:56:58 2024 +0100 Commit: Gerrit Code Review CommitDate: Thu Mar 28 10:56:58 2024 +0100 Update git submodules * Update dictionaries from branch 'master' to c5b2a36bde02841590b8ccc490ca88bfdb69f153 - Hungarian dictionary v1.8.1 Added new words, fixes, and decomposition data of ~6500 compound words for better hyphenation. See tdf#158885 for COMPOUNDLEFTHYPHENMIN implementation in LibreOffice, where Hunspell filters out compound word boundaries from libhyphen-based hyphenation breaks, restricting hyphenation near the compound boundary according to spelling and typography rules. Change-Id: I22a7b70513d0a59d7a31462fcb46efd53cfe8ad7 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165439 Tested-by: László Németh Reviewed-by: László Németh diff --git a/dictionaries b/dictionaries index 491736b0e775..c5b2a36bde02 16 --- a/dictionaries +++ b/dictionaries @@ -1 +1 @@ -Subproject commit 491736b0e775f7d4a0bfd9ed9ce94ec296e3e988 +Subproject commit c5b2a36bde02841590b8ccc490ca88bfdb69f153
dictionaries.git: hu_HU/hu_HU.aff hu_HU/hu_HU.dic hu_HU/README_hu_HU.txt
hu_HU/README_hu_HU.txt |8 hu_HU/hu_HU.aff|58746 +++--- hu_HU/hu_HU.dic|126894 - 3 files changed, 93528 insertions(+), 92120 deletions(-) New commits: commit c5b2a36bde02841590b8ccc490ca88bfdb69f153 Author: László Németh AuthorDate: Thu Mar 28 00:19:22 2024 +0100 Commit: László Németh CommitDate: Thu Mar 28 10:56:58 2024 +0100 Hungarian dictionary v1.8.1 Added new words, fixes, and decomposition data of ~6500 compound words for better hyphenation. See tdf#158885 for COMPOUNDLEFTHYPHENMIN implementation in LibreOffice, where Hunspell filters out compound word boundaries from libhyphen-based hyphenation breaks, restricting hyphenation near the compound boundary according to spelling and typography rules. Change-Id: I22a7b70513d0a59d7a31462fcb46efd53cfe8ad7 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165439 Tested-by: László Németh Reviewed-by: László Németh diff --git a/hu_HU/README_hu_HU.txt b/hu_HU/README_hu_HU.txt index 8593ed0..468cdee 100644 --- a/hu_HU/README_hu_HU.txt +++ b/hu_HU/README_hu_HU.txt @@ -1,17 +1,17 @@ -Magyar Ispell helyesírási szótár – 1.8 szótárállományok morfológiai adatokkal +Magyar Ispell helyesírási szótár – 1.8.1 szótárállományok morfológiai adatokkal A szótárállományok a LibreOffice projekt részeként a következő nyílt forráskódú licencek bármelyike alapján szabadon felhasználhatóak, de mindenféle garancia nélkül: MPLv2 vagy LesserGPLv3+ -(c) Németh László és Godó Ferenc, 2023 +(c) Németh László és Godó Ferenc, 2024 Honlap: http://magyarispell.sf.net -- -Hungarian Hunspell dictionaries version 1.8 with morphological data +Hungarian Hunspell dictionaries version 1.8.1 with morphological data These files are part of the LibreOffice project. @@ -26,6 +26,6 @@ Software distributed under these licenses is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences for the specific language governing rights and limitations under the licenses. -2023 (c) László Németh & Ferenc Godó +2024 (c) László Németh & Ferenc Godó Home: http://magyarispell.sf.net diff --git a/hu_HU/hu_HU.aff b/hu_HU/hu_HU.aff index 4bddd3e..1812c72 100644 --- a/hu_HU/hu_HU.aff +++ b/hu_HU/hu_HU.aff @@ -6,11 +6,11 @@ # GPL/LGPL/MPL license as published by the FSF and Mozilla Foundation. # # -# Version: May 2023, 1.8 +# Version: March 2024, 1.8.1 # # Home page: http://magyarispell.sourceforge.net # -# 2002-2023 (c) L�szl� N�meth and Ferenc God� +# 2002-2024 (c) L�szl� N�meth and Ferenc God� # # Thanks to # Tam�s Sz�nt� , @@ -30,7 +30,7 @@ # amelyet N�meth L�szl� �s God� Ferenc k�sz�tett, �s a GPL/LGPL/MPL licenc # alatt k�zz�tett a http://magyarispell.sourceforge.net oldalon. # -# Magyar Ispell 1.8, 2023-05 +# Magyar Ispell 1.8.1, 2024-03 # # K�sz�net illeti a k�vetkez�ket: # @@ -52,7 +52,7 @@ NAME Magyar Ispell helyes�r�si sz�t�r LANG hu_HU HOME http://magyarispell.sourceforge.net -VERSION Magyar 1.8 +VERSION Magyar 1.8.1 SET UTF-8 KEY öüó|qwertzuiopőú|asdfghjkléáű|íyxcvbnm TRY íóútaeslzánorhgkiédmyőpvöbucfjüűxwq-.à @@ -157,7 +157,7 @@ ICONV fl fl # - multicharacter suggestions # - well-sorted suggestions -REP 170 +REP 171 REP í i REP i í REP ó o @@ -328,8 +328,9 @@ REP ssal$ sszal REP ssé$ sszé REP ssá$ sszá REP ^megfed megfedd +REP lengépszer legnépszer REP # lengépszerűbb->legnépszerűbb -AF 1548 +AF 1559 AF V˯j�L�n�TtYc��l # 1 AF Um��yiYc� # 2 AF �CWR̯j���y���Yc� # 3 @@ -369,7 +370,7 @@ AF uQ # 36 AF �AUʮi���yǿ�Yc� # 37 AF W̯j�M���RTtvc�� # 38 AF Uʮi�K�m�QYc��k # 39 -AF tV˯j�L�n�RYc��l # 40 +AF tV˯j�L�n��y���RTYc� # 40 AF wYUm���ic�k # 41 AF wYUʮi�K�m�Ssc��k # 42 AF VN˯j�L���TtYc�� # 43 @@ -546,1339 +547,1350 @@ AF KU AF A���UQ # 214 AF W�yjYc� # 215 AF Uʮi$s�m�QYc��k # 216 -AF Um�yiYc���K��ǿ�Ss� # 217 -AF UVʮ˯ij��KL��n�m�TtYcklSs # 218 -AF UVʮ˯ij��KL��n�m�QRYckl # 219 -AF Uʮi�K�m�q�Q,�k # 220 -AF W̯j�M���q�Tt,�l # 221 -AF �BVR˯j��q���,� # 222 -AF W̯j�B��q���R,�l # 223 -AF �CWR̯j��q�,� # 224 -AF V˯j�L�n�q�Tt,�l # 225 -AF ��mAFUKQ # 226 -AF �BVR˯j��q�,� # 227 -AF �AUQʮi��q�,� # 228 -AF Uʮi�K�m�q�Ss,� # 229 -AF Uʮi�A��qǿ�Q,�k # 230 -AF Uʮi�K�m�q�Ss,�k # 231 -AF V˯j�L�n�q�R,�l # 232 -AF V˯j�L�n�q���Tt,�l # 233 -AF V˯j�L�n�q���R,�l� # 234 -AF ��nBGVLR # 235 -AF ���BGVLTt # 236 -AF W̯j�M���q���R,�l # 237 -AF �BVR˯j��q���,�� # 238 -AF W̯j�M���q���Tt,�� # 239 -AF V˯j�B��q���R,�l # 240 -AF W̯j�M���q���Tt,�l # 241 -AF W̯j�M���q���R,�l� # 242 -AF W̯j�M���q�R,�l # 243 -AF W̯j�M���q�Tt,� # 244 -AF W̯j�M���q���Tt,� # 245 -AF Um�yiYc���K�q�Ss,� # 246 -AF W̯j�M���q�R,� # 247 -AF Uʮi�K�m�q�Q,� # 248 -AF Uʮi�K�m�qǿ�Ss,� # 249 -AF Uʮi�K�m�qǿ�Ss,�k # 250 -AF Uʮi�A��qǿ�Q,� # 251 -AF �AUQʮi��q�,� #
core.git: dictionaries
dictionaries |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit cfd84d8a2add8b5c121d027458ac7692d90b5c7a Author: László Németh AuthorDate: Fri Mar 22 15:47:59 2024 +0100 Commit: Gerrit Code Review CommitDate: Fri Mar 22 15:47:59 2024 +0100 Update git submodules * Update dictionaries from branch 'master' to 491736b0e775f7d4a0bfd9ed9ce94ec296e3e988 - Updated Hungarian hyphenation dictionary to version v20240321 source: https://sourceforge.net/projects/magyarispell/files/OOo%20Huhyphn/v20240321-0.1/ Change-Id: If470f5854511cac6f0a355e4d006abf9e3976f90 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165166 Tested-by: László Németh Reviewed-by: László Németh diff --git a/dictionaries b/dictionaries index 5da9e11ea767..491736b0e775 16 --- a/dictionaries +++ b/dictionaries @@ -1 +1 @@ -Subproject commit 5da9e11ea767529d55630a96fb11d58a3e2b0694 +Subproject commit 491736b0e775f7d4a0bfd9ed9ce94ec296e3e988
dictionaries.git: hu_HU/hyph_hu_HU.dic hu_HU/README_hyph_hu_HU.txt
hu_HU/README_hyph_hu_HU.txt |2 hu_HU/hyph_hu_HU.dic| 4614 +++- 2 files changed, 4574 insertions(+), 42 deletions(-) New commits: commit 491736b0e775f7d4a0bfd9ed9ce94ec296e3e988 Author: László Németh AuthorDate: Fri Mar 22 15:07:48 2024 +0100 Commit: László Németh CommitDate: Fri Mar 22 15:47:59 2024 +0100 Updated Hungarian hyphenation dictionary to version v20240321 source: https://sourceforge.net/projects/magyarispell/files/OOo%20Huhyphn/v20240321-0.1/ Change-Id: If470f5854511cac6f0a355e4d006abf9e3976f90 Reviewed-on: https://gerrit.libreoffice.org/c/dictionaries/+/165166 Tested-by: László Németh Reviewed-by: László Németh diff --git a/hu_HU/README_hyph_hu_HU.txt b/hu_HU/README_hyph_hu_HU.txt index 3f86548..bca57ed 100644 --- a/hu_HU/README_hyph_hu_HU.txt +++ b/hu_HU/README_hyph_hu_HU.txt @@ -1,6 +1,6 @@ % Hungarian hyphenation patterns with non-standard hyphenation patch % -- -% Patch version: 2010-10-07 +% Patch version: 2024-03-21 % % Language: Hungarian (hu HU) % Origin: http://www.github.hu/bencenagy/huhyphn diff --git a/hu_HU/hyph_hu_HU.dic b/hu_HU/hyph_hu_HU.dic index d419ee1..0924dab 100644 --- a/hu_HU/hyph_hu_HU.dic +++ b/hu_HU/hyph_hu_HU.dic @@ -256,7 +256,6 @@ COMPOUNDRIGHTHYPHENMIN 3 .ba2b1a2rá .1ba .b2abar -.ba1ba .ba2bál .ba1bá .ba2b1e2 @@ -689,7 +688,6 @@ COMPOUNDRIGHTHYPHENMIN 3 .fa1i .fa2leg .fa1le -.fa2n1év .fa1né .fa2r1ont .fa1ro @@ -75142,7 +75140,6 @@ s1s1zé össz1e1gye összeg2y 1vi -vis6sz3e6rek vis2s2z vis1s1ze vissze1re @@ -91409,15 +91406,9 @@ expressz1ké .geron1to .geronto1fi .geron7t8ofil -pszichog6ráfi1a pszi1c2h pszi1c1ho pszichog1rá -pszichográ1fi -pszichog8ráfi1a -pszichográ1fi -pszichog6ráfi1á -pszichog8ráfi1á .tele6g7ráf .te1le .teleg1rá @@ -91455,15 +91446,12 @@ c5cs2é./cs=,1,1 c5cs2á./cs=,1,1 c5cse2l./cs=,1,1 c5csa2l./cs=,1,1 -.öc5c1sü/cs=,2,1 .öc2c2s .öc5c1se/cs=,2,1 .öc5c1sé/cs=,2,1 -aöc5c1sü/cs=,3,1 aöc2c2s aöc5c1se/cs=,3,1 aöc5c1sé/cs=,3,1 -söc5c1sü/cs=,3,1 söc2c2s söc5c1se/cs=,3,1 söc5c1sé/cs=,3,1 @@ -91486,7 +91474,6 @@ szkec5csem/cs=,5,1 szkec5csen/cs=,5,1 szkec5csed/cs=,5,1 szkec5cs2e./cs=,5,1 -szkec5c1sü/cs=,5,1 szkec5csetek/cs=,5,1 szkeccse1te sztrec5cse2t./cs=,6,1 @@ -91501,7 +91488,6 @@ sztrec5csem/cs=,6,1 sztrec5csen/cs=,6,1 sztrec5csed/cs=,6,1 sztrec5cs2e./cs=,6,1 -sztrec5c1sü/cs=,6,1 sztrec5csetek/cs=,6,1 sztreccse1te rec5c1se/cs=,3,1 @@ -91511,12 +91497,8 @@ puc2c2s puc1c1sa puc5c1so/cs=,3,1 puc5c1su/cs=,3,1 -puc5c1si/cs=,3,1 -puc5c1sé/cs=,3,1 pric5c1se/cs=,4,1 pric5c1sé/cs=,4,1 -pric5c1si/cs=,4,1 -pric5c1sü/cs=,4,1 fröc5csök/cs=,4,1 fröc2c2s fröc1c1sö @@ -91539,41 +91521,28 @@ fröc5csös/cs=,4,1 ffröc5csös/cs=,4,1 fröc5csöz/cs=,4,1 ffröc5csöz/cs=,4,1 -fröc5c1sü/cs=,4,1 -ffröc5c1sü/cs=,4,1 fröc5csen/cs=,4,1 fröc1c1se ffröc5csen/cs=,4,1 ffröc1c1se fröc5c1sé/cs=,4,1 ffröc5c1sé/cs=,4,1 -fröc5c1s1i/cs=,4,1 -ffröc5c1s1i/cs=,4,1 mec5cse2t./cs=,3,1 mec2c2s mec1c1se -mec5c1sé/cs=,3,1 mec5csér2t./cs=,3,1 mec5csi2g./cs=,3,1 mec1c1si -mec5csem/cs=,3,1 -mec5csen/cs=,3,1 -mec5csed/cs=,3,1 mec5cs2e./cs=,3,1 mec5csek/cs=,3,1 mec5cse1i/cs=,3,1 -mec5csét/cs=,3,1 mec5cséb/cs=,3,1 mec5csérő2l./cs=,3,1 meccsé1rő mec5csér2e./cs=,3,1 meccsé1re -mec5cséh/cs=,3,1 mec5csé1i/cs=,3,1 -mec5csén/cs=,3,1 -mec5csév/cs=,3,1 mec5cses/cs=,3,1 -mec5c1sü/cs=,3,1 mec5csetek/cs=,3,1 meccse1te nuc5c1se/cs=,3,1 @@ -91582,14 +91551,11 @@ glec5cser/cs=,4,1 g2lecc glec2c2s glec1c1se -gic5c1se/cs=,3,1 gic5cse2t./cs=,3,1 gic2c2s -gic5c1sé/cs=,3,1 gic5csér2t./cs=,3,1 gic5csi2g./cs=,3,1 gic1c1si -gic5c1sü/cs=,3,1 fuc5c1so/cs=,3,1 fuc2c2s ffuc5c1so/cs=,3,1 @@ -95870,7 +95836,6 @@ jes5szus/sz=,3,1 jes2s2z jes1s1zu dres5s1zú/sz=,4,1 -dres5s1zi/sz=,4,1 dos5szi1é/sz=,3,1 dos2s2z dos1s1zi @@ -95945,7 +95910,6 @@ asszis2z dres5s1zé/sz=,4,1 dres5sz2i2g./sz=,4,1 as5szonn/sz=,2,1 -proces5szor/sz=,6,1 proces2s2z proces1s1zo szeces5s1zi/sz=,6,1 @@ -95953,7 +95917,6 @@ s2ze1ce s2zeces2s2z stres5szek/sz=,5,1 stres1s1ze -stres5sze2l./sz=,5,1 stres5szelt/sz=,5,1 stres5szeln/sz=,5,1 stres5sze1lé/sz=,5,1 @@ -96022,7 +95985,6 @@ fos1s1zí ffos1s1zí pres5s1zé/sz=,4,1 dis5s1zo/sz=,3,1 -pres5s1zo/sz=,4,1 pres5s1zó/sz=,4,1 bas5s1zi/sz=,3,1 as5szonán/sz=,2,1 @@ -96121,9 +96083,7 @@ ps5sze2l./sz=,2,1 ps1s1ze rs5sz2á./sz=,2,1 rs5sza2l./sz=,2,1 -rs5sz2é./sz=,2,1 rs1s1zé -rs5sze2l./sz=,2,1 ús5sz2á./sz=,2,1 ús5sza2l./sz=,2,1 üs5sz2é./sz=,2,1 @@ -97294,7 +97254,6 @@ ra2ó1fi ős3sz1fi ős3sz1fl 2v1e2lefl -.rén3szarvas7szán íz1p1fi 2z1átfl fly1átfl @@ -97723,3 +97682,4576 @@ r2t1á1fi 2b1ujj1fi r2t1ofl y1év1fi +.rep8i7k8öltség +.hős1t2r +.cé1dé +.versenye1ge +.mikrotra1u +.brin2g1a2u +.bóra1cé +.als2ká +.euros1po +.bőrpig1me +.to1a +.zse2ba +.tejelő1á +.bringau2tat +.zuha1nó +.virá8g7g8y8ant +.pszeudosz1fé +.hip1ho +.menses1p2robl +.makrogerinc1te
core.git: cui/source cui/uiconfig editeng/source include/editeng include/linguistic include/unotools include/xmloff lingucomponent/source linguistic/source offapi/com schema/libreoffice svx/sdi sw/inc
cui/source/inc/paragrph.hxx |2 cui/source/tabpages/paragrph.cxx| 12 cui/uiconfig/ui/textflowpage.ui | 50 ++- editeng/source/items/paraitem.cxx | 13 include/editeng/editrids.hrc|1 include/editeng/hyphenzoneitem.hxx |4 include/editeng/memberids.h |1 include/linguistic/lngprophelp.hxx |4 include/unotools/linguprops.hxx |2 include/xmloff/xmltoken.hxx |1 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx |6 linguistic/source/lngprophelp.cxx | 15 offapi/com/sun/star/style/ParagraphProperties.idl |7 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |9 svx/sdi/svxitems.sdi|1 sw/inc/inspectorproperties.hrc |5 sw/inc/unoprnms.hxx |2 sw/qa/extras/layout/data/tdf158885_compound-remain.fodt | 195 sw/qa/extras/layout/data/tdf158885_not_compound-remain.fodt | 195 sw/qa/extras/layout/layout2.cxx | 48 ++ sw/qa/extras/odfexport/data/tdf158885_compound-remain.fodt | 195 sw/qa/extras/odfexport/odfexport2.cxx |8 sw/qa/uitest/styleInspector/styleInspector.py | 20 - sw/qa/uitest/styleInspector/tdf137513.py|2 sw/source/core/text/inftxt.cxx | 17 - sw/source/core/unocore/unomapproperties.hxx |2 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx |2 xmloff/inc/xmlprop.hxx |2 xmloff/source/core/xmltoken.cxx |3 xmloff/source/text/txtprmap.cxx |1 xmloff/source/token/tokens.txt |1 31 files changed, 799 insertions(+), 27 deletions(-) New commits: commit 3a332d9f1cacb3c6f81fcf6c08afa51d091ddff4 Author: László Németh AuthorDate: Mon Mar 18 21:55:23 2024 +0100 Commit: László Németh CommitDate: Wed Mar 20 13:04:09 2024 +0100 tdf#158885 cui offapi sw xmloff: fix hyphenation at stem boundary Add new hyphenation option "Compound characters at line end", equivalent of libhyphen's COMPOUNDLEFTHYPHENMIN, to limit bad pattern based hyphenation of compound words using morphological analysis of Hunspell. * Add checkbox to Text Flow in paragraph formatting dialog window * Store property in paragraph model: css::style::ParagraphProperties::ParaHyphenationCompoundMinLeadingChars * Add ODF import/export (loext:hyphenation-compound-remain-char-count) * Add ODF unit tests Note: slower Hunspell based hyphenation is used only if ParaHyphenationCompoundMinLeadingChars >= 3 (we assume that libhyphen hyphenation patterns cover the smaller distances correctly). Hunpell based hyphenation doesn't introduce new hyphenation breaks, only detects the stem boundaries from the libhyphen based hyphenation breaks. Follow-up to commit c899d3608d30f3ab4c2bc193c1fcd765221614a4 "tdf#158885 sw: don't hyphenate right after a stem boundary", replacing hyphenation zone dependence with the new "Compound characters at line end". Note: preset COMPOUNDLEFTHYPHENMIN values aren't loaded yet from hyphenation dictionaries. Note: the suffix of the last stem of the compound is always hyphenated, i.e. the distance limits only hyphenation inside the stem, not inside its suffix or at the end of the stem before the suffix. Change-Id: I46a0288929a66f7453e3ff97fbc5a0c6a01f038f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164983 Tested-by: László Németh Reviewed-by: László Németh diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 0972203be73f..dde2eda5fac4 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -237,6 +237,8 @@ private: std::unique_ptr m_xExtHyphenBeforeBox; std::unique_ptr m_xAfterText; std::unique_ptr m_xExtHyphenAfterBox; +std::unique_ptr m_xCompoundBeforeText; +std::unique_ptr m_xExtCompoundHyphenBeforeBox; std::unique_ptr m_xMaxHyphenLabel; std::unique_ptr m_xMaxHyphenEdit; std::unique_ptr m_xMinWordLabel; diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index a1403b30ea74..abe2a1adc315 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1625,6 +1625,7 @@ bool SvxExtParagraphTabPage::
core.git: cui/source cui/uiconfig editeng/source include/editeng include/unotools include/xmloff offapi/com offapi/UnoApi_offapi.mk svx/sdi sw/CppunitTest_sw_odfexport2.mk sw/inc sw/qa sw/source xmlof
cui/source/inc/paragrph.hxx |5 cui/source/tabpages/paragrph.cxx | 37 - cui/uiconfig/ui/textflowpage.ui | 100 -- editeng/source/items/paraitem.cxx | 32 include/editeng/editrids.hrc |5 include/editeng/hyphenzoneitem.hxx|4 include/editeng/memberids.h |1 include/unotools/linguprops.hxx |2 include/xmloff/xmltypes.hxx |1 offapi/UnoApi_offapi.mk |1 offapi/com/sun/star/style/ParagraphProperties.idl |8 + offapi/com/sun/star/text/ParagraphHyphenationKeepType.idl | 63 svx/sdi/svxitems.sdi |1 sw/CppunitTest_sw_odfexport2.mk |1 sw/inc/inspectorproperties.hrc|1 sw/inc/unoprnms.hxx |1 sw/qa/extras/odfexport/data/tdf132599_auto.fodt | 49 ++ sw/qa/extras/odfexport/data/tdf132599_page.fodt | 49 ++ sw/qa/extras/odfexport/odfexport2.cxx | 27 +++ sw/qa/uitest/styleInspector/styleInspector.py | 20 +- sw/qa/uitest/styleInspector/tdf137513.py |2 sw/source/core/text/inftxt.cxx| 16 +- sw/source/core/text/itrform2.cxx |1 sw/source/core/text/porlay.hxx|3 sw/source/core/text/widorp.cxx| 42 + sw/source/core/unocore/unomapproperties.hxx |2 sw/source/uibase/sidebar/WriterInspectorTextPanel.cxx |1 xmloff/inc/xmlprop.hxx|1 xmloff/source/text/txtprhdl.cxx | 13 + xmloff/source/text/txtprmap.cxx |1 30 files changed, 423 insertions(+), 67 deletions(-) New commits: commit 9574a62add8e4901405e12117e75c86c2d2c2f21 Author: László Németh AuthorDate: Thu Feb 29 14:07:34 2024 +0100 Commit: László Németh CommitDate: Mon Mar 4 23:39:51 2024 +0100 tdf#132599 cui offapi sw xmloff: implement hyphenate-keep Both parts of a hyphenated word shall lie within a single page with ODF paragraph setting fo:hyphenation-keep="page". The implementation follows the default page layout of MSO 2016 and newer by shifting the bottom hyphenated line to the next page (and to the next column, see last note). Note: this is a MSO DOCX interoperability feature, used also in DTP software, XSL and CSS. * Add checkbox/combobox to Text Flow in paragraph dialog * Store property in paragraph model (com::sun::star::style::ParagraphProperties::ParaHyphenationKeep) * Add ODF import/export * Add ODF unit tests New constants of com::sun::star::text::ParagraphHyphenationKeepType, containing ODF AUTO and PAGE (borrowed from XSL), and for the planned extension ParaHyphenationKeepType of ParagraphProperties: – COLUMN (standard XSL value, defined in https://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#hyphenation-keep) – SPREAD and ALWAYS (CSS 4 values of hyphenate-limit-last, equivalent of hyphenation-keep, defined in https://www.w3.org/TR/css-text-4/#hyphenate-line-limits). Note: the implementation truncates only a single hyphenated line, like MSO does: the pages can end in hyphenated lines (i.e. in the case of consecutive hyphenated lines), but less often, than before. Clean-up hyphenation dialog by collecting "Don't hyphenate" options at the end of the hyphenation settings, and negating them (similar to MSO and DTP), adding also the new option "Hyphenate across column and page": [x] Hyphenate words in CAPS [x] Hyphenate last word [x] Hyphenate across column and page Note: ODF fo:hyphenation-keep has got only "auto" and "page" attributes, while XSL defines also "column". Because of the interoperability with MSO and DTP, fo:hyphenation-keep="page" is interpreted as XSL "column", avoiding hyphenation at the end of column, not only at the end of page. Change-Id: I5c6b7adc0671a5a790568e7bf1d33256e607f85f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164158 Tested-by: László Németh Reviewed-by: László Németh diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index 9e78c8311015..0972203be73f 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -223,6 +223,7 @@ private: weld::TriStateEnabled aKeepParaState; weld::TriStateEnabled aOrphanStat
core.git: cui/source cui/uiconfig editeng/source include/editeng sw/qa sw/source
cui/source/inc/chardlg.hxx|1 cui/source/tabpages/chardlg.cxx | 25 cui/uiconfig/ui/positionpage.ui | 49 editeng/source/items/textitem.cxx | 14 +++- include/editeng/editrids.hrc |1 include/editeng/nhypitem.hxx |4 + sw/qa/uitest/writer_tests2/formatCharacter.py |5 + sw/qa/uitest/writer_tests8/tdf106733.py | 78 ++ sw/source/core/access/AccessibilityCheck.cxx |6 ++ sw/source/core/bastyp/init.cxx|2 sw/source/core/layout/wsfrm.cxx |1 sw/source/core/unocore/unomap.cxx |2 sw/source/core/unocore/unomapproperties.hxx |2 13 files changed, 182 insertions(+), 8 deletions(-) New commits: commit 03c5a31a0f374a90fbc821718c14dc5f8a385adf Author: László Németh AuthorDate: Wed Jan 24 13:25:21 2024 +0100 Commit: László Németh CommitDate: Wed Jan 24 20:57:37 2024 +0100 tdf#106733 sw cui: add CharNoHyphenation checkbox On Position tab of Character formatting dialog window as a new checkbox "Exclude from hyphenation" (UX design by Heiko Tietze). With this, it's possible to disable hyphenation with direct character formatting (e.g. combined with Find All), or using character styles, and setting "Exclude from hyphenation" in them. This feature is conformant to the OpenDocument standard, and unlike the previous locale=None workaround, it keeps spell checking and locale dependent text layout. Note: Clear direct formatting (Ctrl-M) is an alternative way to remove the enabled CharNoHyphenation (e.g. in version 24.2, where this commit won't be back-ported). Follow-up to commit b5e275f47a54bd7fee39dad516a433fde5be872d "tdf#106733 sw: implement CharNoHyphenation". Change-Id: I26823e6ec2a3ca39dcf0f7c051d96e638921c589 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162514 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index 6d6bf958c2e2..b484c7419b83 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -269,6 +269,7 @@ private: std::unique_ptr m_xKerningMF; std::unique_ptr m_xPairKerningBtn; +std::unique_ptr m_xNoHyphenationBtn; voidInitialize(); voidUpdatePreview_Impl( sal_uInt8 nProp, sal_uInt8 nEscProp, short nEsc ); diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index e851816c1787..86b183fe4160 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -2429,6 +2430,7 @@ SvxCharPositionPage::SvxCharPositionPage(weld::Container* pPage, weld::DialogCon , m_xScaleWidthMF(m_xBuilder->weld_metric_spin_button("scalewidthsb", FieldUnit::PERCENT)) , m_xKerningMF(m_xBuilder->weld_metric_spin_button("kerningsb", FieldUnit::POINT)) , m_xPairKerningBtn(m_xBuilder->weld_check_button("pairkerning")) +, m_xNoHyphenationBtn(m_xBuilder->weld_check_button("nohyphenation")) { m_xPreviewWin.reset(new weld::CustomWeld(*m_xBuilder, "preview", m_aPreviewWin)); #ifdef IOS @@ -2794,6 +2796,16 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) else m_xPairKerningBtn->set_active(false); +// No hyphenation +nWhich = GetWhich( sal_uInt16(19) ); // number borrowed from RES_CHRATR_NOHYPHEN +if ( rSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) +{ +const SvxNoHyphenItem& rItem = static_cast(rSet->Get( nWhich )); +m_xNoHyphenationBtn->set_active(rItem.GetValue()); +} +else +m_xNoHyphenationBtn->set_active(false); + // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); if ( rSet->GetItemState( nWhich ) >= SfxItemState::DEFAULT ) @@ -2874,6 +2886,7 @@ void SvxCharPositionPage::ChangesApplied() m_xScaleWidthMF->save_value(); m_xKerningMF->save_value(); m_xPairKerningBtn->save_state(); +m_xNoHyphenationBtn->save_state(); } bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) @@ -2963,6 +2976,18 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) rSet->InvalidateItem(nWhich); +// No hyphenation + +nWhich = GetWhich( sal_uInt16(19) ); // number borrowed from RES_CHRATR_NOHYPHEN + +if (m_xNoHyphenationBtn->get_state_changed_from_saved()) +{ +rSet->Put( SvxNoHyphenItem( m_xNoHyphenationBtn->get_active(), nWhich ) ); +bModified = true; +} +else if ( SfxI
core.git: Branch 'libreoffice-24-2' - 2 commits - offapi/com sw/inc sw/qa sw/source xmloff/source
offapi/com/sun/star/style/CharacterProperties.idl |8 + sw/inc/ndtxt.hxx |2 sw/qa/uitest/data/tdf106733.fodt | 66 sw/qa/uitest/writer_tests8/tdf106733.py | 112 ++ sw/qa/uitest/writer_tests8/tdf159102.py | 42 +--- sw/source/core/inc/txtfrm.hxx |2 sw/source/core/text/guess.cxx |7 + sw/source/core/text/txtfrm.cxx|4 sw/source/core/txtnode/thints.cxx | 25 +++- xmloff/source/text/txtprmap.cxx |2 10 files changed, 244 insertions(+), 26 deletions(-) New commits: commit de8a6c90c7aa5d26f758a590bad955cd62251702 Author: László Németh AuthorDate: Mon Jan 22 15:22:39 2024 +0100 Commit: Michael Stahl CommitDate: Wed Jan 24 12:12:18 2024 +0100 tdf#106733 sw: fix bad downcast in SwTextNode::GetLang() Fix bad cast of SvxNoHyphenItem to SvxLanguageItem reported by <https://ci.libreoffice.org/job/lo_ubsan/3049/>: /sw/source/core/txtnode/thints.cxx:3560:16: runtime error: downcast of address 0x6030005e44d0 which does not point to an object of type 'const SvxLanguageItem' 0x6030005e44d0: note: object is of type 'SvxNoHyphenItem' 1a 00 00 00 90 e3 d5 77 5c 7f 00 00 00 00 00 00 13 00 be be 16 00 00 00 92 01 be be 00 00 00 00 ^~~ vptr for 'SvxNoHyphenItem' #0 0x7f5bda7e8c0c in SwTextNode::GetLang(int, int, unsigned short, bool) const /sw/source/core/txtnode/thints.cxx:3560:16 Regression since commit b5e275f47a54bd7fee39dad516a433fde5be872d "tdf#106733 sw: implement CharNoHyphenation". Change-Id: I0c6f60a4074f8fd6da26674cace47f5c5e32afd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162401 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 9193e61d3e7b850b3715c848c09434e24855340b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162379 Reviewed-by: Michael Stahl diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index a7dff69e1c2e..cf5e1ff1cccf 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -3555,7 +3555,7 @@ LanguageType SwTextNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen, } } } -if( LANGUAGE_DONTKNOW == nRet ) +if( LANGUAGE_DONTKNOW == nRet && !bNoneIfNoHyphenation ) { nRet = static_cast(GetSwAttrSet().Get( nWhichId )).GetLanguage(); if( LANGUAGE_DONTKNOW == nRet ) commit 04c92ff9cfec039f7fc03277de46d77bb3109431 Author: László Németh AuthorDate: Fri Jan 19 01:29:34 2024 +0100 Commit: Michael Stahl CommitDate: Wed Jan 24 12:12:12 2024 +0100 tdf#106733 sw: implement CharNoHyphenation Implement CharNoHyphenation character property to disable automatic hyphenation of words in paragraphs with enabled hyphenation. Fix also fo:hyphenate mapping to CharNoHyphenation using automatic inversion of their boolean values defined by xmloff's XML_TYPE_NBOOL, as suggested by Michael Stahl. Update also the test for tdf#159102 to check the available hyphenation dictionary (also custom hyphenation patterns work only with supported locales of the hyphenator). Note: patch of thints.cxx contains also partial revert of commit 53b289eabb3d265b47bc7fb6cc430291c97f0c0b "use more TypedWhichId". Follow-up to commit 73bd04a71e741788a2f2f3b26cc46ddb6a361372 "tdf#106733 xmloff: keep fo:hyphenate in character formatting". Change-Id: If99b94ddcd44a5c2426e646be149078a3b9773b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162300 Tested-by: László Németh Reviewed-by: László Németh Signed-off-by: Xisco Fauli Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162283 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/offapi/com/sun/star/style/CharacterProperties.idl b/offapi/com/sun/star/style/CharacterProperties.idl index 6502a47b2886..aaff4a569455 100644 --- a/offapi/com/sun/star/style/CharacterProperties.idl +++ b/offapi/com/sun/star/style/CharacterProperties.idl @@ -325,7 +325,13 @@ published service CharacterProperties /** This optional property determines if the word can be hyphenated at the -character. +character by automatic hyphenation. + +Setting to `true` will disable hyphenation enabled by ParaIsHyphenation. + +Note: implemented since LibreOffice 24.2. + +@see ParaIsHyphenation */ [optional, property] boolean CharNoHyphenation; diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 3f99919f77b2..352dad71c247 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -720,7 +720,7 @@ public: voi
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/uitest/data/tdf159102.fodt| 61 sw/qa/uitest/writer_tests8/tdf159102.py | 81 sw/source/core/text/portxt.cxx | 12 +++- 3 files changed, 151 insertions(+), 3 deletions(-) New commits: commit d8116658ecf66d915ae8cf6510a76ee628c45431 Author: László Németh AuthorDate: Wed Jan 10 20:41:04 2024 +0100 Commit: Xisco Fauli CommitDate: Tue Jan 23 00:31:18 2024 +0100 tdf#159102 sw smart justify: fix automatic hyphenation As before with soft hyphens, automatic hyphenation could result too much shrinking, because of calculating with an extra non-existing space in the line. Also try to shrink the line only if a space likely will be available in it. During testing, extend user dictionary temporarily with custom automatic hyphenation to avoid of false tests because of non-available hyphenation patterns. (Note: maybe the other tests with non-user dictionary based automatic hyphenations are not correct.) Follow-up to commit d511367c102ef2ada0f73dbe81744d39865d58ba "tdf#195085 sw smart justify: fix bad shrinking at soft hyphen". Change-Id: I58ecb8f1ea9f55ef2457d7ff4aca6aefa59a6dd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162199 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 7c1f4dd740c32050480f3ab678805ad3c4c748bb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162219 Reviewed-by: Xisco Fauli diff --git a/sw/qa/uitest/data/tdf159102.fodt b/sw/qa/uitest/data/tdf159102.fodt new file mode 100644 index ..dfe9fc18872b --- /dev/null +++ b/sw/qa/uitest/data/tdf159102.fodt @@ -0,0 +1,61 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + true + high-resolution + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus egestas. + venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus egestas. + + + diff --git a/sw/qa/uitest/writer_tests8/tdf159102.py b/sw/qa/uitest/writer_tests8/tdf159102.py new file mode 100644 index ..07152ada3999 --- /dev/null +++ b/sw/qa/uitest/writer_tests8/tdf159102.py @@ -0,0 +1,81 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the Li
core.git: sw/source
sw/source/core/txtnode/thints.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 9193e61d3e7b850b3715c848c09434e24855340b Author: László Németh AuthorDate: Mon Jan 22 15:22:39 2024 +0100 Commit: László Németh CommitDate: Mon Jan 22 16:56:43 2024 +0100 tdf#106733 sw: fix bad downcast in SwTextNode::GetLang() Fix bad cast of SvxNoHyphenItem to SvxLanguageItem reported by <https://ci.libreoffice.org/job/lo_ubsan/3049/>: /sw/source/core/txtnode/thints.cxx:3560:16: runtime error: downcast of address 0x6030005e44d0 which does not point to an object of type 'const SvxLanguageItem' 0x6030005e44d0: note: object is of type 'SvxNoHyphenItem' 1a 00 00 00 90 e3 d5 77 5c 7f 00 00 00 00 00 00 13 00 be be 16 00 00 00 92 01 be be 00 00 00 00 ^~~ vptr for 'SvxNoHyphenItem' #0 0x7f5bda7e8c0c in SwTextNode::GetLang(int, int, unsigned short, bool) const /sw/source/core/txtnode/thints.cxx:3560:16 Regression since commit b5e275f47a54bd7fee39dad516a433fde5be872d "tdf#106733 sw: implement CharNoHyphenation". Change-Id: I0c6f60a4074f8fd6da26674cace47f5c5e32afd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162401 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 184866daf3e0..5b78ea29eb84 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -3555,7 +3555,7 @@ LanguageType SwTextNode::GetLang( const sal_Int32 nBegin, const sal_Int32 nLen, } } } -if( LANGUAGE_DONTKNOW == nRet ) +if( LANGUAGE_DONTKNOW == nRet && !bNoneIfNoHyphenation ) { nRet = static_cast(GetSwAttrSet().Get( nWhichId )).GetLanguage(); if( LANGUAGE_DONTKNOW == nRet )
core.git: Branch 'libreoffice-24-2' - sw/qa xmloff/inc xmloff/source
sw/qa/extras/odfexport/data/tdf106733.fodt | 66 + sw/qa/extras/odfexport/odfexport2.cxx | 20 xmloff/inc/xmlprop.hxx |1 xmloff/source/text/txtprmap.cxx|4 - 4 files changed, 89 insertions(+), 2 deletions(-) New commits: commit 05292d3fd50c64ac0b2a927334c39fe63aa3a108 Author: László Németh AuthorDate: Thu Jan 18 14:53:24 2024 +0100 Commit: Michael Stahl CommitDate: Mon Jan 22 13:01:10 2024 +0100 tdf#106733 xmloff: keep fo:hyphenate in character formatting In the case of character formatting, map fo:hyphenate to the unused CharNoHyphenation character property to keep it during ODF import/export instead of losing it completely. This is the first step to disable hyphenation for single words or text spans in paragraphs with automatic hyphenation. Note: using fo:hyphenate as character property is part of the ODF standard. Note: the old workaround to disable hyphenation, changing the language of the text to None had got some serious fallbacks: losing spell checking and losing language-dependent text layout (supported by both OpenType and Graphite font engines in LibreOffice). Change-Id: I9565c3efbbb6e6d970fb03710e8c932ad72ab57e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162257 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 956f81ebc9d70507a4a976bfe42c99175dbf3632) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162272 Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/odfexport/data/tdf106733.fodt b/sw/qa/extras/odfexport/data/tdf106733.fodt new file mode 100644 index ..fa9a02440573 --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf106733.fodt @@ -0,0 +1,66 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Hyphenate + The Earth is no different to any other celestial body out there in space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is space, except that it has an atmosphere. + Don’t hyphenate (direct formatting) + The Earth is no different to any other celestial body out there in space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is spa
core.git: offapi/com sw/inc sw/qa sw/source xmloff/source
offapi/com/sun/star/style/CharacterProperties.idl |8 + sw/inc/ndtxt.hxx |2 sw/qa/uitest/data/tdf106733.fodt | 66 sw/qa/uitest/writer_tests8/tdf106733.py | 112 ++ sw/qa/uitest/writer_tests8/tdf159102.py | 42 +--- sw/source/core/inc/txtfrm.hxx |2 sw/source/core/text/guess.cxx |7 + sw/source/core/text/txtfrm.cxx|4 sw/source/core/txtnode/thints.cxx | 23 +++- xmloff/source/text/txtprmap.cxx |2 10 files changed, 243 insertions(+), 25 deletions(-) New commits: commit b5e275f47a54bd7fee39dad516a433fde5be872d Author: László Németh AuthorDate: Fri Jan 19 01:29:34 2024 +0100 Commit: László Németh CommitDate: Fri Jan 19 17:37:41 2024 +0100 tdf#106733 sw: implement CharNoHyphenation Implement CharNoHyphenation character property to disable automatic hyphenation of words in paragraphs with enabled hyphenation. Fix also fo:hyphenate mapping to CharNoHyphenation using automatic inversion of their boolean values defined by xmloff's XML_TYPE_NBOOL, as suggested by Michael Stahl. Update also the test for tdf#159102 to check the available hyphenation dictionary (also custom hyphenation patterns work only with supported locales of the hyphenator). Note: patch of thints.cxx contains also partial revert of commit 53b289eabb3d265b47bc7fb6cc430291c97f0c0b "use more TypedWhichId". Follow-up to commit 73bd04a71e741788a2f2f3b26cc46ddb6a361372 "tdf#106733 xmloff: keep fo:hyphenate in character formatting". Change-Id: If99b94ddcd44a5c2426e646be149078a3b9773b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162300 Tested-by: László Németh Reviewed-by: László Németh diff --git a/offapi/com/sun/star/style/CharacterProperties.idl b/offapi/com/sun/star/style/CharacterProperties.idl index 6502a47b2886..aaff4a569455 100644 --- a/offapi/com/sun/star/style/CharacterProperties.idl +++ b/offapi/com/sun/star/style/CharacterProperties.idl @@ -325,7 +325,13 @@ published service CharacterProperties /** This optional property determines if the word can be hyphenated at the -character. +character by automatic hyphenation. + +Setting to `true` will disable hyphenation enabled by ParaIsHyphenation. + +Note: implemented since LibreOffice 24.2. + +@see ParaIsHyphenation */ [optional, property] boolean CharNoHyphenation; diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 3f99919f77b2..352dad71c247 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -720,7 +720,7 @@ public: void fillSoftPageBreakList( SwSoftPageBreakList& rBreak ) const; LanguageType GetLang( const sal_Int32 nBegin, const sal_Int32 nLen = 0, -sal_uInt16 nScript = 0 ) const; +sal_uInt16 nScript = 0, bool bNoneIfNoHyphenation = false ) const; /// in ndcopy.cxx bool IsSymbolAt(sal_Int32 nBegin) const; // In itratr.cxx. diff --git a/sw/qa/uitest/data/tdf106733.fodt b/sw/qa/uitest/data/tdf106733.fodt new file mode 100644 index ..fa9a02440573 --- /dev/null +++ b/sw/qa/uitest/data/tdf106733.fodt @@ -0,0 +1,66 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns
core.git: sw/qa xmloff/inc xmloff/source
sw/qa/extras/odfexport/data/tdf106733.fodt | 66 + sw/qa/extras/odfexport/odfexport2.cxx | 20 xmloff/inc/xmlprop.hxx |1 xmloff/source/text/txtprmap.cxx|4 - 4 files changed, 89 insertions(+), 2 deletions(-) New commits: commit 73bd04a71e741788a2f2f3b26cc46ddb6a361372 Author: László Németh AuthorDate: Thu Jan 18 14:53:24 2024 +0100 Commit: László Németh CommitDate: Fri Jan 19 00:42:36 2024 +0100 tdf#106733 xmloff: keep fo:hyphenate in character formatting In the case of character formatting, map fo:hyphenate to the unused CharNoHyphenation character property to keep it during ODF import/export instead of losing it completely. This is the first step to disable hyphenation for single words or text spans in paragraphs with automatic hyphenation. Note: using fo:hyphenate as character property is part of the ODF standard. Note: the old workaround to disable hyphenation, changing the language of the text to None had got some serious fallbacks: losing spell checking and losing language-dependent text layout (supported by both OpenType and Graphite font engines in LibreOffice). Change-Id: I9565c3efbbb6e6d970fb03710e8c932ad72ab57e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162257 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/odfexport/data/tdf106733.fodt b/sw/qa/extras/odfexport/data/tdf106733.fodt new file mode 100644 index ..fa9a02440573 --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf106733.fodt @@ -0,0 +1,66 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Hyphenate + The Earth is no different to any other celestial body out there in space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is space, except that it has an atmosphere. + Don’t hyphenate (direct formatting) + The Earth is no different to any other celestial body out there in space. It merely moves along in space inertially. Even just one inch above the surface of the Earth is space, except that it has an atmosphere. + Don’t hyphenate (character style) + The Earth is no different to any other celestial body out there in space. It merely
core.git: sw/qa sw/source
sw/qa/uitest/data/tdf159102.fodt| 61 sw/qa/uitest/writer_tests8/tdf159102.py | 81 sw/source/core/text/portxt.cxx | 12 +++- 3 files changed, 151 insertions(+), 3 deletions(-) New commits: commit 8b393bba9bd4f8988457f3a78b0306462bf2 Author: László Németh AuthorDate: Wed Jan 10 20:41:04 2024 +0100 Commit: László Németh CommitDate: Thu Jan 18 01:29:38 2024 +0100 tdf#159102 sw smart justify: fix automatic hyphenation As before with soft hyphens, automatic hyphenation could result too much shrinking, because of calculating with an extra non-existing space in the line. Also try to shrink the line only if a space likely will be available in it. During testing, extend user dictionary temporarily with custom automatic hyphenation to avoid of false tests because of non-available hyphenation patterns. (Note: maybe the other tests with non-user dictionary based automatic hyphenations are not correct.) Follow-up to commit d511367c102ef2ada0f73dbe81744d39865d58ba "tdf#195085 sw smart justify: fix bad shrinking at soft hyphen". Change-Id: I58ecb8f1ea9f55ef2457d7ff4aca6aefa59a6dd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162199 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/uitest/data/tdf159102.fodt b/sw/qa/uitest/data/tdf159102.fodt new file mode 100644 index ..dfe9fc18872b --- /dev/null +++ b/sw/qa/uitest/data/tdf159102.fodt @@ -0,0 +1,61 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + true + high-resolution + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus egestas. + venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus egestas. + + + diff --git a/sw/qa/uitest/writer_tests8/tdf159102.py b/sw/qa/uitest/writer_tests8/tdf159102.py new file mode 100644 index ..07152ada3999 --- /dev/null +++ b/sw/qa/uitest/writer_tests8/tdf159102.py @@ -0,0 +1,81 @@ +# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +
core.git: Branch 'libreoffice-7-6' - editeng/inc editeng/source sw/qa
editeng/inc/editattr.hxx|1 editeng/source/editeng/impedit3.cxx |4 ++ sw/qa/extras/layout/data/tdf129357.fodt | 48 sw/qa/extras/layout/layout2.cxx | 17 +++ 4 files changed, 70 insertions(+) New commits: commit f62c5ae27190b1f338fbd68ff03df9423b97f7ba Author: László Németh AuthorDate: Fri Dec 8 08:13:42 2023 +0100 Commit: Michael Stahl CommitDate: Thu Jan 11 13:18:07 2024 +0100 tdf#129357 editeng: show soft hyphen in text boxes and shapes Shapes and text boxes didn't show the optional hyphen at line break. Change-Id: I5cc842964fc91571e5c55995981de697da966b14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160453 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 1e121850c3a42bb0ccbf90fccd7870de3b27d11b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160471 Reviewed-by: Michael Stahl diff --git a/editeng/inc/editattr.hxx b/editeng/inc/editattr.hxx index fcc14ba5ce25..0a042dbf8d7e 100644 --- a/editeng/inc/editattr.hxx +++ b/editeng/inc/editattr.hxx @@ -53,6 +53,7 @@ class SfxGrabBagItem; #define CH_FEATURE_OLD (sal_uInt8) 0xFF #define CH_FEATURE u'\x0001' +#define CH_SOFTHYPHEN u'\x00AD' // DEF_METRIC: For my pool, the DefMetric should always appear when // GetMetric (nWhich)! diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index ce79f8bfe1d2..f9ba6282fdb3 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2021,6 +2021,10 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te i18n::LineBreakResults aLBR = _xBI->getLineBreak( pNode->GetString(), nMaxBreakPos, aLocale, nMinBreakPos, aHyphOptions, aUserOptions ); nBreakPos = aLBR.breakIndex; + +// show soft hyphen +if ( nBreakPos && CH_SOFTHYPHEN == pNode->GetString()[ sal_Int32(nBreakPos) - 1 ] ) +bHyphenated = true; } else { diff --git a/sw/qa/extras/layout/data/tdf129357.fodt b/sw/qa/extras/layout/data/tdf129357.fodt new file mode 100644 index ..9cf563d71710 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf129357.fodt @@ -0,0 +1,48 @@ + +http://www.w3.org/1999/xlink; xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:officeooo="http://openoffice.org/2009/office; office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + 2023-12-07T18:38:07.3012800122023-12-07T18:42:50.197688001PT4M44S1LibreOfficeDev/24.2.0.0.alpha0$Linux_X86_64 LibreOffice_project/47e8abdafa26e64647e32d8577cb27e54cd843d1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hyphenation + + + + + diff --git a/sw/qa/extras/layout/layout2.cxx b/sw/qa/extras/layout/layout2.cxx index 9cbae8ae114a..d57788f5413c 100644 --- a/sw/qa/extras/layout/layout2.cxx +++ b/sw/qa/extras/layout/layout2.cxx @@ -519,6 +519,23 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf150790) "colors", "#Bookmark 2 Bookmark End#Bookmark 3 Bookmark Start"); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testTdf129357) +{ +createSwDoc("tdf129357.fodt"); +SwDoc* pDoc = getSwDoc(); +SwDocShell* pShell = pDoc->GetDocShell(); + +// Dump the rendering of the first page as an XML file. +std::shared_ptr xMetaFile = pShell->GetPreviewMetaFile(); +MetafileXmlDump dumper; + +xmlDocUniquePtr pXmlDoc = dumpAndParse(dumper, *xMetaFile); +CPPUNIT_ASSERT(pXmlDoc); + +// visible soft hyphen +assertXPathContent(pXmlDoc, "/metafile/push/push/push/push/push/textarray[2]/text", "-"); +} + CPPUNIT_TEST_FIXTURE(SwLayoutWriter2, testRedlineNumberInNumbering) { createSwDoc("tdf42748.fodt");
core.git: Branch 'libreoffice-7-6' - sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf159026.docx |binary sw/qa/extras/uiwriter/uiwriter8.cxx | 58 ++ sw/source/core/frmedt/tblsel.cxx |4 +- 3 files changed, 61 insertions(+), 1 deletion(-) New commits: commit 1b79e993fefbf102466f7a0e394e71478a643896 Author: László Németh AuthorDate: Mon Jan 8 01:28:36 2024 +0100 Commit: Michael Stahl CommitDate: Wed Jan 10 15:08:45 2024 +0100 tdf#159026 sw: fix Undo crash with tracked floating table deletion In Hide Changes mode, tracked deletion of a floating table, and after that, its frame resulted a crash during Undos. Regression from commit 0c6221e1545e7b96d9df23cdc24302c28ae935b8 "tdf#148227 sw: fix Undo of tracked row deletion in Hide Changes mode". Change-Id: I3fd88a30df2739ce8a3cdc24da07684a3ac5a41b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161777 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit f5a00d9ffb8325f4b9fed21b5c96ca005e11b1bb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161758 Tested-by: Jenkins Reviewed-by: Xisco Fauli (cherry picked from commit de7e0bc32d3629063f13250ae3b7c9f934fba046) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161855 Reviewed-by: Michael Stahl diff --git a/sw/qa/extras/uiwriter/data/tdf159026.docx b/sw/qa/extras/uiwriter/data/tdf159026.docx new file mode 100644 index ..65bfaae3e423 Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf159026.docx differ diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx b/sw/qa/extras/uiwriter/uiwriter8.cxx index 04655535c2d5..a928bea1695d 100644 --- a/sw/qa/extras/uiwriter/uiwriter8.cxx +++ b/sw/qa/extras/uiwriter/uiwriter8.cxx @@ -15,9 +15,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -236,6 +238,62 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf146962) assertXPath(pXmlDoc, "/root/page[1]/body/tab/row", 2); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf159026) +{ +// load a floating table (tables in DOCX footnotes +// imported as floating tables in Writer) +createSwDoc("tdf159026.docx"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); + +// enable redlining +dispatchCommand(mxComponent, ".uno:TrackChanges", {}); +CPPUNIT_ASSERT_MESSAGE("redlining should be on", + pDoc->getIDocumentRedlineAccess().IsRedlineOn()); +// hide changes +dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {}); +CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines()); + +// select table with SelectionSupplier +uno::Reference xTextTablesSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xIndexAccess(xTextTablesSupplier->getTextTables(), + uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + +uno::Reference xModel(mxComponent, uno::UNO_QUERY); +uno::Reference xSelSupplier(xModel->getCurrentController(), + uno::UNO_QUERY_THROW); +// select floating table (table in a frame) +xSelSupplier->select(xIndexAccess->getByIndex(0)); + +// delete table with track changes +dispatchCommand(mxComponent, ".uno:DeleteTable", {}); + +// tracked table deletion +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + +// hidden table +xmlDocUniquePtr pXmlDoc = parseLayoutDump(); +assertXPath(pXmlDoc, "//tab", 0); + +// delete frame +uno::Reference xTextFramesSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xIndexAccess2(xTextFramesSupplier->getTextFrames(), + uno::UNO_QUERY); +xSelSupplier->select(xIndexAccess2->getByIndex(0)); +dispatchCommand(mxComponent, ".uno:Delete", {}); + +// undo frame deletion +dispatchCommand(mxComponent, ".uno:Undo", {}); + +// undo tracked table deletion + +// This resulted crashing +dispatchCommand(mxComponent, ".uno:Undo", {}); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf147347) { // load a 2-row table, set Hide Changes mode and delete the table with change tracking diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 48a92366509c..ec56a5285675 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -2383,7 +2383,9 @@ void FndBox_::MakeFrames( SwTable ) for ( sal_uInt16 j = nStPos; j <= nEndPos; ++j ) { SwTableLine * pLine = rTable.GetTa
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/layout/data/tdf159085.fodt | 61 sw/qa/extras/layout/layout3.cxx | 24 sw/source/core/text/portxt.cxx |9 3 files changed, 93 insertions(+), 1 deletion(-) New commits: commit 6bd230862605760bd4357e6e4bba2c91dcbe5438 Author: László Németh AuthorDate: Tue Jan 9 13:35:23 2024 +0100 Commit: László Németh CommitDate: Wed Jan 10 13:11:50 2024 +0100 tdf#159085 sw smart justify: fix bad shrinking at soft hyphen Soft hyphen in the word could result too much shrinking, calculating with an extra (non-existing) space. Change-Id: If8b7af40ff50d12c0f2428a6f2475e261fbd0f42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161827 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit f35d7b0484205e6c8daef795f787e5d6cbc88fc8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161769 Tested-by: László Németh diff --git a/sw/qa/extras/layout/data/tdf159085.fodt b/sw/qa/extras/layout/data/tdf159085.fodt new file mode 100644 index ..efd0e98e9213 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf159085.fodt @@ -0,0 +1,61 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + true + high-resolution + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus egestas. + venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus egestas. + + + diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx index f660334012d0..e17eaa108a30 100644 --- a/sw/qa/extras/layout/layout3.cxx +++ b/sw/qa/extras/layout/layout3.cxx @@ -244,6 +244,30 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf158333) "venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis "); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159085) +{ +createSwDoc("tdf159085.fodt"); +// Ensure that all text portions are calculated before testing. +SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); +CPPUNIT_ASSERT(pTextDoc); +SwViewShell* pViewShell += pTextDoc->GetDocShell()->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); +CPPUNIT_ASSERT(pViewShell); +pViewShell->Reformat(); + +xml
core.git: sw/qa sw/source
sw/qa/extras/layout/data/tdf159085.fodt | 61 sw/qa/extras/layout/layout3.cxx | 24 sw/source/core/text/portxt.cxx |9 3 files changed, 93 insertions(+), 1 deletion(-) New commits: commit d511367c102ef2ada0f73dbe81744d39865d58ba Author: László Németh AuthorDate: Tue Jan 9 13:35:23 2024 +0100 Commit: László Németh CommitDate: Tue Jan 9 20:03:00 2024 +0100 tdf#195085 sw smart justify: fix bad shrinking at soft hyphen Soft hyphen in the word could result too much shrinking, calculating with an extra (non-existing) space. Change-Id: If8b7af40ff50d12c0f2428a6f2475e261fbd0f42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161827 Tested-by: Jenkins Reviewed-by: László Németh diff --git a/sw/qa/extras/layout/data/tdf159085.fodt b/sw/qa/extras/layout/data/tdf159085.fodt new file mode 100644 index ..efd0e98e9213 --- /dev/null +++ b/sw/qa/extras/layout/data/tdf159085.fodt @@ -0,0 +1,61 @@ + + +http://www.w3.org/TR/css3-text/; xmlns:grddl="http://www.w3.org/2003/g/data-view#; xmlns:xhtml="http://www.w3.org/1999/xhtml; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd="http://www.w3.org/2001/XMLSchema; xmlns:xforms="http://www.w3.org/2002/xforms; xmlns:dom="http://www.w3.org/2001/xml-events; xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML; xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:ooo="http://openoffice.org/2004/office; xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" xmlns:ooow="http://openoffice.org/2004/writer; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:drawooo="http://openoffice.org/2010/draw; xmlns:oooc="http://openoffice.org/2004/calc; xmlns:dc="http://purl.org/dc/elements/1.1/; xmlns:c alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:tableooo="http://openoffice.org/2009/table; xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:rpt="http://openoffice.org/2005/report; xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:officeooo="http://openoffice.org/2009/office; xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns: meta:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.text"> + + + true + high-resolution + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus egestas. + venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis cursus egestas. + + + diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx index da882cba559d..e4bfc5195b4b 100644 --- a/sw/qa/extras/layout/layout3.cxx +++ b/sw/qa/extras/layout/layout3.cxx @@ -246,6 +246,30 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf158333) "venenatis, quis commodo dolor posuere. Curabitur dignissim sapien quis "); } +CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf159085) +{ +createSwDoc("tdf159085.fodt"); +// Ensure that all text portions are calculated before testing. +SwXTextDocument* pTextDoc = dynamic_cast(mxComponent.get()); +CPPUNIT_ASSERT(pTextDoc); +SwViewShell* pViewShell += pTextDoc->GetDocShell()->GetDoc()->getIDocumentLayoutAccess().GetCurrentViewShell(); +CPPUNIT_ASSERT(pViewShell); +pViewShell->Reformat(); + +xmlDocUniquePtr pXmlDoc = parseLayoutDump(); + +// This was "... cursus" instead of breaking the word at soft hyphen +assertXPath( +pXmlDoc, "/root/page/body/txt[1
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/core/text/porlin.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit ac96909729152d01b0a20c8e6ca204e6bc3d7160 Author: László Németh AuthorDate: Fri Jan 5 08:00:19 2024 +0100 Commit: László Németh CommitDate: Tue Jan 9 10:36:08 2024 +0100 tdf#159034 sw smart justify: fix position of shading E.g. shading of soft hyphens didn't follow space shrinking. Follow-up to commit 20cbe88ce5610fd8ee302e5780a4c0821ddb3db4 "tdf#119908 tdf#158419 sw smart justify: fix cursor position". Change-Id: Icdce4736d9c76ff1fbe9dd140b9f1c091e605452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161654 Tested-by: Jenkins Reviewed-by: László Németh (cherry picked from commit 7a1470fd97d52c5196a0800dd64f4c8899909c4b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161762 Tested-by: László Németh diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx index 4f93c9d727ce..a420d64301ff 100644 --- a/sw/source/core/text/porlin.cxx +++ b/sw/source/core/text/porlin.cxx @@ -89,8 +89,8 @@ void SwLinePortion::PrePaint( const SwTextPaintInfo& rInf, const sal_uInt16 nHalfView = nViewWidth / 2; sal_uInt16 nLastWidth = pLast->Width() + pLast->ExtraBlankWidth(); -if ( pLast->InSpaceGrp() && rInf.GetSpaceAdd() ) -nLastWidth += pLast->CalcSpacing( rInf.GetSpaceAdd(), rInf ); +if ( pLast->InSpaceGrp() && rInf.GetSpaceAdd(/*bShrink=*/true) ) +nLastWidth += pLast->CalcSpacing( rInf.GetSpaceAdd(/*bShrink=*/true), rInf ); sal_uInt16 nPos; SwTextPaintInfo aInf( rInf );
core.git: Branch 'libreoffice-24-2' - sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf159026.docx |binary sw/qa/extras/uiwriter/uiwriter8.cxx | 58 ++ sw/source/core/frmedt/tblsel.cxx |4 +- 3 files changed, 61 insertions(+), 1 deletion(-) New commits: commit de7e0bc32d3629063f13250ae3b7c9f934fba046 Author: László Németh AuthorDate: Mon Jan 8 01:28:36 2024 +0100 Commit: Xisco Fauli CommitDate: Tue Jan 9 09:37:13 2024 +0100 tdf#159026 sw: fix Undo crash with tracked floating table deletion In Hide Changes mode, tracked deletion of a floating table, and after that, its frame resulted a crash during Undos. Regression from commit 0c6221e1545e7b96d9df23cdc24302c28ae935b8 "tdf#148227 sw: fix Undo of tracked row deletion in Hide Changes mode". Change-Id: I3fd88a30df2739ce8a3cdc24da07684a3ac5a41b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161777 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit f5a00d9ffb8325f4b9fed21b5c96ca005e11b1bb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161758 Tested-by: Jenkins Reviewed-by: Xisco Fauli diff --git a/sw/qa/extras/uiwriter/data/tdf159026.docx b/sw/qa/extras/uiwriter/data/tdf159026.docx new file mode 100644 index ..65bfaae3e423 Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf159026.docx differ diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx b/sw/qa/extras/uiwriter/uiwriter8.cxx index 9aaafa1e6967..4fa027b0515b 100644 --- a/sw/qa/extras/uiwriter/uiwriter8.cxx +++ b/sw/qa/extras/uiwriter/uiwriter8.cxx @@ -15,9 +15,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -239,6 +241,62 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf146962) assertXPath(pXmlDoc, "/root/page[1]/body/tab/row"_ostr, 2); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf159026) +{ +// load a floating table (tables in DOCX footnotes +// imported as floating tables in Writer) +createSwDoc("tdf159026.docx"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); + +// enable redlining +dispatchCommand(mxComponent, ".uno:TrackChanges", {}); +CPPUNIT_ASSERT_MESSAGE("redlining should be on", + pDoc->getIDocumentRedlineAccess().IsRedlineOn()); +// hide changes +dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {}); +CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines()); + +// select table with SelectionSupplier +uno::Reference xTextTablesSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xIndexAccess(xTextTablesSupplier->getTextTables(), + uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + +uno::Reference xModel(mxComponent, uno::UNO_QUERY); +uno::Reference xSelSupplier(xModel->getCurrentController(), + uno::UNO_QUERY_THROW); +// select floating table (table in a frame) +xSelSupplier->select(xIndexAccess->getByIndex(0)); + +// delete table with track changes +dispatchCommand(mxComponent, ".uno:DeleteTable", {}); + +// tracked table deletion +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + +// hidden table +xmlDocUniquePtr pXmlDoc = parseLayoutDump(); +assertXPath(pXmlDoc, "//tab"_ostr, 0); + +// delete frame +uno::Reference xTextFramesSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xIndexAccess2(xTextFramesSupplier->getTextFrames(), + uno::UNO_QUERY); +xSelSupplier->select(xIndexAccess2->getByIndex(0)); +dispatchCommand(mxComponent, ".uno:Delete", {}); + +// undo frame deletion +dispatchCommand(mxComponent, ".uno:Undo", {}); + +// undo tracked table deletion + +// This resulted crashing +dispatchCommand(mxComponent, ".uno:Undo", {}); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf147347) { // load a 2-row table, set Hide Changes mode and delete the table with change tracking diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 48a92366509c..ec56a5285675 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -2383,7 +2383,9 @@ void FndBox_::MakeFrames( SwTable ) for ( sal_uInt16 j = nStPos; j <= nEndPos; ++j ) { SwTableLine * pLine = rTable.GetTabLines()[j]; -if ( !bHideChanges || !pLine->IsDeleted(nRedlinePos) ) +if ( ( !bHideChanges || !pLine-
core.git: sw/qa sw/source
sw/qa/extras/uiwriter/data/tdf159026.docx |binary sw/qa/extras/uiwriter/uiwriter8.cxx | 58 ++ sw/source/core/frmedt/tblsel.cxx |4 +- 3 files changed, 61 insertions(+), 1 deletion(-) New commits: commit 14c0f2cd140da66d38a8282332f2cb734bb74e39 Author: László Németh AuthorDate: Mon Jan 8 01:28:36 2024 +0100 Commit: László Németh CommitDate: Mon Jan 8 13:20:11 2024 +0100 tdf#159026 sw: fix Undo crash with tracked floating table deletion In Hide Changes mode, tracked deletion of a floating table, and after that, its frame resulted a crash during Undos. Regression from commit 0c6221e1545e7b96d9df23cdc24302c28ae935b8 "tdf#148227 sw: fix Undo of tracked row deletion in Hide Changes mode". Change-Id: I3fd88a30df2739ce8a3cdc24da07684a3ac5a41b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161777 Tested-by: László Németh Reviewed-by: László Németh diff --git a/sw/qa/extras/uiwriter/data/tdf159026.docx b/sw/qa/extras/uiwriter/data/tdf159026.docx new file mode 100644 index ..65bfaae3e423 Binary files /dev/null and b/sw/qa/extras/uiwriter/data/tdf159026.docx differ diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx b/sw/qa/extras/uiwriter/uiwriter8.cxx index 2cfcc2066c41..4aebc11b237a 100644 --- a/sw/qa/extras/uiwriter/uiwriter8.cxx +++ b/sw/qa/extras/uiwriter/uiwriter8.cxx @@ -15,9 +15,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -241,6 +243,62 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf146962) assertXPath(pXmlDoc, "/root/page[1]/body/tab/row"_ostr, 2); } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf159026) +{ +// load a floating table (tables in DOCX footnotes +// imported as floating tables in Writer) +createSwDoc("tdf159026.docx"); +SwDoc* pDoc = getSwDoc(); +CPPUNIT_ASSERT(pDoc); +SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); +CPPUNIT_ASSERT(pWrtShell); + +// enable redlining +dispatchCommand(mxComponent, ".uno:TrackChanges", {}); +CPPUNIT_ASSERT_MESSAGE("redlining should be on", + pDoc->getIDocumentRedlineAccess().IsRedlineOn()); +// hide changes +dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {}); +CPPUNIT_ASSERT(pWrtShell->GetLayout()->IsHideRedlines()); + +// select table with SelectionSupplier +uno::Reference xTextTablesSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xIndexAccess(xTextTablesSupplier->getTextTables(), + uno::UNO_QUERY); +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + +uno::Reference xModel(mxComponent, uno::UNO_QUERY); +uno::Reference xSelSupplier(xModel->getCurrentController(), + uno::UNO_QUERY_THROW); +// select floating table (table in a frame) +xSelSupplier->select(xIndexAccess->getByIndex(0)); + +// delete table with track changes +dispatchCommand(mxComponent, ".uno:DeleteTable", {}); + +// tracked table deletion +CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount()); + +// hidden table +xmlDocUniquePtr pXmlDoc = parseLayoutDump(); +assertXPath(pXmlDoc, "//tab"_ostr, 0); + +// delete frame +uno::Reference xTextFramesSupplier(mxComponent, uno::UNO_QUERY); +uno::Reference xIndexAccess2(xTextFramesSupplier->getTextFrames(), + uno::UNO_QUERY); +xSelSupplier->select(xIndexAccess2->getByIndex(0)); +dispatchCommand(mxComponent, ".uno:Delete", {}); + +// undo frame deletion +dispatchCommand(mxComponent, ".uno:Undo", {}); + +// undo tracked table deletion + +// This resulted crashing +dispatchCommand(mxComponent, ".uno:Undo", {}); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf147347) { // load a 2-row table, set Hide Changes mode and delete the table with change tracking diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 48a92366509c..ec56a5285675 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -2383,7 +2383,9 @@ void FndBox_::MakeFrames( SwTable ) for ( sal_uInt16 j = nStPos; j <= nEndPos; ++j ) { SwTableLine * pLine = rTable.GetTabLines()[j]; -if ( !bHideChanges || !pLine->IsDeleted(nRedlinePos) ) +if ( ( !bHideChanges || !pLine->IsDeleted(nRedlinePos) ) && +// tdf#159026 fix Undo crash with floating tables +pUpperFrame->GetUpper() ) ::lcl_InsertRow( *pLine, static_cast(pUpperFrame), pSibling ); }