core.git: 3 commits - toolkit/inc toolkit/source

2025-01-24 Thread Michael Weghorn (via logerrit)
 toolkit/inc/controls/table/AccessibleGridControlBase.hxx  |   78 ---
 toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx|   13 
 toolkit/inc/controls/table/AccessibleGridControlTable.hxx |1 
 toolkit/source/controls/table/AccessibleGridControl.cxx   |8 
 toolkit/source/controls/table/AccessibleGridControlBase.cxx   |  200 
--
 toolkit/source/controls/table/AccessibleGridControlHeader.cxx |   18 
 toolkit/source/controls/table/AccessibleGridControlHeaderCell.cxx |   28 -
 toolkit/source/controls/table/AccessibleGridControlTable.cxx  |   39 +
 toolkit/source/controls/table/AccessibleGridControlTableBase.cxx  |   22 -
 toolkit/source/controls/table/AccessibleGridControlTableCell.cxx  |   14 
 10 files changed, 84 insertions(+), 337 deletions(-)

New commits:
commit b92e6bf5c5d1aa3fd6ea8c31afb286803e26ad83
Author: Michael Weghorn 
AuthorDate: Fri Jan 24 19:54:49 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 24 22:02:22 2025 +0100

toolkit a11y: Use cppu::ImplInheritanceHelper

Change-Id: I69a1eeb53b1f3f2f4ba2b9050c70efb3d91e2150
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180725
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx 
b/toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx
index 57b348333fc1..f6387f0bde9f 100644
--- a/toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx
+++ b/toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx
@@ -23,7 +23,8 @@
 
 namespace accessibility
 {
-class AccessibleGridControlHeaderCell final : public 
AccessibleGridControlCell, public css::accessibility::XAccessible
+class AccessibleGridControlHeaderCell final
+: public cppu::ImplInheritanceHelper
 {
 sal_Int32   m_nColumnRowId;
 public:
@@ -44,16 +45,6 @@ namespace accessibility
 /** Grabs the focus to the GridControl. */
 virtual void SAL_CALL grabFocus() override;
 
-// XInterface
-
-/** Queries for a new interface. */
-css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) 
override;
-
-/** Acquires the object (calls acquire() on base class). */
-virtual void SAL_CALL acquire() noexcept override;
-
-/** Releases the object (calls release() on base class). */
-virtual void SAL_CALL release() noexcept override;
 // XAccessible
 
 /** @return  The XAccessibleContext interface of this object. */
diff --git a/toolkit/source/controls/table/AccessibleGridControlHeaderCell.cxx 
b/toolkit/source/controls/table/AccessibleGridControlHeaderCell.cxx
index 178ea9e23b71..5551dbf79182 100644
--- a/toolkit/source/controls/table/AccessibleGridControlHeaderCell.cxx
+++ b/toolkit/source/controls/table/AccessibleGridControlHeaderCell.cxx
@@ -35,14 +35,15 @@ 
AccessibleGridControlHeaderCell::AccessibleGridControlHeaderCell(sal_Int32 _nCol
   const Reference< XAccessible >& rxParent,
   svt::table::TableControl& rTable,
   AccessibleTableControlObjType  eObjType)
-: AccessibleGridControlCell(rxParent, rTable,
+: ImplInheritanceHelper(rxParent, rTable,
 (eObjType == 
AccessibleTableControlObjType::ROWHEADERCELL) ? _nColumnRowId : 0,
 (eObjType == 
AccessibleTableControlObjType::ROWHEADERCELL) ? 0 : _nColumnRowId,
 eObjType)
-, m_nColumnRowId(_nColumnRowId)
+, m_nColumnRowId(_nColumnRowId)
 {
 assert(eObjType == AccessibleTableControlObjType::ROWHEADERCELL || 
eObjType == AccessibleTableControlObjType::COLUMNHEADERCELL);
 }
+
 /** Return a bitset of states of the current object.
 */
 sal_Int64 AccessibleGridControlHeaderCell::implCreateStateSet()
@@ -85,26 +86,7 @@ Reference SAL_CALL 
AccessibleGridControlHeaderCell::getAccessibleC
 {
 throw IndexOutOfBoundsException();
 }
-// XInterface -
 
-/** Queries for a new interface. */
-css::uno::Any SAL_CALL AccessibleGridControlHeaderCell::queryInterface( 
const css::uno::Type& rType )
-{
-Any aRet = AccessibleGridControlCell::queryInterface(rType);
-return aRet;
-}
-
-/** Acquires the object (calls acquire() on base class). */
-void SAL_CALL AccessibleGridControlHeaderCell::acquire() noexcept
-{
-AccessibleGridControlCell::acquire();
-}
-
-/** Releases the object (calls release() on base class). */
-void SAL_CALL AccessibleGridControlHeaderCell::release() noexcept
-{
-AccessibleGridControlCell::release();
-}
 /** @return  The XAccessibleContext interface of this object. */
 Reference< css::accessibility::XAccessibleContext > SAL_CALL 
AccessibleGridControlHeaderCell::getAccessibleContext()
 {
commit 

core.git: 2 commits - include/vcl toolkit/inc toolkit/source

2025-01-24 Thread Michael Weghorn (via logerrit)
 include/vcl/accessibletable.hxx  |2 
 toolkit/inc/controls/table/tablecontrol.hxx  |2 
 toolkit/source/controls/table/AccessibleGridControlBase.cxx  |   32 
+++---
 toolkit/source/controls/table/AccessibleGridControlTableCell.cxx |2 
 toolkit/source/controls/table/tablecontrol.cxx   |   13 
 5 files changed, 13 insertions(+), 38 deletions(-)

New commits:
commit 1ed642a19958e65bccd21bbb7de8f03812c23ac5
Author: Michael Weghorn 
AuthorDate: Fri Jan 24 10:40:53 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 24 22:01:03 2025 +0100

toolkit a11y: Port away from TableControl::GetFieldCharacterBounds

TableControl::GetFieldCharacterBounds ignores the first
2 params and just calls TableControl::GetCharacterBounds,
so use the latter directly instead and drop the former.

Change-Id: Ib2c799cdb5f8f8515ee771b241e1fd8567dc967d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180697
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/include/vcl/accessibletable.hxx b/include/vcl/accessibletable.hxx
index efb1051ce9cb..7c750c2166ef 100644
--- a/include/vcl/accessibletable.hxx
+++ b/include/vcl/accessibletable.hxx
@@ -80,7 +80,6 @@ public:
 virtual tools::Rectangle calcHeaderCellRect( bool _bColHeader, sal_Int32 
_nPos ) = 0;
 virtual tools::Rectangle calcTableRect() = 0;
 virtual tools::Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 
_nColPos ) = 0;
-virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 _nRow,sal_Int32 
_nColumnPos,sal_Int32 nIndex)= 0;
 virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 
_nColumnPos,const Point& _rPoint)= 0;
 virtual void FillAccessibleStateSetForCell( sal_Int64& _rStateSet, 
sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const= 0;
 virtual OUString GetRowName(sal_Int32 _nIndex) const = 0;
diff --git a/toolkit/inc/controls/table/tablecontrol.hxx 
b/toolkit/inc/controls/table/tablecontrol.hxx
index d443c87cb2bc..390da80cb9c7 100644
--- a/toolkit/inc/controls/table/tablecontrol.hxx
+++ b/toolkit/inc/controls/table/tablecontrol.hxx
@@ -134,7 +134,6 @@ namespace svt::table
 virtual tools::Rectangle calcHeaderCellRect( bool _bIsColumnBar, 
sal_Int32 nPos) override;
 virtual tools::Rectangle calcTableRect() override;
 virtual tools::Rectangle calcCellRect( sal_Int32 _nRowPos, sal_Int32 
_nColPos ) override;
-virtual tools::Rectangle GetFieldCharacterBounds(sal_Int32 
_nRow,sal_Int32 _nColumnPos,sal_Int32 nIndex) override;
 virtual sal_Int32 GetFieldIndexAtPoint(sal_Int32 _nRow,sal_Int32 
_nColumnPos,const Point& _rPoint) override;
 virtual void FillAccessibleStateSetForCell( sal_Int64& _rStateSet, 
sal_Int32 _nRow, sal_uInt16 _nColumnPos ) const override;
 virtual OUString GetRowName(sal_Int32 _nIndex) const override;
diff --git a/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx 
b/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx
index 2aba147012b4..79b21c0b326a 100644
--- a/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx
+++ b/toolkit/source/controls/table/AccessibleGridControlTableCell.cxx
@@ -139,7 +139,7 @@ namespace accessibility
 throw IndexOutOfBoundsException();
 
 return vcl::unohelper::ConvertToAWTRect(
-m_aTable.GetFieldCharacterBounds(getRowPos(), getColumnPos(), 
nIndex));
+m_aTable.GetCharacterBounds(nIndex));
 }
 
 sal_Int32 SAL_CALL AccessibleGridControlTableCell::getIndexAtPoint( const 
css::awt::Point& _aPoint )
diff --git a/toolkit/source/controls/table/tablecontrol.cxx 
b/toolkit/source/controls/table/tablecontrol.cxx
index 61062df11739..f9cdbc8ef545 100644
--- a/toolkit/source/controls/table/tablecontrol.cxx
+++ b/toolkit/source/controls/table/tablecontrol.cxx
@@ -585,13 +585,6 @@ namespace svt::table
 _rStateSet |= AccessibleStateType::ACTIVE;
 }
 
-
-tools::Rectangle 
TableControl::GetFieldCharacterBounds(sal_Int32,sal_Int32,sal_Int32 nIndex)
-{
-return GetCharacterBounds(nIndex);
-}
-
-
 sal_Int32 TableControl::GetFieldIndexAtPoint(sal_Int32,sal_Int32,const 
Point& _rPoint)
 {
 return GetIndexForPoint(_rPoint);
commit 7bdaccecdfd82fd2c6853be8d740a3a9dc466954
Author: Michael Weghorn 
AuthorDate: Fri Jan 24 10:35:33 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 24 22:00:51 2025 +0100

toolkit: Drop IAccessibleTable::GetWindowInstance

This method to get a vcl::Window pointer to self is
no more needed since

commit c6c471546ee82d939092da3ac25a6548145c56c9
Author: Michael Weghorn 
Date:   Thu Jan 23 17:29:32 2025 +0100

toolkit a11y: Use pointers/refs to concrete TableControl class

Use the TableControl right away instead.

Change-Id: I692b0397e6d6b74d8dd5d194d1708a796e

core.git: 2 commits - toolkit/inc toolkit/source

2025-01-24 Thread Michael Weghorn (via logerrit)
 toolkit/inc/controls/table/AccessibleGridControl.hxx  |3 -
 toolkit/inc/controls/table/AccessibleGridControlBase.hxx  |8 ++-
 toolkit/inc/controls/table/AccessibleGridControlHeader.hxx|3 -
 toolkit/inc/controls/table/AccessibleGridControlHeaderCell.hxx|2 
 toolkit/inc/controls/table/AccessibleGridControlTable.hxx |3 -
 toolkit/inc/controls/table/AccessibleGridControlTableCell.hxx |1 
 toolkit/source/controls/table/AccessibleGridControl.cxx   |7 --
 toolkit/source/controls/table/AccessibleGridControlBase.cxx   |   16 ++
 toolkit/source/controls/table/AccessibleGridControlHeader.cxx |   12 
 toolkit/source/controls/table/AccessibleGridControlHeaderCell.cxx |   14 -
 toolkit/source/controls/table/AccessibleGridControlTable.cxx  |   14 -
 toolkit/source/controls/table/AccessibleGridControlTableCell.cxx  |   12 
 toolkit/source/controls/table/tablecontrol_impl.cxx   |   25 
++
 toolkit/source/controls/table/tablecontrol_impl.hxx   |4 -
 14 files changed, 26 insertions(+), 98 deletions(-)

New commits:
commit d1d2afa7dd9591664c72fffd6cd941220bb05999
Author: Michael Weghorn 
AuthorDate: Fri Jan 24 17:51:05 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 24 22:01:56 2025 +0100

toolkit a11y: Return parent-relative coords if requested

As its documentation described, the (so far) purely virtual
AccessibleGridControlBase::implGetBoundingBox was implemented
by all subclasses to return the bounding box relative to the
TableControl's vcl::Window parent.

However, this method is used to implement methods like
XAccessibleComponent::containsPoint,
XAccessibleComponent::getBounds and
XAccessibleComponent::getLocation, all of which are supposed
to be using the position relative to the *immediate* accessible
parent.

This mismatch could e.g. be seen with the grid control
in attachment 198647 of tdf#164783 and the gtk3 VCL plugin
as follows:

1) allow macros
2) open sample file
3) click "Grid in dialog" to start the dialog containing a grid
4) start Accerciser
5) In Accerciser's treeview of the LO a11y hierarchy, select the
   "Grid control" object with a11y table role.
6) Select its first child, which is a table cell.

What could be seen is that the top-left corner of the highlighted
area for the first cell (step 6) is shifted to the right and down
as compareed to the highlighted area for the table (step 5), even
though the first cell in reality has the exact same origin, (because
the table area is defined by the cells it contains).

The AccessibleGridControlBase::implGetBoundingBoxOnScreen overrides
correctly return the bounding box on screen and duplicated much
of the logic.

Fix the problem and deduplicate code by implementing
AccessibleGridControlBase::implGetBoundingBox directly in
AccessibleGridControlBase: Let it calculate the position
relative to the parent from the absolute position of the parent
and of the object itself.

With this in place, the scenario described above now results in
the area highlighted in steps 5) and 6) to have the same top-left
corner.

Change-Id: If28de14d440706bd6493626586f82859e5570e75
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180720
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/toolkit/inc/controls/table/AccessibleGridControl.hxx 
b/toolkit/inc/controls/table/AccessibleGridControl.hxx
index de28396fc402..ffeacebe43f4 100644
--- a/toolkit/inc/controls/table/AccessibleGridControl.hxx
+++ b/toolkit/inc/controls/table/AccessibleGridControl.hxx
@@ -106,9 +106,6 @@ public:
 private:
 // internal virtual methods ---
 
-/** @attention  This method requires locked mutex's and a living object.
-@return  The bounding box (VCL rect.) relative to the parent window. */
-virtual tools::Rectangle implGetBoundingBox() override;
 /** @attention  This method requires locked mutex's and a living object.
 @return  The bounding box (VCL rect.) in screen coordinates. */
 virtual AbsoluteScreenPixelRectangle implGetBoundingBoxOnScreen() override;
diff --git a/toolkit/inc/controls/table/AccessibleGridControlBase.hxx 
b/toolkit/inc/controls/table/AccessibleGridControlBase.hxx
index a5b961f2c88a..92c78652f198 100644
--- a/toolkit/inc/controls/table/AccessibleGridControlBase.hxx
+++ b/toolkit/inc/controls/table/AccessibleGridControlBase.hxx
@@ -198,10 +198,12 @@ protected:
 @return  TRUE, if the object is really showing. */
 bool implIsShowing();
 
-/** Derived classes return the bounding box relative to the parent window.
+/** Return the bounding box relative to the parent.
 @attention  This method requires locked mutex's an

core.git: 2 commits - include/vcl toolkit/inc toolkit/source

2025-01-24 Thread Michael Weghorn (via logerrit)
 include/vcl/accessibletable.hxx|7 ---
 toolkit/inc/controls/table/tablecontrol.hxx|5 -
 toolkit/source/controls/table/tablecontrol.cxx |   25 -
 3 files changed, 37 deletions(-)

New commits:
commit dd3fae8818d0685fb67a2fad8e0b42f3de7c2fea
Author: Michael Weghorn 
AuthorDate: Fri Jan 24 10:29:30 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 24 22:00:36 2025 +0100

toolkit a11y: Drop methods just calling their base class implementations

These were only needed before

commit c6c471546ee82d939092da3ac25a6548145c56c9
Author: Michael Weghorn 
Date:   Thu Jan 23 17:29:32 2025 +0100

toolkit a11y: Use pointers/refs to concrete TableControl class

to be able to call them with only a pointer/ref to the
abstract IAccessibleTable base class.

Change-Id: I9d148babaa4ac7210d9b1d3a81d7361ff8eab438
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180695
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/include/vcl/accessibletable.hxx b/include/vcl/accessibletable.hxx
index e7d49b3935e9..6a8ee6034423 100644
--- a/include/vcl/accessibletable.hxx
+++ b/include/vcl/accessibletable.hxx
@@ -71,11 +71,6 @@ public:
 AccessibleTableControlObjType eObjType ) const= 0;
 
 // Window
-virtual AbsoluteScreenPixelRectangle GetWindowExtentsAbsolute() const = 0;
-virtual tools::Rectangle GetWindowExtentsRelative(const vcl::Window& 
rRelativeWindow) const = 0;
-virtual void GrabFocus()= 0;
-virtual css::uno::Reference< css::accessibility::XAccessible > 
GetAccessible()= 0;
-virtual vcl::Window* GetAccessibleParentWindow() const= 0;
 virtual vcl::Window* GetWindowInstance()= 0;
 virtual sal_Int32 GetAccessibleControlCount() const = 0;
 virtual bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const Point& 
_rPoint )= 0;
diff --git a/toolkit/inc/controls/table/tablecontrol.hxx 
b/toolkit/inc/controls/table/tablecontrol.hxx
index 075e3b83ebe5..72bdcec4fc79 100644
--- a/toolkit/inc/controls/table/tablecontrol.hxx
+++ b/toolkit/inc/controls/table/tablecontrol.hxx
@@ -125,11 +125,6 @@ namespace svt::table
 
 
 // IAccessibleTable
-virtual AbsoluteScreenPixelRectangle GetWindowExtentsAbsolute() const 
override;
-virtual tools::Rectangle GetWindowExtentsRelative(const vcl::Window& 
rRelativeWindow) const override;
-virtual void GrabFocus() override;
-virtual css::uno::Reference< css::accessibility::XAccessible > 
GetAccessible() override;
-virtual vcl::Window* GetAccessibleParentWindow() const override;
 virtual vcl::Window* GetWindowInstance() override;
 virtual sal_Int32 GetAccessibleControlCount() const override;
 virtual bool ConvertPointToControlIndex( sal_Int32& _rnIndex, const 
Point& _rPoint ) override;
diff --git a/toolkit/source/controls/table/tablecontrol.cxx 
b/toolkit/source/controls/table/tablecontrol.cxx
index c5b5ef1c6b78..14cdd539f6f8 100644
--- a/toolkit/source/controls/table/tablecontrol.cxx
+++ b/toolkit/source/controls/table/tablecontrol.cxx
@@ -516,31 +516,6 @@ namespace svt::table
 m_pImpl->commitTableEvent( i_eventID, i_newValue, i_oldValue );
 }
 
-AbsoluteScreenPixelRectangle TableControl::GetWindowExtentsAbsolute() const
-{
-return Control::GetWindowExtentsAbsolute();
-}
-
-tools::Rectangle TableControl::GetWindowExtentsRelative(const vcl::Window& 
rRelativeWindow) const
-{
-return Control::GetWindowExtentsRelative( rRelativeWindow );
-}
-
-void TableControl::GrabFocus()
-{
-Control::GrabFocus();
-}
-
-Reference< XAccessible > TableControl::GetAccessible()
-{
-return Control::GetAccessible();
-}
-
-vcl::Window* TableControl::GetAccessibleParentWindow() const
-{
-return Control::GetAccessibleParentWindow();
-}
-
 vcl::Window* TableControl::GetWindowInstance()
 {
 return this;
commit b7a662e81432bc50ec485f6062cab4b0dc71870c
Author: Michael Weghorn 
AuthorDate: Fri Jan 24 10:15:13 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 24 22:00:23 2025 +0100

Drop unused RowPos typedef

The `RowPos` typedef used e.g. in
toolkit/source/controls/table/tablecontrol_impl.cxx
is defined the same way in toolkit/inc/controls/table/tabletypes.hxx .

Change-Id: Ia9997150f1b9395bf4b7a73b079e0a79639b209e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180694
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/include/vcl/accessibletable.hxx b/include/vcl/accessibletable.hxx
index 5afae8d1bfd1..e7d49b3935e9 100644
--- a/include/vcl/accessibletable.hxx
+++ b/include/vcl/accessibletable.hxx
@@ -30,8 +30,6 @@ namespace vcl { class Window; }
 namespace vcl::table
 {
 
-typedef sal_Int32   RowPos;
-
 enum class AccessibleTableControlObjType
 {

core.git: 2 commits - include/vcl toolkit/inc toolkit/source

2025-01-24 Thread Michael Weghorn (via logerrit)
 include/vcl/accessibletable.hxx  |1 
 toolkit/inc/controls/table/AccessibleGridControlBase.hxx |3 -
 toolkit/inc/controls/table/tablecontrol.hxx  |1 
 toolkit/source/controls/table/AccessibleGridControlBase.cxx  |   24 
+-
 toolkit/source/controls/table/AccessibleGridControlTableCell.cxx |3 -
 toolkit/source/controls/table/tablecontrol.cxx   |5 --
 6 files changed, 13 insertions(+), 24 deletions(-)

New commits:
commit 3e447bcca78dec8c2b8f3499969641e008ad7e7f
Author: Michael Weghorn 
AuthorDate: Fri Jan 24 11:35:31 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 24 22:01:23 2025 +0100

toolkit a11y: Drop AccessibleGridControlBase::{g,s}etClientId

The AccessibleGridControlBase::m_aClientId is
(and should only be) used by the class itself, not by subclasses,
so access the member directly and drop the protected getter
and setter.

Change-Id: I987cad89c7aec48fb0286d7b24e9b282db3b536c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180711
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/toolkit/inc/controls/table/AccessibleGridControlBase.hxx 
b/toolkit/inc/controls/table/AccessibleGridControlBase.hxx
index e4a406cb6ebc..a5b961f2c88a 100644
--- a/toolkit/inc/controls/table/AccessibleGridControlBase.hxx
+++ b/toolkit/inc/controls/table/AccessibleGridControlBase.hxx
@@ -232,9 +232,6 @@ protected:
 /// @throws css::lang::DisposedException
 AbsoluteScreenPixelRectangle getBoundingBoxOnScreen();
 
-::comphelper::AccessibleEventNotifier::TClientId getClientId() const { 
return m_aClientId; }
-void setClientId(::comphelper::AccessibleEventNotifier::TClientId 
_aNewClientId) { m_aClientId = _aNewClientId; }
-
 protected:
 // members
 
diff --git a/toolkit/source/controls/table/AccessibleGridControlBase.cxx 
b/toolkit/source/controls/table/AccessibleGridControlBase.cxx
index bafb961f6e56..9fc195a0b68c 100644
--- a/toolkit/source/controls/table/AccessibleGridControlBase.cxx
+++ b/toolkit/source/controls/table/AccessibleGridControlBase.cxx
@@ -74,10 +74,10 @@ void SAL_CALL AccessibleGridControlBase::disposing()
 {
 SolarMutexGuard g;
 
-if ( getClientId( ) )
+if (m_aClientId)
 {
-AccessibleEventNotifier::TClientId nId( getClientId( ) );
-setClientId( 0 );
+AccessibleEventNotifier::TClientId nId = m_aClientId;
+m_aClientId = 0;
 AccessibleEventNotifier::revokeClientNotifyDisposing( nId, *this );
 }
 
@@ -217,30 +217,30 @@ void SAL_CALL 
AccessibleGridControlBase::addAccessibleEventListener(
 {
 SolarMutexGuard g;
 
-if ( !getClientId( ) )
-setClientId( AccessibleEventNotifier::registerClient( ) );
+if (!m_aClientId)
+m_aClientId = AccessibleEventNotifier::registerClient();
 
-AccessibleEventNotifier::addEventListener( getClientId( ), _rxListener 
);
+AccessibleEventNotifier::addEventListener(m_aClientId, _rxListener );
 }
 }
 
 void SAL_CALL AccessibleGridControlBase::removeAccessibleEventListener(
 const css::uno::Reference< 
css::accessibility::XAccessibleEventListener>& _rxListener )
 {
-if( !(_rxListener.is() && getClientId( )) )
+if (!(_rxListener.is() && m_aClientId))
 return;
 
 SolarMutexGuard g;
 
-sal_Int32 nListenerCount = AccessibleEventNotifier::removeEventListener( 
getClientId( ), _rxListener );
+sal_Int32 nListenerCount = 
AccessibleEventNotifier::removeEventListener(m_aClientId, _rxListener);
 if ( !nListenerCount )
 {
 // no listeners anymore
 // -> revoke ourself. This may lead to the notifier thread dying (if 
we were the last client),
 // and at least to us not firing any events anymore, in case somebody 
calls
 // NotifyAccessibleEvent, again
-AccessibleEventNotifier::TClientId nId( getClientId( ) );
-setClientId( 0 );
+AccessibleEventNotifier::TClientId nId = m_aClientId;
+m_aClientId = 0;
 AccessibleEventNotifier::revokeClient( nId );
 }
 }
@@ -340,7 +340,7 @@ void AccessibleGridControlBase::commitEvent(
 {
 SolarMutexGuard g;
 
-if ( !getClientId( ) )
+if (!m_aClientId)
 // if we don't have a client id for the notifier, then we don't 
have listeners, then
 // we don't need to notify anything
 return;
@@ -350,7 +350,7 @@ void AccessibleGridControlBase::commitEvent(
 
 // let the notifier handle this event
 
-AccessibleEventNotifier::addEvent( getClientId( ), aEvent );
+AccessibleEventNotifier::addEvent(m_aClientId, aEvent);
 }
 
 sal_Int16 SAL_CALL AccessibleGridControlBase::getAccessibleRole()
commit d38bb9e0a9a192ccc6f5c71c9e173cc95e709119
Author: Michael Weghorn 
AuthorDate: Fri Jan 24 10:43:39 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 24 22:01:11 2025 +0100


core.git: download.lst

2025-01-24 Thread Xisco Fauli (via logerrit)
 download.lst |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 8fad479890379e2f010fbf0be29f8f97e6e85904
Author: Xisco Fauli 
AuthorDate: Fri Jan 24 21:08:04 2025 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 24 22:15:21 2025 +0100

libpng: upgrade to 1.6.46

Downloaded from 
https://netix.dl.sourceforge.net/project/libpng/libpng16/1.6.46/libpng-1.6.46.tar.xz

Change-Id: I532674663e66e294f92269d2ac0b748b8afb8543
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180730
Reviewed-by: Xisco Fauli 
Tested-by: Jenkins

diff --git a/download.lst b/download.lst
index b380d0307978..014dacbcff4b 100644
--- a/download.lst
+++ b/download.lst
@@ -568,8 +568,8 @@ PIXMAN_TARBALL := pixman-0.42.2.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-LIBPNG_SHA256SUM := 
926485350139ffb51ef69760db35f78846c805fef3d59bfdcb2fba704663f370
-LIBPNG_TARBALL := libpng-1.6.45.tar.xz
+LIBPNG_SHA256SUM := 
f3aa8b7003998ab92a4e9906c18d19853e999f9d3bca9bd1668f54fa81707cb1
+LIBPNG_TARBALL := libpng-1.6.46.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts


core.git: sw/qa sw/source

2025-01-24 Thread Michael Stahl (via logerrit)
 sw/qa/extras/layout/data/table-split-bug.fodt |  440 ++
 sw/qa/extras/layout/layout.cxx|   41 ++
 sw/source/core/layout/ssfrm.cxx   |2 
 3 files changed, 482 insertions(+), 1 deletion(-)

New commits:
commit 225ce4b678f5f0241bf3757d9ab7e5223866c431
Author: Michael Stahl 
AuthorDate: Thu Jan 23 20:07:42 2025 +0100
Commit: Michael Stahl 
CommitDate: Fri Jan 24 20:22:56 2025 +0100

sw: layout: fix bad split table resulting in empty cell

The problem is that the table goes into an infinite loop of splitting
and joining, because there is a temporarily negative PrtArea height in
the top row's cells (-170), because of setting all heights to 0.

This causes an inconsistency where it is first joined because in
ShouldBwdMoved() another line of text in the right column cell can move
backward, but then there isn't enough space for another row as the
negative cell PrtArea height is added to the available space and so the
line won't fit in SwTextFrameBreak::IsInside(); the same situation
occurs until a "Looping Louie" aborts the iteration with a bad result.

This is somehow caused by the hidden section following the table, but
not sure how exactly (the "if (pNxt->IsHiddenNow()) bCalcNxt = false"
suspect code was actually added in a later commit).

Prevent it by preventing negative PrtArea heights.

(regression from commit 0c96119895b347f8eb5bb89f393351bd3c02b9f1)

Change-Id: I36ce8a8bf750cf407cece5ad3cc23374182179de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180719
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/extras/layout/data/table-split-bug.fodt 
b/sw/qa/extras/layout/data/table-split-bug.fodt
new file mode 100644
index ..935899af2a82
--- /dev/null
+++ b/sw/qa/extras/layout/data/table-split-bug.fodt
@@ -0,0 +1,440 @@
+
+http://openoffice.org/2009/office"; 
xmlns:css3t="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:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:dc="http://purl.org/dc/eleme
 nts/1.1/" xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 
xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0"
 xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0
 " xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; office:version="1.2" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ 
+  
+   0
+   0
+   21987
+   17704
+   false
+   false
+   
+
+ view2
+ 3401
+ 11201
+ 0
+ 0
+ 21985
+ 17702
+ 3
+ 0
+ false
+ 84
+ false
+ true
+
+   
+  
+  
+   false
+   false
+   false
+   true
+   true
+   true
+   true
+   true
+   false
+   0
+   true
+   false
+   false
+   false
+   false
+   true
+   false
+   true
+   false
+   false
+   true
+   true
+   true
+   false
+   false
+   false
+   false
+   false
+   false
+   true
+   false
+   false
+   false
+   false
+   true
+   false
+   false
+   false
+   0
+   1
+   true
+   ADRESSEN
+   high-resolution
+   true
+   
+   Adreßbuch
+   true
+   false
+   true
+   false
+   true
+   true
+   false
+   true
+   
+
+ de
+ DE
+ 
+ 
+ 
+
+
+ en
+ US
+ 
+ 
+ 
+
+   
+   tru

core.git: Branch 'distro/collabora/co-24.04' - 2 commits - sfx2/source

2025-01-24 Thread Miklos Vajna (via logerrit)
 sfx2/source/doc/objmisc.cxx |   20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

New commits:
commit a2ca28d58bc7f5fa46144c64af371eda93044fbe
Author: Miklos Vajna 
AuthorDate: Fri Jan 24 08:31:13 2025 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 24 10:42:03 2025 +0100

cool#11002 sfx2: fix uncaught exception in SfxObjectShell::isExportLocked()

Similar to commit 71aa5352f6f57283d1db51c980f6f0b802381871 (sfx2: fix
uncaught exception in SfxObjectShell::isEditDocLocked(), 2025-01-23).

This seems to be the last problem with this pattern.

Change-Id: Ibaceb23beaff808d9f192fd55505361bf74016b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180683
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index cff95996460c..0c880d7914fb 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -2054,7 +2054,15 @@ bool SfxObjectShell::isExportLocked() const
 Reference xModel = GetModel();
 if (!xModel.is())
 return false;
-return comphelper::NamedValueCollection::getOrDefault(xModel->getArgs2( { 
"LockExport" } ), u"LockExport", false);
+try
+{
+return 
comphelper::NamedValueCollection::getOrDefault(xModel->getArgs2( { "LockExport" 
} ), u"LockExport", false);
+}
+catch (const uno::RuntimeException&)
+{
+TOOLS_WARN_EXCEPTION("sfx.appl", "unexpected RuntimeException");
+}
+return false;
 }
 
 bool SfxObjectShell::isPrintLocked() const
commit 825ba76626c9db981b5f1186e064d7779881b48b
Author: Miklos Vajna 
AuthorDate: Fri Jan 24 08:13:51 2025 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 24 10:41:57 2025 +0100

cool#11002 sfx2: fix uncaught exception in 
SfxObjectShell::isContentExtractionLocked()

Similar to commit 71aa5352f6f57283d1db51c980f6f0b802381871 (sfx2: fix
uncaught exception in SfxObjectShell::isEditDocLocked(), 2025-01-23).

Change-Id: I9f6c35c8b2934fee193a4c4211f4d3fbcad12aab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180682
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 607f2074577d..cff95996460c 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -2038,7 +2038,15 @@ bool SfxObjectShell::isContentExtractionLocked() const
 Reference xModel = GetModel();
 if (!xModel.is())
 return false;
-return comphelper::NamedValueCollection::getOrDefault(xModel->getArgs2( { 
"LockContentExtraction" } ), u"LockContentExtraction", false);
+try
+{
+return 
comphelper::NamedValueCollection::getOrDefault(xModel->getArgs2( { 
"LockContentExtraction" } ), u"LockContentExtraction", false);
+}
+catch (const uno::RuntimeException&)
+{
+TOOLS_WARN_EXCEPTION("sfx.appl", "unexpected RuntimeException");
+}
+return false;
 }
 
 bool SfxObjectShell::isExportLocked() const


Tea Time Training, week 4

2025-01-24 Thread Miklos Vajna
Hi,

We run a Tea Time Training (TTT) on Fridays. The topics are typically
focused around LibreOffice Technology and Collabora Online.

These are developer-centric calls & opportunity to ask questions to the
experts right there.

The session today is at 13:00 CET.

Topic: Glade – and accessibility – how to find things in dialogs by Caolán 
McNamara

Duration: 15-45 minutes

Join via this link: https://meet.jit.si/Fri-TTT-CPTEAM

More info about TTTs in general: 
https://collaboraonline.github.io/post/communicate/#tea-time-trainings

Regards,

Miklos


core.git: Branch 'libreoffice-25-2' - toolkit/source

2025-01-24 Thread Michael Weghorn (via logerrit)
 toolkit/source/controls/svtxgridcontrol.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bf5af7725bbd53c70596723e7fc9548d3d89c427
Author: Michael Weghorn 
AuthorDate: Thu Jan 23 14:37:07 2025 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jan 24 11:40:48 2025 +0100

tdf#164783 toolkit a11y: Only send event for current cell if there's one

TableControl::commitCellEventIfAccessibleAlive sends an event
on the currently selected/active cell. So only call it in
SVTXGridControl::ProcessWindowEvent when there is one.

Use TableControl::GetCurrentRow and TableControl::GetCurrentColumn
to check that, which return a special value (of -2) for the case there
is no active cell.

For TableControl::GetCurrentRow:

/** retrieves the current row

The current row is the one which contains the active cell.

@return
the row index of the active cell, or ->ROW_INVALID
if there is no active cell, e.g. because the table does
not contain any rows or columns.
*/
sal_Int32 GetCurrentRow() const override;

The previous check whether the table has any rows was insufficient
and resulted in an invalid attempt to access vector elements at
negative indices.

