sc/sdi/scalc.sdi | 4 ++-- sc/source/ui/view/tabvwsha.cxx | 7 +++++-- sfx2/source/control/unoctitm.cxx | 8 ++++---- 3 files changed, 11 insertions(+), 8 deletions(-)
New commits: commit 44362e588686e33ff60ddcb6c1cd0c6082073fb0 Author: Henry Castro <hcas...@collabora.com> AuthorDate: Wed May 3 16:59:37 2023 -0400 Commit: Henry Castro <hcas...@collabora.com> CommitDate: Mon Jun 12 22:58:18 2023 +0200 sc: fix freeze row/column panes The UNO command state has changed to Point (row, tab) and Point (col, tab), Otherwise, if the row or column has the same value for all sheets, the state cache will not report any changes to the client side. Signed-off-by: Henry Castro <hcas...@collabora.com> Change-Id: I2080f5e664825d81c4fa4dbb2c5d782f188dae64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151344 Tested-by: Andras Timar <andras.ti...@collabora.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151975 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152908 Tested-by: Jenkins diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi index 9da8595a56d5..cfd0f43f580b 100644 --- a/sc/sdi/scalc.sdi +++ b/sc/sdi/scalc.sdi @@ -1947,7 +1947,7 @@ SfxVoidItem FreezePanes SID_WINDOW_FIX GroupId = SfxGroupId::View; ] -SfxInt32Item FreezePanesColumn SID_WINDOW_FIX_COL +SfxPointItem FreezePanesColumn SID_WINDOW_FIX_COL [ AutoUpdate = FALSE, @@ -1964,7 +1964,7 @@ SfxInt32Item FreezePanesColumn SID_WINDOW_FIX_COL GroupId = SfxGroupId::View; ] -SfxInt32Item FreezePanesRow SID_WINDOW_FIX_ROW +SfxPointItem FreezePanesRow SID_WINDOW_FIX_ROW [ AutoUpdate = FALSE, diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx index f1305672a096..231630a4e5d3 100644 --- a/sc/source/ui/view/tabvwsha.cxx +++ b/sc/source/ui/view/tabvwsha.cxx @@ -35,6 +35,7 @@ #include <svl/numformat.hxx> #include <svl/zformat.hxx> #include <svl/int64item.hxx> +#include <svl/ptitem.hxx> #include <svl/srchitem.hxx> #include <svl/srchdefs.hxx> #include <svl/stritem.hxx> @@ -472,9 +473,11 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) case SID_WINDOW_FIX_COL: case SID_WINDOW_FIX_ROW: { + Point aPos; bool bIsCol = (nWhich == SID_WINDOW_FIX_COL); - sal_Int32 nFreezeIndex = rViewData.GetLOKSheetFreezeIndex(bIsCol); - rSet.Put(SfxInt32Item(TypedWhichId<SfxInt32Item>(nWhich), nFreezeIndex)); + aPos.setX(rViewData.GetLOKSheetFreezeIndex(bIsCol)); + aPos.setY(rViewData.GetTabNo()); + rSet.Put(SfxPointItem(nWhich, aPos)); } break; diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index bfc155599a17..1b0d1223a3b7 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -1115,9 +1115,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aEvent.FeatureURL.Path == "StatusSelectionMode" || aEvent.FeatureURL.Path == "Signature" || aEvent.FeatureURL.Path == "SelectionMode" || - aEvent.FeatureURL.Path == "StatusBarFunc" || - aEvent.FeatureURL.Path == "FreezePanesColumn" || - aEvent.FeatureURL.Path == "FreezePanesRow") + aEvent.FeatureURL.Path == "StatusBarFunc") { sal_Int32 aInt32; @@ -1201,7 +1199,9 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, SfxViewFrame* pViewFra aBuffer.append("disabled"); } } - else if (aEvent.FeatureURL.Path == "Position") + else if (aEvent.FeatureURL.Path == "Position" || + aEvent.FeatureURL.Path == "FreezePanesColumn" || + aEvent.FeatureURL.Path == "FreezePanesRow") { css::awt::Point aPoint;