core.git: sc/source

2024-04-21 Thread Sahil Gautam (via logerrit)
 sc/source/ui/view/cellsh1.cxx |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 695e8742da850bbb15c2e6d2b5d4c99a0daf4925
Author: Sahil Gautam 
AuthorDate: Sun Apr 21 23:24:50 2024 +0530
Commit: Stephan Bergmann 
CommitDate: Sun Apr 21 23:15:17 2024 +0200

tdf#80390 Use local copy in anonymous function.

The nCount object might go out of scope, as it's used by
an async function.

https://gerrit.libreoffice.org/c/core/+/164316/comments/507b830b_001a71eb

Change-Id: I4218f6e35b61704115047481cb97a193c593a072
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154750
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 69fbd1ead083..ae55a3312d25 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -352,7 +352,6 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 case FID_INS_CELL:
 {
 InsCellCmd eCmd=INS_NONE;
-size_t nCount = 0;
 
 if ( pReqArgs )
 {
@@ -386,20 +385,21 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
 ScAbstractDialogFactory* pFact = 
ScAbstractDialogFactory::Create();
 
 VclPtr 
pDlg(pFact->CreateScInsertCellDlg(pTabViewShell->GetFrameWeld(), bTheFlag));
-pDlg->StartExecuteAsync([pDlg, pTabViewShell, 
](sal_Int32 nResult){
+pDlg->StartExecuteAsync([pDlg, 
pTabViewShell](sal_Int32 nResult){
 if (nResult == RET_OK)
 {
 SfxRequest 
aRequest(pTabViewShell->GetViewFrame(), FID_INS_CELL);
 InsCellCmd eTmpCmd = pDlg->GetInsCellCmd();
-nCount = pDlg->GetCount();
-InsertCells(pTabViewShell, aRequest, eTmpCmd, 
nCount);
+size_t nInsCount = pDlg->GetCount();
+InsertCells(pTabViewShell, aRequest, eTmpCmd, 
nInsCount);
 }
 pDlg->disposeOnce();
 });
+break;
 }
 }
 
-InsertCells(pTabViewShell, rReq, eCmd, nCount);
+InsertCells(pTabViewShell, rReq, eCmd);
 }
 break;
 


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

2024-04-20 Thread Sahil Gautam (via logerrit)
 sc/inc/scabstdlg.hxx|1 
 sc/source/ui/attrdlg/scdlgfact.cxx  |5 +
 sc/source/ui/attrdlg/scdlgfact.hxx  |1 
 sc/source/ui/docshell/docfunc.cxx   |6 -
 sc/source/ui/inc/docfunc.hxx|2 
 sc/source/ui/inc/inscldlg.hxx   |8 +
 sc/source/ui/inc/viewfunc.hxx   |2 
 sc/source/ui/miscdlgs/inscldlg.cxx  |   42 
 sc/source/ui/view/cellsh1.cxx   |   13 +-
 sc/source/ui/view/viewfunc.cxx  |5 -
 sc/uiconfig/scalc/ui/insertcells.ui |  170 +++-
 11 files changed, 184 insertions(+), 71 deletions(-)

New commits:
commit 05a1217921b7be283c6750a35b90e4feda6e993e
Author: Sahil Gautam 
AuthorDate: Mon Mar 4 04:22:03 2024 +0530
Commit: Thorsten Behrens 
CommitDate: Sat Apr 20 21:58:10 2024 +0200

tdf#80390 Extend InsertCells Dialog to allow adding a set of Rows/Columns

Change-Id: I103574d720fef685b806943672a2aeb1fbf87097
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164316
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens 

diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index afd9abf4fbfc..40cf91404518 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -184,6 +184,7 @@ protected:
 virtual ~AbstractScInsertCellDlg() override = default;
 public:
 virtual InsCellCmd GetInsCellCmd() const = 0;
+virtual size_t GetCount() const = 0;
 };
 
 class AbstractScInsertContentsDlg : public VclAbstractDialog
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx 
b/sc/source/ui/attrdlg/scdlgfact.cxx
index 03926077d9f1..1dba14884dbc 100644
--- a/sc/source/ui/attrdlg/scdlgfact.cxx
+++ b/sc/source/ui/attrdlg/scdlgfact.cxx
@@ -570,6 +570,11 @@ InsCellCmd  AbstractScInsertCellDlg_Impl::GetInsCellCmd() 
const
 return m_xDlg->GetInsCellCmd();
 }
 
+size_t AbstractScInsertCellDlg_Impl::GetCount() const
+{
+return m_xDlg->GetCount();
+}
+
 InsertDeleteFlags AbstractScInsertContentsDlg_Impl::GetInsContentsCmdBits() 
const
 {
 return m_xDlg->GetInsContentsCmdBits();
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx 
b/sc/source/ui/attrdlg/scdlgfact.hxx
index 4644ff4b35e2..e1c2d0f52df3 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -266,6 +266,7 @@ public:
 virtual short Execute() override;
 virtual bool StartExecuteAsync(VclAbstractDialog::AsyncContext ) 
override;
 virtual InsCellCmd GetInsCellCmd() const override ;
+virtual size_t GetCount() const override ;
 };
 
 class AbstractScInsertContentsDlg_Impl : public AbstractScInsertContentsDlg
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index bad24d1cafb2..430fbe53ddd3 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1756,7 +1756,7 @@ bool canDeleteCellsByPivot(const ScRange& rRange, const 
ScMarkData& rMarkData, D
 }
 
 bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* 
pTabMark, InsCellCmd eCmd,
- bool bRecord, bool bApi, bool bPartOfPaste )
+ bool bRecord, bool bApi, bool bPartOfPaste, 
size_t nInsertCount )
 {
 ScDocShellModificator aModificator( rDocShell );
 ScDocument& rDoc = rDocShell.GetDocument();
@@ -1795,8 +1795,8 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 SCCOL nStartCol = aTargetRange.aStart.Col();
 SCROW nStartRow = aTargetRange.aStart.Row();
 SCTAB nStartTab = aTargetRange.aStart.Tab();
-SCCOL nEndCol = aTargetRange.aEnd.Col();
-SCROW nEndRow = aTargetRange.aEnd.Row();
+SCCOL nEndCol = aTargetRange.aEnd.Col() + nInsertCount;
+SCROW nEndRow = aTargetRange.aEnd.Row() + nInsertCount;
 SCTAB nEndTab = aTargetRange.aEnd.Tab();
 
 if ( !rDoc.ValidRow(nStartRow) || !rDoc.ValidRow(nEndRow) )
diff --git a/sc/source/ui/inc/docfunc.hxx b/sc/source/ui/inc/docfunc.hxx
index e1f0bb9eaa34..53f0bcc27104 100644
--- a/sc/source/ui/inc/docfunc.hxx
+++ b/sc/source/ui/inc/docfunc.hxx
@@ -138,7 +138,7 @@ public:
 bool bApi );
 
 boolInsertCells( const ScRange& rRange,const ScMarkData* 
pTabMark,
-  InsCellCmd eCmd, bool bRecord, bool bApi, bool 
bPartOfPaste = false );
+  InsCellCmd eCmd, bool bRecord, bool bApi, bool 
bPartOfPaste = false, size_t nInsertCount = 0 );
 
 boolDeleteCells( const ScRange& rRange, const ScMarkData* 
pTabMark,
   DelCellCmd eCmd, bool bApi );
diff --git a/sc/source/ui/inc/inscldlg.hxx b/sc/source/ui/inc/inscldlg.hxx
index b44bfb60baa9..fdd70fff8738 100644
--- a/sc/source/ui/inc/inscldlg.hxx
+++ b/sc/source/ui/inc/inscldlg.hxx
@@ -30,12 +30,20 @@ private:
 std::unique_ptr m_xBtnCellsRight;
 std::unique_ptr m_xBtnInsRow;
 std::unique_ptr m_xBtnInsCol;
+std::unique_ptr m_xNumberOfRows;
+std::unique_ptr 

core.git: sc/sdi sc/source

2024-03-28 Thread Sahil Gautam (via logerrit)
 sc/sdi/docsh.sdi |1 
 sc/sdi/editsh.sdi|1 
 sc/source/ui/docshell/docsh4.cxx |   48 +++
 sc/source/ui/inc/gridwin.hxx |9 ++
 sc/source/ui/view/editsh.cxx |   10 ---
 sc/source/ui/view/gridwin.cxx|   53 +++
 6 files changed, 111 insertions(+), 11 deletions(-)

New commits:
commit 14396a5361ef72afc99033d4cac29aaeb1ffa2d8
Author: Sahil Gautam 
AuthorDate: Sun Mar 24 00:48:22 2024 +0530
Commit: Michael Weghorn 
CommitDate: Thu Mar 28 21:41:51 2024 +0100

tdf#123159 Make Hyperlinks keyboard accessible

Extend .uno:OpenHyperlinkOnCursor to open all hyperlinks
in a cell, when not in edit mode.

The UNO command can be assigned to a keyboard shortcut from
`Tools > Customize > Keyboard`. If the active cell is not in
edit mode, then pressing the shortcut opens all the hyperlinks
in the cell. If in edit mode, pressing the shortcut opens the
hyperlink under the caret "|".

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

diff --git a/sc/sdi/docsh.sdi b/sc/sdi/docsh.sdi
index b4a8a04326d8..380ddb08e620 100644
--- a/sc/sdi/docsh.sdi
+++ b/sc/sdi/docsh.sdi
@@ -58,6 +58,7 @@ interface TableDocument
 SID_CHART_ADDSOURCE [ ExecMethod = Execute; ]
 FID_AUTO_CALC   [ ExecMethod = Execute; StateMethod = GetState; ]
 FID_RECALC  [ ExecMethod = Execute; StateMethod = GetState; ]
+SID_OPEN_HYPERLINK[ ExecMethod = Execute; StateMethod = GetState; ]
 FID_HARD_RECALC [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_UPDATETABLINKS  [ ExecMethod = Execute; ]
 SID_REIMPORT_AFTER_LOAD [ ExecMethod = Execute; ]
diff --git a/sc/sdi/editsh.sdi b/sc/sdi/editsh.sdi
index 3dd0219948ab..5dd18e81f3a4 100644
--- a/sc/sdi/editsh.sdi
+++ b/sc/sdi/editsh.sdi
@@ -74,7 +74,6 @@ interface TableText
 
 SID_HYPERLINK_SETLINK   [ ExecMethod = Execute; ]
 SID_HYPERLINK_GETLINK   [ StateMethod = GetState; ]
-SID_OPEN_HYPERLINK  [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_EDIT_HYPERLINK  [ ExecMethod = Execute; StateMethod = GetState; ]
 SID_COPY_HYPERLINK_LOCATION [ ExecMethod = Execute; StateMethod = 
GetState; ]
 SID_REMOVE_HYPERLINK  [ ExecMethod = Execute; StateMethod = GetState; ]
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index 741d60cd5c47..0348ce5174be 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -401,6 +401,54 @@ void ScDocShell::Execute( SfxRequest& rReq )
 rReq.Done();
 }
 break;
+case SID_OPEN_HYPERLINK:
+{
+ScViewData* pViewData = GetViewData();
+if ( !pViewData )
+{
+rReq.Ignore();
+break;
+}
+
+if (SC_MOD()->IsEditMode())
+{
+if (EditView* pEditView = 
pViewData->GetEditView(pViewData->GetActivePart()))
+{
+const SvxFieldItem* pFieldItem = 
pEditView->GetFieldAtSelection(/*bAlsoCheckBeforeCursor=*/true);
+const SvxFieldData* pField = pFieldItem ? 
pFieldItem->GetField() : nullptr;
+if (const SvxURLField* pURLField = dynamic_cast(pField))
+{
+ScGlobal::OpenURL(pURLField->GetURL(), 
pURLField->GetTargetFrame(), true);
+rReq.Done();
+break;
+}
+}
+rReq.Ignore();
+break;
+}
+
+ScGridWindow* pWin = pViewData->GetActiveWin();
+if ( !pWin )
+{
+rReq.Ignore();
+break;
+}
+
+ScAddress aCell {pViewData->GetCurPos()};
+std::vector vUrls = pWin->GetEditUrls(aCell);
+if (vUrls.empty())
+{
+rReq.Ignore();
+break;
+}
+
+for (UrlData& data : vUrls)
+{
+ScGlobal::OpenURL(data.aUrl, data.aTarget, true);
+}
+rReq.Done();
+}
+break;
 case FID_RECALC:
 DoRecalc( rReq.IsAPI() );
 rReq.Done();
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 9e91409f514c..5c548e5af824 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -81,6 +81,13 @@ class ScLokRTLContext;
 #define SC_PD_BREAK_H   16
 #define SC_PD_BREAK_V   32
 
+struct UrlData
+{
+OUString aName;
+   

[Libreoffice-commits] core.git: officecfg/registry sc/source sc/uiconfig

2023-12-04 Thread Sahil Gautam (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |1 
 sc/source/ui/inc/tpview.hxx  |1 
 sc/source/ui/optdlg/tpview.cxx   |   12 +++
 sc/uiconfig/scalc/ui/tpviewpage.ui   |   25 +--
 4 files changed, 36 insertions(+), 3 deletions(-)

New commits:
commit a4d11d07fbace142cba82c30ecb09ff99b9bbb6f
Author: Sahil Gautam 
AuthorDate: Mon Nov 13 00:22:11 2023 +0530
Commit: Mike Kaganski 
CommitDate: Mon Dec 4 16:22:54 2023 +0100

tdf#33201 Checkbox Implementation for Col/row Highlight

Change-Id: I32aca7128a3f01be9fd5a7150243f8fd4e82f626
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159001
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 
Reviewed-by: Mike Kaganski 

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index aa58fc81a9a7..e1fe88dfa1d9 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -122,6 +122,7 @@
   false
 
 
+  
   
 Indicates whether the column/row highlight has been enabled 
or not.
 Column/row highlighting
diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx
index 65aed43031d8..72f3b7668732 100644
--- a/sc/source/ui/inc/tpview.hxx
+++ b/sc/source/ui/inc/tpview.hxx
@@ -37,6 +37,7 @@ class ScTpContentOptions : public SfxTabPage
 std::unique_ptr m_xAnnotCB;
 std::unique_ptr m_xFormulaMarkCB;
 std::unique_ptr m_xValueCB;
+std::unique_ptr m_xColRowHighCB;
 std::unique_ptr m_xAnchorCB;
 std::unique_ptr m_xRangeFindCB;
 
diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx
index a31bc5d417fc..4b8595899f04 100644
--- a/sc/source/ui/optdlg/tpview.cxx
+++ b/sc/source/ui/optdlg/tpview.cxx
@@ -19,6 +19,7 @@
 
 #undef SC_DLLIMPLEMENTATION
 
+#include 
 #include 
 #include 
 #include 
@@ -42,6 +43,7 @@ ScTpContentOptions::ScTpContentOptions(weld::Container* 
pPage, weld::DialogContr
 , m_xAnnotCB(m_xBuilder->weld_check_button("annot"))
 , m_xFormulaMarkCB(m_xBuilder->weld_check_button("formulamark"))
 , m_xValueCB(m_xBuilder->weld_check_button("value"))
+, m_xColRowHighCB(m_xBuilder->weld_check_button("colrowhigh"))
 , m_xAnchorCB(m_xBuilder->weld_check_button("anchor"))
 , m_xRangeFindCB(m_xBuilder->weld_check_button("rangefind"))
 , m_xObjGrfLB(m_xBuilder->weld_combo_box("objgrf"))
@@ -71,6 +73,7 @@ ScTpContentOptions::ScTpContentOptions(weld::Container* 
pPage, weld::DialogContr
 m_xAnnotCB->set_accessible_description(ScResId(STR_A11Y_DESC_ANNOT));
 m_xFormulaMarkCB->connect_toggled(aCBHdl);
 m_xValueCB->connect_toggled(aCBHdl);
+m_xColRowHighCB->connect_toggled(aCBHdl);
 m_xAnchorCB->connect_toggled(aCBHdl);
 
 m_xVScrollCB->connect_toggled(aCBHdl);
@@ -156,6 +159,13 @@ boolScTpContentOptions::FillItemSet( SfxItemSet* 
rCoreSet )
 rCoreSet->Put(SfxBoolItem(SID_SC_OPT_SYNCZOOM, 
m_xSyncZoomCB->get_active()));
 bRet = true;
 }
+if (m_xColRowHighCB->get_state_changed_from_saved())
+{
+auto pChange(comphelper::ConfigurationChanges::create());
+
officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::set(m_xColRowHighCB->get_active(),
 pChange);
+pChange->commit();
+bRet = true;
+}
 
 return bRet;
 }
@@ -171,6 +181,7 @@ voidScTpContentOptions::Reset( const SfxItemSet* 
rCoreSet )
 m_xAnnotCB   ->set_active(m_xLocalOptions->GetOption(VOPT_NOTES));
 
m_xFormulaMarkCB->set_active(m_xLocalOptions->GetOption(VOPT_FORMULAS_MARKS));
 m_xValueCB   ->set_active(m_xLocalOptions->GetOption(VOPT_SYNTAX));
+
m_xColRowHighCB->set_active(officecfg::Office::Calc::Content::Display::ColumnRowHighlighting::get());
 m_xAnchorCB  ->set_active(m_xLocalOptions->GetOption(VOPT_ANCHOR));
 
 m_xObjGrfLB  ->set_active( 
static_cast(m_xLocalOptions->GetObjMode(VOBJ_TYPE_OLE)) );
@@ -206,6 +217,7 @@ voidScTpContentOptions::Reset( const SfxItemSet* 
rCoreSet )
 m_xAnnotCB->save_state();
 m_xFormulaMarkCB->save_state();
 m_xValueCB->save_state();
+m_xColRowHighCB->save_state();
 m_xAnchorCB->save_state();
 m_xObjGrfLB->save_value();
 m_xDiagramLB->save_value();
diff --git a/sc/uiconfig/scalc/ui/tpviewpage.ui 
b/sc/uiconfig/scalc/ui/tpviewpage.ui
index b96283d18b69..df87f8e27b3a 100644
--- a/sc/uiconfig/scalc/ui/tpviewpage.ui
+++ b/sc/uiconfig/scalc/ui/tpviewpage.ui
@@ -20,7 +20,7 @@
 0
 none
 
-  
+  
   
 True
 False
@@ -127,7 +127,7 @@
   
   
 0
-5
+6
   
 
 
@@ -146,7 

[Libreoffice-commits] core.git: sc/source

2023-11-19 Thread Sahil Gautam (via logerrit)
 sc/source/ui/view/gridwin4.cxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit b05905dc2da404fd307b4589ca2df424b1bb4d65
Author: Sahil Gautam 
AuthorDate: Sat Nov 18 20:43:07 2023 +0530
Commit: Mike Kaganski 
CommitDate: Sun Nov 19 13:44:36 2023 +0100

tdf#33201 Make Row/column highlight usable

Row/column highlight shouldn't be updated using ScGridWindow::DrawContent
because it would call for highlight refresh even when typing in a cell,
leading to the text being hidden under the highlight.

Change-Id: Ic7cc71bc94629c71e6efdf677b7f34d6c4d0cc93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159636
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 0aede8ad69f8..3639e8287698 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -1411,10 +1411,6 @@ void ScGridWindow::DrawContent(OutputDevice , 
const ScTableInfo& rTableI
 
 if (bPage && bInitialPageBreaks)
 SetupInitialPageBreaks(rDoc, nTab);
-
-// redraw highlighting as well
-ScAddress aCell = getViewData().GetCurPos();
-getViewData().GetViewShell()->SetCursor(aCell.Col(), aCell.Row());
 }
 
 


[Libreoffice-commits] core.git: officecfg/registry sc/source

2023-11-17 Thread Sahil Gautam (via logerrit)
 officecfg/registry/schema/org/openoffice/Office/Calc.xcs |7 +
 sc/source/ui/inc/gridwin.hxx |2 
 sc/source/ui/inc/tabview.hxx |6 +
 sc/source/ui/inc/viewdata.hxx|2 
 sc/source/ui/view/gridwin.cxx|   55 
 sc/source/ui/view/gridwin4.cxx   |4 
 sc/source/ui/view/tabview.cxx|1 
 sc/source/ui/view/tabview2.cxx   |   66 +++
 sc/source/ui/view/tabview3.cxx   |   28 ++
 sc/source/ui/view/viewdata.cxx   |6 +
 10 files changed, 177 insertions(+)

New commits:
commit 487e30bec174342fff07f1f8cc76c9beed4c4843
Author: Sahil Gautam 
AuthorDate: Tue Oct 31 03:57:05 2023 +0530
Commit: Mike Kaganski 
CommitDate: Fri Nov 17 17:35:32 2023 +0100

tdf#33201 Highlight current row and column in spreadsheet

Highlighting functions added

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

diff --git a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
index 3de756beac4e..aa58fc81a9a7 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Calc.xcs
@@ -121,6 +121,13 @@
   
   false
 
+
+  
+Indicates whether the column/row highlight has been enabled 
or not.
+Column/row highlighting
+  
+  false
+
 
   
   
diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 8334e5fd0d51..37c38fe069a0 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -103,6 +103,7 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public 
vcl::DocWindow, public DropTarget
 
 std::unique_ptr mpOOCursors;
 std::unique_ptr mpOOSelection;
+std::unique_ptr mpOOHighlight;
 std::unique_ptr mpOOSelectionBorder;
 std::unique_ptr mpOOAutoFill;
 std::unique_ptr mpOODragRect;
@@ -476,6 +477,7 @@ public:
 voidUpdateCursorOverlay();
 voidDeleteSelectionOverlay();
 voidUpdateSelectionOverlay();
+voidUpdateHighlightOverlay();
 voidDeleteAutoFillOverlay();
 voidUpdateAutoFillOverlay();
 voidDeleteDragRectOverlay();
diff --git a/sc/source/ui/inc/tabview.hxx b/sc/source/ui/inc/tabview.hxx
index edb9dd991971..8c69933cc1af 100644
--- a/sc/source/ui/inc/tabview.hxx
+++ b/sc/source/ui/inc/tabview.hxx
@@ -179,6 +179,7 @@ private:
 tools::LongnPrevDragPos;
 
 BlockMode   meBlockMode;   // Marks block
+BlockMode   meHighlightBlockMode;  // Highlight row/col
 
 SCCOL   nBlockStartX;
 SCCOL   nBlockStartXOrig;
@@ -263,6 +264,8 @@ private:
 
 DECL_STATIC_LINK(ScTabView, InstallLOKNotifierHdl, void*, 
vcl::ILibreOfficeKitNotifier*);
 
+voidUpdateHighlightOverlay();
+
 protected:
 voidUpdateHeaderWidth( const ScVSplitPos* pWhich = nullptr,
 const SCROW* pPosY = nullptr );
@@ -536,6 +539,8 @@ public:
bool bCols = false, bool bRows = false, 
bool bForceNeg = false );
 voidInitOwnBlockMode( const ScRange& rMarkRange );
 voidDoneBlockMode( bool bContinue = false );
+voidInitBlockModeHighlight( SCCOL nCurX, SCROW nCurY, SCTAB 
nCurZ, bool bCols, bool bRows );
+voidDoneBlockModeHighlight( bool bContinue );
 
 boolIsBlockMode() const;
 
@@ -561,6 +566,7 @@ public:
  * @param nModifier: 0, KEY_SHIFT, KEY_MOD1, KEY_SHIFT | KEY_MOD1
  */
 voidMarkRows(SCROW nRow, sal_Int16 nModifier);
+voidHighlightOverlay(const ScAddress& rCell);
 
 voidMarkDataArea( bool bIncludeCursor = true );
 voidMarkMatrixFormula();
diff --git a/sc/source/ui/inc/viewdata.hxx b/sc/source/ui/inc/viewdata.hxx
index 7a6758788ad4..72386b2efa17 100644
--- a/sc/source/ui/inc/viewdata.hxx
+++ b/sc/source/ui/inc/viewdata.hxx
@@ -274,6 +274,7 @@ private:
 
 ::std::vector> maTabData;
 ScMarkData  maMarkData;
+ScMarkData  maHighlightData;
 ScViewDataTable*pThisTab;   // Data of the displayed 
sheet
 ScDocShell* pDocShell;
 ScDocument& mrDoc;
@@ -361,6 +362,7 @@ public:
 SfxDispatcher&  GetDispatcher();// from ViewShell's ViewFrame
 
 ScMarkData& GetMarkData();
+ScMarkData& GetHighlightData();
 const ScMarkData& GetMarkData() const;