For the tdf#164783 scenario:


/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
In function:
reference

std::vector>::operator[](size_type)
[_Tp = 
rtl::Reference,
_Allocator =

std::allocator>]

Error: attempt to subscript container with out-of-bounds index -6, but
container only holds 60 elements.

Objects involved in the operation:
sequence "this" @ 0x5638c74e2350 {
  type = 
std::debug::vector,
 std::allocator > 
>;
}

/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
In function:
reference

std::vector>::operator[](size_type)
[_Tp = 
rtl::Reference,
_Allocator =

std::allocator>]

Error: attempt to subscript container with out-of-bounds index -6, but
container only holds 60 elements.

Objects involved in the operation:
sequence "this" @ 0x5638c74e2350 {
  type = 
std::debug::vector,
 std::allocator > 
>;
}
sequence "this" @ 0x5638c74e2350 {
  type = 
std::debug::vector,
 std::allocator > 
>;
}

Fatal exception: Signal 6
Stack:
#0 sal::backtrace_get(unsigned int) at 
.../libreoffice/sal/osl/unx/backtraceapi.cxx:42
#1 (anonymous namespace)::printStack(int) at 
.../libreoffice/sal/osl/unx/signal.cxx:289
#2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at 
.../libreoffice/sal/osl/unx/signal.cxx:330
#3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) 
at .../libreoffice/sal/osl/unx/signal.cxx:427
#4 /lib/x86_64-linux-gnu/libc.so.6(+0x3fda0) [0x7f7544649da0]
#5 __pthread_kill_implementation at ./nptl/pthread_kill.c:44 
(discriminator 1)
#6 raise at ./signal/../sysdeps/posix/raise.c:27
#7 abort at ./stdlib/abort.c:81
#8 std::__throw_bad_exception() in /lib/x86_64-linux-gnu/libstdc++.so.6
#9 
std::__debug::vector,
 
std::allocator>>::operator[](unsigned
 long) at 
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508
#10 accessibility::AccessibleGridControlTable::getAccessibleChild(long) 
at .../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:66
#11 accessibility::AccessibleGridControlTable::getAccessibleCellAt(int, 
int) at 
.../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:191
#12 accessibility::AccessibleGridControl::commitCellEvent(short, 
com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at 
.../libreoffice/vcl/source/accessibility/AccessibleGridControl.cxx:272
#13 accessibility::AccessibleGridControlAccess::commitCellEvent(short, 
com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at 
.../libreoffice/vcl/inc/accessibility/AccessibleGridControl.hxx:197
#14 svt::table::TableControl_Impl::commitCellEvent(short, 
com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at 
.../libreoffice/toolkit/source/controls/table/tablecontrol_impl.cxx:2304
#15 svt::table::TableControl::commitCellEventIfAccessibleAlive(short, 
com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at 
.../libreoffice/toolkit/source/controls/table/tablecontrol.cxx:470
#16 SVTXGridControl::ProcessWindowEvent(VclWindowEvent const&) at 
.../libreoffice/toolkit/source/controls/svtxgridcon

core.git: Branch 'libreoffice-24-8' - toolkit/source

2025-01-24 Thread Michael Weghorn (via logerrit)
 toolkit/source/controls/svtxgridcontrol.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 1cc254f10bc39eb605ab442cdfac35ad41a0ebb4
Author: Michael Weghorn 
AuthorDate: Thu Jan 23 14:37:07 2025 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jan 24 11:40:58 2025 +0100

tdf#164783 toolkit a11y: Only send event for current cell if there's one

TableControl::commitCellEventIfAccessibleAlive sends an event
on the currently selected/active cell. So only call it in
SVTXGridControl::ProcessWindowEvent when there is one.

Use TableControl::GetCurrentRow and TableControl::GetCurrentColumn
to check that, which return a special value (of -2) for the case there
is no active cell.

For TableControl::GetCurrentRow:

/** retrieves the current row

The current row is the one which contains the active cell.

@return
the row index of the active cell, or ->ROW_INVALID
if there is no active cell, e.g. because the table does
not contain any rows or columns.
*/
sal_Int32 GetCurrentRow() const override;

The previous check whether the table has any rows was insufficient
and resulted in an invalid attempt to access vector elements at
negative indices.

For the tdf#164783 scenario:


/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
In function:
reference

std::vector>::operator[](size_type)
[_Tp = 
rtl::Reference,
_Allocator =

std::allocator>]

Error: attempt to subscript container with out-of-bounds index -6, but
container only holds 60 elements.

Objects involved in the operation:
sequence "this" @ 0x5638c74e2350 {
  type = 
std::debug::vector,
 std::allocator > 
>;
}

/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508:
In function:
reference

std::vector>::operator[](size_type)
[_Tp = 
rtl::Reference,
_Allocator =

std::allocator>]

Error: attempt to subscript container with out-of-bounds index -6, but
container only holds 60 elements.

Objects involved in the operation:
sequence "this" @ 0x5638c74e2350 {
  type = 
std::debug::vector,
 std::allocator > 
>;
}
sequence "this" @ 0x5638c74e2350 {
  type = 
std::debug::vector,
 std::allocator > 
>;
}

Fatal exception: Signal 6
Stack:
#0 sal::backtrace_get(unsigned int) at 
.../libreoffice/sal/osl/unx/backtraceapi.cxx:42
#1 (anonymous namespace)::printStack(int) at 
.../libreoffice/sal/osl/unx/signal.cxx:289
#2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at 
.../libreoffice/sal/osl/unx/signal.cxx:330
#3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) 
at .../libreoffice/sal/osl/unx/signal.cxx:427
#4 /lib/x86_64-linux-gnu/libc.so.6(+0x3fda0) [0x7f7544649da0]
#5 __pthread_kill_implementation at ./nptl/pthread_kill.c:44 
(discriminator 1)
#6 raise at ./signal/../sysdeps/posix/raise.c:27
#7 abort at ./stdlib/abort.c:81
#8 std::__throw_bad_exception() in /lib/x86_64-linux-gnu/libstdc++.so.6
#9 
std::__debug::vector,
 
std::allocator>>::operator[](unsigned
 long) at 
/usr/lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/debug/vector:508
#10 accessibility::AccessibleGridControlTable::getAccessibleChild(long) 
at .../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:66
#11 accessibility::AccessibleGridControlTable::getAccessibleCellAt(int, 
int) at 
.../libreoffice/vcl/source/accessibility/AccessibleGridControlTable.cxx:191
#12 accessibility::AccessibleGridControl::commitCellEvent(short, 
com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at 
.../libreoffice/vcl/source/accessibility/AccessibleGridControl.cxx:272
#13 accessibility::AccessibleGridControlAccess::commitCellEvent(short, 
com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at 
.../libreoffice/vcl/inc/accessibility/AccessibleGridControl.hxx:197
#14 svt::table::TableControl_Impl::commitCellEvent(short, 
com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at 
.../libreoffice/toolkit/source/controls/table/tablecontrol_impl.cxx:2304
#15 svt::table::TableControl::commitCellEventIfAccessibleAlive(short, 
com::sun::star::uno::Any const&, com::sun::star::uno::Any const&) at 
.../libreoffice/toolkit/source/controls/table/tablecontrol.cxx:470
#16 SVTXGridControl::ProcessWindowEvent(VclWindowEvent const&) at 
.../libreoffice/toolkit/source/controls/svtxgridcon

core.git: sfx2/inc sfx2/source sfx2/uiconfig

2025-01-24 Thread bruh (via logerrit)
 sfx2/inc/guisaveas.hxx  |1 +
 sfx2/source/dialog/alienwarn.cxx|   11 ++-
 sfx2/source/doc/guisaveas.cxx   |9 ++---
 sfx2/source/inc/alienwarn.hxx   |3 ++-
 sfx2/uiconfig/ui/alienwarndialog.ui |4 ++--
 5 files changed, 21 insertions(+), 7 deletions(-)

New commits:
commit cc42d34ce938352135fb405a47d5bc7e5d929e1b
Author: bruh 
AuthorDate: Thu Jan 23 00:58:41 2025 +0530
Commit: Mike Kaganski 
CommitDate: Fri Jan 24 12:58:19 2025 +0100

tdf#158624 -  Improve warning dialogue for non-recommended formats during 
save

Implemented changes to display the recommended file extension in the
warning dialogue when a non-recommended extension is selected during
document save. This improves user guidance and ensures better file
format compatibility.

Change-Id: I08208a8968f37a4dfeb34623402004b41a0a2c34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180605
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/sfx2/inc/guisaveas.hxx b/sfx2/inc/guisaveas.hxx
index a1f85bbc2248..d6a037f4ed26 100644
--- a/sfx2/inc/guisaveas.hxx
+++ b/sfx2/inc/guisaveas.hxx
@@ -101,6 +101,7 @@ public:
 static bool WarnUnacceptableFormat(
 const css::uno::Reference< 
css::frame::XModel >& xModel,
 std::u16string_view aOldUIName,
+std::u16string_view aExtension,
 const OUString& aDefExtension,
 bool rDefaultIsAlien );
 
diff --git a/sfx2/source/dialog/alienwarn.cxx b/sfx2/source/dialog/alienwarn.cxx
index 9d96dfa77268..3e9be6970de8 100644
--- a/sfx2/source/dialog/alienwarn.cxx
+++ b/sfx2/source/dialog/alienwarn.cxx
@@ -22,6 +22,7 @@
 
 SfxAlienWarningDialog::SfxAlienWarningDialog(weld::Window* pParent,
  std::u16string_view _rFormatName,
+ std::u16string_view _rExtension,
  const OUString& 
_rDefaultExtension,
  bool rDefaultIsAlien)
 : MessageDialogController(pParent, u"sfx/ui/alienwarndialog.ui"_ustr, 
u"AlienWarnDialog"_ustr,
@@ -32,9 +33,10 @@ SfxAlienWarningDialog::SfxAlienWarningDialog(weld::Window* 
pParent,
 {
 OUString aExtension = u"ODF"_ustr;
 
-// replace formatname (text)
+// replace formatname and extension (text)
 OUString sInfoText = m_xDialog->get_primary_text();
 sInfoText = sInfoText.replaceAll("%FORMATNAME", _rFormatName);
+sInfoText = sInfoText.replaceAll("%EXTENSION", _rExtension);
 m_xDialog->set_primary_text(sInfoText);
 
 // replace formatname (button)
@@ -49,6 +51,13 @@ SfxAlienWarningDialog::SfxAlienWarningDialog(weld::Window* 
pParent,
 m_xDialog->set_secondary_text(OUString());
 aExtension = _rDefaultExtension.toAsciiUpperCase();
 }
+else
+{
+// replace extension (secondary-text)
+sInfoText = m_xDialog->get_secondary_text();
+sInfoText = sInfoText.replaceAll("%EXTENSION", _rDefaultExtension);
+m_xDialog->set_secondary_text(sInfoText);
+}
 
 // replace defaultextension (button)
 sInfoText = m_xUseDefaultFormatBtn->get_label();
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index adfc6c8345fa..7e6be3b5ebab 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -845,14 +845,16 @@ sal_Int8 ModelData_Impl::CheckFilter( const OUString& 
aFilterName )
 // the default filter is acceptable and the old filter is alien one
 // so ask to make a saveAs operation
 const OUString aUIName = 
aFiltPropsHM.getUnpackedValueOrDefault(u"UIName"_ustr, OUString() );
-const OUString aDefUIName = 
aDefFiltPropsHM.getUnpackedValueOrDefault(u"UIName"_ustr, OUString() );
+const OUString aType = aFiltPropsHM.getUnpackedValueOrDefault( 
u"Type"_ustr, OUString() );
+const OUString aExtension = GetRecommendedExtension(aType);
 const OUString aPreusedFilterName = 
GetDocProps().getUnpackedValueOrDefault(u"PreusedFilterName"_ustr, OUString() );
+const OUString aDefUIName = 
aDefFiltPropsHM.getUnpackedValueOrDefault(u"UIName"_ustr, OUString() );
 const OUString aDefType = aDefFiltPropsHM.getUnpackedValueOrDefault( 
u"Type"_ustr, OUString() );
 const OUString aDefExtension = GetRecommendedExtension( aDefType );
 
 if ( aPreusedFilterName != aFilterName && aUIName != aDefUIName )
 {
-if ( !SfxStoringHelper::WarnUnacceptableFormat( GetModel(), 
aUIName, aDefExtension,
+if ( !SfxStoringHelper::WarnUnacceptableFormat( GetModel(), 
aUIName,aExtension, aDefExtension,
 static_cast( 
nDefFiltFlags & SfxFilterFlags::ALIEN ) ) )
 return STAT

core.git: Branch 'libreoffice-25-2' - sw/qa sw/source

2025-01-24 Thread Jonathan Clark (via logerrit)
 sw/qa/extras/layout/data/tdf164803.fodt |  115 
 sw/qa/extras/layout/layout5.cxx |9 ++
 sw/source/core/text/inftxt.cxx  |   13 +++
 3 files changed, 135 insertions(+), 2 deletions(-)

New commits:
commit 57614c6d6c2b95cfac83c22e4ed4a55d439b5cf4
Author: Jonathan Clark 
AuthorDate: Thu Jan 23 09:04:10 2025 -0700
Commit: Michael Stahl 
CommitDate: Fri Jan 24 11:55:30 2025 +0100

tdf#164803 sw: Fix SwTextSizeInfo applying grid metrics without grid

Writer has two grid attributes: the document-level grid item, which
controls whether the grid is enabled; and a paragraph-level grid item,
which controls whether the document grid applies to the paragraph.

Previously, SwTextSizeInfo populated its snap-to-grid flag based only on
the paragraph-level attribute. Downstream code was expected to
double-check that the grid is actually enabled using the document-level
item. As shown by tdf#164803, this is error-prone.

Now, SwTextSizeInfo only sets the snap-to-grid flag when the grid is
enabled by both attributes.

Change-Id: I6528f653748de942f42da11e34ff340cb3db37e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180676
Reviewed-by: Jonathan Clark 
Tested-by: Jenkins
(cherry picked from commit 43fc662520e5488cbeadd6eb60a24374a837dca4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180686
Reviewed-by: Michael Stahl 

diff --git a/sw/qa/extras/layout/data/tdf164803.fodt 
b/sw/qa/extras/layout/data/tdf164803.fodt
new file mode 100644
index ..7a4ef38d8d1b
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf164803.fodt
@@ -0,0 +1,115 @@
+
+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.4" office:mimetype="application/vnd.oasis.opendocument.text">
+ 
2025-01-23T08:44:13.366544373LibreOfficeDev/25.8.0.0.alpha0$Linux_X86_64
 
LibreOffice_project/b811b283c254fb48d8991576dfee0bae3dc322dd2025-01-23T08:58:37.879339983PT5M3S7
+ 
+  
+  
+  
+ 
+ 
+  
+   
+   
+
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+  
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+  
+  
+  
+  
+  
+ 
+  
+   
+   
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+ 
+ 
+  
+ 
+ 
+  
+   
+
+
+
+
+
+   
+   A A A A A A A A A A A A A A A A A A A A A A A 
A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A 
A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A A 
A A A A A A A A A A A A A A A A A A A A A A A A A A A A 
A A A A A A A A A A A A
+  
+ 
+
\ No newline at end of file
diff --git a/sw/qa/extras/layout/layout5.cxx b

core.git: cui/source

2025-01-24 Thread bruh (via logerrit)
 cui/source/dialogs/MacroManagerDialog.cxx |   33 ++
 1 file changed, 20 insertions(+), 13 deletions(-)

New commits:
commit a88b3da5b01403ba593423821843a0dacda158ec
Author: bruh 
AuthorDate: Mon Jan 20 19:56:25 2025 +0530
Commit: Mike Kaganski 
CommitDate: Fri Jan 24 19:18:02 2025 +0100

tdf#158280 Replace usage of InputDialog with SvxNameDialog

Change-Id: Ic70a88f391f1aca9dd7d8429cb1af9678654820e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180514
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/cui/source/dialogs/MacroManagerDialog.cxx 
b/cui/source/dialogs/MacroManagerDialog.cxx
index ebc07902dcb3..11240cc3c4dc 100644
--- a/cui/source/dialogs/MacroManagerDialog.cxx
+++ b/cui/source/dialogs/MacroManagerDialog.cxx
@@ -41,6 +41,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1228,22 +1229,28 @@ void 
MacroManagerDialog::BasicScriptsCreateLibrary(const basctl::ScriptDocument&
  aLibName = CuiResId(STR_LIBRARY) + OUString::number(++i))
 ;
 
-InputDialog aInputDlg(m_xDialog.get(), 
CuiResId(STR_INPUTDIALOG_NEWLIBRARYLABEL));
-aInputDlg.set_title(CuiResId(STR_INPUTDIALOG_NEWLIBRARYTITLE));
-aInputDlg.SetEntryText(aLibName);
-aInputDlg.HideHelpBtn();
-aInputDlg.setCheckEntry([&](OUString sNewName) {
-if (sNewName.isEmpty() || rDocument.hasLibrary(basctl::E_SCRIPTS, 
sNewName)
-|| rDocument.hasLibrary(basctl::E_DIALOGS, sNewName) || 
sNewName.getLength() > 30
-|| !basctl::IsValidSbxName(sNewName))
-return false;
-return true;
-});
+OUString aDesc = CuiResId(STR_INPUTDIALOG_NEWLIBRARYLABEL);
 
-if (!aInputDlg.run())
+SvxNameDialog aNameDialog(m_xDialog.get(), aLibName, aDesc,
+  CuiResId(STR_INPUTDIALOG_NEWLIBRARYTITLE));
+
+aNameDialog.SetCheckNameHdl(Link(
+static_cast(const_cast(&rDocument)),
+[](void* param, SvxNameDialog& dialog) -> bool {
+const basctl::ScriptDocument& rDoc = *static_cast(param);
+OUString sNewName = dialog.GetName();
+if (sNewName.isEmpty() || rDoc.hasLibrary(basctl::E_SCRIPTS, 
sNewName)
+|| rDoc.hasLibrary(basctl::E_DIALOGS, sNewName) || 
sNewName.getLength() > 30
+|| !basctl::IsValidSbxName(sNewName))
+return false;
+return true;
+}));
+;
+
+if (aNameDialog.run() != RET_OK)
 return;
 
-aLibName = aInputDlg.GetEntryText();
+aLibName = aNameDialog.GetName();
 
 try
 {


core.git: bin/ui-translatable.sh

2025-01-24 Thread Gabor Kelemen (via logerrit)
 bin/ui-translatable.sh |   10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 9701fa96d9a64a9d6374447a0cdb62b5746d3b9a
Author: Gabor Kelemen 
AuthorDate: Fri Jan 24 17:20:48 2025 +0100
Commit: Gabor Kelemen 
CommitDate: Fri Jan 24 21:29:13 2025 +0100

More readable grep output from bin/ui-translatable.sh

Change-Id: I3faea6bf893c6c70d4fcf71146796530be062b6e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180721
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/bin/ui-translatable.sh b/bin/ui-translatable.sh
index e3240826b22c..8853bc81956f 100755
--- a/bin/ui-translatable.sh
+++ b/bin/ui-translatable.sh
@@ -10,13 +10,7 @@
 
 for i in `git ls-files *.ui`; do
 for j in "label" "title" "text" "format" "copyright" "comments" 
"preview_text" "tooltip" "message" ; do
-grep -s "\.*[A-Za-z].*<";
-if [ "$?" -eq 0 ] ;
-then echo "Source: $i^";
-fi
+grep -Hns "\.*[A-Za-z].*<";
 done
-grep -s ".*[A-Za-z].*<";
-if [ "$?" -eq 0 ] ;
-then echo "Source: $i^";
-fi
+grep -Hns ".*[A-Za-z].*<";
 done


core.git: 2 commits - toolkit/source

2025-01-24 Thread Michael Weghorn (via logerrit)
 toolkit/source/controls/table/AccessibleGridControlTableCell.cxx |6 +--
 toolkit/source/controls/table/tablecontrol_impl.cxx  |   18 
+++---
 2 files changed, 9 insertions(+), 15 deletions(-)

New commits:
commit ea0faaf9bb1fab2044e6cef9bc8e3d03f63896ec
Author: Michael Weghorn 
AuthorDate: Fri Jan 24 16:06:00 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 24 22:01:40 2025 +0100

toolkit: Use method with return value instead of out param

Return direct uses of TableControl_Impl::impl_getCellRect
with uses of TableControl_Impl::calcCellRect
that returns the Rectangle instead of taking an
out Rectangle& param.

(Note that the order of the row/col index params is
reversed in both methods.)

Change-Id: I32af4c14d6193c12bd0bbc91dde14bb526abc48e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180717
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/toolkit/source/controls/table/tablecontrol_impl.cxx 
b/toolkit/source/controls/table/tablecontrol_impl.cxx
index c4bdf8834a69..2a3112cc8841 100644
--- a/toolkit/source/controls/table/tablecontrol_impl.cxx
+++ b/toolkit/source/controls/table/tablecontrol_impl.cxx
@@ -1657,8 +1657,7 @@ namespace svt::table
 PTableRenderer pRenderer = m_pModel ? m_pModel->getRenderer() : 
PTableRenderer();
 if ( pRenderer )
 {
-tools::Rectangle aCellRect;
-impl_getCellRect( m_nCurColumn, m_nCurRow, aCellRect );
+tools::Rectangle aCellRect = calcCellRect(m_nCurRow, m_nCurColumn);
 if ( _bShow )
 pRenderer->ShowCellCursor( *m_pDataWindow, aCellRect );
 else
@@ -1825,27 +1824,24 @@ namespace svt::table
 // if only one row is selected
 if ( _nPrevRow == _nCurRow )
 {
-tools::Rectangle aCellRect;
-impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect );
+tools::Rectangle aCellRect = calcCellRect(_nCurRow, m_nCurColumn);
 aInvalidateRect.SetTop( aCellRect.Top() );
 aInvalidateRect.SetBottom( aCellRect.Bottom() );
 }
 //if the region is above the current row
 else if(_nPrevRow < _nCurRow )
 {
-tools::Rectangle aCellRect;
-impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect );
+tools::Rectangle aCellRect = calcCellRect(_nPrevRow, m_nCurColumn);
 aInvalidateRect.SetTop( aCellRect.Top() );
-impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect );
+aCellRect = calcCellRect(_nCurRow, m_nCurColumn);
 aInvalidateRect.SetBottom( aCellRect.Bottom() );
 }
 //if the region is beneath the current row
 else
 {
-tools::Rectangle aCellRect;
-impl_getCellRect( m_nCurColumn, _nCurRow, aCellRect );
+tools::Rectangle aCellRect = calcCellRect(_nCurRow, m_nCurColumn);
 aInvalidateRect.SetTop( aCellRect.Top() );
-impl_getCellRect( m_nCurColumn, _nPrevRow, aCellRect );
+aCellRect = calcCellRect(_nPrevRow, m_nCurColumn);
 aInvalidateRect.SetBottom( aCellRect.Bottom() );
 }
 
commit af3c7a31ea2cb979fa5819d103438ace17864472
Author: Michael Weghorn 
AuthorDate: Fri Jan 24 15:21:48 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 24 22:01:31 2025 +0100

toolkit a11y: Deobfuscate TableControl::calcCellRect

In the only 2 callers of this method, the logic
so far was this:

1) Retrieve the child index, which is calculated
   from the row index + column index.

2) Revert the calculation from step 1 by calculating
   the row and column index from the child index.

3) Pass the column index calculated this way as the
   `_nRowPos` param and the row index as the
   `_nColPos` param to TableControl::calcCellRect.
   (Note that the param order is reversed from what
   at least I would naively have expected from looking
   at the param names.)

4) In TableControl::calcCellRect, call
   TableControl_Impl::calcCellRect, passing the `_nRowPos`
   param as the `nRow` param and the `_nColPos` as the
   `nCol` param.
   (That looks reasonable.)

5) In TableControl_Impl::calcCellRect,
   call TableControl_Impl::impl_getCellRect, which
   takes row index and column index in the reverse
   order. Pass the TableControl::calcCellRect's
   `nRow` param as TableControl_Impl::impl_getCellRect's
   `_nColumn` param and vice versa.
   (Note that using `_nRowPos`/`nRow` for the row index in
   one method and for the column pos in the other
   method is not what I would naively have expected,
   but together with 3), the order is correct again.)

