download.lst | 4 external/zxcvbn-c/0001-There-is-no-std-basic_string-int.patch.1 | 72 ---------- external/zxcvbn-c/0001-use-const-for-these-arrays.patch.1 | 42 ----- external/zxcvbn-c/UnpackedTarball_zxcvbn-c.mk | 2 sw/qa/extras/odfimport/data/tdf167774.odt |binary sw/qa/extras/odfimport/odfimport.cxx | 15 ++ sw/source/core/attr/calbck.cxx | 2 sw/source/core/layout/flyincnt.cxx | 10 - sw/source/core/layout/pagechg.cxx | 8 + sw/source/core/txtnode/atrfld.cxx | 5 sw/source/core/txtnode/ndtxt.cxx | 63 ++++---- 11 files changed, 68 insertions(+), 155 deletions(-)
New commits: commit 39db15ab28f1d2acd9fb83aa8ba7676200e895a9 Author: Xisco Fauli <[email protected]> AuthorDate: Thu Aug 21 18:39:47 2025 +0200 Commit: Andras Timar <[email protected]> CommitDate: Sun Aug 24 11:18:38 2025 +0200 tdf#167774: sw_odfimport: Add test Change-Id: I781bd1bbae10f2ccc0660b39e976d99c72c4fee0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190021 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> (cherry picked from commit 3d411a417db35c40e990c2cab09f65198ec0371b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190031 diff --git a/sw/qa/extras/odfimport/data/tdf167774.odt b/sw/qa/extras/odfimport/data/tdf167774.odt new file mode 100644 index 000000000000..c0714c9cadcb Binary files /dev/null and b/sw/qa/extras/odfimport/data/tdf167774.odt differ diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index a78a9fddf236..8dcbc2776b5d 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -1545,6 +1545,21 @@ CPPUNIT_TEST_FIXTURE(Test, testWindowsFileZone) #endif } +CPPUNIT_TEST_FIXTURE(Test, testTdf167774) +{ + createSwDoc("tdf167774.odt"); + + CPPUNIT_ASSERT_EQUAL(4, getParagraphs()); + + for (int i = 1; i <= 4; ++i) + { + // Without the fix in place, this test would have failed with + // - Expected: 9 + // - Actual : 10.8 + CPPUNIT_ASSERT_EQUAL(float(9), getProperty<float>(getParagraph(i), u"CharHeight"_ustr)); + } +} + CPPUNIT_TEST_FIXTURE(Test, testEmptyTrailingSpans) { createSwDoc("emptyParagraphLoosesFontHeight.fodt"); commit c661a1333e7321151fdf4008c62823f2ab48f142 Author: Noel Grandin <[email protected]> AuthorDate: Thu Aug 21 14:23:05 2025 +0200 Commit: Andras Timar <[email protected]> CommitDate: Sun Aug 24 11:18:38 2025 +0200 tdf#167774 Writer shows font of defined style with 10,8 pt instead of 9 pt regression from commit ca65ed8a37847b334868b8cbf05f1ba77665d5aa Author: Noel Grandin <[email protected]> Date: Tue Dec 24 12:28:29 2024 +0200 move RES_FMT_CHG to SfxHint The important fix is in SwModify::SwClientNotify. The other changes are small things I picked up when going over the original patch, which likely don't make much different, but better safe than sorry. Change-Id: I65c79b60740dc7f1b711522db8d8682c69d632e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189998 Reviewed-by: Noel Grandin <[email protected]> Tested-by: Jenkins Signed-off-by: Xisco Fauli <[email protected]> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190020 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190023 diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx index e4a1f437cef7..6e6b9721f11b 100644 --- a/sw/source/core/attr/calbck.cxx +++ b/sw/source/core/attr/calbck.cxx @@ -289,7 +289,7 @@ sw::ClientIteratorBase* sw::ClientIteratorBase::s_pClientIters = nullptr; void SwModify::SwClientNotify(const SwModify&, const SfxHint& rHint) { - if (rHint.GetId() != SfxHintId::SwLegacyModify && rHint.GetId() != SfxHintId::SwRemoveUnoObject && rHint.GetId() != SfxHintId::SwRemoveUnoObject) + if (rHint.GetId() != SfxHintId::SwLegacyModify && rHint.GetId() != SfxHintId::SwRemoveUnoObject && rHint.GetId() != SfxHintId::SwFormatChange) return; DBG_TESTSOLARMUTEX(); diff --git a/sw/source/core/layout/flyincnt.cxx b/sw/source/core/layout/flyincnt.cxx index ed249c322bd0..2d7fb593a10f 100644 --- a/sw/source/core/layout/flyincnt.cxx +++ b/sw/source/core/layout/flyincnt.cxx @@ -102,9 +102,13 @@ void SwFlyInContentFrame::SwClientNotify(const SwModify& rMod, const SfxHint& rH } if (rHint.GetId() == SfxHintId::SwFormatChange) { - SwFlyFrame::SwClientNotify(rMod, rHint); - if(GetAnchorFrame()) - AnchorFrame()->Prepare(PrepareHint::FlyFrameAttributesChanged, GetFormat()); + auto pFormatChangeHint = static_cast<const SwFormatChangeHint*>(&rHint); + if (pFormatChangeHint->m_pNewFormat) + { + SwFlyFrame::SwClientNotify(rMod, rHint); + if(GetAnchorFrame()) + AnchorFrame()->Prepare(PrepareHint::FlyFrameAttributesChanged, GetFormat()); + } return; } if (rHint.GetId() != SfxHintId::SwLegacyModify) diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index bc8de8ed1f9b..89774c299d8d 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -625,6 +625,14 @@ void SwPageFrame::UpdateAttr_( const SfxPoolItem *pOld, const SfxPoolItem *pNew, } else if (pNew) { + const SwFormatFrameSize &rSz = static_cast<const SwFormatFrameSize&>(*pNew); + + { + SwFrameAreaDefinition::FrameAreaWriteAccess aFrm(*this); + aFrm.Height( std::max( rSz.GetHeight(), tools::Long(MINLAY) ) ); + aFrm.Width ( std::max( rSz.GetWidth(), tools::Long(MINLAY) ) ); + } + if ( GetUpper() ) { static_cast<SwRootFrame*>(GetUpper())->CheckViewLayout( nullptr, nullptr ); diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx index 25b9c0287673..12d72a2cb47d 100644 --- a/sw/source/core/txtnode/atrfld.cxx +++ b/sw/source/core/txtnode/atrfld.cxx @@ -413,6 +413,11 @@ void SwFormatField::UpdateTextNode(const SfxHint& rHint) if (rHint.GetId() == SfxHintId::SwFormatChange) { auto pChangeHint = static_cast<const SwFormatChangeHint*>(&rHint); + if (pChangeHint->m_pOldFormat == nullptr && pChangeHint->m_pNewFormat == nullptr) + { + ForceUpdateTextNode(); + return; + } if (!IsFieldInDoc()) return; diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index db1061a4d5e4..8f7a2e8dc26b 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -5691,46 +5691,43 @@ void SwTextNode::TriggerNodeUpdate(const sw::RemoveUnoObjectHint& rHint) void SwTextNode::TriggerNodeUpdate(const SwFormatChangeHint& rHint) { - assert(!rHint.m_pOldFormat || dynamic_cast<const SwTextFormatColl*>(rHint.m_pOldFormat)); - assert(!rHint.m_pNewFormat || dynamic_cast<const SwTextFormatColl*>(rHint.m_pNewFormat)); - const SwTextFormatColl* pTxtFmtColOld = static_cast<const SwTextFormatColl*>( - rHint.m_pOldFormat); - const SwTextFormatColl* pTxtFmtColNew = static_cast<const SwTextFormatColl*>( - rHint.m_pNewFormat); - { - sw::TextNodeNotificationSuppressor(*this); + sw::TextNodeNotificationSuppressor(*this); - // Override Modify so that deleting styles works properly (outline - // numbering!). - // Never call ChgTextCollUpdateNum for Nodes in Undo. - if( GetRegisteredIn() == rHint.m_pNewFormat - && GetNodes().IsDocNodes() ) + // Override Modify so that deleting styles works properly (outline + // numbering!). + // Never call ChgTextCollUpdateNum for Nodes in Undo. + if( rHint.m_pOldFormat + && rHint.m_pNewFormat + && GetRegisteredIn() == rHint.m_pNewFormat + && GetNodes().IsDocNodes() ) + { + assert(dynamic_cast<const SwTextFormatColl*>(rHint.m_pNewFormat)); + if (const SwTextFormatColl* pTxtFmtColOld = dynamic_cast<const SwTextFormatColl*>(rHint.m_pOldFormat)) { - if (pTxtFmtColOld) - { - ChgTextCollUpdateNum(pTxtFmtColOld, pTxtFmtColNew); - } + ChgTextCollUpdateNum( + pTxtFmtColOld, static_cast<const SwTextFormatColl*>(rHint.m_pNewFormat)); } + } - // reset fill information - if (maFillAttributes) - { - maFillAttributes.reset(); - } + // reset fill information + if (maFillAttributes && rHint.m_pNewFormat) + { + // ..on format change (e.g. style changed) + maFillAttributes.reset(); + } - if ( !mbInSetOrResetAttr ) - { - HandleModifyAtTextNodeFormatChange( *this ); - } + if ( !mbInSetOrResetAttr ) + { + HandleModifyAtTextNodeFormatChange( *this ); + } - SwContentNode::SwClientNotify(*this, rHint); + SwContentNode::SwClientNotify(*this, rHint); - SwDoc& rDoc = GetDoc(); - // #125329# - assure that text node is in document nodes array - if ( !rDoc.IsInDtor() && &rDoc.GetNodes() == &GetNodes() ) - { - rDoc.GetNodes().UpdateOutlineNode(*this); - } + SwDoc& rDoc = GetDoc(); + // #125329# - assure that text node is in document nodes array + if ( !rDoc.IsInDtor() && &rDoc.GetNodes() == &GetNodes() ) + { + rDoc.GetNodes().UpdateOutlineNode(*this); } } commit d68dfcb477b9fb406c3efdf114364222a648ec46 Author: Xisco Fauli <[email protected]> AuthorDate: Thu Aug 7 10:17:30 2025 +0200 Commit: Andras Timar <[email protected]> CommitDate: Sun Aug 24 11:18:25 2025 +0200 zxcvbn-c: upgrade to 2.6 * 0001-There-is-no-std-basic_string-int.patch.1 and 0001-use-const-for-these-arrays.patch.1 are fixed uptream now Downloaded from https://github.com/tsyrogit/zxcvbn-c/archive/refs/tags/v2.5.tar.gz Change-Id: I80b2d5f2b9a6a6bb274f56098f72010291934b21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189041 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins diff --git a/download.lst b/download.lst index c1f06779da30..d8eda71c535e 100644 --- a/download.lst +++ b/download.lst @@ -748,8 +748,8 @@ ZMF_TARBALL := libzmf-0.0.2.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -ZXCVBN_C_SHA256SUM := 77d6c6ecb35952a8d8ce7f736b7a2bf466275c48210e309b73782d6b7e84dffd -ZXCVBN_C_TARBALL := zxcvbn-c-2.5.tar.gz +ZXCVBN_C_SHA256SUM := 11e39f6776f9c82c68b2acb94336e32697d4ab6cdb4ac16f9583ccbdd735113a +ZXCVBN_C_TARBALL := zxcvbn-c-2.6.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/zxcvbn-c/0001-There-is-no-std-basic_string-int.patch.1 b/external/zxcvbn-c/0001-There-is-no-std-basic_string-int.patch.1 deleted file mode 100644 index a1fe25bba08e..000000000000 --- a/external/zxcvbn-c/0001-There-is-no-std-basic_string-int.patch.1 +++ /dev/null @@ -1,72 +0,0 @@ -From 92c6ea875231876ca264187326ce2d615d5ad543 Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann <[email protected]> -Date: Tue, 6 Feb 2024 13:14:08 +0100 -Subject: There is no std::basic_string<int> - -...and at least LLVM 19 trunk libc++ complains about it now since -<c3668779c13596e223c26fbd49670d18cd638c40> "[libc++] Remove deprecated -char_traits base template (#72694)" with - -> In file included from dict-generate.cpp:25: -> In file included from ~/llvm/inst/bin/../include/c++/v1/iostream:43: -> In file included from ~/llvm/inst/bin/../include/c++/v1/ios:223: -> In file included from ~/llvm/inst/bin/../include/c++/v1/__locale:24: -> ~/llvm/inst/bin/../include/c++/v1/string:746:43: error: implicit instantiation of undefined template 'std::char_traits<int>' -> 746 | static_assert((is_same<_CharT, typename traits_type::char_type>::value), -> | ^ -> dict-generate.cpp:861:18: note: in instantiation of template class 'std::basic_string<int>' requested here -> 861 | StringOfInts Chld; -> | ^ -> ~/llvm/inst/bin/../include/c++/v1/__fwd/string.h:23:29: note: template is declared here -> 23 | struct _LIBCPP_TEMPLATE_VIS char_traits; -> | ^ - -etc., so use a std::vector<int> instead ---- - dict-generate.cpp | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/dict-generate.cpp b/dict-generate.cpp -index eebcca9..fcfaaea 100644 ---- a/dict-generate.cpp -+++ b/dict-generate.cpp -@@ -22,6 +22,7 @@ - * - **********************************************************************************/ - -+#include <algorithm> - #include <iostream> - #include <string> - #include <fstream> -@@ -387,7 +388,7 @@ typedef map<string, Entry> EntryMap_t; - typedef list<string> StringList_t; - typedef list<NodeSPtr> NodeList_t; - typedef set<StringInt> StringIntSet_t; --typedef basic_string<int> StringOfInts; -+typedef vector<int> StringOfInts; - typedef vector<unsigned int> UintVect; - typedef vector<uint64_t> Uint64Vect; - typedef vector<StringInt *> StrIntPtrVect_t; -@@ -864,15 +865,14 @@ void CreateArrays(NodeSPtr Root, StringIntSet_t & StrSet, StringOfInts & ChildAd - for(Itc = Root->ChildBegin(); Itc != Root->ChildEnd(); ++Itc) - { - int i = Itc->second->GetAddr(); -- Chld += i; -+ Chld.push_back(i); - } - // Find where in pointer array the child pointer string is -- StringOfInts::size_type x = ChildAddrs.find(Chld); -- if (x == StringOfInts::npos) -+ StringOfInts::size_type x = search(ChildAddrs.begin(), ChildAddrs.end(), Chld.begin(), Chld.end()) - ChildAddrs.begin(); -+ if (x == ChildAddrs.size()) - { - // Not found, add it -- x = ChildAddrs.length(); -- ChildAddrs += Chld; -+ ChildAddrs.insert(ChildAddrs.end(), Chld.begin(), Chld.end()); - } - // Val will contain the final node data - uint64_t Val = Its->i; --- -2.43.0 - diff --git a/external/zxcvbn-c/0001-use-const-for-these-arrays.patch.1 b/external/zxcvbn-c/0001-use-const-for-these-arrays.patch.1 deleted file mode 100644 index 77cd9876921d..000000000000 --- a/external/zxcvbn-c/0001-use-const-for-these-arrays.patch.1 +++ /dev/null @@ -1,42 +0,0 @@ -From fb847af696b873750adf2e61410d897d128f3dee Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <[email protected]> -Date: Sat, 12 Jul 2025 21:21:48 +0100 -Subject: [PATCH] use const for these arrays - -so they don't appear in the .data section. With const WordEndBits -ends up in the .rodata section and Formats in the .data.rel.ro -section. ---- - dict-generate.cpp | 2 +- - zxcvbn.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/dict-generate.cpp b/dict-generate.cpp -index 878b4aa..7041be7 100644 ---- a/dict-generate.cpp -+++ b/dict-generate.cpp -@@ -1246,7 +1246,7 @@ int OutputCode(ostream *Out, bool Cmnts, const string & CharSet, StringIntSet_t - unsigned int Len = ((NodeData.size() + 7) / 8); - OutputSize += Len; - x = 999; -- *Out << "static unsigned char WordEndBits[" << Len << "] = {"; -+ *Out << "static const unsigned char WordEndBits[" << Len << "] = {"; - Index = 0; - unsigned int v = 0; - unsigned int y = 0; -diff --git a/zxcvbn.c b/zxcvbn.c -index 95aa88f..f6d843b 100644 ---- a/zxcvbn.c -+++ b/zxcvbn.c -@@ -1228,7 +1228,7 @@ static void SpatialMatch(ZxcMatch_t **Result, const uint8_t *Passwd, int Start, - - /* The possible date formats ordered by length (d for day, m for month, */ - /* y for year, ? for separator) */ --static const char *Formats[] = -+static const char * const Formats[] = - { - "yyyy", - "d?m?yy", --- -2.49.0 - diff --git a/external/zxcvbn-c/UnpackedTarball_zxcvbn-c.mk b/external/zxcvbn-c/UnpackedTarball_zxcvbn-c.mk index a1167ae708e0..2c3633859df7 100644 --- a/external/zxcvbn-c/UnpackedTarball_zxcvbn-c.mk +++ b/external/zxcvbn-c/UnpackedTarball_zxcvbn-c.mk @@ -17,8 +17,6 @@ $(eval $(call gb_UnpackedTarball_set_tarball,zxcvbn-c,$(ZXCVBN_C_TARBALL))) # <https://github.com/tsyrogit/zxcvbn-c/pull/37> "use const for these arrays": $(eval $(call gb_UnpackedTarball_add_patches,zxcvbn-c,\ external/zxcvbn-c/zxcvbn-c-2.5-do-not-use-stdafx.patch \ - external/zxcvbn-c/0001-There-is-no-std-basic_string-int.patch.1 \ - external/zxcvbn-c/0001-use-const-for-these-arrays.patch.1 \ )) # vim: set noet sw=4 ts=4:
