configure.ac | 2 framework/source/uielement/toolbarmodemenucontroller.cxx | 2 framework/source/uielement/toolbarsmenucontroller.cxx | 2 include/svtools/popupmenucontrollerbase.hxx | 3 sfx2/source/control/bindings.cxx | 2 sfx2/source/control/statcach.cxx | 46 +++++++++++--- sfx2/source/inc/statcach.hxx | 2 svl/source/items/voiditem.cxx | 5 + svtools/source/uno/popupmenucontrollerbase.cxx | 2 svx/source/gallery2/codec.cxx | 49 --------------- svx/source/gallery2/galmisc.cxx | 7 -- sw/source/core/frmedt/feshview.cxx | 9 +- sw/source/ui/fldui/fldvar.cxx | 5 + sw/source/writerfilter/dmapper/PropertyMap.cxx | 2 14 files changed, 70 insertions(+), 68 deletions(-)
New commits: commit b8ea36c08437199ed53a4c88c3fb89ad497a6880 Author: Justin Luth <[email protected]> AuthorDate: Sat Nov 2 19:22:13 2024 -0400 Commit: Thorsten Behrens <[email protected]> CommitDate: Wed Nov 6 11:19:17 2024 +0100 tdf#161349 writerfilter: only copy page background vml fill This fixes my 24.8 regression. I had this clause in earlier versions of the patchset, but it moved along with most of the other logic to the initialization of the default page style. However, I certainly need to limit copying the properties of the default page style to ONLY the fill properties here as well. Change-Id: I168f13ebeea3720eba53703210314f069fb87ae2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175963 Reviewed-by: Justin Luth <[email protected]> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175965 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/source/writerfilter/dmapper/PropertyMap.cxx b/sw/source/writerfilter/dmapper/PropertyMap.cxx index 9dbf1c1eb47d..a9270da6617b 100644 --- a/sw/source/writerfilter/dmapper/PropertyMap.cxx +++ b/sw/source/writerfilter/dmapper/PropertyMap.cxx @@ -1211,6 +1211,8 @@ void SectionPropertyMap::HandleMarginsHeaderFooter(DomainMapper_Impl& rDM_Impl) rDM_Impl.GetPageStyles()->getByName(u"Standard"_ustr), uno::UNO_QUERY_THROW); for (const beans::Property& rProp : m_aPageStyle->getPropertySetInfo()->getProperties()) { + if (!rProp.Name.startsWith("Fill")) // only copy XATTR_FILL properties + continue; try { const uno::Any aFillValue = xDefaultPageStyle->getPropertyValue(rProp.Name); commit 9a7d9bf269ba35b077be3f4a6b587f25b54c06f2 Author: Thorsten Behrens <[email protected]> AuthorDate: Wed Nov 6 11:18:40 2024 +0100 Commit: Thorsten Behrens <[email protected]> CommitDate: Wed Nov 6 11:18:40 2024 +0100 Bump version to 24.8.3.2 Change-Id: I82f721dbb939ff1d54fb13a33b7f4a7df63cbc22 diff --git a/configure.ac b/configure.ac index d8eca0b49430..18392ba4ee68 100644 --- a/configure.ac +++ b/configure.ac @@ -9,7 +9,7 @@ dnl in order to create a configure script. # several non-alphanumeric characters, those are split off and used only for the # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea. -AC_INIT([LibreOffice],[24.8.3.1.0+],[],[],[http://documentfoundation.org/]) +AC_INIT([LibreOffice],[24.8.3.2],[],[],[http://documentfoundation.org/]) dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard commit f186a9689371421029c509021badb3b8dec35c3c Merge: 29524def36f5 82ad8c2df714 Author: Thorsten Behrens <[email protected]> AuthorDate: Wed Nov 6 11:03:41 2024 +0100 Commit: Thorsten Behrens <[email protected]> CommitDate: Wed Nov 6 11:03:41 2024 +0100 Merge remote-tracking branch 'libreoffice-24-8-3' into feature/cib_contract49d Change-Id: I916f856984edd0e85c2ea4818e549703812d7020 commit 82ad8c2df714292d0f6cfdee2f1a8312d11f8f5c Author: Armin Le Grand (allotropia) <[email protected]> AuthorDate: Thu Oct 31 13:38:30 2024 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Wed Nov 6 10:37:38 2024 +0100 tdf#162666 Make SfxStateCache handle Items correctly SfxStateCache had problems processing the extra Item states disabled/invalid. Note that due to not using a Pool here it is not possible to use an ItemSet or an ItemHolder, those would automatically handle these cases correctly. In this cache, this currently needs to be done handish. Also note that because of that this may break again when changes in the Item/ItemSet/ItemHolder mechanism may be done. Change-Id: I007bc25c727e6432062fa0d2af8215a912cb2fff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175871 Reviewed-by: Armin Le Grand <[email protected]> Tested-by: Jenkins (cherry picked from commit 288d720e4940d8fdd71715e6d339765e90716931) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175904 Reviewed-by: Thorsten Behrens <[email protected]> (cherry picked from commit 4cc42d9aaf62fa9711782a07a00559a43532dced) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175907 Tested-by: Gabor Kelemen <[email protected]> Reviewed-by: Balazs Varga <[email protected]> Reviewed-by: Michael Stahl <[email protected]> diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index ffafadfeb2a6..7b8b939aa6cb 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1203,6 +1203,8 @@ void SfxBindings::UpdateControllers_Impl SfxItemPool::IsSlot(rFound.nWhichId) ) { // no Status or Default but without Pool + // tdf#162666 note that use DISABLED_POOL_ITEM needs to be + // handled correctly in the cache, see comments there rCache.SetState( SfxItemState::UNKNOWN, DISABLED_POOL_ITEM ); } else if ( SfxItemState::DISABLED == eState ) diff --git a/sfx2/source/control/statcach.cxx b/sfx2/source/control/statcach.cxx index 037a38253a31..4432f0bc37e6 100644 --- a/sfx2/source/control/statcach.cxx +++ b/sfx2/source/control/statcach.cxx @@ -127,6 +127,8 @@ void SAL_CALL BindDispatch_Impl::statusChanged( const css::frame::FeatureStateE pItem->PutValue( aAny, 0 ); } else + // tdf#162666 nId should not be zero. This will now create + // a SAL_INFO in SfxVoidItem::SfxVoidItem pItem.reset( new SfxVoidItem( nId ) ); } pArg = pItem.get(); @@ -203,8 +205,13 @@ SfxStateCache::SfxStateCache( sal_uInt16 nFuncId ): SfxStateCache::~SfxStateCache() { DBG_ASSERT( pController == nullptr && pInternalController == nullptr, "there are still Controllers registered" ); - if ( !IsInvalidItem(pLastItem) ) + + if ( !IsInvalidItem(pLastItem) && !IsDisabledItem(pLastItem) ) + { + // tdf#162666 only delete if it *was* cloned delete pLastItem; + } + if ( mxDispatch.is() ) mxDispatch->Release(); } @@ -424,15 +431,40 @@ void SfxStateCache::SetState_Impl static_cast<SfxDispatchController_Impl *>(pInternalController)->StateChanged( nId, eState, pState, &aSlotServ ); // Remember new value - if ( !IsInvalidItem(pLastItem) ) + if (!IsInvalidItem(pLastItem) && !IsDisabledItem(pLastItem)) { + // tdf#162666 only delete if it *was* cloned delete pLastItem; - pLastItem = nullptr; } - if ( pState && !IsInvalidItem(pState) ) - pLastItem = pState->Clone(); - else - pLastItem = nullptr; + + // always reset to nullptr + pLastItem = nullptr; + + if ( nullptr != pState) + { + if (IsInvalidItem(pState)) + { + // tdf#162666 if invalid, use INVALID_POOL_ITEM + pLastItem = INVALID_POOL_ITEM; + } + else if (IsDisabledItem(pState)) + { + // tdf#162666 if disabled, use DISABLED_POOL_ITEM + pLastItem = DISABLED_POOL_ITEM; + } + else + { + // tdf#162666 in all other cases, clone the Item. Note that + // due to not using a Pool here it is not possible to use a + // ItemSet or a ItemHolder, those would automatically handle + // these cases correctly. In this cache, this currently needs + // to be done handish. Also note that this may break again + // when changes in the Item/ItemSet/ItemHolder mechanism may + // be done + pLastItem = pState->Clone(); + } + } + eLastState = eState; bItemDirty = false; } diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx index 388e184f6653..2e648bd4b7fb 100644 --- a/sfx2/source/inc/statcach.hxx +++ b/sfx2/source/inc/statcach.hxx @@ -67,7 +67,7 @@ friend class BindDispatch_Impl; css::uno::Reference < css::frame::XDispatch > xMyDispatch; SfxControllerItem* pController; // Pointer to first bound Controller (interlinked with each other) SfxSlotServer aSlotServ; // SlotServer, SlotPtr = 0 -> not on Stack - SfxPoolItem* pLastItem; // Last sent Item, never -1 + const SfxPoolItem* pLastItem; // Last sent Item, never -1 SfxItemState eLastState; // Last sent State bool bCtrlDirty:1; // Update Controller? bool bSlotDirty:1; // Present Function, must be updated diff --git a/svl/source/items/voiditem.cxx b/svl/source/items/voiditem.cxx index 2091359e7bb5..6bda725d0fcd 100644 --- a/svl/source/items/voiditem.cxx +++ b/svl/source/items/voiditem.cxx @@ -19,12 +19,17 @@ #include <svl/voiditem.hxx> #include <libxml/xmlwriter.h> +#include <sal/log.hxx> SfxPoolItem* SfxVoidItem::CreateDefault() { return new SfxVoidItem(0); } SfxVoidItem::SfxVoidItem(sal_uInt16 which) : SfxPoolItem(which) { +#ifdef DBG_UTIL + if (0 == which) + SAL_INFO("svl.items", "ITEM: SfxVoidItem with 0 == WhichID gets constructed (!)"); +#endif } SfxVoidItem::SfxVoidItem(const SfxVoidItem& rCopy) commit 29524def36f567aa256d8f0b2509474566c8d54a Author: Oliver Specht <[email protected]> AuthorDate: Wed Nov 6 08:57:32 2024 +0100 Commit: Thorsten Behrens <[email protected]> CommitDate: Wed Nov 6 09:44:23 2024 +0100 tdf#160621 Variable field dialog page resize Reduce the size of the upper boxes to get more space for the field value input. Change-Id: I96cc38b30fa7afccf6ca009aad3b15f1f051d381 diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 01be468828f1..0478ed1b6040 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -121,6 +121,11 @@ void SwFieldVarPage::Reset(const SfxItemSet* ) } else { + auto nWidth = m_xTypeLB->get_approximate_digit_width() * FIELD_COLUMN_WIDTH; + auto nHeight = m_xTypeLB->get_height_rows(8); + m_xTypeLB->set_size_request(nWidth, nHeight); + m_xSelectionLB->set_size_request(nWidth, nHeight); + m_xFormatLB->set_size_request(nWidth, nHeight/2); const SwField* pCurField = GetCurField(); assert(pCurField && "<SwFieldVarPage::Reset(..)> - <SwField> instance missing!"); nTypeId = pCurField->GetTypeId(); commit fa0bea66016e5887f2036027184443ab8cc070a6 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Nov 4 11:11:07 2024 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Nov 5 22:10:17 2024 +0100 delete useless parts of GalleryCodec::Read no point reading this to just to discard it later the only places reading this are just opening, using and close the streams afterwards, so the need to even skip over this data doesn't seem to arise. Change-Id: Ieb2498f458534770c167bbbfb3a4792162238986 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176010 Tested-by: Jenkins Reviewed-by: Xisco Fauli <[email protected]> (cherry picked from commit c7c950b4c3809152a5a28eca8663cd119dbcb7c4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176065 Reviewed-by: Caolán McNamara <[email protected]> Reviewed-by: Thorsten Behrens <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/svx/source/gallery2/codec.cxx b/svx/source/gallery2/codec.cxx index 062c60dbecc6..19e2a92cb548 100644 --- a/svx/source/gallery2/codec.cxx +++ b/svx/source/gallery2/codec.cxx @@ -18,6 +18,7 @@ */ +#include <sal/log.hxx> #include <tools/stream.hxx> #include <tools/zcodec.hxx> #include "codec.hxx" @@ -84,56 +85,12 @@ void GalleryCodec::Read( SvStream& rStmToRead ) if( !IsCoded( rStm, nVersion ) ) return; - sal_uInt32 nCompressedSize, nUnCompressedSize; - - rStm.SeekRel( 6 ); - rStm.ReadUInt32( nUnCompressedSize ).ReadUInt32( nCompressedSize ); + rStm.SeekRel( 14 ); // decompress if( 1 == nVersion ) { - std::unique_ptr<sal_uInt8[]> pCompressedBuffer(new sal_uInt8[ nCompressedSize ]); - rStm.ReadBytes(pCompressedBuffer.get(), nCompressedSize); - sal_uInt8* pInBuf = pCompressedBuffer.get(); - std::unique_ptr<sal_uInt8[]> pOutBuf(new sal_uInt8[ nUnCompressedSize ]); - sal_uInt8* pTmpBuf = pOutBuf.get(); - sal_uInt8* pLast = pOutBuf.get() + nUnCompressedSize - 1; - sal_uIntPtr nIndex = 0, nCountByte, nRunByte; - bool bEndDecoding = false; - - do - { - nCountByte = *pInBuf++; - - if ( !nCountByte ) - { - nRunByte = *pInBuf++; - - if ( nRunByte > 2 ) - { - // filling absolutely - memcpy( &pTmpBuf[ nIndex ], pInBuf, nRunByte ); - pInBuf += nRunByte; - nIndex += nRunByte; - - // note WORD alignment - if ( nRunByte & 1 ) - pInBuf++; - } - else if ( nRunByte == 1 ) // End of the image - bEndDecoding = true; - } - else - { - const sal_uInt8 cVal = *pInBuf++; - - memset( &pTmpBuf[ nIndex ], cVal, nCountByte ); - nIndex += nCountByte; - } - } - while ( !bEndDecoding && ( pTmpBuf <= pLast ) ); - - rStmToRead.WriteBytes(pOutBuf.get(), nUnCompressedSize); + SAL_WARN("svx", "staroffice binary file formats are no longer supported inside the gallery!"); } else if( 2 == nVersion ) { diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 4d3ef2d5a619..6e80276c3aa6 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -86,12 +86,7 @@ bool GallerySvDrawImport( SvStream& rIStm, SdrModel& rModel ) aCodec.Read( aMemStm ); aMemStm.Seek( 0 ); - if( 1 == nVersion ) - { - OSL_FAIL( "staroffice binary file formats are no longer supported inside the gallery!" ); - bRet = false; - } - else if( 2 == nVersion ) + if ( 2 == nVersion ) { // recall to read as XML bRet = GallerySvDrawImport( aMemStm, rModel ); commit 1e89f956622b2763da1d0c6e3b90c1b54dadc3f9 Author: László Németh <[email protected]> AuthorDate: Thu Oct 31 11:04:42 2024 +0100 Commit: Thorsten Behrens <[email protected]> CommitDate: Tue Nov 5 21:25:06 2024 +0100 tdf#163699 sw: fix reported crash using the Navigator "On a specific file, when double-clicking multiple times on different images in the navigator panel, LO crashes." reported by Vladislav Tarakanov with a code pointer. Regression since 3e0650fb166cac116a43f6ce5d03bd69830e37b8 "tdf#157533 sw: fix cursor position deselecting formula in table". Change-Id: I550d61d8ee10205ff2357c2511ae0062077d651e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175855 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins (cherry picked from commit 5115079520192ad48ce7ce14027f5a75fc83a4cf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175914 Reviewed-by: László Németh <[email protected]> Reviewed-by: Thorsten Behrens <[email protected]> Reviewed-by: Michael Stahl <[email protected]> Tested-by: Thorsten Behrens <[email protected]> diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx index e05d4fb10fe4..0a3830009e99 100644 --- a/sw/source/core/frmedt/feshview.cxx +++ b/sw/source/core/frmedt/feshview.cxx @@ -217,8 +217,9 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) pOldSelFly->GetAnchorFrame()->GetUpper() ) { const SwNode * pOldNd = pContact->GetAnchorNode().FindTableNode(); + const SwNode * pNewNd = GetCursor()->GetPointNode().FindTableNode(); // the original image was in a table, but the cursor is not in that - if ( pOldNd && pOldNd != GetCursor()->GetPointNode().FindTableNode() ) + if ( pOldNd && pOldNd != pNewNd ) { const SwRect& rCellFrame = pOldSelFly->GetAnchorFrame()->GetUpper()->getFrameArea(); @@ -229,8 +230,10 @@ bool SwFEShell::SelectObj( const Point& rPt, sal_uInt8 nFlag, SdrObject *pObj ) pWrtShell->SelectTableRowCol( aPtCellTopRight ); } // same table, but not in the same cell - else if ( pContact->GetAnchorNode().GetTableBox() != - GetCursor()->GetPointNode().GetTextNode()->GetTableBox() ) + else if ( pOldNd && pOldNd == pNewNd && + GetCursor()->GetPointNode().GetTextNode() && + pContact->GetAnchorNode().GetTableBox() != + GetCursor()->GetPointNode().GetTextNode()->GetTableBox() ) { aPt.setX( aPt.getX() + 2 + pOldSelFly->getFrameArea().Width() ); // put the text cursor after the object commit d9af76c652a7394491c225a89562ed0aa52dee82 Author: Patrick Luby <[email protected]> AuthorDate: Mon Nov 4 18:22:58 2024 -0500 Commit: Christian Lohmaier <[email protected]> CommitDate: Tue Nov 5 13:25:09 2024 +0100 Fix crash due to unexpected dynamic_cast failures in optimized build When an optimized build of this branch is compiled on Silicon Mac, a dynamic_cast from com.sun.star.awt.XPopupMenu to VCLXPopupMenu will fail. The pointer being casted has not been deleted and is an undeleted instance yet dynamic_cast fails. However, a dynamic_cast to VCLXPopupMenu's superclass VCLXMenu succeeds so cast to that class instead. Change-Id: Ie9ab79df109eece46351545a71325d1e37bde94d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175995 Tested-by: Christian Lohmaier <[email protected]> Reviewed-by: Patrick Luby <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx index 1b6c9964b698..11bf5d787866 100644 --- a/framework/source/uielement/toolbarmodemenucontroller.cxx +++ b/framework/source/uielement/toolbarmodemenucontroller.cxx @@ -274,7 +274,7 @@ void SAL_CALL ToolbarModeMenuController::setPopupMenu( const Reference< css::awt // Create popup menu on demand SolarMutexGuard aSolarMutexGuard; - m_xPopupMenu = dynamic_cast<VCLXPopupMenu*>(xPopupMenu.get()); + m_xPopupMenu = dynamic_cast<VCLXMenu*>(xPopupMenu.get()); assert(bool(xPopupMenu) == bool(m_xPopupMenu) && "we only support VCLXPopupMenu"); m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >(this) ); fillPopupMenu( m_xPopupMenu ); diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 9e5055ccfd37..ea96810613df 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -707,7 +707,7 @@ void SAL_CALL ToolbarsMenuController::setPopupMenu( const Reference< css::awt::X // Create popup menu on demand SolarMutexGuard aSolarMutexGuard; - m_xPopupMenu = dynamic_cast<VCLXPopupMenu*>(xPopupMenu.get()); + m_xPopupMenu = dynamic_cast<VCLXMenu*>(xPopupMenu.get()); assert(bool(xPopupMenu) == bool(m_xPopupMenu) && "we only support VCLXPopupMenu"); m_xPopupMenu->addMenuListener( Reference< css::awt::XMenuListener >(this) ); fillPopupMenu( m_xPopupMenu ); diff --git a/include/svtools/popupmenucontrollerbase.hxx b/include/svtools/popupmenucontrollerbase.hxx index b484aafd7a06..c27c203ac3eb 100644 --- a/include/svtools/popupmenucontrollerbase.hxx +++ b/include/svtools/popupmenucontrollerbase.hxx @@ -33,6 +33,7 @@ #include <comphelper/compbase.hxx> #include <rtl/ref.hxx> #include <rtl/ustring.hxx> +#include <toolkit/awt/vclxmenu.hxx> namespace com :: sun :: star :: frame { class XFrame; } namespace com :: sun :: star :: uno { class XComponentContext; } @@ -118,7 +119,7 @@ namespace svt css::uno::Reference< css::frame::XDispatch > m_xDispatch; css::uno::Reference< css::frame::XFrame > m_xFrame; css::uno::Reference< css::util::XURLTransformer > m_xURLTransformer; - rtl::Reference< VCLXPopupMenu > m_xPopupMenu; + rtl::Reference< VCLXMenu > m_xPopupMenu; comphelper::OInterfaceContainerHelper4<XStatusListener> maStatusListeners; }; } diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx index 85065724f9f3..2806efef204d 100644 --- a/svtools/source/uno/popupmenucontrollerbase.cxx +++ b/svtools/source/uno/popupmenucontrollerbase.cxx @@ -343,7 +343,7 @@ void SAL_CALL PopupMenuControllerBase::setPopupMenu( const Reference< awt::XPopu // Create popup menu on demand SolarMutexGuard aSolarMutexGuard; - m_xPopupMenu = dynamic_cast<VCLXPopupMenu*>(xPopupMenu.get()); + m_xPopupMenu = dynamic_cast<VCLXMenu*>(xPopupMenu.get()); assert(bool(xPopupMenu) == bool(m_xPopupMenu) && "we only support VCLXPopupMenu"); m_xPopupMenu->addMenuListener( Reference< awt::XMenuListener >(this) );