Make this a bit less confusing by skipping steps 1) and 2)
and consistently using `_nRowPos`/`nRow` as param name for
th

core.git: cui/source

2025-01-24 Thread Xisco Fauli (via logerrit)
 cui/source/dialogs/MacroManagerDialog.cxx |   33 +++---
 1 file changed, 13 insertions(+), 20 deletions(-)

New commits:
commit b9fd8cc18a9cd5cd4ae86b4256cf8786ea34ea89
Author: Xisco Fauli 
AuthorDate: Fri Jan 24 21:00:42 2025 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 24 22:41:58 2025 +0100

Revert "tdf#158280 Replace usage of InputDialog with SvxNameDialog"

This reverts commit a88b3da5b01403ba593423821843a0dacda158ec.

Reason for revert: it breaks the build because there was a mid-air
collision with
commit b811b283c254fb48d8991576dfee0bae3dc322dd
Author: Stephan Bergmann 
Date:   Wed Jan 22 12:54:21 2025 +0100

Extend the Link DBG_UTIL support to non-member function Links

Change-Id: I674b91fbfecae16204bb9d7560ec7ad56f348a5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180728
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/cui/source/dialogs/MacroManagerDialog.cxx 
b/cui/source/dialogs/MacroManagerDialog.cxx
index 11240cc3c4dc..ebc07902dcb3 100644
--- a/cui/source/dialogs/MacroManagerDialog.cxx
+++ b/cui/source/dialogs/MacroManagerDialog.cxx
@@ -41,7 +41,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #include 
 #include 
@@ -1229,28 +1228,22 @@ void 
MacroManagerDialog::BasicScriptsCreateLibrary(const basctl::ScriptDocument&
  aLibName = CuiResId(STR_LIBRARY) + OUString::number(++i))
 ;
 
-OUString aDesc = CuiResId(STR_INPUTDIALOG_NEWLIBRARYLABEL);
-
-SvxNameDialog aNameDialog(m_xDialog.get(), aLibName, aDesc,
-  CuiResId(STR_INPUTDIALOG_NEWLIBRARYTITLE));
-
-aNameDialog.SetCheckNameHdl(Link(
-static_cast(const_cast(&rDocument)),
-[](void* param, SvxNameDialog& dialog) -> bool {
-const basctl::ScriptDocument& rDoc = *static_cast(param);
-OUString sNewName = dialog.GetName();
-if (sNewName.isEmpty() || rDoc.hasLibrary(basctl::E_SCRIPTS, 
sNewName)
-|| rDoc.hasLibrary(basctl::E_DIALOGS, sNewName) || 
sNewName.getLength() > 30
-|| !basctl::IsValidSbxName(sNewName))
-return false;
-return true;
-}));
-;
+InputDialog aInputDlg(m_xDialog.get(), 
CuiResId(STR_INPUTDIALOG_NEWLIBRARYLABEL));
+aInputDlg.set_title(CuiResId(STR_INPUTDIALOG_NEWLIBRARYTITLE));
+aInputDlg.SetEntryText(aLibName);
+aInputDlg.HideHelpBtn();
+aInputDlg.setCheckEntry([&](OUString sNewName) {
+if (sNewName.isEmpty() || rDocument.hasLibrary(basctl::E_SCRIPTS, 
sNewName)
+|| rDocument.hasLibrary(basctl::E_DIALOGS, sNewName) || 
sNewName.getLength() > 30
+|| !basctl::IsValidSbxName(sNewName))
+return false;
+return true;
+});
 
-if (aNameDialog.run() != RET_OK)
+if (!aInputDlg.run())
 return;
 
-aLibName = aNameDialog.GetName();
+aLibName = aInputDlg.GetEntryText();
 
 try
 {


core.git: sw/source

2025-01-24 Thread Balazs Varga (via logerrit)
 sw/source/ui/frmdlg/frmpage.cxx |   15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 81f7503d2d205f4f6df0bfd1a66ed10cccb556c2
Author: Balazs Varga 
AuthorDate: Mon Jan 20 14:40:49 2025 +0100
Commit: Balazs Varga 
CommitDate: Fri Jan 24 10:03:39 2025 +0100

tdf#132853 - UI: fix different sizes in Image tabs Type & Crop

Sincornize Graphic frame size and frame size values in Writer
"Position and Size" tab and "Crop" tab.

Change-Id: Ifc325bb510ac4d2376ec5be791aadb7df81e8ff5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180510
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
Reviewed-by: Balazs Varga 

diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 5de4a804bbf0..d4265da6df75 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -1351,6 +1351,12 @@ bool SwFramePage::FillItemSet(SfxItemSet *rSet)
 aSz.SetHeightSizeType(SwFrameSize::Minimum);
 
 bRet |= nullptr != rSet->Put( aSz );
+if (bRet)
+{
+SvxSizeItem aGSz(SID_ATTR_GRAF_FRMSIZE);
+aGSz.SetSize(aSz.GetSize());
+bRet |= nullptr != rSet->Put(aGSz);
+}
 }
 if (m_xFollowTextFlowCB->get_state_changed_from_saved())
 {
@@ -2296,7 +2302,14 @@ void SwFramePage::Init(const SfxItemSet& rSet)
 }
 }
 
-const SwFormatFrameSize& rSize = rSet.Get(RES_FRM_SIZE);
+SwFormatFrameSize rSize = rSet.Get(RES_FRM_SIZE);
+// size could already have been set from another (Crop) page
+if (const SvxSizeItem* pSizeItem = 
rSet.GetItemIfSet(SID_ATTR_GRAF_FRMSIZE, false))
+{
+if (pSizeItem->GetSize() != rSize.GetSize())
+rSize.SetSize(pSizeItem->GetSize());
+}
+
 sal_Int64 nWidth  = m_xWidthED->NormalizePercent(rSize.GetWidth());
 sal_Int64 nHeight = m_xHeightED->NormalizePercent(rSize.GetHeight());
 


core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2025-01-24 Thread Xisco Fauli (via logerrit)
 formula/inc/core_resource.hrc|6 
 formula/source/core/api/FormulaCompiler.cxx  |1 
 include/formula/compiler.hxx |   15 
 include/formula/opcode.hxx   |2 
 sc/README.md |1 
 sc/inc/helpids.h |1 
 sc/inc/scfuncs.hrc   |   12 
 sc/qa/extras/scfunctionlistobj.cxx   |2 
 sc/qa/unit/data/functions/spreadsheet/fods/drop.fods | 5543 +++
 sc/qa/unit/ucalc.cxx |1 
 sc/source/core/data/funcdesc.cxx |1 
 sc/source/core/inc/interpre.hxx  |1 
 sc/source/core/tool/interpr1.cxx |  136 
 sc/source/core/tool/interpr4.cxx |1 
 sc/source/core/tool/parclass.cxx |1 
 sc/source/core/tool/token.cxx|1 
 sc/source/filter/excel/xlformula.cxx |1 
 sc/source/filter/oox/formulabase.cxx |1 
 18 files changed, 5719 insertions(+), 8 deletions(-)

New commits:
commit 9bf96332b57efdff2755ec498cda17408ff5deca
Author: Xisco Fauli 
AuthorDate: Thu Jan 23 20:21:53 2025 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 24 10:08:51 2025 +0100

tdf#150998: Add support for DROP function

Change-Id: Id84cbf25e655410c3fac655cd88f1d74dc98defd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180673
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 5791ea03bd39..712f60817abc 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -281,6 +281,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "COM.MICROSOFT.FILTER" , SC_OPCODE_FILTER },
 { "COM.MICROSOFT.SORT" , SC_OPCODE_SORT },
 { "COM.MICROSOFT.SORTBY" , SC_OPCODE_SORTBY },
+{ "COM.MICROSOFT.DROP" , SC_OPCODE_DROP },
 { "COM.MICROSOFT.TAKE" , SC_OPCODE_TAKE },
 { "COM.MICROSOFT.TOCOL" , SC_OPCODE_TOCOL },
 { "COM.MICROSOFT.TOROW" , SC_OPCODE_TOROW },
@@ -743,6 +744,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "_xlfn._xlws.FILTER" , SC_OPCODE_FILTER },
 { "_xlfn._xlws.SORT" , SC_OPCODE_SORT },
 { "_xlfn.SORTBY" , SC_OPCODE_SORTBY },
+{ "_xlfn.DROP" , SC_OPCODE_DROP },
 { "_xlfn.TAKE" , SC_OPCODE_TAKE },
 { "_xlfn.TOCOL" , SC_OPCODE_TOCOL },
 { "_xlfn.TOROW" , SC_OPCODE_TOROW },
@@ -1208,6 +1210,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
+{ "DROP" , SC_OPCODE_DROP },
 { "TAKE" , SC_OPCODE_TAKE },
 { "TOCOL" , SC_OPCODE_TOCOL },
 { "TOROW" , SC_OPCODE_TOROW },
@@ -1673,6 +1676,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
+{ "DROP" , SC_OPCODE_DROP },
 { "TAKE" , SC_OPCODE_TAKE },
 { "TOCOL" , SC_OPCODE_TOCOL },
 { "TOROW" , SC_OPCODE_TOROW },
@@ -2136,6 +2140,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "FILTER" , SC_OPCODE_FILTER },
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
+{ "DROP" , SC_OPCODE_DROP },
 { "TAKE" , SC_OPCODE_TAKE },
 { "TOCOL" , SC_OPCODE_TOCOL },
 { "TOROW" , SC_OPCODE_TOROW },
@@ -2580,6 +2585,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "FILTER") , SC_OPCODE_FILTER },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SORTBY") , SC_OPCODE_SORTBY },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "DROP") , SC_OPCODE_DROP },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "TAKE") , SC_OPCODE_TAKE },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "TOCOL") , SC_OPCODE_TOCOL },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "TOROW") , SC_OPCODE_TOROW },
diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 7e4156669803..c1eb3ac94e67 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1279,6 +1279,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode )
 case ocSort :
 case ocSortBy :
 case ocRandArray :
+case ocDrop :
 case ocTake :
 case ocToCol :
 case ocToRow :
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx
index c7c1c8e28cb8..9dd7d6efafac 100644
--- a/include/formula/compiler.hxx
+++ b/include/formula/compiler.hxx
@@ -517,13 +517,14 @@
 #define SC_OPCODE_SORTBY502
 #define SC_OPCODE_MAT_SEQUENCE  503
 #define SC_OPCODE_RANDARRAY 504
-#de

core.git: officecfg/registry sw/inc sw/source

2025-01-24 Thread Heiko Tietze (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |7 ++
 sw/inc/strings.hrc |6 ++
 sw/source/uibase/docvw/PostItMgr.cxx   |   34 +
 3 files changed, 46 insertions(+), 1 deletion(-)

New commits:
commit 70e9083c0e511ae845a43b6ceaf9e79ee47ab880
Author: Heiko Tietze 
AuthorDate: Wed Jan 22 15:38:02 2025 +0100
Commit: Heiko Tietze 
CommitDate: Fri Jan 24 10:11:27 2025 +0100

Resolves tdf#164586 - Confirm 'Delete all comments'

Option Common::Misc::QueryDeleteAllComments added but
with default false to keep the familiar workflow and
to prevent macros to fails

Change-Id: I9424d900d226b7b757701f5f16209a0241adf7cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180596
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins

diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 61dba68ab1af..b457d92e02c9 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5388,12 +5388,17 @@
   -1
   
   
-
 
   Determines whether to query when switching into the overwrite 
mode.
 
 true
   
+  
+
+  Determines whether to confirm delete all comments or all by 
user.
+
+false
+  
   
 
 
diff --git a/sw/inc/strings.hrc b/sw/inc/strings.hrc
index 633efd926094..2a478f49afea 100644
--- a/sw/inc/strings.hrc
+++ b/sw/inc/strings.hrc
@@ -1552,6 +1552,12 @@
 #define STR_QUERY_INSMODE_TITLE NC_("STR_QUERY_INSMODE_TITLE", "You are 
switching to the overwrite mode")
 #define STR_QUERY_INSMODE_TEXT NC_("STR_QUERY_INSMODE_TEXT", "The overwrite 
mode allows to type over text. It is indicated by a block cursor and at the 
statusbar. Press Insert again to switch back.")
 #define STR_QUERY_INSMODE_QUESTION NC_("STR_QUERY_INSMODE_QUESTION", "Do you 
want to continue?")
+
+// To translators: title and question for confirmation whether to delete all 
comments / all comments by author; text intentionally empty
+#define STR_QUERY_DELALLCOMMENTS_TITLE NC_("STR_QUERY_DELALLCOMMENTS_TITLE", 
"Confirm delete")
+#define STR_QUERY_DELALLCOMMENTS_QUESTION 
NC_("STR_QUERY_DELALLCOMMENTS_QUESTION", "Are you sure you want to delete all 
comments?")
+#define STR_QUERY_DELALLCOMMENTSAUTHOR_QUESTION 
NC_("STR_QUERY_DELALLCOMMENTS_QUESTION", "Are you sure you want to delete all 
comments by %AUTHOR?")
+
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 97098f197283..5e3ccb5857ef 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -82,6 +82,8 @@
 #include 
 #include 
 #include 
+#include 
+
 #include 
 
 // distance between Anchor Y and initial note position
@@ -1584,11 +1586,40 @@ void SwPostItMgr::RemoveSidebarWin()
 PreparePageContainer();
 }
 
+static bool ConfirmDeleteAll(SwView& pView, const OUString& sText)
+{
+const bool bAsk = 
officecfg::Office::Common::Misc::QueryDeleteAllComments::get();
+bool bConfirm = true;
+if (bAsk)
+{
+VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create();
+auto pDlg
+= pFact->CreateQueryDialog(pView.GetFrameWeld(),
+   
SwResId(STR_QUERY_DELALLCOMMENTS_TITLE), sText, "", true);
+sal_Int32 nResult = pDlg->Execute();
+if (pDlg->ShowAgain() == false)
+{
+std::shared_ptr xChanges(
+comphelper::ConfigurationChanges::create());
+
officecfg::Office::Common::Misc::QueryDeleteAllComments::set(false, xChanges);
+xChanges->commit();
+}
+bConfirm = (nResult == RET_YES);
+pDlg->disposeOnce();
+}
+return bConfirm;
+}
+
 // copy to new vector, otherwise RemoveItem would operate and delete stuff on 
mvPostItFields as well
 // RemoveItem will clean up the core field and visible postit if necessary
 // we cannot just delete everything as before, as postits could move into 
change tracking
 void SwPostItMgr::Delete(const OUString& rAuthor)
 {
+OUString sQuestion = SwResId(STR_QUERY_DELALLCOMMENTSAUTHOR_QUESTION);
+sQuestion = sQuestion.replaceAll("%AUTHOR", rAuthor);
+if (!ConfirmDeleteAll(mpWrtShell->GetView(), sQuestion))
+return;
+
 mpWrtShell->StartAllAction();
 if (HasActiveSidebarWin() && (GetActiveSidebarWin()->GetAuthor() == 
rAuthor))
 {
@@ -1719,6 +1750,9 @@ void SwPostItMgr::ToggleResolvedForThread(sal_uInt32 
nPostItId)
 
 void SwPostItMgr::Delete()
 {
+if (!ConfirmDeleteAll(mpWrtShell->GetView(), 
SwResId(STR_QUERY_DELALLCOMMENTS_QUESTION)))
+return;
+
 mpWrtShell->StartAllAction();
 SetActiveSidebarWin(nullptr);

core.git: sfx2/source

2025-01-24 Thread Miklos Vajna (via logerrit)
 sfx2/source/view/viewfrm.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7ce3ff3edefe7f4540f37754d789035286634b9b
Author: Miklos Vajna 
AuthorDate: Thu Jan 23 17:00:07 2025 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 24 10:14:29 2025 +0100

cool#11002 sfx2: fix crash in SfxViewFrame::StateReload_Impl()

Now that the scheduler no longer calls std::abort(), we crashed with:

#5  
(gdb)
#6  std::__uniq_ptr_impl >::_M_ptr (this=0x10) at 
/usr/include/c++/12/bits/unique_ptr.h:191
191   pointer_M_ptr() const noexcept { return 
std::get<0>(_M_t); }
(gdb)
#7  0x7ff37cdaf9da in std::unique_ptr >::get (this=0x10) at 
/usr/include/c++/12/bits/unique_ptr.h:462
462   { return _M_t._M_ptr(); }
(gdb)
#8  0x7ff37cdab888 in std::unique_ptr >::operator-> (this=0x10) at 
/usr/include/c++/12/bits/unique_ptr.h:455
455 return get();
(gdb)
#9  0x7ff37cd989e3 in SfxMedium::GetItemSet (this=0x0) at 
sfx2/source/doc/docfile.cxx:3810
3810if (!pImpl->m_pSet)
(gdb) up
#10 0x7ff37d082c50 in SfxViewFrame::StateReload_Impl 
(this=0x1ba830c0, rSet=SfxItemSet of pool 0x18ba4d60 with parent 0x0 and Which 
ranges: [(6312, 6312)] = {...})
at sfx2/source/view/viewfrm.cxx:944
944 const SfxBoolItem* pItem = 
pSh->GetMedium()->GetItemSet().GetItem(SID_EDITDOC, false);
(gdb) print pSh->GetMedium()
$1 = (SfxMedium *) 0x0

So just check for that case when the shell doesn't have a medium.

Change-Id: I0198121853d283253b782c7e526ef8ef9436eed7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180685
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 28ac21bb02dd..791996653298 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -944,7 +944,8 @@ void SfxViewFrame::StateReload_Impl( SfxItemSet& rSet )
 rSet.DisableItem( nWhich );
 else
 {
-const SfxBoolItem* pItem = 
pSh->GetMedium()->GetItemSet().GetItem(SID_EDITDOC, false);
+SfxMedium* pMedium = pSh->GetMedium();
+const SfxBoolItem* pItem = pMedium ? 
pMedium->GetItemSet().GetItem(SID_EDITDOC, false) : nullptr;
 if ( pItem && !pItem->GetValue() )
 rSet.DisableItem( nWhich );
 else


core.git: sfx2/source

2025-01-24 Thread Miklos Vajna (via logerrit)
 sfx2/source/doc/objmisc.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 32f0b68a9cb4f2762f9b5d31713972e6a430a2f2
Author: Miklos Vajna 
AuthorDate: Fri Jan 24 08:31:13 2025 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 24 16:17:16 2025 +0100

cool#11002 sfx2: fix uncaught exception in SfxObjectShell::isExportLocked()

Similar to commit 71aa5352f6f57283d1db51c980f6f0b802381871 (sfx2: fix
uncaught exception in SfxObjectShell::isEditDocLocked(), 2025-01-23).

This seems to be the last problem with this pattern.

Change-Id: Ibaceb23beaff808d9f192fd55505361bf74016b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180709
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 868277740b59..0a58635a2f7d 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -2051,7 +2051,15 @@ bool SfxObjectShell::isExportLocked() const
 Reference xModel = GetModel();
 if (!xModel.is())
 return false;
-return comphelper::NamedValueCollection::getOrDefault(xModel->getArgs2( { 
u"LockExport"_ustr } ), u"LockExport", false);
+try
+{
+return 
comphelper::NamedValueCollection::getOrDefault(xModel->getArgs2( { 
u"LockExport"_ustr } ), u"LockExport", false);
+}
+catch (const uno::RuntimeException&)
+{
+TOOLS_WARN_EXCEPTION("sfx.appl", "unexpected RuntimeException");
+}
+return false;
 }
 
 bool SfxObjectShell::isPrintLocked() const


core.git: formula/inc formula/source include/formula sc/inc sc/qa sc/README.md sc/source

2025-01-24 Thread Xisco Fauli (via logerrit)
 formula/inc/core_resource.hrc  |6 
 formula/source/core/api/FormulaCompiler.cxx|1 
 include/formula/compiler.hxx   |   15 
 include/formula/opcode.hxx |2 
 sc/README.md   |1 
 sc/inc/helpids.h   |1 
 sc/inc/scfuncs.hrc |   14 
 sc/qa/extras/scfunctionlistobj.cxx |2 
 sc/qa/unit/data/functions/spreadsheet/fods/expand.fods | 6012 +
 sc/qa/unit/ucalc.cxx   |1 
 sc/source/core/data/funcdesc.cxx   |1 
 sc/source/core/inc/interpre.hxx|1 
 sc/source/core/tool/interpr1.cxx   |  134 
 sc/source/core/tool/interpr4.cxx   |1 
 sc/source/core/tool/parclass.cxx   |1 
 sc/source/core/tool/token.cxx  |1 
 sc/source/filter/excel/xlformula.cxx   |1 
 sc/source/filter/oox/formulabase.cxx   |1 
 18 files changed, 6188 insertions(+), 8 deletions(-)

New commits:
commit 5506dd8bcf587ac4472ce28d26c174bfdfd08f91
Author: Xisco Fauli 
AuthorDate: Fri Jan 24 14:13:06 2025 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 24 16:57:21 2025 +0100

tdf#151001: Add support for EXPAND function

Change-Id: I4eabd526d656c13da7792d3c195f036ce78bd0d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180706
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/formula/inc/core_resource.hrc b/formula/inc/core_resource.hrc
index 712f60817abc..5b6165a35202 100644
--- a/formula/inc/core_resource.hrc
+++ b/formula/inc/core_resource.hrc
@@ -282,6 +282,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF[] =
 { "COM.MICROSOFT.SORT" , SC_OPCODE_SORT },
 { "COM.MICROSOFT.SORTBY" , SC_OPCODE_SORTBY },
 { "COM.MICROSOFT.DROP" , SC_OPCODE_DROP },
+{ "COM.MICROSOFT.EXPAND" , SC_OPCODE_EXPAND },
 { "COM.MICROSOFT.TAKE" , SC_OPCODE_TAKE },
 { "COM.MICROSOFT.TOCOL" , SC_OPCODE_TOCOL },
 { "COM.MICROSOFT.TOROW" , SC_OPCODE_TOROW },
@@ -745,6 +746,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_OOXML[] =
 { "_xlfn._xlws.SORT" , SC_OPCODE_SORT },
 { "_xlfn.SORTBY" , SC_OPCODE_SORTBY },
 { "_xlfn.DROP" , SC_OPCODE_DROP },
+{ "_xlfn.EXPAND" , SC_OPCODE_EXPAND },
 { "_xlfn.TAKE" , SC_OPCODE_TAKE },
 { "_xlfn.TOCOL" , SC_OPCODE_TOCOL },
 { "_xlfn.TOROW" , SC_OPCODE_TOROW },
@@ -1211,6 +1213,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_PODF[] =
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
 { "DROP" , SC_OPCODE_DROP },
+{ "EXPAND" , SC_OPCODE_EXPAND },
 { "TAKE" , SC_OPCODE_TAKE },
 { "TOCOL" , SC_OPCODE_TOCOL },
 { "TOROW" , SC_OPCODE_TOROW },
@@ -1677,6 +1680,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH_API[] =
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
 { "DROP" , SC_OPCODE_DROP },
+{ "EXPAND" , SC_OPCODE_EXPAND },
 { "TAKE" , SC_OPCODE_TAKE },
 { "TOCOL" , SC_OPCODE_TOCOL },
 { "TOROW" , SC_OPCODE_TOROW },
@@ -2141,6 +2145,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES_ENGLISH[] =
 { "SORT" , SC_OPCODE_SORT },
 { "SORTBY" , SC_OPCODE_SORTBY },
 { "DROP" , SC_OPCODE_DROP },
+{ "EXPAND" , SC_OPCODE_EXPAND },
 { "TAKE" , SC_OPCODE_TAKE },
 { "TOCOL" , SC_OPCODE_TOCOL },
 { "TOROW" , SC_OPCODE_TOROW },
@@ -2586,6 +2591,7 @@ const std::pair 
RID_STRLIST_FUNCTION_NAMES[] =
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SORT") , SC_OPCODE_SORT },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "SORTBY") , SC_OPCODE_SORTBY },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "DROP") , SC_OPCODE_DROP },
+{ NC_("RID_STRLIST_FUNCTION_NAMES", "EXPAND") , SC_OPCODE_EXPAND },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "TAKE") , SC_OPCODE_TAKE },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "TOCOL") , SC_OPCODE_TOCOL },
 { NC_("RID_STRLIST_FUNCTION_NAMES", "TOROW") , SC_OPCODE_TOROW },
diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index c1eb3ac94e67..eafb6220c78a 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1280,6 +1280,7 @@ bool FormulaCompiler::IsMatrixFunction( OpCode eOpCode )
 case ocSortBy :
 case ocRandArray :
 case ocDrop :
+case ocExpand :
 case ocTake :
 case ocToCol :
 case ocToRow :
diff --git a/include/formula/compiler.hxx b/include/formula/compiler.hxx
index 9dd7d6efafac..a8962479a432 100644
--- a/include/formula/compiler.hxx
+++ b/include/formula/compiler.hxx
@@ -518,13 +518,14 @@
 #define SC_OPCODE_MAT_SEQUENCE  503
 #define SC_OPCODE_RANDARRAY 504
 #define SC_O

core.git: Branch 'distro/collabora/co-23.05' - sc/source

2025-01-24 Thread Henry Castro (via logerrit)
 sc/source/ui/view/output.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 13e1a9ac77aad9ca3c024c0c9d66b63adf588442
Author: Henry Castro 
AuthorDate: Mon Dec 30 06:19:24 2024 -0400
Commit: Aron Budea 
CommitDate: Fri Jan 24 16:19:36 2025 +0100

tdf#164130: ensure valid column and row values

Sometimes the range mark has not valid col/row values.

Signed-off-by: Henry Castro 
Change-Id: I29cf70c8c2a4e832f1ee65abac0ff55e49295fc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179897
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
(cherry picked from commit 289667abb3bcf165402f4f5c10af91ec59b0d26f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179916
Reviewed-by: Xisco Fauli 
(cherry picked from commit 8e250191dfabc8e1396170399facce5562b248f9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180708
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit a24a6e484c4ba1f9193af94084c861f09af9f027)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180714

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 14419a362682..2627152fde55 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -2011,7 +2011,8 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW 
nRefStartY,
 
 if ( nRefStartX == nRefEndX && nRefStartY == nRefEndY )
 mpDoc->ExtendMerge( nRefStartX, nRefStartY, nRefEndX, nRefEndY, nTab );
-else if (mpDoc->HasAttrib(nRefEndX, nRefEndY, nTab, HasAttrFlags::Merged))
+else if (mpDoc->ValidCol(nRefEndX) && mpDoc->ValidRow(nRefEndY) &&
+ mpDoc->HasAttrib(nRefEndX, nRefEndY, nTab, HasAttrFlags::Merged))
 mpDoc->ExtendMerge(nRefEndX, nRefEndY, nRefEndX, nRefEndY, nTab);
 
 if ( !(nRefStartX <= nVisX2 && nRefEndX >= nVisX1 &&


core.git: Branch 'distro/collabora/co-24.04' - sc/source vcl/qa

2025-01-24 Thread Jonathan Clark (via logerrit)
 sc/source/ui/view/output2.cxx|   16 ++-
 vcl/qa/cppunit/pdfexport/data/tdf160786.fods |  134 +++
 vcl/qa/cppunit/pdfexport/pdfexport2.cxx  |   50 ++
 3 files changed, 197 insertions(+), 3 deletions(-)

New commits:
commit b197cd18e18d55652b8b5ba6018fc1946dc9a391
Author: Jonathan Clark 
AuthorDate: Tue Aug 6 06:01:57 2024 -0600
Commit: Aron Budea 
CommitDate: Fri Jan 24 15:29:26 2025 +0100

tdf#160786 sc: Fix repeat char format code inaccuracy

Number format codes allow arbitrary repeat characters. These repeat
characters are inserted while formatting numbers to pad strings to the
width of the containing cell. For example, this is used in some default
format codes to left-align currency symbols with right-aligned digits.

Previously, Calc determined the number of repeat characters to insert
based on the assumption that the pixel width of a string containing N of
the repeat character would be N times the pixel width of a string
containing 1 of them. This is not a safe assumption.

This change updates the algorithm to instead look at the average width
of a repeat character when used in context as part of a padding string.
This approach is still not entirely correct - it doesn't account for
ligatures around the padding sequence, for example - but in practice it
is a reasonable compromise between cost and accuracy.

Change-Id: I240cf38ec0376ee2d2896e7a7da6760a374b3034
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171548
Tested-by: Jenkins
Reviewed-by: Jonathan Clark 
(cherry picked from commit 981c5780da8ec6b6878de58909b7cc7e736ad33a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172067
Reviewed-by: Xisco Fauli 
(cherry picked from commit ca1bbfd1585e3b38ba9b0046b1c6960cd24f9c0e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180684
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index 34236246e515..69c29516e09a 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -578,8 +578,17 @@ void ScDrawStringsVars::RepeatToFill( tools::Long 
nColWidth )
 if ( nRepeatPos == -1 || nRepeatPos > aString.getLength() )
 return;
 
-tools::Long nCharWidth = GetFmtTextWidth(OUString(nRepeatChar));
+// Measuring a string containing a single copy of the repeat char is 
inaccurate.
+// To increase accuracy, start with a representative sample of a padding 
sequence.
+constexpr sal_Int32 nSampleSize = 20;
+OUStringBuffer aFill(nSampleSize);
+comphelper::string::padToLength(aFill, nSampleSize, nRepeatChar);
 
+tools::Long nSampleWidth = GetFmtTextWidth(aFill.makeStringAndClear());
+double nAvgCharWidth = static_cast(nSampleWidth) / 
static_cast(nSampleSize);
+
+// Intentionally truncate to round toward zero
+auto nCharWidth = static_cast(nAvgCharWidth);
 if ( nCharWidth < 1 || (bPixelToLogic && nCharWidth < 
pOutput->mpRefDevice->PixelToLogic(Size(1,0)).Width()) )
 return;
 
@@ -595,8 +604,9 @@ void ScDrawStringsVars::RepeatToFill( tools::Long nColWidth 
)
 if ( nSpaceToFill <= nCharWidth )
 return;
 
-sal_Int32 nCharsToInsert = nSpaceToFill / nCharWidth;
-OUStringBuffer aFill(nCharsToInsert);
+// Intentionally truncate to round toward zero
+auto nCharsToInsert = 
static_cast(static_cast(nSpaceToFill) / nAvgCharWidth);
+aFill.ensureCapacity(nCharsToInsert);
 comphelper::string::padToLength(aFill, nCharsToInsert, nRepeatChar);
 aString = aString.replaceAt( nRepeatPos, 0, aFill );
 TextChanged();
diff --git a/vcl/qa/cppunit/pdfexport/data/tdf160786.fods 
b/vcl/qa/cppunit/pdfexport/data/tdf160786.fods
new file mode 100644
index ..acb279ee52fc
--- /dev/null
+++ b/vcl/qa/cppunit/pdfexport/data/tdf160786.fods
@@ -0,0 +1,134 @@
+
+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://o
 penoffice.org/2004/calc" xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:calcex

core.git: 2 commits - helpcontent2 sw/inc sw/Library_swui.mk sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk

2025-01-24 Thread Gabor Kelemen (via logerrit)
 helpcontent2  |2 
 sw/Library_swui.mk|1 
 sw/UIConfig_swriter.mk|1 
 sw/inc/cmdid.h|1 
 sw/inc/swabstdlg.hxx  |   13 ++
 sw/sdi/_textsh.sdi|5 
 sw/sdi/swriter.sdi|   18 +++
 sw/source/ui/dialog/swdlgfact.cxx |   17 +++
 sw/source/ui/dialog/swdlgfact.hxx |3 
 sw/source/ui/utlui/copyfielddlg.cxx   |   58 +++
 sw/source/uibase/docvw/romenu.cxx |6 -
 sw/source/uibase/docvw/romenu.hxx |1 
 sw/source/uibase/inc/copyfielddlg.hxx |   37 +++
 sw/source/uibase/shells/textfld.cxx   |   32 +-
 sw/uiconfig/swriter/ui/copyfielddialog.ui |  157 ++
 sw/uiconfig/swriter/ui/readonlymenu.ui|   14 ++
 16 files changed, 363 insertions(+), 3 deletions(-)

New commits:
commit 1c3ffcb60d55c2c2ac92bf998c98732f5d982fc2
Author: Gabor Kelemen 
AuthorDate: Fri Jan 24 15:37:41 2025 +0100
Commit: Gerrit Code Review 
CommitDate: Fri Jan 24 15:37:41 2025 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to b3d44a635cf6f1dde13883262a259c0d73e020a0
  - tdf#164318 Add help page for the new Copy Field Content dialog

Change-Id: I3ea5b64ce58bcf934c3f80b2b45904bfb624f2b2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/180419
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/helpcontent2 b/helpcontent2
index 5eeb4854797b..b3d44a635cf6 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5eeb4854797b00302a1f78e439ec63c78e3f559c
+Subproject commit b3d44a635cf6f1dde13883262a259c0d73e020a0
commit a45428d4bdf733718bad2d87412eb0932c90d27e
Author: Oliver Specht 
AuthorDate: Wed Jan 8 14:20:43 2025 +0100
Commit: Gabor Kelemen 
CommitDate: Fri Jan 24 15:37:29 2025 +0100

tdf#164318 Add dialog to show content of fields in readonly documents

Change-Id: I0036e8c02b57dab91361213489c5a6189149b553
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179953
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 2c6d8512fe44..cf025735337e 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -168,6 +168,7 @@ $(eval $(call gb_Library_add_exception_objects,swui,\
 sw/source/ui/table/tabledlg \
 sw/source/ui/table/tautofmt \
 sw/source/ui/utlui/swrenamexnameddlg \
+sw/source/ui/utlui/copyfielddlg \
 ))
 
 ifneq (,$(filter DBCONNECTIVITY,$(BUILD_TYPE)))
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index d9df23bf27a4..6bc32a541106 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -138,6 +138,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/contentcontroldropdown \
sw/uiconfig/swriter/ui/contentcontrollistitemdlg \
sw/uiconfig/swriter/ui/converttexttable \
+   sw/uiconfig/swriter/ui/copyfielddialog \
sw/uiconfig/swriter/ui/createaddresslist \
sw/uiconfig/swriter/ui/createauthorentry \
sw/uiconfig/swriter/ui/createautomarkdialog \
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index f50754b6e274..340e57c8f5b4 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -152,6 +152,7 @@ class SwUINumRuleItem;
 #define FN_REDLINE_ACCEPT_TONEXT (FN_EDIT2 + 45)/* Redlining Accept 
and jump to next*/
 #define FN_REDLINE_REJECT_TONEXT (FN_EDIT2 + 46)/* Redlining Reject 
and jump to next*/
 #define FN_TRANSFORM_DOCUMENT_STRUCTURE (FN_EDIT2 + 47) /* overwrite text of 
content control, and more*/
+#define FN_COPY_FIELD(FN_EDIT2 + 48)/* show field content 
in readonly documents to copy content*/
 
 // Region: View
 #define FN_DRAW_WRAP_DLGTypedWhichId(FN_VIEW + 3)   /* 
Draw wrapping dlg */
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 229b2fdc042d..59768a69aa55 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -366,6 +366,16 @@ public:
  css::uno::Reference< css::container::XNameAccess > & xThird ) = 0;
 };
 
+/**
+ * Interface for copy field value dialog in read only documents. It's 
implemented by
+ * AbstractCopyFieldDlg_Impl
+ */
+class AbstractCopyFieldDlg : public VclAbstractDialog
+{
+protected:
+virtual ~AbstractCopyFieldDlg() override = default;
+};
+
 /**
  * Interface for e.g. the form -> content control -> properties -> add dialog. 
It's implemented by
  * AbstractSwContentControlListItemDlg_Impl, but SwContentControlDlg only 
knows about this interface
@@ -547,6 +557,9 @@ public:
 virtual VclPtr 
CreateSwRenameXNamedDlg(weld::Widget* pParent,
 css::uno::Reference< css::container::XNamed > & xNamed,
 css::uno::Reference< css::container::XNameAccess > & xNameAccess) = 0;
+
+virtual VclPtr CreateCopyFieldDlg(weld::Widget* 
pParen

help.git: AllLangHelp_swriter.mk source/text

2025-01-24 Thread Gabor Kelemen (via logerrit)
 AllLangHelp_swriter.mk |1 
 source/text/swriter/01/copyfielddialog.xhp |   42 +
 2 files changed, 43 insertions(+)

New commits:
commit b3d44a635cf6f1dde13883262a259c0d73e020a0
Author: Gabor Kelemen 
AuthorDate: Fri Jan 17 15:16:51 2025 +0100
Commit: Gabor Kelemen 
CommitDate: Fri Jan 24 15:37:41 2025 +0100

tdf#164318 Add help page for the new Copy Field Content dialog

Change-Id: I3ea5b64ce58bcf934c3f80b2b45904bfb624f2b2
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/180419
Reviewed-by: Gabor Kelemen 
Tested-by: Jenkins

diff --git a/AllLangHelp_swriter.mk b/AllLangHelp_swriter.mk
index 2efd1dd4d3..bbe42362ba 100644
--- a/AllLangHelp_swriter.mk
+++ b/AllLangHelp_swriter.mk
@@ -166,6 +166,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,swriter,\
 helpcontent2/source/text/swriter/01/0699 \
 helpcontent2/source/text/swriter/01/paragraph_hyphenation \
 helpcontent2/source/text/swriter/01/contentcontrol00 \
+helpcontent2/source/text/swriter/01/copyfielddialog \
 helpcontent2/source/text/swriter/01/accessibility_check \
 helpcontent2/source/text/swriter/01/format_object \
 helpcontent2/source/text/swriter/01/format_frame \
diff --git a/source/text/swriter/01/copyfielddialog.xhp 
b/source/text/swriter/01/copyfielddialog.xhp
new file mode 100644
index 00..d65d9acc7d
--- /dev/null
+++ b/source/text/swriter/01/copyfielddialog.xhp
@@ -0,0 +1,42 @@
+
+
+
+
+
+
+Copy Field Content Dialog
+/text/swriter/01/copyfielddialog.xhp
+
+
+
+
+copy field dialog;text documents
+copying field text;read-only documents
+read-only documents;copying field text
+
+
+
+Copy Field Content Dialog
+Copy the content of a field from a read-only 
document.
+In read-only 
documents the available editing functions are limited. In case of fields, it 
may be useful to copy part of the field text, but the Fields dialog can not be 
opened.
+
+
+Choose Copy Field Content.
+
+
+Click 
on the field in the read-only document to highlight it.
+Right 
click and select the Copy Field Content item of 
the context menu.
+
+You can edit and then highlight the 
desired text in the Content box before pressing the Copy button.
+
+Content
+Copy the contents of the field for reuse in other 
documents.
+
+


core.git: Branch 'distro/collabora/co-24.04' - sc/source

2025-01-24 Thread Henry Castro (via logerrit)
 sc/source/ui/view/output.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit a24a6e484c4ba1f9193af94084c861f09af9f027
Author: Henry Castro 
AuthorDate: Mon Dec 30 06:19:24 2024 -0400
Commit: Aron Budea 
CommitDate: Fri Jan 24 15:38:11 2025 +0100

tdf#164130: ensure valid column and row values

Sometimes the range mark has not valid col/row values.

Signed-off-by: Henry Castro 
Change-Id: I29cf70c8c2a4e832f1ee65abac0ff55e49295fc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179897
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
(cherry picked from commit 289667abb3bcf165402f4f5c10af91ec59b0d26f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179916
Reviewed-by: Xisco Fauli 
(cherry picked from commit 8e250191dfabc8e1396170399facce5562b248f9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180708
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index be6fa725b3f7..dc8dd29484ff 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -2017,7 +2017,8 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW 
nRefStartY,
 
 if ( nRefStartX == nRefEndX && nRefStartY == nRefEndY )
 mpDoc->ExtendMerge( nRefStartX, nRefStartY, nRefEndX, nRefEndY, nTab );
-else if (mpDoc->HasAttrib(nRefEndX, nRefEndY, nTab, HasAttrFlags::Merged))
+else if (mpDoc->ValidCol(nRefEndX) && mpDoc->ValidRow(nRefEndY) &&
+ mpDoc->HasAttrib(nRefEndX, nRefEndY, nTab, HasAttrFlags::Merged))
 mpDoc->ExtendMerge(nRefEndX, nRefEndY, nRefEndX, nRefEndY, nTab);
 
 if ( !(nRefStartX <= nVisX2 && nRefEndX >= nVisX1 &&


core.git: Branch 'distro/collabora/co-24.04' - sc/source

2025-01-24 Thread Pranam Lashkari (via logerrit)
 sc/source/ui/view/cellsh2.cxx |  239 ++
 1 file changed, 151 insertions(+), 88 deletions(-)

New commits:
commit ba2a63a0c2bee76e4d1e3ee35f5eab44b2cdc69a
Author: Pranam Lashkari 
AuthorDate: Wed Dec 25 23:15:02 2024 +0530
Commit: Caolán McNamara 
CommitDate: Fri Jan 24 12:20:39 2025 +0100

sc: convert data validity dialog async

Change-Id: Ifef985c15a58c1c081f9a011e174e3b2547f3ea2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179402
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index b2fdf0ba411b..51c5feea769c 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -901,102 +901,165 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
 // cell range picker
 vcl::Window* pWin = GetViewData().GetActiveWin();
 weld::Window* pParentWin = pWin ? pWin->GetFrameWeld() : 
nullptr;
-auto xDlg = std::make_shared(pParentWin, 
&aArgSet, pTabViewShell);
-ScValidationRegisteredDlg 
aRegisterThatDlgExists(pParentWin, xDlg);
+auto xDlg
+= std::make_shared(pParentWin, 
&aArgSet, pTabViewShell);
 
-short nResult = xDlg->run();
-if ( nResult == RET_OK )
-{
-const SfxItemSet* pOutSet = xDlg->GetOutputItemSet();
+auto aRegisterThatDlgExists
+= 
std::make_shared(pParentWin, xDlg);
 
-if ( const SfxUInt16Item* pItem = 
pOutSet->GetItemIfSet( FID_VALID_MODE ) )
-eMode = 
static_cast(pItem->GetValue());
-if ( const SfxUInt16Item* pItem = 
pOutSet->GetItemIfSet( FID_VALID_CONDMODE ) )
-eOper = 
static_cast(pItem->GetValue());
-if ( const SfxStringItem* pItem = 
pOutSet->GetItemIfSet( FID_VALID_VALUE1 ) )
-{
-OUString aTemp1 = pItem->GetValue();
-if (eMode == SC_VALID_DATE || eMode == 
SC_VALID_TIME)
-{
-sal_uInt32 nNumIndex = 0;
-double nVal;
-if 
(rDoc.GetFormatTable()->IsNumberFormat(aTemp1, nNumIndex, nVal))
-aExpr1 = ::rtl::math::doubleToUString( 
nVal,
-rtl_math_StringFormat_Automatic, 
rtl_math_DecimalPlaces_Max,
-
ScGlobal::getLocaleData().getNumDecimalSep()[0], true);
-else
-aExpr1 = aTemp1;
-}
-else
-aExpr1 = aTemp1;
-}
-if ( const SfxStringItem* pItem = 
pOutSet->GetItemIfSet( FID_VALID_VALUE2 ) )
+struct lcl_auxData
+{
+ScAddress aCursorPos;
+ScValidationMode eMode;
+ScConditionMode eOper;
+OUString aExpr1;
+OUString aExpr2;
+bool bBlank;
+sal_Int16 nListType;
+bool bShowHelp;
+OUString aHelpTitle;
+OUString aHelpText;
+bool bShowError;
+ScValidErrorStyle eErrStyle;
+OUString aErrTitle;
+OUString aErrText;
+};
+
+std::shared_ptr pAuxData = 
std::make_shared(lcl_auxData{
+aCursorPos, eMode, eOper, aExpr1, aExpr2, bBlank, 
nListType, bShowHelp,
+aHelpTitle, aHelpText, bShowError, eErrStyle, 
aErrTitle, aErrText});
+SfxTabDialogController::runAsync(
+xDlg,
+[&rDoc, pAuxData, nSlotId, xDlg, 
pTabViewShell](sal_Int32 nResult)
 {
-OUString aTemp2 = pItem->GetValue();
-if (eMode == SC_VALID_DATE || eMode == 
SC_VALID_TIME)
+if (nResult == RET_OK)
 {
-sal_uInt32 nNumIndex = 0;
-double nVal;
-if 
(rDoc.GetFormatTable()->IsNumberFormat(aTemp2, nNumIndex, nVal))
-aExpr2 = ::rtl::math::doubleToUString( 
nVal,
-rtl_math_StringFormat_Automatic, 
rtl_math_DecimalPlac

core.git: 2 commits - vcl/win

2025-01-24 Thread Noel Grandin (via logerrit)
 vcl/win/gdi/salbmp.cxx |   46 ++
 1 file changed, 10 insertions(+), 36 deletions(-)

New commits:
commit fee5ffe67ca3100a9fc2e4830aff2bea0d22591b
Author: Noel Grandin 
AuthorDate: Fri Jan 24 11:33:17 2025 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 24 12:20:51 2025 +0100

remove remnants of 16-bit bitmap support from windows backend

dead since
commit 78b9dac2ee77bf6efc1298962cbeca284db5b00a
Author: Noel Grandin 
Date:   Tue Sep 24 21:38:51 2019 +0200
remove internal use of 16-bit packed formats

Change-Id: Iab6e4fc4b6bc4c83deac07d587bc8c996359e3d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180689
Reviewed-by: Noel Grandin 
Tested-by: Jenkins

diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index b7b1315159b4..d2f6fdbd265e 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -794,28 +794,15 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( 
BitmapAccessMode /*nMode*/ )
 memcpy( pBuffer->maPalette.ImplGetColorBuffer(), 
pBI->bmiColors, nPalCount * sizeof( RGBQUAD ) );
 pBuffer->mpBits = reinterpret_cast(pBI) + 
pBI->bmiHeader.biSize + nPalCount * sizeof( RGBQUAD );
 }
-else if( ( pBIH->biBitCount == 16 ) || ( pBIH->biBitCount == 
32 ) )
+else if( pBIH->biBitCount == 32 )
 {
-if( pBIH->biBitCount == 16 )
-{
-ColorMaskElement aRedMask(0x7c00UL);
-aRedMask.CalcMaskShift();
-ColorMaskElement aGreenMask(0x03e0UL);
-aGreenMask.CalcMaskShift();
-ColorMaskElement aBlueMask(0x001fUL);
-aBlueMask.CalcMaskShift();
-pBuffer->maColorMask = ColorMask(aRedMask, aGreenMask, 
aBlueMask);
-}
-else
-{
-ColorMaskElement aRedMask(0x00ffUL);
-aRedMask.CalcMaskShift();
-ColorMaskElement aGreenMask(0xff00UL);
-aGreenMask.CalcMaskShift();
-ColorMaskElement aBlueMask(0x00ffUL);
-aBlueMask.CalcMaskShift();
-pBuffer->maColorMask = ColorMask(aRedMask, aGreenMask, 
aBlueMask);
-}
+ColorMaskElement aRedMask(0x00ffUL);
+aRedMask.CalcMaskShift();
+ColorMaskElement aGreenMask(0xff00UL);
+aGreenMask.CalcMaskShift();
+ColorMaskElement aBlueMask(0x00ffUL);
+aBlueMask.CalcMaskShift();
+pBuffer->maColorMask = ColorMask(aRedMask, aGreenMask, 
aBlueMask);
 
 pBuffer->mpBits = reinterpret_cast(pBI) + 
pBI->bmiHeader.biSize;
 }
commit a1bda2919756c8a5ef5e7505614938033950f87c
Author: Noel Grandin 
AuthorDate: Fri Jan 24 11:24:05 2025 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 24 12:20:42 2025 +0100

BI_BITFIELDS in windows vcl backend is unused

all the way back to initial import

Change-Id: I2bfc75b2461496a1b7d127d211a7c358092ab2ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180688
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index 3fe13d5254e3..b7b1315159b4 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -796,20 +796,7 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( 
BitmapAccessMode /*nMode*/ )
 }
 else if( ( pBIH->biBitCount == 16 ) || ( pBIH->biBitCount == 
32 ) )
 {
-sal_uLong nOffset = 0;
-
-if( pBIH->biCompression == BI_BITFIELDS )
-{
-nOffset = 3 * sizeof( RGBQUAD );
-ColorMaskElement 
aRedMask(*reinterpret_cast(&pBI->bmiColors[ 0 ]));
-aRedMask.CalcMaskShift();
-ColorMaskElement 
aGreenMask(*reinterpret_cast(&pBI->bmiColors[ 1 ]));
-aGreenMask.CalcMaskShift();
-ColorMaskElement 
aBlueMask(*reinterpret_cast(&pBI->bmiColors[ 2 ]));
-aBlueMask.CalcMaskShift();
-pBuffer->maColorMask = ColorMask(aRedMask, aGreenMask, 
aBlueMask);
-}
-else if( pBIH->biBitCount == 16 )
+if( pBIH->biBitCount == 16 )
 {
 ColorMaskElement aRedMask(0x7c00UL);
 aRedMask.CalcMaskShift();
@@ -830,7 +817,7 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( BitmapAccessMode 
/*nMode*/ )
 p

core.git: vcl/win

2025-01-24 Thread Noel Grandin (via logerrit)
 vcl/win/gdi/salbmp.cxx |   18 --
 1 file changed, 4 insertions(+), 14 deletions(-)

New commits:
commit e7befa23eacd46607afdf1363d9aaa93a589f547
Author: Noel Grandin 
AuthorDate: Fri Jan 24 11:36:51 2025 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 24 12:20:59 2025 +0100

remove remnants of 1-bit bitmap support

dead since
commit 21734247d58a6e915b058d8fa55ece949d049613
Author: Noel Grandin 
Date:   Tue Jan 10 12:56:58 2023 +0200
drop internal support for 1-bit images

Change-Id: I755423e339dac797abc726012cfb96d27b8f15fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180690
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index d2f6fdbd265e..e88a366d2d75 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -514,20 +514,10 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, 
SalGraphics* pSGraphics )
 WinSalGraphics* pGraphics = static_cast(pSGraphics);
 
 HDC hDC  = pGraphics->getHDC();
-HBITMAP hNewDDB;
 BITMAP  aDDBInfo;
 PBYTE   pBits = reinterpret_cast(pBI) + 
pBI->bmiHeader.biSize +
-ImplGetDIBColorCount( rSalBmp.mhDIB ) * sizeof( 
RGBQUAD );
-
-if( pBI->bmiHeader.biBitCount == 1 )
-{
-hNewDDB = CreateBitmap( pBI->bmiHeader.biWidth, 
pBI->bmiHeader.biHeight, 1, 1, nullptr );
-
-if( hNewDDB )
-SetDIBits( hDC, hNewDDB, 0, pBI->bmiHeader.biHeight, pBits, pBI, 
DIB_RGB_COLORS );
-}
-else
-hNewDDB = CreateDIBitmap( hDC, &pBI->bmiHeader, CBM_INIT, pBits, pBI, 
DIB_RGB_COLORS );
+ImplGetDIBColorCount( rSalBmp.mhDIB ) * 
sizeof( RGBQUAD );
+HBITMAP hNewDDB = CreateDIBitmap( hDC, &pBI->bmiHeader, CBM_INIT, pBits, 
pBI, DIB_RGB_COLORS );
 
 GlobalUnlock( rSalBmp.mhDIB );
 
@@ -773,11 +763,11 @@ BitmapBuffer* WinSalBitmap::AcquireBuffer( 
BitmapAccessMode /*nMode*/ )
 {
 pBuffer.reset(new BitmapBuffer);
 
-pBuffer->meFormat = pBIH->biBitCount == 1 ? 
ScanlineFormat::N1BitMsbPal :
-pBIH->biBitCount == 8 ? 
ScanlineFormat::N8BitPal :
+pBuffer->meFormat = pBIH->biBitCount == 8 ? 
ScanlineFormat::N8BitPal :
 pBIH->biBitCount == 24 ? 
ScanlineFormat::N24BitTcBgr :
 pBIH->biBitCount == 32 ? 
ScanlineFormat::N32BitTcMask :
 ScanlineFormat::NONE;
+assert (pBuffer->meFormat != ScanlineFormat::NONE);
 
 if (pBuffer->meFormat != ScanlineFormat::NONE)
 {


core.git: 2 commits - include/vcl vcl/headless vcl/inc vcl/quartz vcl/skia vcl/source vcl/win

2025-01-24 Thread Noel Grandin (via logerrit)
 include/vcl/BitmapBuffer.hxx|2 -
 include/vcl/BitmapInfoAccess.hxx|   14 +--
 include/vcl/BitmapReadAccess.hxx|   64 +---
 include/vcl/BitmapWriteAccess.hxx   |2 -
 vcl/headless/CairoCommon.cxx|1 
 vcl/inc/unx/saldisp.hxx |1 
 vcl/quartz/salbmp.cxx   |1 
 vcl/skia/salbmp.cxx |2 -
 vcl/source/bitmap/BitmapReadAccess.cxx  |   60 --
 vcl/source/bitmap/BitmapWriteAccess.cxx |3 -
 vcl/source/bitmap/dibtools.cxx  |3 +
 vcl/source/gdi/salmisc.cxx  |   29 +-
 vcl/win/gdi/salbmp.cxx  |1 
 13 files changed, 67 insertions(+), 116 deletions(-)

New commits:
commit bc5e9c0d0afe0e7ffeb3d2c4475852620b3fc2e2
Author: Noel Grandin 
AuthorDate: Fri Jan 24 13:26:52 2025 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 24 14:18:50 2025 +0100

remove some unnececessary ColorMask includes and forwards

Change-Id: I33c43e14e962991f89b960cd10519cf1a37cb84e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180702
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index f14893617598..81bfc830780a 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -50,7 +50,6 @@ typedef unsigned long Pixel;
 
 class   BitmapPalette;
 class   SalFrame;
-class   ColorMask;
 
 namespace vcl_sal { class WMAdaptor; }
 
diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index 82ef64db8ebe..4c6c57874f04 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -31,7 +31,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff --git a/vcl/source/bitmap/BitmapReadAccess.cxx 
b/vcl/source/bitmap/BitmapReadAccess.cxx
index 5503156e3d8d..b009534cd6f4 100644
--- a/vcl/source/bitmap/BitmapReadAccess.cxx
+++ b/vcl/source/bitmap/BitmapReadAccess.cxx
@@ -19,7 +19,6 @@
 
 #include 
 #include 
-#include 
 
 #include 
 #include 
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index c0f9bf49ba06..4559e22f30ed 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -21,7 +21,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
commit 2b6d1050ffe1c538426e8365802439e0c1b9f313
Author: Noel Grandin 
AuthorDate: Fri Jan 24 13:19:38 2025 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 24 14:18:42 2025 +0100

no need to use ColorMask in BitmapBuffer

ever since
commit 291c6d7626278e0d0db1b0bcd9e7c911eb8eeb83
Author: Noel Grandin 
Date:   Fri Jan 24 11:55:11 2025 +0200
no need to use color mask in QuartzSalBitmap::AcquireBuffer

Change-Id: I3bdd5ec96d69a8ee75d92c46040ec0b352de1f2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180701
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vcl/BitmapBuffer.hxx b/include/vcl/BitmapBuffer.hxx
index 8b6322b730ad..b5444afc877b 100644
--- a/include/vcl/BitmapBuffer.hxx
+++ b/include/vcl/BitmapBuffer.hxx
@@ -26,7 +26,6 @@
 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -41,7 +40,6 @@ struct VCL_DLLPUBLIC BitmapBuffer
 sal_uInt8*  mpBits;
 ScanlineFormat  meFormat = ScanlineFormat::NONE;
 ScanlineDirection meDirection = ScanlineDirection::BottomUp;
-ColorMask   maColorMask;
 sal_uInt16  mnBitCount;
 };
 
diff --git a/include/vcl/BitmapInfoAccess.hxx b/include/vcl/BitmapInfoAccess.hxx
index 4e6f38081f7e..e01c2aba7a8f 100644
--- a/include/vcl/BitmapInfoAccess.hxx
+++ b/include/vcl/BitmapInfoAccess.hxx
@@ -27,9 +27,8 @@
 
 bool Bitmap32IsPreMultipled();
 
-typedef BitmapColor (*FncGetPixel)(ConstScanline pScanline, tools::Long nX, 
const ColorMask& rMask);
-typedef void (*FncSetPixel)(Scanline pScanline, tools::Long nX, const 
BitmapColor& rBitmapColor,
-const ColorMask& rMask);
+typedef BitmapColor (*FncGetPixel)(ConstScanline pScanline, tools::Long nX);
+typedef void (*FncSetPixel)(Scanline pScanline, tools::Long nX, const 
BitmapColor& rBitmapColor);
 
 class VCL_DLLPUBLIC BitmapInfoAccess
 {
@@ -133,15 +132,6 @@ public:
 /// of the required color. Returns SAL_MAX_UINT16 if nothing found.
 sal_uInt16 GetMatchingPaletteIndex(const BitmapColor& rBitmapColor) const;
 
-const ColorMask& GetColorMask() const
-{
-const BitmapBuffer* pBuffer = mpBuffer;
-
-assert(pBuffer && "Access is not valid!");
-
-return pBuffer->maColorMask;
-}
-
 private:
 BitmapInfoAccess(const BitmapInfoAccess&) = delete;
 BitmapInfoAccess& operator=(const BitmapInfoAccess&) = delete;
diff --git a/include/vcl/BitmapReadAccess.hxx b/include/vcl/BitmapReadAccess.hxx
index 79b39cfc5b88..3d6a47b33535 100644
--- a/include/vcl/BitmapReadAccess.hxx
+++ b/include/vcl/BitmapReadAccess.hxx
@@ -60,7 +60,7 @@ public:
 {
 a

core.git: 2 commits - include/vcl vcl/quartz vcl/source

2025-01-24 Thread Noel Grandin (via logerrit)
 include/vcl/BitmapInfoAccess.hxx   |1 -
 include/vcl/BitmapReadAccess.hxx   |4 ++--
 include/vcl/BitmapWriteAccess.hxx  |2 +-
 vcl/quartz/salbmp.cxx  |   11 ---
 vcl/source/bitmap/BitmapReadAccess.cxx |2 --
 5 files changed, 3 insertions(+), 17 deletions(-)

New commits:
commit 973771c8cd1e9888f34511919070a0161e079229
Author: Noel Grandin 
AuthorDate: Fri Jan 24 12:10:41 2025 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 24 14:18:34 2025 +0100

no need to store ColorMask in BitmapInfoAccess

when we already have it in the BitmapBuffer we point to

Change-Id: I64158251c113f9dd11f21f4f3f112248b82db5f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180700
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/include/vcl/BitmapInfoAccess.hxx b/include/vcl/BitmapInfoAccess.hxx
index f3ac582b6a16..4e6f38081f7e 100644
--- a/include/vcl/BitmapInfoAccess.hxx
+++ b/include/vcl/BitmapInfoAccess.hxx
@@ -149,7 +149,6 @@ private:
 protected:
 Bitmap maBitmap;
 BitmapBuffer* mpBuffer;
-ColorMask maColorMask;
 BitmapAccessMode mnAccessMode;
 };
 
diff --git a/include/vcl/BitmapReadAccess.hxx b/include/vcl/BitmapReadAccess.hxx
index 7e4a9e2b04c1..79b39cfc5b88 100644
--- a/include/vcl/BitmapReadAccess.hxx
+++ b/include/vcl/BitmapReadAccess.hxx
@@ -60,7 +60,7 @@ public:
 {
 assert(pData && "Access is not valid!");
 
-return mFncGetPixel(pData, nX, maColorMask);
+return mFncGetPixel(pData, nX, mpBuffer->maColorMask);
 }
 
 sal_uInt8 GetIndexFromData(const sal_uInt8* pData, tools::Long nX) const
@@ -72,7 +72,7 @@ public:
 {
 assert(pData && "Access is not valid!");
 
-mFncSetPixel(pData, nX, rBitmapColor, maColorMask);
+mFncSetPixel(pData, nX, rBitmapColor, mpBuffer->maColorMask);
 }
 
 BitmapColor GetPixel(tools::Long nY, tools::Long nX) const
diff --git a/include/vcl/BitmapWriteAccess.hxx 
b/include/vcl/BitmapWriteAccess.hxx
index 631b097438bf..86936457295d 100644
--- a/include/vcl/BitmapWriteAccess.hxx
+++ b/include/vcl/BitmapWriteAccess.hxx
@@ -54,7 +54,7 @@ public:
 assert(nX < mpBuffer->mnWidth && "x-coordinate out of range!");
 assert(nY < mpBuffer->mnHeight && "y-coordinate out of range!");
 
-mFncSetPixel(GetScanline(nY), nX, rBitmapColor, maColorMask);
+mFncSetPixel(GetScanline(nY), nX, rBitmapColor, mpBuffer->maColorMask);
 }
 
 void SetPixelIndex(tools::Long nY, tools::Long nX, sal_uInt8 cIndex)
diff --git a/vcl/source/bitmap/BitmapReadAccess.cxx 
b/vcl/source/bitmap/BitmapReadAccess.cxx
index c5e5a6a92c8e..3588f097b20b 100644
--- a/vcl/source/bitmap/BitmapReadAccess.cxx
+++ b/vcl/source/bitmap/BitmapReadAccess.cxx
@@ -41,8 +41,6 @@ BitmapReadAccess::BitmapReadAccess(const Bitmap& rBitmap, 
BitmapAccessMode nMode
 if (!xImpBmp)
 return;
 
-maColorMask = mpBuffer->maColorMask;
-
 mFncGetPixel = GetPixelFunction(mpBuffer->meFormat);
 mFncSetPixel = SetPixelFunction(mpBuffer->meFormat);
 
commit 9e77eefb0ef2d6a23a2d9833ad9783a194c37d1b
Author: Noel Grandin 
AuthorDate: Fri Jan 24 11:55:11 2025 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 24 14:18:26 2025 +0100

no need to use color mask in QuartzSalBitmap::AcquireBuffer

ever since
commit b29e161488f0291f381f04e2533106321f357c1e
Author: Noel Grandin 
Date:   Fri Jan 10 21:19:54 2025 +0200
make the ScanlineFormat values more explicit

Change-Id: I5a348659e1d341e3f33e0a2636697e37aaabfe47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180699
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx
index ca286b3fc434..82ef64db8ebe 100644
--- a/vcl/quartz/salbmp.cxx
+++ b/vcl/quartz/salbmp.cxx
@@ -46,10 +46,6 @@
 #include 
 #endif
 
-const unsigned long k32BitRedColorMask   = 0x00ff;
-const unsigned long k32BitGreenColorMask = 0xff00;
-const unsigned long k32BitBlueColorMask  = 0x00ff;
-
 QuartzSalBitmap::QuartzSalBitmap()
   : mxCachedImage( nullptr )
   , mnBits(0)
@@ -446,13 +442,6 @@ BitmapBuffer* QuartzSalBitmap::AcquireBuffer( 
BitmapAccessMode /*nMode*/ )
 case 32:
 {
 pBuffer->meFormat = ImplGetSVData()->mpDefInst->supportsBitmap32() 
? ScanlineFormat::N32BitTcArgb : ScanlineFormat::N32BitTcXrgb;
-ColorMaskElement aRedMask(k32BitRedColorMask);
-aRedMask.CalcMaskShift();
-ColorMaskElement aGreenMask(k32BitGreenColorMask);
-aGreenMask.CalcMaskShift();
-ColorMaskElement aBlueMask(k32BitBlueColorMask);
-aBlueMask.CalcMaskShift();
-pBuffer->maColorMask  = ColorMask(aRedMask, aGreenMask, aBlueMask);
 break;
 }
 default: assert(false);


core.git: sc/source

2025-01-24 Thread Xisco Fauli (via logerrit)
 sc/source/core/tool/interpr1.cxx |  137 +++
 1 file changed, 25 insertions(+), 112 deletions(-)

New commits:
commit 577c47a279b4307a563f8387a16b354a470e6830
Author: Xisco Fauli 
AuthorDate: Fri Jan 24 16:10:44 2025 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 24 17:52:07 2025 +0100

sc: factor out common code

Change-Id: Ie76ee43b4fd00d5a1e152532017b3a30581252cf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180715
Reviewed-by: Xisco Fauli 
Tested-by: Jenkins

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 45fdac1ae057..7f955bc410f4 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -8800,6 +8800,22 @@ void ScInterpreter::ScSortBy()
 PushIllegalParameter();
 }
 
+static void lcl_FillCell(const ScMatrixRef& pMatSource, const ScMatrixRef& 
pMatDest, SCSIZE nsC, SCSIZE nsR, SCSIZE ndC, SCSIZE ndR)
+{
+if (pMatSource->IsEmptyCell(nsC, nsR))
+{
+pMatDest->PutEmpty(ndC, ndR);
+}
+else if (!pMatSource->IsStringOrEmpty(nsC, nsR))
+{
+pMatDest->PutDouble(pMatSource->GetDouble(nsC, nsR), ndC, ndR);
+}
+else
+{
+pMatDest->PutString(pMatSource->GetString(nsC, nsR), ndC, ndR);
+}
+}
+
 void ScInterpreter::ScDrop()
 {
 sal_uInt8 nParamCount = GetByte();
@@ -8916,19 +8932,7 @@ void ScInterpreter::ScDrop()
 {
 for (SCSIZE row = 0; row < nRows; ++row)
 {
-if (pMatSource->IsEmptyCell(aResPos[iPos].first, 
aResPos[iPos].second))
-{
-pResMat->PutEmpty(col, row);
-}
-else if (!pMatSource->IsStringOrEmpty(aResPos[iPos].first, 
aResPos[iPos].second))
-{
-pResMat->PutDouble(pMatSource->GetDouble(aResPos[iPos].first, 
aResPos[iPos].second), col, row);
-}
-else
-{
-pResMat->PutString(pMatSource->GetString(aResPos[iPos].first, 
aResPos[iPos].second), col, row);
-}
-
+lcl_FillCell(pMatSource, pResMat, aResPos[iPos].first, 
aResPos[iPos].second, col, row);
 ++iPos;
 }
 }
@@ -9038,20 +9042,7 @@ void ScInterpreter::ScExpand()
 for (SCSIZE row = 0; row < nRows; ++row)
 {
 if (col < nsC && row < nsR)
-{
-if (pMatSource->IsEmptyCell(col, row))
-{
-pResMat->PutEmpty(col, row);
-}
-else if (!pMatSource->IsStringOrEmpty(col, row))
-{
-pResMat->PutDouble(pMatSource->GetDouble(col, row), col, 
row);
-}
-else
-{
-pResMat->PutString(pMatSource->GetString(col, row), col, 
row);
-}
-}
+lcl_FillCell(pMatSource, pResMat, col, row, col, row);
 else
 {
 if (bDouble.has_value())
@@ -9186,19 +9177,7 @@ void ScInterpreter::ScTake()
 {
 for (SCSIZE row = 0; row < nRows; ++row)
 {
-if (pMatSource->IsEmptyCell(aResPos[iPos].first, 
aResPos[iPos].second))
-{
-pResMat->PutEmpty(col, row);
-}
-else if (!pMatSource->IsStringOrEmpty(aResPos[iPos].first, 
aResPos[iPos].second))
-{
-pResMat->PutDouble(pMatSource->GetDouble(aResPos[iPos].first, 
aResPos[iPos].second), col, row);
-}
-else
-{
-pResMat->PutString(pMatSource->GetString(aResPos[iPos].first, 
aResPos[iPos].second), col, row);
-}
-
+lcl_FillCell(pMatSource, pResMat, aResPos[iPos].first, 
aResPos[iPos].second, col, row);
 ++iPos;
 }
 }
@@ -9300,18 +9279,7 @@ void ScInterpreter::ScToCol()
 // fill result matrix to the same column
 for (SCSIZE iPos = 0; iPos < aResPos.size(); ++iPos)
 {
-if (pMatSource->IsEmptyCell(aResPos[iPos].first, aResPos[iPos].second))
-{
-pResMat->PutEmpty(0, iPos);
-}
-else if (!pMatSource->IsStringOrEmpty(aResPos[iPos].first, 
aResPos[iPos].second))
-{
-pResMat->PutDouble(pMatSource->GetDouble(aResPos[iPos].first, 
aResPos[iPos].second), 0, iPos);
-}
-else
-{
-pResMat->PutString(pMatSource->GetString(aResPos[iPos].first, 
aResPos[iPos].second), 0, iPos);
-}
+lcl_FillCell(pMatSource, pResMat, aResPos[iPos].first, 
aResPos[iPos].second, 0, iPos);
 }
 
 PushMatrix(pResMat);
@@ -9411,18 +9379,7 @@ void ScInterpreter::ScToRow()
 // fill result matrix to the same row
 for (SCSIZE iPos = 0; iPos < aResPos.size(); ++iPos)
 {
-if (pMatSource->IsEmptyCell(aResPos[iPos].first, aResPos[iPos].second))
-{
-pResMat->PutEmpty(iPos, 0);
-}
-else if (!pMatSource->IsStr

core.git: sfx2/source

2025-01-24 Thread Miklos Vajna (via logerrit)
 sfx2/source/doc/objmisc.cxx |   10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 99f4c0fc0a0e12ff7e72a4b047a6d8cfdfee5012
Author: Miklos Vajna 
AuthorDate: Fri Jan 24 08:13:51 2025 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 24 14:04:44 2025 +0100

cool#11002 sfx2: fix uncaught exception in 
SfxObjectShell::isContentExtractionLocked()

Similar to commit 71aa5352f6f57283d1db51c980f6f0b802381871 (sfx2: fix
uncaught exception in SfxObjectShell::isEditDocLocked(), 2025-01-23).

Change-Id: I9f6c35c8b2934fee193a4c4211f4d3fbcad12aab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180691
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 7d48d40a7439..868277740b59 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -2035,7 +2035,15 @@ bool SfxObjectShell::isContentExtractionLocked() const
 Reference xModel = GetModel();
 if (!xModel.is())
 return false;
-return comphelper::NamedValueCollection::getOrDefault(xModel->getArgs2( { 
u"LockContentExtraction"_ustr } ), u"LockContentExtraction", false);
+try
+{
+return 
comphelper::NamedValueCollection::getOrDefault(xModel->getArgs2( { 
u"LockContentExtraction"_ustr } ), u"LockContentExtraction", false);
+}
+catch (const uno::RuntimeException&)
+{
+TOOLS_WARN_EXCEPTION("sfx.appl", "unexpected RuntimeException");
+}
+return false;
 }
 
 bool SfxObjectShell::isExportLocked() const


core.git: canvas/source compilerplugins/clang include/vcl vcl/qa vcl/source vcl/win

2025-01-24 Thread Noel Grandin (via logerrit)
 canvas/source/directx/dx_vcltools.cxx  |2 
 compilerplugins/clang/unusedenumconstants.readonly.results |2 
 include/vcl/BitmapBuffer.hxx   |2 
 include/vcl/BitmapReadAccess.hxx   |4 -
 include/vcl/Scanline.hxx   |3 
 vcl/qa/cppunit/canvasbitmaptest.cxx|2 
 vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx  |1 
 vcl/source/bitmap/BitmapFilterStackBlur.cxx|4 -
 vcl/source/bitmap/BitmapReadAccess.cxx |   19 -
 vcl/source/bitmap/BitmapWriteAccess.cxx|5 -
 vcl/source/bitmap/bmpfast.cxx  |   18 
 vcl/source/bitmap/dibtools.cxx |   48 -
 vcl/source/gdi/salmisc.cxx |   12 ---
 vcl/source/helper/canvasbitmap.cxx |9 --
 vcl/win/gdi/salbmp.cxx |   18 
 15 files changed, 23 insertions(+), 126 deletions(-)

New commits:
commit 42cc3b58451dec8a99af9c26e8bc947cce0ae058
Author: Noel Grandin 
AuthorDate: Fri Jan 24 11:52:18 2025 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 24 14:14:14 2025 +0100

N32BitTcMask is unnecessary

The remaining usage site can use N32BitTcXrgb

Change-Id: I97c0a7e97d45dfcb4726b197159ca2f197b43713
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180698
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/canvas/source/directx/dx_vcltools.cxx 
b/canvas/source/directx/dx_vcltools.cxx
index 9b0da87842a2..83978830e0d6 100644
--- a/canvas/source/directx/dx_vcltools.cxx
+++ b/canvas/source/directx/dx_vcltools.cxx
@@ -173,7 +173,6 @@ namespace dxcanvas::tools
 //ScanlineFormat::N1BitMsbPal
 //ScanlineFormat::N8BitPal
 //ScanlineFormat::N24BitTcBgr
-//ScanlineFormat::N32BitTcMask
 
 // and is always ScanlineFormat::BottomUp
 
@@ -234,7 +233,6 @@ namespace dxcanvas::tools
 // to hand-formulate the following
 // formats, too.
 case ScanlineFormat::N1BitMsbPal:
-case ScanlineFormat::N32BitTcMask:
 {
 Scanline pAScan = 
pAlphaReadAccess->GetScanline( y );
 
diff --git a/compilerplugins/clang/unusedenumconstants.readonly.results 
b/compilerplugins/clang/unusedenumconstants.readonly.results
index e8357bb4ad3f..efcc2f8d1ffb 100644
--- a/compilerplugins/clang/unusedenumconstants.readonly.results
+++ b/compilerplugins/clang/unusedenumconstants.readonly.results
@@ -1020,8 +1020,6 @@ include/vcl/rendercontext/DrawImageFlags.hxx:29
 enum DrawImageFlags Highlight
 include/vcl/rendercontext/DrawImageFlags.hxx:30
 enum DrawImageFlags Deactive
-include/vcl/Scanline.hxx:43
-enum ScanlineFormat N32BitTcMask
 include/vcl/skia/SkiaHelper.hxx:31
 enum SkiaHelper::RenderMethod RenderMetal
 include/vcl/vclenum.hxx:39
diff --git a/include/vcl/BitmapBuffer.hxx b/include/vcl/BitmapBuffer.hxx
index a9e91c54505f..8b6322b730ad 100644
--- a/include/vcl/BitmapBuffer.hxx
+++ b/include/vcl/BitmapBuffer.hxx
@@ -47,7 +47,7 @@ struct VCL_DLLPUBLIC BitmapBuffer
 
 VCL_DLLPUBLIC std::optional StretchAndConvert(
 const BitmapBuffer& rSrcBuffer, const SalTwoRect& rTwoRect,
-ScanlineFormat nDstBitmapFormat, std::optional pDstPal = 
std::nullopt, const ColorMask* pDstMask = nullptr );
+ScanlineFormat nDstBitmapFormat, std::optional pDstPal = 
std::nullopt );
 
 #endif // INCLUDED_VCL_BITMAPBUFFER_HXX
 
diff --git a/include/vcl/BitmapReadAccess.hxx b/include/vcl/BitmapReadAccess.hxx
index 0227e4d1df4d..7e4a9e2b04c1 100644
--- a/include/vcl/BitmapReadAccess.hxx
+++ b/include/vcl/BitmapReadAccess.hxx
@@ -155,8 +155,6 @@ public:
const ColorMask& rMask);
 static BitmapColor GetPixelForN32BitTcRgbx(ConstScanline pScanline, 
tools::Long nX,
const ColorMask& rMask);
-static BitmapColor GetPixelForN32BitTcMask(ConstScanline pScanline, 
tools::Long nX,
-   const ColorMask& rMask);
 
 static void SetPixelForN1BitMsbPal(Scanline pScanline, tools::Long nX,
const BitmapColor& rBitmapColor, const 
ColorMask& rMask);
@@ -182,8 +180,6 @@ public:
 const BitmapColor& rBitmapColor, const 
ColorMask& rMask);
 static void SetPixelForN32BitTcRgbx(Scanline pScanline, tools::Long nX,
 const BitmapColor& rBitmapColor, const 
ColorMask& rMask);
-static void SetPixelForN32BitTcMask(Scanline pScanline, tools::Long nX,
-const Bit

core.git: sw/source

2025-01-24 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/lingu/olmenu.cxx |   21 +
 1 file changed, 17 insertions(+), 4 deletions(-)

New commits:
commit 9c55d9be304f0f6eb88488c46031a17e1ccac1eb
Author: Caolán McNamara 
AuthorDate: Fri Dec 20 12:52:57 2024 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 24 13:46:52 2025 +0100

expose Add to Dictionary menu entries to kit

Change-Id: If9a072afef339110a4d44366b1f2e515e6feb55a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178917
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 2ce644117859138121869ff6146822c153ea60f0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180692
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sw/source/uibase/lingu/olmenu.cxx 
b/sw/source/uibase/lingu/olmenu.cxx
index acf36d89a113..b501bd45fc14 100644
--- a/sw/source/uibase/lingu/olmenu.cxx
+++ b/sw/source/uibase/lingu/olmenu.cxx
@@ -361,6 +361,7 @@ SwSpellPopup::SwSpellPopup(
 }
 }
 }
+
 m_xPopupMenu->EnableItem(m_nAddMenuId, (nItemId - MN_DICTIONARIES_START) > 
1);
 m_xPopupMenu->EnableItem(m_nAddId, (nItemId - MN_DICTIONARIES_START) == 1);
 
@@ -595,9 +596,8 @@ void SwSpellPopup::InitItemCommands(const 
css::uno::Sequence< OUString >& aSugge
 m_xPopupMenu->SetItemCommand(nItemId, sCommandString);
 }
 
-PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(m_nLangSelectionMenuId);
 m_xPopupMenu->SetItemCommand(m_nLangSelectionMenuId, 
u".uno:SetSelectionLanguageMenu"_ustr);
-if(pMenu)
+if (PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(m_nLangSelectionMenuId))
 {
 for (const auto& item : m_aLangTable_Text)
 {
@@ -610,9 +610,8 @@ void SwSpellPopup::InitItemCommands(const 
css::uno::Sequence< OUString >& aSugge
 pMenu->SetItemCommand(MN_SET_SELECTION_MORE, 
u".uno:FontDialog?Page:string=font"_ustr);
 }
 
-pMenu = m_xPopupMenu->GetPopupMenu(m_nLangParaMenuId);
 m_xPopupMenu->SetItemCommand(m_nLangParaMenuId, 
u".uno:SetParagraphLanguageMenu"_ustr);
-if(pMenu)
+if (PopupMenu* pMenu = m_xPopupMenu->GetPopupMenu(m_nLangParaMenuId))
 {
 for (const auto& item : m_aLangTable_Paragraph)
 {
@@ -624,6 +623,20 @@ void SwSpellPopup::InitItemCommands(const 
css::uno::Sequence< OUString >& aSugge
 pMenu->SetItemCommand(MN_SET_PARA_RESET, 
u".uno:LanguageStatus?Language:string=Paragraph_RESET_LANGUAGES"_ustr);
 pMenu->SetItemCommand(MN_SET_PARA_MORE, 
u".uno:FontDialogForParagraph"_ustr);
 }
+
+OUString sCommandString = ".uno:AddToWordbook?Wordbook:string=" + 
m_aDicNameSingle;
+m_xPopupMenu->SetItemCommand(m_nAddId, sCommandString);
+m_xPopupMenu->SetItemCommand(m_nAddMenuId, sCommandString);
+if (PopupMenu *pMenu = m_xPopupMenu->GetPopupMenu(m_nAddMenuId))
+{
+for (sal_uInt16 i = 0, nItemCount = pMenu->GetItemCount(); i < 
nItemCount; ++i)
+{
+sal_uInt16 nItemId = pMenu->GetItemId(i);
+OUString sDict = pMenu->GetItemText(nItemId);
+sCommandString = ".uno:AddToWordbook?Wordbook:string=" + sDict;
+pMenu->SetItemCommand(nItemId, sCommandString);
+}
+}
 }
 
 void SwSpellPopup::checkRedline()