core.git: 2 commits - sc/source

2024-05-10 Thread Gökay Şatır (via logerrit)
 sc/source/core/data/markdata.cxx  |   12 +++--
 sc/source/core/data/markmulti.cxx |   47 --
 sc/source/core/tool/address.cxx   |   42 +++--
 sc/source/ui/docshell/docfunc.cxx |8 +++---
 sc/source/ui/view/viewfunc.cxx|   28 --
 5 files changed, 68 insertions(+), 69 deletions(-)

New commits:
commit 8ab95722bc2e64a8cc1fd6b5aa36ecc599a8e1b6
Author: Gökay Şatır 
AuthorDate: Mon Oct 30 12:37:23 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Fri May 10 08:07:11 2024 +0200

Fix row deletion bug.

When multiple users are editing a Calc document:
* If one user selects a whole row and another one deletes a range of rows 
including or above the selected row, app crashes.
* This PR fixes the crash.
* Also when multiple rows are deleted, other user's selected row is moved 
only one row. This PR moves the selected row according to the deleted row count.
* The cursor position was also causing a crash, fixed.

Signed-off-by: Gökay Şatır 
Change-Id: Ie4b893fee7192492efacbb167b747434336384e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158650
Reviewed-by: Marco Cecchetti 
Tested-by: Marco Cecchetti 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167374
Tested-by: Jenkins

diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index afc875983ab1..98a3aebe5c8b 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -670,13 +670,11 @@ void ScMarkData::ShiftCols(const ScDocument& rDoc, SCCOL 
nStartCol, sal_Int32 nC
 void ScMarkData::ShiftRows(const ScDocument& rDoc, SCROW nStartRow, sal_Int32 
nRowOffset)
 {
 if (bMarked)
-{
 aMarkRange.IncRowIfNotLessThan(rDoc, nStartRow, nRowOffset);
-}
-else if (bMultiMarked)
+if (bMultiMarked)
 {
-aMultiSel.ShiftRows(nStartRow, nRowOffset);
 aMultiRange.IncRowIfNotLessThan(rDoc, nStartRow, nRowOffset);
+aMultiSel.ShiftRows(nStartRow, nRowOffset);
 }
 }
 
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index ba6f73f47bec..b976443fc649 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -2405,17 +2405,30 @@ void ScRange::IncColIfNotLessThan(const ScDocument& 
rDoc, SCCOL nStartCol, SCCOL
 
 void ScRange::IncRowIfNotLessThan(const ScDocument& rDoc, SCROW nStartRow, 
SCROW nOffset)
 {
-if (aStart.Row() >= nStartRow)
+SCROW offset;
+if (aStart.Row() > nStartRow)
 {
-aStart.IncRow(nOffset);
+offset = nOffset;
+if (nStartRow + nOffset > aStart.Row())
+offset = aStart.Row() - nStartRow;
+else if (nStartRow - nOffset > aStart.Row())
+offset = -1 * (aStart.Row() - nStartRow);
+
+aStart.IncRow(offset);
 if (aStart.Row() < 0)
 aStart.SetRow(0);
 else if(aStart.Row() > rDoc.MaxRow())
 aStart.SetRow(rDoc.MaxRow());
 }
-if (aEnd.Row() >= nStartRow)
+if (aEnd.Row() > nStartRow)
 {
-aEnd.IncRow(nOffset);
+offset = nOffset;
+if (nStartRow + nOffset > aEnd.Row())
+offset = aEnd.Row() - nStartRow;
+else if (nStartRow - nOffset > aEnd.Row())
+offset = -1 * (aEnd.Row() - nStartRow);
+
+aEnd.IncRow(offset);
 if (aEnd.Row() < 0)
 aEnd.SetRow(0);
 else if(aEnd.Row() > rDoc.MaxRow())
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 55f9c209f599..556cd6e6c940 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2280,7 +2280,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 
 if (bInsertRows)
 {
-pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row(), 1);
+pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row() - (eCmd == 
INS_INSROWS_BEFORE ? 1: 0), 1);
 }
 }
 
@@ -2860,7 +2860,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 }
 if (eCmd == DelCellCmd::Rows)
 {
-pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row(), -1);
+pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row(), -1 * 
(rRange.aEnd.Row() - rRange.aStart.Row() + 1));
 }
 }
 
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index d0945c76febc..679f60295aff 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1776,11 +1776,17 @@ void ScViewFunc::OnLOKInsertDeleteRow(SCROW nStartRow, 
tools::Long nOffset)
 if (pTabViewShell->getPart() == nCurrentTabIndex)
 {
 SCROW nY = pTabViewShell->GetViewData().GetCurY();
-if (nY > nStartRow || (nY == nStartRow && nOffset > 0))
+

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

2024-05-10 Thread Gökay Şatır (via logerrit)
 sc/source/core/data/markdata.cxx  |   12 +++--
 sc/source/core/data/markmulti.cxx |   47 --
 sc/source/core/tool/address.cxx   |   42 +++--
 sc/source/ui/docshell/docfunc.cxx |8 +++---
 sc/source/ui/view/viewfunc.cxx|   28 --
 5 files changed, 68 insertions(+), 69 deletions(-)

New commits:
commit a578321434ada456be3fc7a91b3da9321ce01c5a
Author: Gökay Şatır 
AuthorDate: Mon Oct 30 12:37:23 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Fri May 10 08:02:47 2024 +0200

Fix row deletion bug.

When multiple users are editing a Calc document:
* If one user selects a whole row and another one deletes a range of rows 
including or above the selected row, app crashes.
* This PR fixes the crash.
* Also when multiple rows are deleted, other user's selected row is moved 
only one row. This PR moves the selected row according to the deleted row count.
* The cursor position was also causing a crash, fixed.

Signed-off-by: Gökay Şatır 
Change-Id: Ie4b893fee7192492efacbb167b747434336384e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158650
Reviewed-by: Marco Cecchetti 
Tested-by: Marco Cecchetti 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167373

diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index afc875983ab1..98a3aebe5c8b 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -670,13 +670,11 @@ void ScMarkData::ShiftCols(const ScDocument& rDoc, SCCOL 
nStartCol, sal_Int32 nC
 void ScMarkData::ShiftRows(const ScDocument& rDoc, SCROW nStartRow, sal_Int32 
nRowOffset)
 {
 if (bMarked)
-{
 aMarkRange.IncRowIfNotLessThan(rDoc, nStartRow, nRowOffset);
-}
-else if (bMultiMarked)
+if (bMultiMarked)
 {
-aMultiSel.ShiftRows(nStartRow, nRowOffset);
 aMultiRange.IncRowIfNotLessThan(rDoc, nStartRow, nRowOffset);
+aMultiSel.ShiftRows(nStartRow, nRowOffset);
 }
 }
 
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index ba6f73f47bec..b976443fc649 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -2405,17 +2405,30 @@ void ScRange::IncColIfNotLessThan(const ScDocument& 
rDoc, SCCOL nStartCol, SCCOL
 
 void ScRange::IncRowIfNotLessThan(const ScDocument& rDoc, SCROW nStartRow, 
SCROW nOffset)
 {
-if (aStart.Row() >= nStartRow)
+SCROW offset;
+if (aStart.Row() > nStartRow)
 {
-aStart.IncRow(nOffset);
+offset = nOffset;
+if (nStartRow + nOffset > aStart.Row())
+offset = aStart.Row() - nStartRow;
+else if (nStartRow - nOffset > aStart.Row())
+offset = -1 * (aStart.Row() - nStartRow);
+
+aStart.IncRow(offset);
 if (aStart.Row() < 0)
 aStart.SetRow(0);
 else if(aStart.Row() > rDoc.MaxRow())
 aStart.SetRow(rDoc.MaxRow());
 }
-if (aEnd.Row() >= nStartRow)
+if (aEnd.Row() > nStartRow)
 {
-aEnd.IncRow(nOffset);
+offset = nOffset;
+if (nStartRow + nOffset > aEnd.Row())
+offset = aEnd.Row() - nStartRow;
+else if (nStartRow - nOffset > aEnd.Row())
+offset = -1 * (aEnd.Row() - nStartRow);
+
+aEnd.IncRow(offset);
 if (aEnd.Row() < 0)
 aEnd.SetRow(0);
 else if(aEnd.Row() > rDoc.MaxRow())
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index aa8a5d64d7fe..c33daee69b14 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2280,7 +2280,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 
 if (bInsertRows)
 {
-pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row(), 1);
+pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row() - (eCmd == 
INS_INSROWS_BEFORE ? 1: 0), 1);
 }
 }
 
@@ -2860,7 +2860,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 }
 if (eCmd == DelCellCmd::Rows)
 {
-pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row(), -1);
+pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row(), -1 * 
(rRange.aEnd.Row() - rRange.aStart.Row() + 1));
 }
 }
 
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 8d77023cbaa9..db2bb7c8e717 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1779,11 +1779,17 @@ void ScViewFunc::OnLOKInsertDeleteRow(SCROW nStartRow, 
tools::Long nOffset)
 if (pTabViewShell->getPart() == nCurrentTabIndex)
 {
 SCROW nY = pTabViewShell->GetViewData().GetCurY();
-if (nY > nStartRow || (nY == nStartRow && nOffset > 0))
+if (nY 

core.git: desktop/source include/sfx2 sfx2/source

2024-05-01 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx|   10 --
 include/sfx2/lokhelper.hxx |4 
 sfx2/source/view/lokhelper.cxx |   30 ++
 3 files changed, 38 insertions(+), 6 deletions(-)

New commits:
commit 1ac07d2c9d45cc5db3f689d287ad9be939ef1124
Author: Gökay Şatır 
AuthorDate: Tue Apr 23 14:40:14 2024 +0300
Commit: Gökay ŞATIR 
CommitDate: Wed May 1 16:16:52 2024 +0200

Use a for loop for setting view properties.

Since there may be no view with the given id, checking the list first is 
safer.

Signed-off-by: Gökay Şatır 
Change-Id: I4c305e0a0f6ce7cccdfea9889c414a6054ed3a88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166531
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
(cherry picked from commit 4d8c4a60105488be84ea80775dc04a24582752fb)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166720
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 22a0abd3a6e3..a857dec6f3f5 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7232,26 +7232,24 @@ static void doc_setViewTimezone(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*p
 }
 }
 
-static void doc_setViewReadOnly(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* 
pThis, int nId, const bool readOnly)
+static void doc_setViewReadOnly(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* 
/*pThis*/, int nId, const bool readOnly)
 {
 comphelper::ProfileZone aZone("doc_setViewReadOnly");
 
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
-doc_setView(pThis, nId);
-SfxViewShell::Current()->SetLokReadOnlyView(readOnly);
+SfxLokHelper::setViewReadOnly(nId, readOnly);
 }
 
-static void doc_setAllowChangeComments(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pThis, int nId, const bool allow)
+static void doc_setAllowChangeComments(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* /*pThis*/, int nId, const bool allow)
 {
 comphelper::ProfileZone aZone("doc_setAllowChangeComments");
 
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
-doc_setView(pThis, nId);
-SfxViewShell::Current()->SetAllowChangeComments(allow);
+SfxLokHelper::setAllowChangeComments(nId, allow);
 }
 
 static void doc_setAccessibilityState(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pThis, int nId, bool nEnabled)
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index c4e88035fd96..3820558d6500 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -119,6 +119,10 @@ public:
 static void setDefaultLanguage(const OUString& rBcp47LanguageTag);
 /// Enable/Disable AT support for the given view.
 static void setAccessibilityState(int nId, bool nEnabled);
+// Set the readonly state of the view.
+static void setViewReadOnly(int nId, bool readOnly);
+// In readonly view, can user add / modify comments or not.
+static void setAllowChangeComments(int nId, bool allow);
 /// Get the language used by the loading view (used for all save 
operations).
 static const LanguageTag & getLoadLanguage();
 /// Set the language used by the loading view (used for all save 
operations).
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index ff9f1a8175bf..145484fce9e7 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -342,6 +342,36 @@ void SfxLokHelper::setViewLanguage(int nId, const 
OUString& rBcp47LanguageTag)
 }
 }
 
+void SfxLokHelper::setViewReadOnly(int nId, bool readOnly)
+{
+std::vector& rViewArr = SfxGetpApp()->GetViewShells_Impl();
+
+for (SfxViewShell* pViewShell : rViewArr)
+{
+if (pViewShell && pViewShell->GetViewShellId() == ViewShellId(nId))
+{
+LOK_INFO("lok.readonlyview", "SfxLokHelper::setViewReadOnly: view 
id: " << nId << ", readOnly: " << readOnly);
+pViewShell->SetLokReadOnlyView(readOnly);
+return;
+}
+}
+}
+
+void SfxLokHelper::setAllowChangeComments(int nId, bool allow)
+{
+std::vector& rViewArr = SfxGetpApp()->GetViewShells_Impl();
+
+for (SfxViewShell* pViewShell : rViewArr)
+{
+if (pViewShell && pViewShell->GetViewShellId() == ViewShellId(nId))
+{
+LOK_INFO("lok.readonlyview", 
"SfxLokHelper::setAllowChangeComments: view id: " << nId << ", allow: " << 
allow);
+pViewShell->SetAllowChangeComments(allow);
+return;
+}
+}
+}
+
 void SfxLokHelper::setAccessibilityState(int nId, bool nEnabled)
 {
 std::vector& rViewArr = SfxGetpApp()->GetViewShells_Impl();


core.git: Branch 'distro/collabora/co-24.04' - desktop/source include/sfx2 sfx2/source

2024-04-26 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx|6 ++
 include/sfx2/lokhelper.hxx |4 
 sfx2/source/view/lokhelper.cxx |   30 ++
 3 files changed, 36 insertions(+), 4 deletions(-)

New commits:
commit 4d8c4a60105488be84ea80775dc04a24582752fb
Author: Gökay Şatır 
AuthorDate: Tue Apr 23 14:40:14 2024 +0300
Commit: Michael Meeks 
CommitDate: Fri Apr 26 16:08:38 2024 +0200

Use a for loop for setting view properties.

Since there may be no view with the given id, checking the list first is 
safer.

Signed-off-by: Gökay Şatır 
Change-Id: I4c305e0a0f6ce7cccdfea9889c414a6054ed3a88
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166531
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ba9b45230093..79e5af2fdedd 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7292,8 +7292,7 @@ static void doc_setViewReadOnly(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pTh
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
-doc_setView(pThis, nId);
-SfxViewShell::Current()->SetLokReadOnlyView(readOnly);
+SfxLokHelper::setViewReadOnly(nId, readOnly);
 }
 
 static void doc_setAllowChangeComments(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pThis, int nId, const bool allow)
@@ -7303,8 +7302,7 @@ static void 
doc_setAllowChangeComments(SAL_UNUSED_PARAMETER LibreOfficeKitDocume
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
-doc_setView(pThis, nId);
-SfxViewShell::Current()->SetAllowChangeComments(allow);
+SfxLokHelper::setAllowChangeComments(nId, allow);
 }
 
 static void doc_setAccessibilityState(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pThis, int nId, bool nEnabled)
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 3cdc404a8e2a..96974417430e 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -119,6 +119,10 @@ public:
 static void setDefaultLanguage(const OUString& rBcp47LanguageTag);
 /// Enable/Disable AT support for the given view.
 static void setAccessibilityState(int nId, bool nEnabled);
+// Set the readonly state of the view.
+static void setViewReadOnly(int nId, bool readOnly);
+// In readonly view, can user add / modify comments or not.
+static void setAllowChangeComments(int nId, bool allow);
 /// Get the language used by the loading view (used for all save 
operations).
 static const LanguageTag & getLoadLanguage();
 /// Set the language used by the loading view (used for all save 
operations).
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 80bdb38aa13a..8df19c359442 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -341,6 +341,36 @@ void SfxLokHelper::setViewLanguage(int nId, const 
OUString& rBcp47LanguageTag)
 }
 }
 
+void SfxLokHelper::setViewReadOnly(int nId, bool readOnly)
+{
+std::vector& rViewArr = SfxGetpApp()->GetViewShells_Impl();
+
+for (SfxViewShell* pViewShell : rViewArr)
+{
+if (pViewShell && pViewShell->GetViewShellId() == ViewShellId(nId))
+{
+LOK_INFO("lok.readonlyview", "SfxLokHelper::setViewReadOnly: view 
id: " << nId << ", readOnly: " << readOnly);
+pViewShell->SetLokReadOnlyView(readOnly);
+return;
+}
+}
+}
+
+void SfxLokHelper::setAllowChangeComments(int nId, bool allow)
+{
+std::vector& rViewArr = SfxGetpApp()->GetViewShells_Impl();
+
+for (SfxViewShell* pViewShell : rViewArr)
+{
+if (pViewShell && pViewShell->GetViewShellId() == ViewShellId(nId))
+{
+LOK_INFO("lok.readonlyview", 
"SfxLokHelper::setAllowChangeComments: view id: " << nId << ", allow: " << 
allow);
+pViewShell->SetAllowChangeComments(allow);
+return;
+}
+}
+}
+
 void SfxLokHelper::setAccessibilityState(int nId, bool nEnabled)
 {
 std::vector& rViewArr = SfxGetpApp()->GetViewShells_Impl();


core.git: sc/source

2024-04-06 Thread Gökay Şatır (via logerrit)
 sc/source/ui/view/select.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 3d83f91b9ba249fcfa93fc24a1b427840b7b2c61
Author: Gökay Şatır 
AuthorDate: Fri Mar 15 17:24:53 2024 +0300
Commit: Caolán McNamara 
CommitDate: Sat Apr 6 22:10:47 2024 +0200

Disable dragging in readonly view mode.

Signed-off-by: Gökay Şatır 
Change-Id: I962d68b85897c156bba6d1898cf78b5fcd85540a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164866
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 
(cherry picked from commit 0cdafeb746196f9f1e9ad271a77f5911694ff07d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165726
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index d972c9b4eb8d..7d744f32246c 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -145,6 +145,9 @@ void ScViewFunctionSet::SetSelectionEngine( 
ScViewSelectionEngine* pSelEngine )
 // Drag & Drop
 void ScViewFunctionSet::BeginDrag()
 {
+if (m_pViewData->GetViewShell()->IsLokReadOnlyView())
+return;
+
 SCTAB nTab = m_pViewData->GetTabNo();
 
 SCCOL nPosX;


core.git: sfx2/source

2024-04-03 Thread Gökay Şatır (via logerrit)
 sfx2/source/control/dispatch.cxx |3 +
 sfx2/source/control/unoctitm.cxx |   83 ---
 2 files changed, 3 insertions(+), 83 deletions(-)

New commits:
commit fb471194d04607eb7706f8650f0c92c6e5b8
Author: Gökay Şatır 
AuthorDate: Mon Mar 25 16:49:08 2024 +0300
Commit: Caolán McNamara 
CommitDate: Wed Apr 3 13:07:37 2024 +0200

Use sdi properties for checking uno commands'a availability.

Signed-off-by: Gökay Şatır 
Change-Id: Ie70851756d1a4272876b07fefb876d7e6f8d4d81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165287
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 68422af88576a799b22e472c303ed924c360784b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165734
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index ef59094293b9..6ae4d71a6db9 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1590,6 +1590,9 @@ bool SfxDispatcher::FindServer_(sal_uInt16 nSlot, 
SfxSlotServer& rServer)
 
 bool bReadOnly = ( SfxSlotFilterState::ENABLED_READONLY != nSlotEnableMode 
&& xImp->bReadOnly );
 
+if (!bReadOnly && comphelper::LibreOfficeKit::isActive())
+bReadOnly = xImp->pFrame && xImp->pFrame->GetViewShell() && 
xImp->pFrame->GetViewShell()->IsLokReadOnlyView();
+
 // search through all the shells of the chained dispatchers
 // from top to bottom
 sal_uInt16 nFirstShell = 0;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 23a370a4240f..333879c24d0f 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -520,83 +520,6 @@ void collectUIInformation(const util::URL& rURL, const 
css::uno::Sequence< css::
 
 }
 
-// Checks if LOK is active and uno command is allowed for the current LOK view.
-static bool isCommandAllowedForViewType(const OUString& command)
-{
-if (SfxViewShell::IsCurrentLokViewReadOnly())
-{
-// This is a sublist of "sUnoCommands".
-constexpr OUString allowedCommandList[] = {
-u"Copy"_ustr,
-u"SelectAll"_ustr,
-u"SelectColumn"_ustr,
-u"SelectRow"_ustr,
-u"EntireRow"_ustr,
-u"EntireColumn"_ustr,
-u"EntireCell"_ustr,
-u"RowColSelCount"_ustr,
-u"SpellOnline"_ustr,
-u"StatePageNumber"_ustr,
-u"StateWordCount"_ustr,
-u"StateTableCell"_ustr,
-u"SelectionMode"_ustr,
-u"PageStatus"_ustr,
-u"LayoutStatus"_ustr,
-u"ToolbarMode"_ustr,
-u"ChangeTheme"_ustr,
-u"CopyHyperlinkLocation"_ustr,
-u"ExportDirectToPDF"_ustr,
-u"ExportToPDF"_ustr,
-u"ExportToEPUB"_ustr,
-u"CharRightSel"_ustr,
-u"CharLeftSel"_ustr,
-u"WordRightSel"_ustr,
-u"WordLeftSel"_ustr,
-u"EndOfParaSel"_ustr,
-u"StartOfParaSel"_ustr,
-u"GoRight"_ustr,
-u"GoLeft"_ustr,
-u"GoToNextWord"_ustr,
-u"GoToPrevWord"_ustr,
-u"GoToNextPara"_ustr,
-u"GoToStartOfPara"_ustr,
-u"GoUp"_ustr,
-u"GoDown"_ustr,
-u"GoRightSel"_ustr,
-u"GoLeftSel"_ustr,
-u"GoUpSel"_ustr,
-u"GoDownSel"_ustr,
-u"GoLeftToStartOfData"_ustr,
-u"GoRightToEndOfData"_ustr,
-u"GoToStart"_ustr,
-u"GoToEndOfData"_ustr,
-u"GoUpToStartOfData"_ustr,
-u"GoDownToEndOfData"_ustr,
-u"GoLeftToStartOfDataSel"_ustr,
-u"GoRightToEndOfDataSel"_ustr,
-u"GoUpToStartOfDataSel"_ustr,
-u"GoDownToEndOfDataSel"_ustr
-};
-
-bool allowed = std::find(std::begin(allowedCommandList), 
std::end(allowedCommandList), command) != std::end(allowedCommandList);
-
-if (!allowed && SfxViewShell::Current() && 
SfxViewShell::Current()->IsAllowChangeComments())
-{
-constexpr OUString allowedCommentCommandList[] = {
-u"InsertAnnotation"_ustr,
-u"DeleteComment"_ustr,
-u"DeleteAnnotation"_ustr,
-u"EditAnnotation"_ustr
-};
-allowed = std::find(std::begin(allowedCommentCommandList), 
std::end(allowedCommentCommandList), command) != 
std::end(allowedCommentCommandList);
-}
-
-return allowed;
-}
-
-return true;
-}
-
 void SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
 const css::uno::Sequence< css::beans::PropertyValue >& aArgs,
 const css::uno::Reference< css::frame::XDispatchResultListener >& 
rListener )
@@ -623,12 +546,6 @@ void SfxDispatchController_Impl::dispatch( const 
css::util::URL& 

core.git: sfx2/source

2024-04-03 Thread Gökay Şatır (via logerrit)
 sfx2/source/control/unoctitm.cxx |   30 +-
 1 file changed, 29 insertions(+), 1 deletion(-)

New commits:
commit 5266c1b215263029fe9b35e5365df65d116edf64
Author: Gökay Şatır 
AuthorDate: Fri Mar 22 13:34:38 2024 +0300
Commit: Caolán McNamara 
CommitDate: Wed Apr 3 12:48:41 2024 +0200

Allow more uno commands in readonly view mode.

So user can use keyboard for selection.

Signed-off-by: Gökay Şatır 
Change-Id: Ic7812c88110da9fbefe86d145f921e48360b4f34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165157
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165733
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index d81b191d8623..23a370a4240f 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -547,7 +547,35 @@ static bool isCommandAllowedForViewType(const OUString& 
command)
 u"CopyHyperlinkLocation"_ustr,
 u"ExportDirectToPDF"_ustr,
 u"ExportToPDF"_ustr,
-u"ExportToEPUB"_ustr
+u"ExportToEPUB"_ustr,
+u"CharRightSel"_ustr,
+u"CharLeftSel"_ustr,
+u"WordRightSel"_ustr,
+u"WordLeftSel"_ustr,
+u"EndOfParaSel"_ustr,
+u"StartOfParaSel"_ustr,
+u"GoRight"_ustr,
+u"GoLeft"_ustr,
+u"GoToNextWord"_ustr,
+u"GoToPrevWord"_ustr,
+u"GoToNextPara"_ustr,
+u"GoToStartOfPara"_ustr,
+u"GoUp"_ustr,
+u"GoDown"_ustr,
+u"GoRightSel"_ustr,
+u"GoLeftSel"_ustr,
+u"GoUpSel"_ustr,
+u"GoDownSel"_ustr,
+u"GoLeftToStartOfData"_ustr,
+u"GoRightToEndOfData"_ustr,
+u"GoToStart"_ustr,
+u"GoToEndOfData"_ustr,
+u"GoUpToStartOfData"_ustr,
+u"GoDownToEndOfData"_ustr,
+u"GoLeftToStartOfDataSel"_ustr,
+u"GoRightToEndOfDataSel"_ustr,
+u"GoUpToStartOfDataSel"_ustr,
+u"GoDownToEndOfDataSel"_ustr
 };
 
 bool allowed = std::find(std::begin(allowedCommandList), 
std::end(allowedCommandList), command) != std::end(allowedCommandList);


core.git: chart2/source

2024-04-02 Thread Gökay Şatır (via logerrit)
 chart2/source/controller/main/ChartController_Window.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 3eb61ea78d73c4b1311bf3ec4e5b4e0332e9f0ba
Author: Gökay Şatır 
AuthorDate: Mon Mar 18 15:34:01 2024 +0300
Commit: Caolán McNamara 
CommitDate: Tue Apr 2 12:26:18 2024 +0200

Disable chart modification in readony view mode.

Signed-off-by: Gökay Şatır 
Change-Id: I271caa12eed69099d6f0acd9bdcff53efcc26972
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164970
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit dd232051d7ac43f1f15731916708a95403b78b62)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165627
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index 681c0ae95f0b..116e65090126 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -935,8 +935,8 @@ void ChartController::execute_MouseButtonUp( const 
MouseEvent& rMEvt )
 void ChartController::execute_DoubleClick( const Point* pMousePixel )
 {
 const SfxViewShell* pViewShell = SfxViewShell::Current();
-bool isMobilePhone = pViewShell && pViewShell->isLOKMobilePhone();
-if (isMobilePhone)
+bool notAllowed = pViewShell && (pViewShell->isLOKMobilePhone() || 
pViewShell->IsLokReadOnlyView());
+if (notAllowed)
 return;
 
 bool bEditText = false;


core.git: sfx2/source

2024-03-27 Thread Gökay Şatır (via logerrit)
 sfx2/source/control/unoctitm.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit d5dccc8780c737c0f23164fd98669303e61ba737
Author: Gökay Şatır 
AuthorDate: Mon Mar 18 15:17:32 2024 +0300
Commit: Miklos Vajna 
CommitDate: Wed Mar 27 16:57:06 2024 +0100

Allow export commands in readonly view mode.

(cherry picked from commit 5c8c5db55e082eed3422e3fb9455943b2f285253)

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

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index f8c62b3dae19..d81b191d8623 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -544,7 +544,10 @@ static bool isCommandAllowedForViewType(const OUString& 
command)
 u"LayoutStatus"_ustr,
 u"ToolbarMode"_ustr,
 u"ChangeTheme"_ustr,
-u"CopyHyperlinkLocation"_ustr
+u"CopyHyperlinkLocation"_ustr,
+u"ExportDirectToPDF"_ustr,
+u"ExportToPDF"_ustr,
+u"ExportToEPUB"_ustr
 };
 
 bool allowed = std::find(std::begin(allowedCommandList), 
std::end(allowedCommandList), command) != std::end(allowedCommandList);


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

2024-03-27 Thread Gökay Şatır (via logerrit)
 include/sfx2/dispatch.hxx|1 +
 sfx2/source/control/dispatch.cxx |   32 ++--
 2 files changed, 31 insertions(+), 2 deletions(-)

New commits:
commit 226e2263468da403d1f9db504115830f5a030229
Author: Gökay Şatır 
AuthorDate: Tue Mar 26 18:41:34 2024 +0300
Commit: Gökay ŞATIR 
CommitDate: Wed Mar 27 10:39:09 2024 +0100

Enable allowing comment editing in readOnly view mode.

Signed-off-by: Gökay Şatır 
Change-Id: I536448da395568cd43af6f4d1d36ef09f3c6a6b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165349
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Gökay ŞATIR 

diff --git a/include/sfx2/dispatch.hxx b/include/sfx2/dispatch.hxx
index 7216fc92badc..fee0082fb36b 100644
--- a/include/sfx2/dispatch.hxx
+++ b/include/sfx2/dispatch.hxx
@@ -89,6 +89,7 @@ friend class SfxHelp;
 
 
 boolFindServer_( sal_uInt16 nId, SfxSlotServer  );
+static boolIsCommandAllowedInLokReadOnlyViewMode (OUString 
commandName);
 boolFillState_( const SfxSlotServer ,
 SfxItemSet , const SfxSlot 
*pRealSlot );
 voidExecute_( SfxShell , const SfxSlot ,
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 67f78885a033..81317dab4153 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1521,6 +1521,23 @@ SfxSlotFilterState 
SfxDispatcher::IsSlotEnabledByFilter_Impl( sal_uInt16 nSID )
 return bFound ? SfxSlotFilterState::DISABLED : 
SfxSlotFilterState::ENABLED;
 }
 
+bool SfxDispatcher::IsCommandAllowedInLokReadOnlyViewMode (OUString 
commandName) {
+constexpr OUString allowedList[] = {
+u".uno:InsertAnnotation"_ustr,
+u".uno:ReplyComment"_ustr,
+u".uno:ResolveComment"_ustr,
+u".uno:ResolveCommentThread"_ustr,
+u".uno:DeleteComment"_ustr,
+u".uno:DeleteAnnotation"_ustr,
+u".uno:EditAnnotation"_ustr,
+};
+
+if (std::find(std::begin(allowedList), std::end(allowedList), commandName) 
!= std::end(allowedList))
+return true;
+else
+return false;
+}
+
 /** This helper method searches for the  which currently serves
 the nSlot. As the result, rServe is filled accordingly.
 
@@ -1590,9 +1607,16 @@ bool SfxDispatcher::FindServer_(sal_uInt16 nSlot, 
SfxSlotServer& rServer)
 }
 
 bool bReadOnly = ( SfxSlotFilterState::ENABLED_READONLY != nSlotEnableMode 
&& xImp->bReadOnly );
+bool bCheckForCommentCommands = false;
 
-if (!bReadOnly && comphelper::LibreOfficeKit::isActive())
-bReadOnly = xImp->pFrame && xImp->pFrame->GetViewShell() && 
xImp->pFrame->GetViewShell()->IsLokReadOnlyView();
+if (!bReadOnly && comphelper::LibreOfficeKit::isActive() && xImp->pFrame 
&& xImp->pFrame->GetViewShell())
+{
+SfxViewShell *pViewSh = xImp->pFrame->GetViewShell();
+bReadOnly = pViewSh->IsLokReadOnlyView();
+
+if (bReadOnly && pViewSh->IsAllowChangeComments())
+bCheckForCommentCommands = true;
+}
 
 // search through all the shells of the chained dispatchers
 // from top to bottom
@@ -1606,6 +1630,10 @@ bool SfxDispatcher::FindServer_(sal_uInt16 nSlot, 
SfxSlotServer& rServer)
 SfxInterface *pIFace = pObjShell->GetInterface();
 const SfxSlot *pSlot = pIFace->GetSlot(nSlot);
 
+// This check can be true only if Lokit is active and view is readonly.
+if (pSlot && bCheckForCommentCommands)
+bReadOnly = 
IsCommandAllowedInLokReadOnlyViewMode(pSlot->GetCommand());
+
 if ( pSlot && pSlot->nDisableFlags != SfxDisableFlags::NONE &&
  ( static_cast(pSlot->nDisableFlags) & 
static_cast(pObjShell->GetDisableFlags()) ) != 0 )
 return false;


core.git: desktop/source sfx2/source

2024-03-26 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx  |3 +++
 sfx2/source/control/unoctitm.cxx |   15 ++-
 2 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit c15b872784c8fc0f5e5e813d38c7722f034034d2
Author: Gökay Şatır 
AuthorDate: Fri Mar 8 13:51:01 2024 +0300
Commit: Miklos Vajna 
CommitDate: Tue Mar 26 16:48:51 2024 +0100

Allow enabling saving when comment edit is allowed in readonly.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6eba39cc32f3..99c533c20598 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5079,6 +5079,9 @@ static bool isCommandAllowed(OUString& command) {
 return true;
 else
 {
+if (command == u".uno:Save"_ustr && SfxViewShell::Current() && 
SfxViewShell::Current()->IsAllowChangeComments())
+return true;
+
 for (size_t i = 0; i < std::size(nonAllowedList); i++)
 {
 if (nonAllowedList[i] == command)
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 24beba448818..1068b28e0ac8 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -547,7 +547,20 @@ static bool isCommandAllowedForViewType(const OUString& 
command)
 u"CopyHyperlinkLocation"_ustr
 };
 
-return std::find(std::begin(allowedCommandList), 
std::end(allowedCommandList), command) != std::end(allowedCommandList);
+bool allowed = std::find(std::begin(allowedCommandList), 
std::end(allowedCommandList), command) != std::end(allowedCommandList);
+
+if (!allowed && SfxViewShell::Current() && 
SfxViewShell::Current()->IsAllowChangeComments())
+{
+constexpr OUString allowedCommentCommandList[] = {
+u"InsertAnnotation"_ustr,
+u"DeleteComment"_ustr,
+u"DeleteAnnotation"_ustr,
+u"EditAnnotation"_ustr
+};
+allowed = std::find(std::begin(allowedCommentCommandList), 
std::end(allowedCommentCommandList), command) != 
std::end(allowedCommentCommandList);
+}
+
+return allowed;
 }
 
 return true;


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

2024-03-26 Thread Gökay Şatır (via logerrit)
 sc/source/ui/view/select.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 0cdafeb746196f9f1e9ad271a77f5911694ff07d
Author: Gökay Şatır 
AuthorDate: Fri Mar 15 17:24:53 2024 +0300
Commit: Michael Meeks 
CommitDate: Tue Mar 26 15:40:43 2024 +0100

Disable dragging in readonly view mode.

Signed-off-by: Gökay Şatır 
Change-Id: I962d68b85897c156bba6d1898cf78b5fcd85540a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164866
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index d972c9b4eb8d..7d744f32246c 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -145,6 +145,9 @@ void ScViewFunctionSet::SetSelectionEngine( 
ScViewSelectionEngine* pSelEngine )
 // Drag & Drop
 void ScViewFunctionSet::BeginDrag()
 {
+if (m_pViewData->GetViewShell()->IsLokReadOnlyView())
+return;
+
 SCTAB nTab = m_pViewData->GetTabNo();
 
 SCCOL nPosX;


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

2024-03-26 Thread Gökay Şatır (via logerrit)
 sfx2/source/control/dispatch.cxx |3 +
 sfx2/source/control/unoctitm.cxx |   83 ---
 2 files changed, 3 insertions(+), 83 deletions(-)

New commits:
commit 68422af88576a799b22e472c303ed924c360784b
Author: Gökay Şatır 
AuthorDate: Mon Mar 25 16:49:08 2024 +0300
Commit: Gökay ŞATIR 
CommitDate: Tue Mar 26 10:02:37 2024 +0100

Use sdi properties for checking uno commands'a availability.

Signed-off-by: Gökay Şatır 
Change-Id: Ie70851756d1a4272876b07fefb876d7e6f8d4d81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165287
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 8505c5ea8477..67f78885a033 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1591,6 +1591,9 @@ bool SfxDispatcher::FindServer_(sal_uInt16 nSlot, 
SfxSlotServer& rServer)
 
 bool bReadOnly = ( SfxSlotFilterState::ENABLED_READONLY != nSlotEnableMode 
&& xImp->bReadOnly );
 
+if (!bReadOnly && comphelper::LibreOfficeKit::isActive())
+bReadOnly = xImp->pFrame && xImp->pFrame->GetViewShell() && 
xImp->pFrame->GetViewShell()->IsLokReadOnlyView();
+
 // search through all the shells of the chained dispatchers
 // from top to bottom
 sal_uInt16 nFirstShell = 0;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 3e2a3f125cfd..d99446d01d79 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -520,83 +520,6 @@ void collectUIInformation(const util::URL& rURL, const 
css::uno::Sequence< css::
 
 }
 
-// Checks if LOK is active and uno command is allowed for the current LOK view.
-static bool isCommandAllowedForViewType(const OUString& command)
-{
-if (SfxViewShell::IsCurrentLokViewReadOnly())
-{
-// This is a sublist of "sUnoCommands".
-constexpr OUString allowedCommandList[] = {
-u"Copy"_ustr,
-u"SelectAll"_ustr,
-u"SelectColumn"_ustr,
-u"SelectRow"_ustr,
-u"EntireRow"_ustr,
-u"EntireColumn"_ustr,
-u"EntireCell"_ustr,
-u"RowColSelCount"_ustr,
-u"SpellOnline"_ustr,
-u"StatePageNumber"_ustr,
-u"StateWordCount"_ustr,
-u"StateTableCell"_ustr,
-u"SelectionMode"_ustr,
-u"PageStatus"_ustr,
-u"LayoutStatus"_ustr,
-u"ToolbarMode"_ustr,
-u"ChangeTheme"_ustr,
-u"CopyHyperlinkLocation"_ustr,
-u"ExportDirectToPDF"_ustr,
-u"ExportToPDF"_ustr,
-u"ExportToEPUB"_ustr,
-u"CharRightSel"_ustr,
-u"CharLeftSel"_ustr,
-u"WordRightSel"_ustr,
-u"WordLeftSel"_ustr,
-u"EndOfParaSel"_ustr,
-u"StartOfParaSel"_ustr,
-u"GoRight"_ustr,
-u"GoLeft"_ustr,
-u"GoToNextWord"_ustr,
-u"GoToPrevWord"_ustr,
-u"GoToNextPara"_ustr,
-u"GoToStartOfPara"_ustr,
-u"GoUp"_ustr,
-u"GoDown"_ustr,
-u"GoRightSel"_ustr,
-u"GoLeftSel"_ustr,
-u"GoUpSel"_ustr,
-u"GoDownSel"_ustr,
-u"GoLeftToStartOfData"_ustr,
-u"GoRightToEndOfData"_ustr,
-u"GoToStart"_ustr,
-u"GoToEndOfData"_ustr,
-u"GoUpToStartOfData"_ustr,
-u"GoDownToEndOfData"_ustr,
-u"GoLeftToStartOfDataSel"_ustr,
-u"GoRightToEndOfDataSel"_ustr,
-u"GoUpToStartOfDataSel"_ustr,
-u"GoDownToEndOfDataSel"_ustr
-};
-
-bool allowed = std::find(std::begin(allowedCommandList), 
std::end(allowedCommandList), command) != std::end(allowedCommandList);
-
-if (!allowed && SfxViewShell::Current() && 
SfxViewShell::Current()->IsAllowChangeComments())
-{
-constexpr OUString allowedCommentCommandList[] = {
-u"InsertAnnotation"_ustr,
-u"DeleteComment"_ustr,
-u"DeleteAnnotation"_ustr,
-u"EditAnnotation"_ustr
-};
-allowed = std::find(std::begin(allowedCommentCommandList), 
std::end(allowedCommentCommandList), command) != 
std::end(allowedCommentCommandList);
-}
-
-return allowed;
-}
-
-return true;
-}
-
 void SfxDispatchController_Impl::dispatch( const css::util::URL& aURL,
 const css::uno::Sequence< css::beans::PropertyValue >& aArgs,
 const css::uno::Reference< css::frame::XDispatchResultListener >& 
rListener )
@@ -623,12 +546,6 @@ void SfxDispatchController_Impl::dispatch( const 
css::util::URL& aURL,
 return;
 }
 
-
-if (aURL.Protocol == ".uno:" && !isCommandAllowedForViewType(aURL.Path))
-{
-return;
-}
-
 if (
 !(pDispatch &&
 (


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

2024-03-22 Thread Gökay Şatır (via logerrit)
 sfx2/source/control/unoctitm.cxx |   30 +-
 1 file changed, 29 insertions(+), 1 deletion(-)

New commits:
commit 38baaed9c11a65bda4079274a3d73bbd7035af7c
Author: Gökay Şatır 
AuthorDate: Fri Mar 22 13:34:38 2024 +0300
Commit: Gökay ŞATIR 
CommitDate: Fri Mar 22 12:37:57 2024 +0100

Allow more uno commands in readonly view mode.

So user can use keyboard for selection.

Signed-off-by: Gökay Şatır 
Change-Id: Ic7812c88110da9fbefe86d145f921e48360b4f34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165157
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 59d51a8c3cf1..3e2a3f125cfd 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -547,7 +547,35 @@ static bool isCommandAllowedForViewType(const OUString& 
command)
 u"CopyHyperlinkLocation"_ustr,
 u"ExportDirectToPDF"_ustr,
 u"ExportToPDF"_ustr,
-u"ExportToEPUB"_ustr
+u"ExportToEPUB"_ustr,
+u"CharRightSel"_ustr,
+u"CharLeftSel"_ustr,
+u"WordRightSel"_ustr,
+u"WordLeftSel"_ustr,
+u"EndOfParaSel"_ustr,
+u"StartOfParaSel"_ustr,
+u"GoRight"_ustr,
+u"GoLeft"_ustr,
+u"GoToNextWord"_ustr,
+u"GoToPrevWord"_ustr,
+u"GoToNextPara"_ustr,
+u"GoToStartOfPara"_ustr,
+u"GoUp"_ustr,
+u"GoDown"_ustr,
+u"GoRightSel"_ustr,
+u"GoLeftSel"_ustr,
+u"GoUpSel"_ustr,
+u"GoDownSel"_ustr,
+u"GoLeftToStartOfData"_ustr,
+u"GoRightToEndOfData"_ustr,
+u"GoToStart"_ustr,
+u"GoToEndOfData"_ustr,
+u"GoUpToStartOfData"_ustr,
+u"GoDownToEndOfData"_ustr,
+u"GoLeftToStartOfDataSel"_ustr,
+u"GoRightToEndOfDataSel"_ustr,
+u"GoUpToStartOfDataSel"_ustr,
+u"GoDownToEndOfDataSel"_ustr
 };
 
 bool allowed = std::find(std::begin(allowedCommandList), 
std::end(allowedCommandList), command) != std::end(allowedCommandList);


core.git: desktop/source editeng/source include/sfx2 sc/source sfx2/inc sfx2/source svx/sdi svx/source sw/source

2024-03-21 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx |   28 
 editeng/source/editeng/editview.cxx |3 -
 editeng/source/editeng/impedit2.cxx |   81 +++-
 include/sfx2/viewsh.hxx |1 
 sc/source/ui/app/inputhdl.cxx   |6 +-
 sc/source/ui/view/gridwin.cxx   |2 
 sfx2/inc/unoctitm.hxx   |1 
 sfx2/source/control/dispatch.cxx|   13 -
 sfx2/source/control/unoctitm.cxx|   39 +
 sfx2/source/doc/objmisc.cxx |3 -
 sfx2/source/view/viewsh.cxx |7 +++
 svx/sdi/svx.sdi |2 
 svx/source/svdraw/svdedtv.cxx   |3 -
 sw/source/uibase/docvw/edtwin.cxx   |   68 --
 sw/source/uibase/inc/edtwin.hxx |2 
 sw/source/uibase/uiview/srcview.cxx |2 
 16 files changed, 179 insertions(+), 82 deletions(-)

New commits:
commit 1de1c47471278db2344c986e9d597d6a05e559e9
Author: Gökay Şatır 
AuthorDate: Thu Feb 22 13:54:06 2024 +0300
Commit: Miklos Vajna 
CommitDate: Thu Mar 21 16:32:09 2024 +0100

Moving parts of readonly checks from model to view.

Summary for what's done with this commit:
init.cxx
* Add guards for modify commands.

viewsh:
* Add "IsCurrentLokViewReadOnly" for ease of use.

unocitm:
* Add guard for modify comamnds

dispatch.cxx
* Implement readonlyview.

objmisc:
* Modify IsReadOnlyUI check for LokReadOnly view.

svx.sdi:
* Disable TableChangeCurrentBorderPosition command for readOnly views.

sw-editwin:
* Treat mouse moves as readonly when the view is LokReadOnly.

gridwin:
* For autofilter.

impedit2, inputhdl:
* For text input.

svdedtc:
* For sdr object dragging.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 25ba3ade88c4..6eba39cc32f3 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4686,6 +4686,10 @@ static void 
doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsig
 static void doc_removeTextContext(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nCharBefore, int nCharAfter)
 {
 SolarMutexGuard aGuard;
+
+if (SfxViewShell::IsCurrentLokViewReadOnly())
+return;
+
 VclPtr pWindow;
 if (nLOKWindowId == 0)
 {
@@ -5067,6 +5071,23 @@ void LibLibreOffice_Impl::dumpState(rtl::OStringBuffer 
)
 vcl::lok::dumpState(rState);
 }
 
+// We have special handling for some uno commands and it seems we need to 
check for readonly state.
+static bool isCommandAllowed(OUString& command) {
+static constexpr OUString nonAllowedList[] = { u".uno:Save"_ustr, 
u".uno:TransformDialog"_ustr, u".uno:SidebarShow"_ustr, 
u".uno:SidebarHide"_ustr };
+
+if (!SfxViewShell::IsCurrentLokViewReadOnly())
+return true;
+else
+{
+for (size_t i = 0; i < std::size(nonAllowedList); i++)
+{
+if (nonAllowedList[i] == command)
+return false;
+}
+return true;
+}
+}
+
 static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* 
pCommand, const char* pArguments, bool bNotifyWhenFinished)
 {
 comphelper::ProfileZone aZone("doc_postUnoCommand");
@@ -5076,6 +5097,10 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
 OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8);
+
+if (!isCommandAllowed(aCommand))
+return;
+
 LibLODocument_Impl* pDocument = static_cast(pThis);
 
 std::vector 
aPropertyValuesVector(jsonToPropertyValuesVector(pArguments));
@@ -7133,6 +7158,9 @@ static void 
doc_sendContentControlEvent(LibreOfficeKitDocument* pThis, const cha
 return;
 }
 
+if (SfxViewShell::IsCurrentLokViewReadOnly())
+return;
+
 StringMap aMap(jsdialog::jsonToStringMap(pArguments));
 ITiledRenderable* pDoc = getTiledRenderable(pThis);
 if (!pDoc)
diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index 7f20f65cb0bb..81fbd2d10b39 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -156,6 +156,7 @@ EditView::EditView(EditEngine* pEditEngine, vcl::Window* 
pWindow)
 : mpImpEditView(new ImpEditView(this, pEditEngine, pWindow))
 {
 assert(pEditEngine);
+getImpl().mbReadOnly = getImpl().mbReadOnly || 
SfxViewShell::IsCurrentLokViewReadOnly();
 }
 
 EditView::~EditView()
@@ -253,7 +254,7 @@ void EditView::Invalidate()
 
 void EditView::SetReadOnly( bool bReadOnly )
 {
-getImpl().mbReadOnly = bReadOnly;
+getImpl().mbReadOnly = bReadOnly || 

core.git: desktop/qa desktop/source include/LibreOfficeKit include/sfx2

2024-03-19 Thread Gökay Şatır (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |3 ++-
 desktop/source/lib/init.cxx |   15 +++
 include/LibreOfficeKit/LibreOfficeKit.h |3 +++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   10 ++
 include/sfx2/viewsh.hxx |3 +++
 5 files changed, 33 insertions(+), 1 deletion(-)

New commits:
commit d50d40b12cf3077dd83e7d3da33e6f3a15e44e14
Author: Gökay Şatır 
AuthorDate: Wed Mar 6 15:36:44 2024 +0300
Commit: Miklos Vajna 
CommitDate: Tue Mar 19 16:53:37 2024 +0100

Allow enabling comment editing in readonly view mode.

Online side can set this property to allow comment editing. This is the 
infra.
Implementation will be in another commit.

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

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 1239af480598..1a0c2fed27b1 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3677,9 +3677,10 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(70), offsetof(struct 
_LibreOfficeKitDocumentClass, getA11yFocusedParagraph));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(71), offsetof(struct 
_LibreOfficeKitDocumentClass, getA11yCaretPosition));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), offsetof(struct 
_LibreOfficeKitDocumentClass, setViewReadOnly));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), offsetof(struct 
_LibreOfficeKitDocumentClass, setAllowChangeComments));
 
 // As above
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(74), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 90bddb4fb899..8550b9d91b1b 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1293,6 +1293,8 @@ static void doc_setViewTimezone(LibreOfficeKitDocument* 
pThis, int nId, const ch
 
 static void doc_setViewReadOnly(LibreOfficeKitDocument* pThis, int nId, const 
bool readonly);
 
+static void doc_setAllowChangeComments(LibreOfficeKitDocument* pThis, int nId, 
const bool allow);
+
 static void doc_setAccessibilityState(LibreOfficeKitDocument* pThis, int nId, 
bool bEnabled);
 
 static char* doc_getA11yFocusedParagraph(LibreOfficeKitDocument* pThis);
@@ -1493,6 +1495,8 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference 
 xC
 
 m_pDocumentClass->setViewReadOnly = doc_setViewReadOnly;
 
+m_pDocumentClass->setAllowChangeComments = doc_setAllowChangeComments;
+
 gDocumentClass = m_pDocumentClass;
 }
 pClass = m_pDocumentClass.get();
@@ -7210,6 +7214,17 @@ static void doc_setViewReadOnly(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pTh
 SfxViewShell::Current()->SetLokReadOnlyView(readOnly);
 }
 
+static void doc_setAllowChangeComments(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pThis, int nId, const bool allow)
+{
+comphelper::ProfileZone aZone("doc_setAllowChangeComments");
+
+SolarMutexGuard aGuard;
+SetLastExceptionMsg();
+
+doc_setView(pThis, nId);
+SfxViewShell::Current()->SetAllowChangeComments(allow);
+}
+
 static void doc_setAccessibilityState(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pThis, int nId, bool nEnabled)
 {
 SolarMutexGuard aGuard;
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index b28bae7e1ebc..de7be575e445 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -517,6 +517,9 @@ struct _LibreOfficeKitDocumentClass
 /// @see lok::Document::setViewReadOnly().
 void (*setViewReadOnly) (LibreOfficeKitDocument* pThis, int nId, const 
bool readOnly);
 
+/// @see lok::Document::setAllowChangeComments().
+void (*setAllowChangeComments) (LibreOfficeKitDocument* pThis, int nId, 
const bool allow);
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 4bf818fad747..7858f90c953b 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -869,6 +869,16 @@ public:
 mpDoc->pClass->setViewReadOnly(mpDoc, nId, readOnly);
 }
 
+/** Set if the view can edit comments on readonly mode or not.
+ *
+ * @param nId view ID
+ * @param allow
+*/
+void setAllowChangeComments(int nId, const bool allow)
+{
+mpDoc->pClass->setAllowChangeComments(mpDoc, nId, allow);
+}
+
 /**
  * Enable/Disable accessibility support for the window with the specified 
nId.
  *
diff 

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

2024-03-18 Thread Gökay Şatır (via logerrit)
 chart2/source/controller/main/ChartController_Window.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dd232051d7ac43f1f15731916708a95403b78b62
Author: Gökay Şatır 
AuthorDate: Mon Mar 18 15:34:01 2024 +0300
Commit: Gökay ŞATIR 
CommitDate: Mon Mar 18 15:37:35 2024 +0100

Disable chart modification in readony view mode.

Signed-off-by: Gökay Şatır 
Change-Id: I271caa12eed69099d6f0acd9bdcff53efcc26972
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164970
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 

diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index 1b2b3654c201..20ba98a6e76d 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -937,8 +937,8 @@ void ChartController::execute_MouseButtonUp( const 
MouseEvent& rMEvt )
 void ChartController::execute_DoubleClick( const Point* pMousePixel )
 {
 const SfxViewShell* pViewShell = SfxViewShell::Current();
-bool isMobilePhone = pViewShell && pViewShell->isLOKMobilePhone();
-if (isMobilePhone)
+bool notAllowed = pViewShell && (pViewShell->isLOKMobilePhone() || 
pViewShell->IsLokReadOnlyView());
+if (notAllowed)
 return;
 
 bool bEditText = false;


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

2024-03-18 Thread Gökay Şatır (via logerrit)
 sfx2/source/control/unoctitm.cxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 5c8c5db55e082eed3422e3fb9455943b2f285253
Author: Gökay Şatır 
AuthorDate: Mon Mar 18 15:17:32 2024 +0300
Commit: Gökay ŞATIR 
CommitDate: Mon Mar 18 14:41:09 2024 +0100

Allow export commands in readonly view mode.

Signed-off-by: Gökay Şatır 
Change-Id: I88e9a45fd9e5c7b6bf1984a424e36b010aaaff4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164969
Reviewed-by: Michael Meeks 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 8072e1a9ad8d..59d51a8c3cf1 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -544,7 +544,10 @@ static bool isCommandAllowedForViewType(const OUString& 
command)
 u"LayoutStatus"_ustr,
 u"ToolbarMode"_ustr,
 u"ChangeTheme"_ustr,
-u"CopyHyperlinkLocation"_ustr
+u"CopyHyperlinkLocation"_ustr,
+u"ExportDirectToPDF"_ustr,
+u"ExportToPDF"_ustr,
+u"ExportToEPUB"_ustr
 };
 
 bool allowed = std::find(std::begin(allowedCommandList), 
std::end(allowedCommandList), command) != std::end(allowedCommandList);


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

2024-03-08 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx  |3 +++
 sfx2/source/control/unoctitm.cxx |   15 ++-
 2 files changed, 17 insertions(+), 1 deletion(-)

New commits:
commit b44a1fdd7e0f5f7be02665407ebbc15b977d2f7b
Author: Gökay Şatır 
AuthorDate: Fri Mar 8 13:51:01 2024 +0300
Commit: Michael Meeks 
CommitDate: Fri Mar 8 14:55:10 2024 +0100

Allow enabling saving when comment edit is allowed in readonly.

Signed-off-by: Gökay Şatır 
Change-Id: I88d535a5b23fb6d5de8e72eec61bdf3550bc757d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164570
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c98362b6ba63..739ba2a42021 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5124,6 +5124,9 @@ static bool isCommandAllowed(OUString& command) {
 return true;
 else
 {
+if (command == u".uno:Save"_ustr && SfxViewShell::Current() && 
SfxViewShell::Current()->IsAllowChangeComments())
+return true;
+
 for (size_t i = 0; i < std::size(nonAllowedList); i++)
 {
 if (nonAllowedList[i] == command)
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 7ddfd50a0796..9b588293082b 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -547,7 +547,20 @@ static bool isCommandAllowedForViewType(const OUString& 
command)
 u"CopyHyperlinkLocation"_ustr
 };
 
-return std::find(std::begin(allowedCommandList), 
std::end(allowedCommandList), command) != std::end(allowedCommandList);
+bool allowed = std::find(std::begin(allowedCommandList), 
std::end(allowedCommandList), command) != std::end(allowedCommandList);
+
+if (!allowed && SfxViewShell::Current() && 
SfxViewShell::Current()->IsAllowChangeComments())
+{
+constexpr OUString allowedCommentCommandList[] = {
+u"InsertAnnotation"_ustr,
+u"DeleteComment"_ustr,
+u"DeleteAnnotation"_ustr,
+u"EditAnnotation"_ustr
+};
+allowed = std::find(std::begin(allowedCommentCommandList), 
std::end(allowedCommentCommandList), command) != 
std::end(allowedCommentCommandList);
+}
+
+return allowed;
 }
 
 return true;


core.git: Branch 'distro/collabora/co-24.04' - desktop/qa desktop/source include/LibreOfficeKit include/sfx2

2024-03-08 Thread Gökay Şatır (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |3 ++-
 desktop/source/lib/init.cxx |   15 +++
 include/LibreOfficeKit/LibreOfficeKit.h |3 +++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   10 ++
 include/sfx2/viewsh.hxx |3 +++
 5 files changed, 33 insertions(+), 1 deletion(-)

New commits:
commit 963ec97d3325cfb2d6c001100b1941b243fccdb3
Author: Gökay Şatır 
AuthorDate: Wed Mar 6 15:36:44 2024 +0300
Commit: Michael Meeks 
CommitDate: Fri Mar 8 14:54:40 2024 +0100

Allow enabling comment editing in readonly view mode.

Online side can set this property to allow comment editing. This is the 
infra.
Implementation will be in another commit.

Signed-off-by: Gökay Şatır 
Change-Id: I3a6f1ad6818c2c6587d98896c3d6d913d51a2295
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164467
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 1239af480598..1a0c2fed27b1 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3677,9 +3677,10 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(70), offsetof(struct 
_LibreOfficeKitDocumentClass, getA11yFocusedParagraph));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(71), offsetof(struct 
_LibreOfficeKitDocumentClass, getA11yCaretPosition));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), offsetof(struct 
_LibreOfficeKitDocumentClass, setViewReadOnly));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), offsetof(struct 
_LibreOfficeKitDocumentClass, setAllowChangeComments));
 
 // As above
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(74), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index bde805eedce5..c98362b6ba63 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1298,6 +1298,8 @@ static void doc_setViewTimezone(LibreOfficeKitDocument* 
pThis, int nId, const ch
 
 static void doc_setViewReadOnly(LibreOfficeKitDocument* pThis, int nId, const 
bool readonly);
 
+static void doc_setAllowChangeComments(LibreOfficeKitDocument* pThis, int nId, 
const bool allow);
+
 static void doc_setAccessibilityState(LibreOfficeKitDocument* pThis, int nId, 
bool bEnabled);
 
 static char* doc_getA11yFocusedParagraph(LibreOfficeKitDocument* pThis);
@@ -1498,6 +1500,8 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference 
 xC
 
 m_pDocumentClass->setViewReadOnly = doc_setViewReadOnly;
 
+m_pDocumentClass->setAllowChangeComments = doc_setAllowChangeComments;
+
 gDocumentClass = m_pDocumentClass;
 }
 pClass = m_pDocumentClass.get();
@@ -7241,6 +7245,17 @@ static void doc_setViewReadOnly(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pTh
 SfxViewShell::Current()->SetLokReadOnlyView(readOnly);
 }
 
+static void doc_setAllowChangeComments(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pThis, int nId, const bool allow)
+{
+comphelper::ProfileZone aZone("doc_setAllowChangeComments");
+
+SolarMutexGuard aGuard;
+SetLastExceptionMsg();
+
+doc_setView(pThis, nId);
+SfxViewShell::Current()->SetAllowChangeComments(allow);
+}
+
 static void doc_setAccessibilityState(SAL_UNUSED_PARAMETER 
LibreOfficeKitDocument* pThis, int nId, bool nEnabled)
 {
 SolarMutexGuard aGuard;
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index abcd404af615..450366ccb70c 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -517,6 +517,9 @@ struct _LibreOfficeKitDocumentClass
 /// @see lok::Document::setViewReadOnly().
 void (*setViewReadOnly) (LibreOfficeKitDocument* pThis, int nId, const 
bool readOnly);
 
+/// @see lok::Document::setAllowChangeComments().
+void (*setAllowChangeComments) (LibreOfficeKitDocument* pThis, int nId, 
const bool allow);
+
 #endif // defined LOK_USE_UNSTABLE_API || defined LIBO_INTERNAL_ONLY
 };
 
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx 
b/include/LibreOfficeKit/LibreOfficeKit.hxx
index b5340b37232c..8b7a211804be 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -869,6 +869,16 @@ public:
 mpDoc->pClass->setViewReadOnly(mpDoc, nId, readOnly);
 }
 
+/** Set if the view can edit comments on readonly mode or not.
+ *
+ * @param nId view ID
+ * @param allow
+*/
+void setAllowChangeComments(int nId, const bool allow)
+{
+mpDoc->pClass->setAllowChangeComments(mpDoc, nId, allow);
+}
+
 /**
  * Enable/Disable accessibility support for 

core.git: desktop/qa desktop/source include/LibreOfficeKit include/sfx2 sw/source

2024-03-07 Thread Gökay Şatır (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   18 +++---
 desktop/source/lib/init.cxx |   15 +++
 include/LibreOfficeKit/LibreOfficeKit.h |3 +++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   10 ++
 include/sfx2/viewsh.hxx |4 
 sw/source/core/view/viewsh.cxx  |4 ++--
 6 files changed, 41 insertions(+), 13 deletions(-)

New commits:
commit 97d32edf39e9d64866d8cee6ab8b5c947c6e18db
Author: Gökay Şatır 
AuthorDate: Fri Feb 16 08:43:14 2024 +0300
Commit: Miklos Vajna 
CommitDate: Thu Mar 7 15:44:29 2024 +0100

Collaborative editing with readonly and edit views.

We can have both readOnly and editor views at the same time while 
collaboratively editing a document.
Our current solution is to disable any command if the user's view is 
readonly.
We want to have a closer behaviour to desktop app with readonly views.
For this purpose, we are allowing more interactions from online server to 
core side.
We also need to filter out the events like the core side readonly view do 
(next commit).
This commit initiates the readonly view infrastructure.

The patches previous commit reverts were an example of how we disable 
things in readonly mode. We needed to open a window for getting hyperlink 
information.
With this patch, we try to separate the edit and readonly view modes on 
core side.

More notes:

We need "&& !comphelper::LibreOfficeKit::isActive()" or it falls into an 
endless loop with this patch.
When we disable editing on a browser, almost all user actions are disabled.

(cherry picked from commit 81dae2ca5187bd24aea0befb099a5b53535b5d03)

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

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 87afe69166a8..1239af480598 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3668,22 +3668,18 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(61), offsetof(struct 
_LibreOfficeKitDocumentClass, sendFormFieldEvent));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(62), offsetof(struct 
_LibreOfficeKitDocumentClass, setBlockedCommandList));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(63), offsetof(struct 
_LibreOfficeKitDocumentClass, renderSearchResult));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(64),
- offsetof(struct _LibreOfficeKitDocumentClass, 
sendContentControlEvent));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(64), offsetof(struct 
_LibreOfficeKitDocumentClass, sendContentControlEvent));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), offsetof(struct 
_LibreOfficeKitDocumentClass, getSelectionTypeAndText));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(66), offsetof(struct 
_LibreOfficeKitDocumentClass, getDataArea));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), offsetof(struct 
_LibreOfficeKitDocumentClass, getEditMode));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(68),
- offsetof(struct _LibreOfficeKitDocumentClass, 
setViewTimezone));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(69),
- offsetof(struct _LibreOfficeKitDocumentClass, 
setAccessibilityState));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(70),
- offsetof(struct _LibreOfficeKitDocumentClass, 
getA11yFocusedParagraph));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(71),
- offsetof(struct _LibreOfficeKitDocumentClass, 
getA11yCaretPosition));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(68), offsetof(struct 
_LibreOfficeKitDocumentClass, setViewTimezone));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), offsetof(struct 
_LibreOfficeKitDocumentClass, setAccessibilityState));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(70), offsetof(struct 
_LibreOfficeKitDocumentClass, getA11yFocusedParagraph));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(71), offsetof(struct 
_LibreOfficeKitDocumentClass, getA11yCaretPosition));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), offsetof(struct 
_LibreOfficeKitDocumentClass, setViewReadOnly));
 
 // As above
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 92f3d52affef..6d221ec84418 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1291,6 +1291,8 @@ static void 
doc_sendContentControlEvent(LibreOfficeKitDocument* pThis, const cha
 
 static void 

core.git: desktop/qa desktop/source include/LibreOfficeKit include/vcl sc/inc sc/source sd/source sw/inc sw/source

2024-03-06 Thread Gökay Şatır (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |5 +
 desktop/source/lib/init.cxx |   18 --
 include/LibreOfficeKit/LibreOfficeKit.h |3 ---
 include/LibreOfficeKit/LibreOfficeKit.hxx   |5 -
 include/vcl/ITiledRenderable.hxx|6 --
 sc/inc/docuno.hxx   |3 ---
 sc/source/ui/unoobj/docuno.cxx  |   18 --
 sd/source/ui/inc/unomodel.hxx   |2 --
 sd/source/ui/unoidl/unomodel.cxx|   25 -
 sw/inc/unotxdoc.hxx |2 --
 sw/source/uibase/uno/unotxdoc.cxx   |   19 ---
 11 files changed, 1 insertion(+), 105 deletions(-)

New commits:
commit 693b7fcf7aef50ef6a55c170880f2854afd8fb12
Author: Gökay Şatır 
AuthorDate: Wed Feb 14 12:08:17 2024 +0300
Commit: Miklos Vajna 
CommitDate: Thu Mar 7 08:12:11 2024 +0100

Revert hyperlinkInfoAtPositon changes.

Revert "Implement hyperlinkInfoAtPosition for Impress."

This reverts commit 876543305c78cb596720da087454a5c54e5feb06.

Revert "Readonly Hyperlink Info - normalize the clicked coordinates."

This reverts commit 322669725b771f5fa2b3c10c5fb73238ca3713f6.

Revert "Implement hyperlinkInfoAtPosition function for Calc."

This reverts commit be01dd78c47b51b19603a6259504e29b11979b0b.

Revert "Implement hyperlinkInfoAtPosition for Writer."

This reverts commit 6773c8929690f557d29bc282dd8f5c4381da3484.

Revert "In readonly mode, we restrict many events like click."

This reverts commit a4f3b97e506f38e0c43d6fbf1192cc523750a9fd.

(cherry picked from commit c3f1d63178d6aaa0888085c7b641eb6d49a18276)

Conflicts:
sc/source/ui/unoobj/docuno.cxx
sd/source/ui/unoidl/unomodel.cxx
sw/source/uibase/uno/unotxdoc.cxx

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

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index c9f276a67eeb..87afe69166a8 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3682,11 +3682,8 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(71),
  offsetof(struct _LibreOfficeKitDocumentClass, 
getA11yCaretPosition));
 
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(72),
- offsetof(struct _LibreOfficeKitDocumentClass, 
hyperlinkInfoAtPosition));
-
 // As above
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 93efef57d138..92f3d52affef 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1138,9 +1138,6 @@ static void 
doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis,
 unsigned nWindowId,
 int nType,
 const char* pText);
-
-static char* doc_hyperlinkInfoAtPosition(LibreOfficeKitDocument *pThis, int x, 
int y);
-
 static void doc_removeTextContext(LibreOfficeKitDocument* pThis,
   unsigned nLOKWindowId,
   int nCharBefore,
@@ -1426,7 +1423,6 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference 
 xC
 m_pDocumentClass->registerCallback = doc_registerCallback;
 m_pDocumentClass->postKeyEvent = doc_postKeyEvent;
 m_pDocumentClass->postWindowExtTextInputEvent = 
doc_postWindowExtTextInputEvent;
-m_pDocumentClass->hyperlinkInfoAtPosition = 
doc_hyperlinkInfoAtPosition;
 m_pDocumentClass->removeTextContext = doc_removeTextContext;
 m_pDocumentClass->postWindowKeyEvent = doc_postWindowKeyEvent;
 m_pDocumentClass->postMouseEvent = doc_postMouseEvent;
@@ -4718,20 +4714,6 @@ static void 
doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsig
 SfxLokHelper::postExtTextEventAsync(pWindow, nType, 
OUString::fromUtf8(std::string_view(pText, strlen(pText;
 }
 
-static char* doc_hyperlinkInfoAtPosition(LibreOfficeKitDocument* pThis, int x, 
int y)
-{
-SolarMutexGuard aGuard;
-
-ITiledRenderable* pDoc = getTiledRenderable(pThis);
-if (!pDoc)
-{
-SetLastExceptionMsg("Document doesn't support tiled rendering");
-return nullptr;
-}
-
-return convertOUString(pDoc->hyperlinkInfoAtPosition(x, y));
-}
-
 static void doc_removeTextContext(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int 

core.git: Branch 'distro/collabora/co-24.04' - desktop/source editeng/source include/sfx2 sc/source sfx2/inc sfx2/source svx/sdi svx/source sw/source

2024-03-06 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx |   28 
 editeng/source/editeng/editview.cxx |3 -
 editeng/source/editeng/impedit2.cxx |   83 +++-
 include/sfx2/viewsh.hxx |1 
 sc/source/ui/app/inputhdl.cxx   |6 +-
 sc/source/ui/view/gridwin.cxx   |2 
 sfx2/inc/unoctitm.hxx   |1 
 sfx2/source/control/dispatch.cxx|   13 +++--
 sfx2/source/control/unoctitm.cxx|   39 
 sfx2/source/doc/objmisc.cxx |3 -
 sfx2/source/view/viewsh.cxx |7 +++
 svx/sdi/svx.sdi |2 
 svx/source/svdraw/svdedtv.cxx   |3 -
 sw/source/uibase/docvw/edtwin.cxx   |   68 +++--
 sw/source/uibase/inc/edtwin.hxx |2 
 sw/source/uibase/uiview/srcview.cxx |2 
 16 files changed, 180 insertions(+), 83 deletions(-)

New commits:
commit c60598390725cc23dc1401beec057f1386226ac8
Author: Gökay Şatır 
AuthorDate: Thu Feb 22 13:54:06 2024 +0300
Commit: Gökay ŞATIR 
CommitDate: Wed Mar 6 11:21:47 2024 +0100

Moving parts of readonly checks from model to view.

Summary for what's done with this commit:
init.cxx
* Add guards for modify commands.

viewsh:
* Add "IsCurrentLokViewReadOnly" for ease of use.

unocitm:
* Add guard for modify comamnds

dispatch.cxx
* Implement readonlyview.

objmisc:
* Modify IsReadOnlyUI check for LokReadOnly view.

svx.sdi:
* Disable TableChangeCurrentBorderPosition command for readOnly views.

sw-editwin:
* Treat mouse moves as readonly when the view is LokReadOnly.

gridwin:
* For autofilter.

impedit2, inputhdl:
* For text input.

svdedtc:
* For sdr object dragging.

Signed-off-by: Gökay Şatır 
Change-Id: I71fc353976256bce22042bbb6042ee464b65cc13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163731
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Gökay ŞATIR 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 939fe2afc09f..586d9b4d84cc 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4726,6 +4726,10 @@ static void 
doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsig
 static void doc_removeTextContext(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nCharBefore, int nCharAfter)
 {
 SolarMutexGuard aGuard;
+
+if (SfxViewShell::IsCurrentLokViewReadOnly())
+return;
+
 VclPtr pWindow;
 if (nLOKWindowId == 0)
 {
@@ -5107,6 +5111,23 @@ void LibLibreOffice_Impl::dumpState(rtl::OStringBuffer 
)
 vcl::lok::dumpState(rState);
 }
 
+// We have special handling for some uno commands and it seems we need to 
check for readonly state.
+static bool isCommandAllowed(OUString& command) {
+static constexpr OUString nonAllowedList[] = { u".uno:Save"_ustr, 
u".uno:TransformDialog"_ustr, u".uno:SidebarShow"_ustr, 
u".uno:SidebarHide"_ustr };
+
+if (!SfxViewShell::IsCurrentLokViewReadOnly())
+return true;
+else
+{
+for (size_t i = 0; i < std::size(nonAllowedList); i++)
+{
+if (nonAllowedList[i] == command)
+return false;
+}
+return true;
+}
+}
+
 static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* 
pCommand, const char* pArguments, bool bNotifyWhenFinished)
 {
 comphelper::ProfileZone aZone("doc_postUnoCommand");
@@ -5116,6 +5137,10 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* 
pThis, const char* pComma
 
 SfxObjectShell* pDocSh = SfxObjectShell::Current();
 OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8);
+
+if (!isCommandAllowed(aCommand))
+return;
+
 LibLODocument_Impl* pDocument = static_cast(pThis);
 
 std::vector 
aPropertyValuesVector(jsonToPropertyValuesVector(pArguments));
@@ -7167,6 +7192,9 @@ static void 
doc_sendContentControlEvent(LibreOfficeKitDocument* pThis, const cha
 return;
 }
 
+if (SfxViewShell::IsCurrentLokViewReadOnly())
+return;
+
 StringMap aMap(jsdialog::jsonToStringMap(pArguments));
 ITiledRenderable* pDoc = getTiledRenderable(pThis);
 if (!pDoc)
diff --git a/editeng/source/editeng/editview.cxx 
b/editeng/source/editeng/editview.cxx
index a7d52c341bb6..e2f429bc7789 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -155,6 +155,7 @@ EditViewCallbacks::~EditViewCallbacks()
 EditView::EditView( EditEngine* pEng, vcl::Window* pWindow )
 {
 pImpEditView.reset( new ImpEditView( this, pEng, pWindow ) );
+pImpEditView->bReadOnly = pImpEditView->bReadOnly || 
SfxViewShell::IsCurrentLokViewReadOnly();
 }
 
 EditView::~EditView()
@@ -252,7 +253,7 @@ void EditView::Invalidate()
 
 void EditView::SetReadOnly( bool bReadOnly )
 {
-pImpEditView->bReadOnly = 

core.git: Branch 'distro/collabora/co-24.04' - desktop/qa desktop/source include/LibreOfficeKit include/sfx2 sw/source

2024-03-06 Thread Gökay Şatır (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   18 +++---
 desktop/source/lib/init.cxx |   15 +++
 include/LibreOfficeKit/LibreOfficeKit.h |3 +++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   10 ++
 include/sfx2/viewsh.hxx |4 
 sw/source/core/view/viewsh.cxx  |4 ++--
 6 files changed, 41 insertions(+), 13 deletions(-)

New commits:
commit 81dae2ca5187bd24aea0befb099a5b53535b5d03
Author: Gökay Şatır 
AuthorDate: Fri Feb 16 08:43:14 2024 +0300
Commit: Gökay ŞATIR 
CommitDate: Wed Mar 6 11:21:29 2024 +0100

Collaborative editing with readonly and edit views.

We can have both readOnly and editor views at the same time while 
collaboratively editing a document.
Our current solution is to disable any command if the user's view is 
readonly.
We want to have a closer behaviour to desktop app with readonly views.
For this purpose, we are allowing more interactions from online server to 
core side.
We also need to filter out the events like the core side readonly view do 
(next commit).
This commit initiates the readonly view infrastructure.

The patches previous commit reverts were an example of how we disable 
things in readonly mode. We needed to open a window for getting hyperlink 
information.
With this patch, we try to separate the edit and readonly view modes on 
core side.

More notes:

We need "&& !comphelper::LibreOfficeKit::isActive()" or it falls into an 
endless loop with this patch.
When we disable editing on a browser, almost all user actions are disabled.

Signed-off-by: Gökay Şatır 
Change-Id: Ia25368dd8065206ec6b4b83eb2f685531110cc78
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163730
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 87afe69166a8..1239af480598 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3668,22 +3668,18 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(61), offsetof(struct 
_LibreOfficeKitDocumentClass, sendFormFieldEvent));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(62), offsetof(struct 
_LibreOfficeKitDocumentClass, setBlockedCommandList));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(63), offsetof(struct 
_LibreOfficeKitDocumentClass, renderSearchResult));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(64),
- offsetof(struct _LibreOfficeKitDocumentClass, 
sendContentControlEvent));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(64), offsetof(struct 
_LibreOfficeKitDocumentClass, sendContentControlEvent));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), offsetof(struct 
_LibreOfficeKitDocumentClass, getSelectionTypeAndText));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(66), offsetof(struct 
_LibreOfficeKitDocumentClass, getDataArea));
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(67), offsetof(struct 
_LibreOfficeKitDocumentClass, getEditMode));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(68),
- offsetof(struct _LibreOfficeKitDocumentClass, 
setViewTimezone));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(69),
- offsetof(struct _LibreOfficeKitDocumentClass, 
setAccessibilityState));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(70),
- offsetof(struct _LibreOfficeKitDocumentClass, 
getA11yFocusedParagraph));
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(71),
- offsetof(struct _LibreOfficeKitDocumentClass, 
getA11yCaretPosition));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(68), offsetof(struct 
_LibreOfficeKitDocumentClass, setViewTimezone));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(69), offsetof(struct 
_LibreOfficeKitDocumentClass, setAccessibilityState));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(70), offsetof(struct 
_LibreOfficeKitDocumentClass, getA11yFocusedParagraph));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(71), offsetof(struct 
_LibreOfficeKitDocumentClass, getA11yCaretPosition));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), offsetof(struct 
_LibreOfficeKitDocumentClass, setViewReadOnly));
 
 // As above
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 4ecbb58b5154..939fe2afc09f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1296,6 +1296,8 @@ static void 
doc_sendContentControlEvent(LibreOfficeKitDocument* pThis, const cha
 
 static void doc_setViewTimezone(LibreOfficeKitDocument* pThis, 

core.git: Branch 'distro/collabora/co-24.04' - desktop/qa desktop/source include/LibreOfficeKit include/vcl sc/inc sc/source sd/source sw/inc sw/source

2024-03-06 Thread Gökay Şatır (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |5 +
 desktop/source/lib/init.cxx |   18 --
 include/LibreOfficeKit/LibreOfficeKit.h |3 ---
 include/LibreOfficeKit/LibreOfficeKit.hxx   |5 -
 include/vcl/ITiledRenderable.hxx|6 --
 sc/inc/docuno.hxx   |3 ---
 sc/source/ui/unoobj/docuno.cxx  |6 --
 sd/source/ui/inc/unomodel.hxx   |2 --
 sd/source/ui/unoidl/unomodel.cxx|6 --
 sw/inc/unotxdoc.hxx |2 --
 sw/source/uibase/uno/unotxdoc.cxx   |   22 --
 11 files changed, 1 insertion(+), 77 deletions(-)

New commits:
commit c3f1d63178d6aaa0888085c7b641eb6d49a18276
Author: Gökay Şatır 
AuthorDate: Wed Feb 14 12:08:17 2024 +0300
Commit: Gökay ŞATIR 
CommitDate: Wed Mar 6 11:21:14 2024 +0100

Revert hyperlinkInfoAtPositon changes.

Revert "Implement hyperlinkInfoAtPosition for Impress."

This reverts commit 876543305c78cb596720da087454a5c54e5feb06.

Revert "Readonly Hyperlink Info - normalize the clicked coordinates."

This reverts commit 322669725b771f5fa2b3c10c5fb73238ca3713f6.

Revert "Implement hyperlinkInfoAtPosition function for Calc."

This reverts commit be01dd78c47b51b19603a6259504e29b11979b0b.

Revert "Implement hyperlinkInfoAtPosition for Writer."

This reverts commit 6773c8929690f557d29bc282dd8f5c4381da3484.

Revert "In readonly mode, we restrict many events like click."

This reverts commit a4f3b97e506f38e0c43d6fbf1192cc523750a9fd.

Change-Id: Ie821a4bca6e6b4649cea17748c44af105cd45d30
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163430
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Michael Meeks 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index c9f276a67eeb..87afe69166a8 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3682,11 +3682,8 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(71),
  offsetof(struct _LibreOfficeKitDocumentClass, 
getA11yCaretPosition));
 
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(72),
- offsetof(struct _LibreOfficeKitDocumentClass, 
hyperlinkInfoAtPosition));
-
 // As above
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 65e131cc48a3..4ecbb58b5154 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1143,9 +1143,6 @@ static void 
doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis,
 unsigned nWindowId,
 int nType,
 const char* pText);
-
-static char* doc_hyperlinkInfoAtPosition(LibreOfficeKitDocument *pThis, int x, 
int y);
-
 static void doc_removeTextContext(LibreOfficeKitDocument* pThis,
   unsigned nLOKWindowId,
   int nCharBefore,
@@ -1431,7 +1428,6 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference 
 xC
 m_pDocumentClass->registerCallback = doc_registerCallback;
 m_pDocumentClass->postKeyEvent = doc_postKeyEvent;
 m_pDocumentClass->postWindowExtTextInputEvent = 
doc_postWindowExtTextInputEvent;
-m_pDocumentClass->hyperlinkInfoAtPosition = 
doc_hyperlinkInfoAtPosition;
 m_pDocumentClass->removeTextContext = doc_removeTextContext;
 m_pDocumentClass->postWindowKeyEvent = doc_postWindowKeyEvent;
 m_pDocumentClass->postMouseEvent = doc_postMouseEvent;
@@ -4723,20 +4719,6 @@ static void 
doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsig
 SfxLokHelper::postExtTextEventAsync(pWindow, nType, 
OUString::fromUtf8(std::string_view(pText, strlen(pText;
 }
 
-static char* doc_hyperlinkInfoAtPosition(LibreOfficeKitDocument* pThis, int x, 
int y)
-{
-SolarMutexGuard aGuard;
-
-ITiledRenderable* pDoc = getTiledRenderable(pThis);
-if (!pDoc)
-{
-SetLastExceptionMsg("Document doesn't support tiled rendering");
-return nullptr;
-}
-
-return convertOUString(pDoc->hyperlinkInfoAtPosition(x, y));
-}
-
 static void doc_removeTextContext(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nCharBefore, int nCharAfter)
 {
 SolarMutexGuard aGuard;
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index d924c416eb0b..8128995fec24 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ 

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

2024-03-06 Thread Gökay Şatır (via logerrit)
 sc/source/ui/docshell/docsh6.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7405a5eb7e727148d9b063f1f01d073565b9f092
Author: Gökay Şatır 
AuthorDate: Wed Mar 6 10:42:39 2024 +0300
Commit: Gökay ŞATIR 
CommitDate: Wed Mar 6 09:27:40 2024 +0100

Add notifier for mismatching locals or debug assertion is hit for nullptr.

Signed-off-by: Gökay Şatır 
Change-Id: I1a9413a7155d30a58673df39d7fab65cc0219ac8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164448
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/ui/docshell/docsh6.cxx b/sc/source/ui/docshell/docsh6.cxx
index caefdfc0fed3..1ea512d40f3b 100644
--- a/sc/source/ui/docshell/docsh6.cxx
+++ b/sc/source/ui/docshell/docsh6.cxx
@@ -501,7 +501,7 @@ void ScDocShell::CheckConfigOptions()
 {
 std::unique_ptr 
xInfoBox(Application::CreateMessageDialog(pViewShell->GetFrameWeld(),
   
VclMessageType::Info, VclButtonsType::Ok,
-  
ScResId(STR_OPTIONS_WARN_SEPARATORS)));
+  
ScResId(STR_OPTIONS_WARN_SEPARATORS), GetpApp()));
 xInfoBox->run();
 }
 


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

2024-02-13 Thread Gökay Şatır (via logerrit)
 sw/inc/fmtfld.hxx|3 ++-
 sw/source/core/doc/docredln.cxx  |   20 
 sw/source/uibase/docvw/PostItMgr.cxx |   11 ---
 sw/source/uibase/uno/unotxdoc.cxx|1 +
 4 files changed, 31 insertions(+), 4 deletions(-)

New commits:
commit d0e71db33b91eeb9f4e4bb4ce13681e972e12a99
Author: Gökay Şatır 
AuthorDate: Tue Jan 30 16:41:04 2024 +0300
Commit: Pranam Lashkari 
CommitDate: Tue Feb 13 12:20:03 2024 +0100

Writer: Improve redline communication with libreofficeKit.

When changes are tracked and user adds / removes a comment, we need a 
better communication.
This PR improves the communication and sends the layout status of comments.
Still there are things to do, like (while tracking is on):
* We need to communicate when a change in comment is approved / rejected.
* When user performs an undo on the removed comment.

Signed-off-by: Gökay Şatır 
Change-Id: Ia3ea4b44c116cc571337e57960aa4f12f934701c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162756
Tested-by: Jenkins CollaboraOffice 
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163155
(cherry picked from commit 48d2d456d8bcb296b4b2f6cc2d1184f9d799f070)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163274
Reviewed-by: Gökay ŞATIR 
Tested-by: Pranam Lashkari 

diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index 0c8d5fda7110..e9da72e5d9c8 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -177,7 +177,8 @@ enum class SwFormatFieldHintWhich
 REMOVED= 2,
 FOCUS  = 3,
 CHANGED= 4,
-RESOLVED   = 5
+RESOLVED   = 5,
+REDLINED_DELETION = 6
 };
 
 class SW_DLLPUBLIC SwFormatFieldHint final : public SfxHint
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index 3b0f8d7b9f53..45af1e8e3f85 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1392,6 +1392,16 @@ SwRangeRedline::SwRangeRedline(RedlineType eTyp, const 
SwPaM& rPam, sal_uInt32 n
 SetComment( RedlineType::Delete == eTyp
 ? SwResId(STR_REDLINE_COMMENT_DELETED)
 : SwResId(STR_REDLINE_COMMENT_ADDED) );
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+auto eHintType = RedlineType::Delete == eTyp ? 
SwFormatFieldHintWhich::REDLINED_DELETION: SwFormatFieldHintWhich::INSERTED;
+const SwTextNode *pTextNode = rPam.GetPointNode().GetTextNode();
+SwTextAttr* pTextAttr = pTextNode ? 
pTextNode->GetFieldTextAttrAt(rPam.GetPoint()->GetContentIndex() - 1, 
::sw::GetTextAttrMode::Default) : nullptr;
+SwTextField *const 
pTextField(static_txtattr_cast(pTextAttr));
+if (pTextField)
+
const_cast(pTextField->GetFormatField()).Broadcast(SwFormatFieldHint(>GetFormatField(),
 eHintType));
+}
 }
 }
 
@@ -1690,6 +1700,16 @@ void SwRangeRedline::InvalidateRange(Invalidation const 
eWhy)
 sw::RedlineUnDelText const hint(nStart, nLen);
 pNd->CallSwClientNotify(hint);
 }
+
+if (comphelper::LibreOfficeKit::isActive() && IsAnnotation())
+{
+auto eHintType = eWhy == Invalidation::Add ? 
SwFormatFieldHintWhich::INSERTED: SwFormatFieldHintWhich::REMOVED;
+const SwTextNode *pTextNode = 
this->GetPointNode().GetTextNode();
+SwTextAttr* pTextAttr = pTextNode ? 
pTextNode->GetFieldTextAttrAt(this->GetPoint()->GetContentIndex() - 1, 
::sw::GetTextAttrMode::Default) : nullptr;
+SwTextField *const 
pTextField(static_txtattr_cast(pTextAttr));
+if (pTextField)
+
const_cast(pTextField->GetFormatField()).Broadcast(SwFormatFieldHint(>GetFormatField(),
 eHintType));
+}
 }
 }
 }
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 12c5e4f52d11..dee622d4b502 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -97,7 +97,7 @@ using namespace sw::annotation;
 
 namespace {
 
-enum class CommentNotificationType { Add, Remove, Modify, Resolve };
+enum class CommentNotificationType { Add, Remove, Modify, Resolve, 
RedlinedDeletion };
 
 bool comp_pos(const std::unique_ptr& a, const 
std::unique_ptr& b)
 {
@@ -141,7 +141,9 @@ namespace {
 aAnnotation.put("action", (nType == CommentNotificationType::Add ? 
"Add" :
(nType == CommentNotificationType::Remove ? 
"Remove" :
 (nType == CommentNotificationType::Modify 
? "Modify" :
- (nType == 
CommentNotificationType::Resolve ? "Resolve" : "???");
+ (nType == 

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

2024-02-08 Thread Gökay Şatır (via logerrit)
 sw/inc/fmtfld.hxx|3 ++-
 sw/source/core/doc/docredln.cxx  |   20 
 sw/source/uibase/docvw/PostItMgr.cxx |   11 ---
 sw/source/uibase/uno/unotxdoc.cxx|1 +
 4 files changed, 31 insertions(+), 4 deletions(-)

New commits:
commit 2bd364f4bba9ad60fd342e363ffd58234fbfec04
Author: Gökay Şatır 
AuthorDate: Tue Jan 30 16:41:04 2024 +0300
Commit: Caolán McNamara 
CommitDate: Thu Feb 8 13:45:41 2024 +0100

Writer: Improve redline communication with libreofficeKit.

When changes are tracked and user adds / removes a comment, we need a 
better communication.
This PR improves the communication and sends the layout status of comments.
Still there are things to do, like (while tracking is on):
* We need to communicate when a change in comment is approved / rejected.
* When user performs an undo on the removed comment.

Signed-off-by: Gökay Şatır 
Change-Id: Ia3ea4b44c116cc571337e57960aa4f12f934701c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162756
Tested-by: Jenkins CollaboraOffice 
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index 5807ed8fba70..20614d80c15c 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -176,7 +176,8 @@ enum class SwFormatFieldHintWhich
 FOCUS  = 3,
 CHANGED= 4,
 LANGUAGE   = 5,
-RESOLVED   = 6
+RESOLVED   = 6,
+REDLINED_DELETION = 7
 };
 
 class SW_DLLPUBLIC SwFormatFieldHint final : public SfxHint
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index c5a6b6885a71..4e03aab32ff6 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -1325,6 +1325,16 @@ SwRangeRedline::SwRangeRedline(RedlineType eTyp, const 
SwPaM& rPam, sal_uInt32 n
 SetComment( RedlineType::Delete == eTyp
 ? SwResId(STR_REDLINE_COMMENT_DELETED)
 : SwResId(STR_REDLINE_COMMENT_ADDED) );
+
+if (comphelper::LibreOfficeKit::isActive())
+{
+auto eHintType = RedlineType::Delete == eTyp ? 
SwFormatFieldHintWhich::REDLINED_DELETION: SwFormatFieldHintWhich::INSERTED;
+const SwTextNode *pTextNode = rPam.GetPointNode().GetTextNode();
+SwTextAttr* pTextAttr = pTextNode ? 
pTextNode->GetFieldTextAttrAt(rPam.GetPoint()->GetContentIndex() - 1, 
::sw::GetTextAttrMode::Default) : nullptr;
+SwTextField *const 
pTextField(static_txtattr_cast(pTextAttr));
+if (pTextField)
+
const_cast(pTextField->GetFormatField()).Broadcast(SwFormatFieldHint(>GetFormatField(),
 eHintType));
+}
 }
 }
 
@@ -1623,6 +1633,16 @@ void SwRangeRedline::InvalidateRange(Invalidation const 
eWhy)
 sw::RedlineUnDelText const hint(nStart, nLen);
 pNd->CallSwClientNotify(hint);
 }
+
+if (comphelper::LibreOfficeKit::isActive() && IsAnnotation())
+{
+auto eHintType = eWhy == Invalidation::Add ? 
SwFormatFieldHintWhich::INSERTED: SwFormatFieldHintWhich::REMOVED;
+const SwTextNode *pTextNode = 
this->GetPointNode().GetTextNode();
+SwTextAttr* pTextAttr = pTextNode ? 
pTextNode->GetFieldTextAttrAt(this->GetPoint()->GetContentIndex() - 1, 
::sw::GetTextAttrMode::Default) : nullptr;
+SwTextField *const 
pTextField(static_txtattr_cast(pTextAttr));
+if (pTextField)
+
const_cast(pTextField->GetFormatField()).Broadcast(SwFormatFieldHint(>GetFormatField(),
 eHintType));
+}
 }
 }
 }
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 10f866e5c9bb..bbc9b15ca322 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -96,7 +96,7 @@ using namespace sw::annotation;
 
 namespace {
 
-enum class CommentNotificationType { Add, Remove, Modify, Resolve };
+enum class CommentNotificationType { Add, Remove, Modify, Resolve, 
RedlinedDeletion };
 
 bool comp_pos(const std::unique_ptr& a, const 
std::unique_ptr& b)
 {
@@ -140,7 +140,9 @@ namespace {
 aAnnotation.put("action", (nType == CommentNotificationType::Add ? 
"Add" :
(nType == CommentNotificationType::Remove ? 
"Remove" :
 (nType == CommentNotificationType::Modify 
? "Modify" :
- (nType == 
CommentNotificationType::Resolve ? "Resolve" : "???");
+ (nType == 
CommentNotificationType::RedlinedDeletion ? "RedlinedDeletion" :
+  (nType == 
CommentNotificationType::Resolve ? "Resolve" : "???"));
+
 aAnnotation.put("id", nPostItId);
 if (nType != 

core.git: sd/source

2024-01-18 Thread Gökay Şatır (via logerrit)
 sd/source/ui/unoidl/unomodel.cxx |   24 ++--
 1 file changed, 22 insertions(+), 2 deletions(-)

New commits:
commit 98f73277667d9fb440c47ff6f9c5c7bd74343dc5
Author: Gökay Şatır 
AuthorDate: Wed Jan 17 18:11:23 2024 +0300
Commit: Caolán McNamara 
CommitDate: Thu Jan 18 11:13:27 2024 +0100

Implement hyperlinkInfoAtPosition for Impress.

It is used in readonly mode.

Signed-off-by: Gökay Şatır 
Change-Id: I428d4923ab89dbcf6df237c68ae792753c1edf13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162201
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 876543305c78cb596720da087454a5c54e5feb06)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/16
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 89efc76df232..c97cd9ff0ab8 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -127,6 +127,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2708,9 +2709,28 @@ void SdXImpressDocument::setTextSelection(int nType, int 
nX, int nY)
 }
 }
 
-OUString SdXImpressDocument::hyperlinkInfoAtPosition(int /*x*/, int /*y*/)
+OUString SdXImpressDocument::hyperlinkInfoAtPosition(int x, int y)
 {
-// To be implemented..
+::sd::ViewShell* viewSh = GetViewShell();
+
+if (viewSh)
+{
+Point point(x, y);
+point = o3tl::convert(point, o3tl::Length::twip, o3tl::Length::mm100);
+SdrView* pSdrView = SfxViewShell::Current()->GetDrawView();
+
+if (pSdrView)
+{
+SdrViewEvent aVEvt;
+pSdrView->PickAnything(point, aVEvt);
+if (aVEvt.mpURLField)
+{
+OUString aURL = 
INetURLObject::decode(aVEvt.mpURLField->GetURL(), 
INetURLObject::DecodeMechanism::WithCharset);
+return aURL;
+}
+}
+}
+
 return OUString();
 }
 


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

2024-01-17 Thread Gökay Şatır (via logerrit)
 sd/source/ui/unoidl/unomodel.cxx |   24 ++--
 1 file changed, 22 insertions(+), 2 deletions(-)

New commits:
commit 876543305c78cb596720da087454a5c54e5feb06
Author: Gökay Şatır 
AuthorDate: Wed Jan 17 18:11:23 2024 +0300
Commit: Szymon Kłos 
CommitDate: Wed Jan 17 19:57:29 2024 +0100

Implement hyperlinkInfoAtPosition for Impress.

It is used in readonly mode.

Signed-off-by: Gökay Şatır 
Change-Id: I428d4923ab89dbcf6df237c68ae792753c1edf13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162201
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index cfc6ec8266b5..c9b69575ff49 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -127,6 +127,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -2701,9 +2702,28 @@ void SdXImpressDocument::setTextSelection(int nType, int 
nX, int nY)
 }
 }
 
-OUString SdXImpressDocument::hyperlinkInfoAtPosition(int /*x*/, int /*y*/)
+OUString SdXImpressDocument::hyperlinkInfoAtPosition(int x, int y)
 {
-// To be implemented..
+::sd::ViewShell* viewSh = GetViewShell();
+
+if (viewSh)
+{
+Point point(x, y);
+point = o3tl::convert(point, o3tl::Length::twip, o3tl::Length::mm100);
+SdrView* pSdrView = SfxViewShell::Current()->GetDrawView();
+
+if (pSdrView)
+{
+SdrViewEvent aVEvt;
+pSdrView->PickAnything(point, aVEvt);
+if (aVEvt.mpURLField)
+{
+OUString aURL = 
INetURLObject::decode(aVEvt.mpURLField->GetURL(), 
INetURLObject::DecodeMechanism::WithCharset);
+return aURL;
+}
+}
+}
+
 return OUString();
 }
 


core.git: sc/source

2024-01-17 Thread Gökay Şatır (via logerrit)
 sc/source/ui/unoobj/docuno.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 88a7384edcd8f4240a659f2c2c7c1258471341f4
Author: Gökay Şatır 
AuthorDate: Tue Jan 16 18:22:12 2024 +0300
Commit: Caolán McNamara 
CommitDate: Wed Jan 17 14:58:44 2024 +0100

Readonly Hyperlink Info - normalize the clicked coordinates.

So the Online side can send the info in twips.

Signed-off-by: Gökay Şatır 
Change-Id: I6f60f3a459856df72201b1100dce3306e9d0e47a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162180
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 322669725b771f5fa2b3c10c5fb73238ca3713f6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162148
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 33f1790f532a..be90caece8fe 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -899,7 +899,7 @@ OUString ScModelObj::hyperlinkInfoAtPosition(int x, int y)
 ScGridWindow* pGridWindow = pViewData->GetActiveWin();
 if (pGridWindow)
 {
-const Point point(x, y);
+const Point point(x * pViewData->GetPPTX(), y * 
pViewData->GetPPTY());
 OUString name;
 OUString url;
 pGridWindow->GetEditUrl(point, , );


core.git: sc/source

2024-01-17 Thread Gökay Şatır (via logerrit)
 sc/source/ui/inc/gridwin.hxx   |5 ++---
 sc/source/ui/unoobj/docuno.cxx |   16 ++--
 2 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit 332d7e878300b5cf627db59ba3065f6ecf63387c
Author: Gökay Şatır 
AuthorDate: Mon Jan 15 17:17:33 2024 +0300
Commit: Caolán McNamara 
CommitDate: Wed Jan 17 11:59:20 2024 +0100

Implement hyperlinkInfoAtPosition function for Calc.

Move getEditURL function to public.
When in readonly mode, we need a way to get the hyperlink info (if any) 
when user
clicks on a certain coordinate.

Signed-off-by: Gökay Şatır 
Change-Id: I2329b3569cfdca91f64cbdb46f43a3a9c34706c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162111
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit be01dd78c47b51b19603a6259504e29b11979b0b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162143
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index f7a64cafb86b..9e91409f514c 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -292,9 +292,6 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public 
vcl::DocWindow, public DropTarget
 voidDrawHiddenIndicator( SCCOL nX1, SCROW nY1, SCCOL nX2, 
SCROW nY2, vcl::RenderContext& rRenderContext);
 voidDrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW 
nY2, vcl::RenderContext& rRenderContext);
 
-boolGetEditUrl( const Point& rPos,
-OUString* pName=nullptr, OUString* 
pUrl=nullptr, OUString* pTarget=nullptr );
-
 boolHitRangeFinder( const Point& rMouse, RfCorner& rCorner, 
sal_uInt16* pIndex,
 SCCOL* pAddX, SCROW* pAddY );
 
@@ -391,6 +388,8 @@ public:
 /// Get the cell selection, coordinates are in logic units.
 void GetCellSelection(std::vector& rLogicRects);
 
+bool GetEditUrl( const Point& rPos, OUString* pName=nullptr, OUString* 
pUrl=nullptr, OUString* pTarget=nullptr );
+
 virtual css::uno::Reference< css::accessibility::XAccessible > 
CreateAccessible() override;
 
 voidFakeButtonUp();
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 275b91ba694f..33f1790f532a 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -892,9 +892,21 @@ void ScModelObj::setTextSelection(int nType, int nX, int 
nY)
 }
 }
 
-OUString ScModelObj::hyperlinkInfoAtPosition(int /*x*/, int /*y*/)
+OUString ScModelObj::hyperlinkInfoAtPosition(int x, int y)
 {
-// To be implemented..
+if (ScViewData* pViewData = ScDocShell::GetViewData())
+{
+ScGridWindow* pGridWindow = pViewData->GetActiveWin();
+if (pGridWindow)
+{
+const Point point(x, y);
+OUString name;
+OUString url;
+pGridWindow->GetEditUrl(point, , );
+return url;
+}
+}
+
 return OUString();
 }
 


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

2024-01-16 Thread Gökay Şatır (via logerrit)
 sc/source/ui/unoobj/docuno.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 322669725b771f5fa2b3c10c5fb73238ca3713f6
Author: Gökay Şatır 
AuthorDate: Tue Jan 16 18:22:12 2024 +0300
Commit: Szymon Kłos 
CommitDate: Tue Jan 16 18:40:09 2024 +0100

Readonly Hyperlink Info - normalize the clicked coordinates.

So the Online side can send the info in twips.

Signed-off-by: Gökay Şatır 
Change-Id: I6f60f3a459856df72201b1100dce3306e9d0e47a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162180
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 593ff4bba5a6..75f869ea9a53 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -898,7 +898,7 @@ OUString ScModelObj::hyperlinkInfoAtPosition(int x, int y)
 ScGridWindow* pGridWindow = pViewData->GetActiveWin();
 if (pGridWindow)
 {
-const Point point(x, y);
+const Point point(x * pViewData->GetPPTX(), y * 
pViewData->GetPPTY());
 OUString name;
 OUString url;
 pGridWindow->GetEditUrl(point, , );


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

2024-01-16 Thread Gökay Şatır (via logerrit)
 sc/source/ui/inc/gridwin.hxx   |5 ++---
 sc/source/ui/unoobj/docuno.cxx |   16 ++--
 2 files changed, 16 insertions(+), 5 deletions(-)

New commits:
commit be01dd78c47b51b19603a6259504e29b11979b0b
Author: Gökay Şatır 
AuthorDate: Mon Jan 15 17:17:33 2024 +0300
Commit: Miklos Vajna 
CommitDate: Tue Jan 16 09:01:35 2024 +0100

Implement hyperlinkInfoAtPosition function for Calc.

Move getEditURL function to public.
When in readonly mode, we need a way to get the hyperlink info (if any) 
when user
clicks on a certain coordinate.

Signed-off-by: Gökay Şatır 
Change-Id: I2329b3569cfdca91f64cbdb46f43a3a9c34706c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162111
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sc/source/ui/inc/gridwin.hxx b/sc/source/ui/inc/gridwin.hxx
index 8d5dcc08696f..773cb3a1eac3 100644
--- a/sc/source/ui/inc/gridwin.hxx
+++ b/sc/source/ui/inc/gridwin.hxx
@@ -291,9 +291,6 @@ class SAL_DLLPUBLIC_RTTI ScGridWindow : public 
vcl::DocWindow, public DropTarget
 voidDrawHiddenIndicator( SCCOL nX1, SCROW nY1, SCCOL nX2, 
SCROW nY2, vcl::RenderContext& rRenderContext);
 voidDrawPagePreview( SCCOL nX1, SCROW nY1, SCCOL nX2, SCROW 
nY2, vcl::RenderContext& rRenderContext);
 
-boolGetEditUrl( const Point& rPos,
-OUString* pName=nullptr, OUString* 
pUrl=nullptr, OUString* pTarget=nullptr );
-
 boolHitRangeFinder( const Point& rMouse, RfCorner& rCorner, 
sal_uInt16* pIndex,
 SCCOL* pAddX, SCROW* pAddY );
 
@@ -390,6 +387,8 @@ public:
 /// Get the cell selection, coordinates are in logic units.
 void GetCellSelection(std::vector& rLogicRects);
 
+bool GetEditUrl( const Point& rPos, OUString* pName=nullptr, OUString* 
pUrl=nullptr, OUString* pTarget=nullptr );
+
 virtual css::uno::Reference< css::accessibility::XAccessible > 
CreateAccessible() override;
 
 voidFakeButtonUp();
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 83db29153bca..593ff4bba5a6 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -891,9 +891,21 @@ void ScModelObj::setTextSelection(int nType, int nX, int 
nY)
 }
 }
 
-OUString ScModelObj::hyperlinkInfoAtPosition(int /*x*/, int /*y*/)
+OUString ScModelObj::hyperlinkInfoAtPosition(int x, int y)
 {
-// To be implemented..
+if (ScViewData* pViewData = ScDocShell::GetViewData())
+{
+ScGridWindow* pGridWindow = pViewData->GetActiveWin();
+if (pGridWindow)
+{
+const Point point(x, y);
+OUString name;
+OUString url;
+pGridWindow->GetEditUrl(point, , );
+return url;
+}
+}
+
 return OUString();
 }
 


core.git: linguistic/source sw/source

2024-01-09 Thread Gökay Şatır (via logerrit)
 linguistic/source/gciterator.cxx|   68 ++--
 sw/source/uibase/shells/textsh1.cxx |3 +
 2 files changed, 44 insertions(+), 27 deletions(-)

New commits:
commit 7a179efac47776df917b7e8e18f9d91973c485db
Author: Gökay Şatır 
AuthorDate: Wed Nov 22 12:15:31 2023 +0300
Commit: Caolán McNamara 
CommitDate: Tue Jan 9 09:32:25 2024 +0100

tdf#150716 - Partially solves the issue.

This PR fixes the IgnoreAll issue. "Ignore" functionality needs another PR.

Grammar checker and spell checker have different implementations. IgnoreAll 
functionality is implemented for spell checker but not grammar checker.
This PR implements IgnoreAll for grammar checkers.

Note: Ignore All function is valid per editing session. The ignored words 
is reset after the session is closed.

Signed-off-by: Gökay Şatır 
Change-Id: I7c2b77b18e0a26a6a1c5fa9e8e66075a34612884
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159813
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit c0a619aa945c852652dc353dbe4c42cabbc2b779)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161699
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 2ef50fbeab27..2f1232289c10 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -409,39 +410,54 @@ void GrammarCheckingIterator::ProcessResult(
 uno::Sequence< text::TextMarkupDescriptor > aDescriptors( 
nErrors + 1 );
 text::TextMarkupDescriptor * pDescriptors = 
aDescriptors.getArray();
 
+uno::Reference< linguistic2::XDictionary > xIgnoreAll = 
::GetIgnoreAllList();
+sal_Int32 ignoredCount = 0;
+
 // at pos 0 .. nErrors-1 -> all grammar errors
 for (const linguistic2::SingleProofreadingError  : 
rRes.aErrors)
 {
-text::TextMarkupDescriptor  = *pDescriptors++;
-
-rDesc.nType   = rError.nErrorType;
-rDesc.nOffset = rError.nErrorStart;
-rDesc.nLength = rError.nErrorLength;
-
-// the proofreader may return SPELLING but right now our 
core
-// does only handle PROOFREADING if the result is from the 
proofreader...
-// (later on we may wish to color spelling errors found by 
the proofreader
-// differently for example. But no special handling right 
now.
-if (rDesc.nType == text::TextMarkupType::SPELLCHECK)
-rDesc.nType = text::TextMarkupType::PROOFREADING;
-
-uno::Reference< container::XStringKeyMap > xKeyMap(
-new LngXStringKeyMap());
-for( const beans::PropertyValue& rProperty : 
rError.aProperties )
+OUString word(rRes.aText.subView(rError.nErrorStart, 
rError.nErrorLength));
+bool ignored = xIgnoreAll->getEntry(word).is();
+
+if (!ignored)
 {
-if ( rProperty.Name == "LineColor" )
-{
-xKeyMap->insertValue(rProperty.Name,
- rProperty.Value);
-rDesc.xMarkupInfoContainer = xKeyMap;
-}
-else if ( rProperty.Name == "LineType" )
+text::TextMarkupDescriptor  = *pDescriptors++;
+
+rDesc.nType   = rError.nErrorType;
+rDesc.nOffset = rError.nErrorStart;
+rDesc.nLength = rError.nErrorLength;
+
+// the proofreader may return SPELLING but right now 
our core
+// does only handle PROOFREADING if the result is from 
the proofreader...
+// (later on we may wish to color spelling errors 
found by the proofreader
+// differently for example. But no special handling 
right now.
+if (rDesc.nType == text::TextMarkupType::SPELLCHECK)
+rDesc.nType = text::TextMarkupType::PROOFREADING;
+
+uno::Reference< container::XStringKeyMap > xKeyMap(new 
LngXStringKeyMap());
+for( const beans::PropertyValue& rProperty : 
rError.aProperties )
 {
-xKeyMap->insertValue(rProperty.Name,
- rProperty.Value);
-rDesc.xMarkupInfoContainer = xKeyMap;
+if ( rProperty.Name == "LineColor" )
+ 

core.git: sw/source

2023-12-28 Thread Gökay Şatır (via logerrit)
 sw/source/uibase/uno/unotxdoc.cxx |   19 ++-
 1 file changed, 18 insertions(+), 1 deletion(-)

New commits:
commit df11ff317de859cad000a50999b48e6a25070be9
Author: Gökay Şatır 
AuthorDate: Thu Dec 14 15:53:17 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Thu Dec 28 16:34:13 2023 +0100

Implement hyperlinkInfoAtPosition for Writer.

Signed-off-by: Gökay Şatır 
Change-Id: Ibc71e4ee83625637f726646feb2c0192f3007687
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161381
Tested-by: Jenkins

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 7dc4f1ccdeeb..3a14cb0f8f96 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3713,7 +3713,24 @@ void SwXTextDocument::setTextSelection(int nType, int 
nX, int nY)
 
 OUString SwXTextDocument::hyperlinkInfoAtPosition(int x, int y)
 {
-return OUString::createFromAscii(std::to_string(x + y));
+SolarMutexGuard aGuard;
+SwWrtShell* pWrtShell = m_pDocShell->GetWrtShell();
+
+if (pWrtShell)
+{
+const Point point(x, y);
+SwContentAtPos aContentAtPos(IsAttrAtPos::InetAttr);
+
+if (pWrtShell->GetContentAtPos(point, aContentAtPos))
+{
+OUString url = static_cast(aContentAtPos.aFnd.pAttr)->GetValue();
+return url;
+}
+else
+return OUString();
+}
+else
+return OUString();
 }
 
 uno::Reference SwXTextDocument::getSelection()


core.git: desktop/qa desktop/source include/LibreOfficeKit include/vcl sc/inc sc/source sd/source sw/inc sw/source

2023-12-28 Thread Gökay Şatır (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |5 -
 desktop/source/lib/init.cxx |   18 ++
 include/LibreOfficeKit/LibreOfficeKit.h |3 +++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |5 +
 include/vcl/ITiledRenderable.hxx|6 ++
 sc/inc/docuno.hxx   |3 +++
 sc/source/ui/unoobj/docuno.cxx  |6 ++
 sd/source/ui/inc/unomodel.hxx   |2 ++
 sd/source/ui/unoidl/unomodel.cxx|6 ++
 sw/inc/unotxdoc.hxx |2 ++
 sw/source/uibase/uno/unotxdoc.cxx   |5 +
 11 files changed, 60 insertions(+), 1 deletion(-)

New commits:
commit 6fc77c2fa419137abe6e1950eda3d4a0bffe105e
Author: Gökay Şatır 
AuthorDate: Tue Nov 28 14:32:59 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Thu Dec 28 13:33:59 2023 +0100

In readonly mode, we restrict many events like click.

In readonly mode, Online users need to be able to click on a hyperlink and 
get the related info.

For this purpose, this PR adds a new function template that sends the 
hyperlink info if there is any at the clicked position.

I will send the implementation with the next commit.

Signed-off-by: Gökay Şatır 
Change-Id: I886ea22a7097aac73ade0da78a88ddfc95ad819c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160022
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161372
Tested-by: Jenkins

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index b3410bd8eb49..cc4360807717 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3702,8 +3702,11 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(71),
  offsetof(struct _LibreOfficeKitDocumentClass, 
getA11yCaretPosition));
 
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(72),
+ offsetof(struct _LibreOfficeKitDocumentClass, 
hyperlinkInfoAtPosition));
+
 // As above
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 76772b4162be..2f82ab48225d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1139,6 +1139,9 @@ static void 
doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis,
 unsigned nWindowId,
 int nType,
 const char* pText);
+
+static char* doc_hyperlinkInfoAtPosition(LibreOfficeKitDocument *pThis, int x, 
int y);
+
 static void doc_removeTextContext(LibreOfficeKitDocument* pThis,
   unsigned nLOKWindowId,
   int nCharBefore,
@@ -1424,6 +1427,7 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference 
 xC
 m_pDocumentClass->registerCallback = doc_registerCallback;
 m_pDocumentClass->postKeyEvent = doc_postKeyEvent;
 m_pDocumentClass->postWindowExtTextInputEvent = 
doc_postWindowExtTextInputEvent;
+m_pDocumentClass->hyperlinkInfoAtPosition = 
doc_hyperlinkInfoAtPosition;
 m_pDocumentClass->removeTextContext = doc_removeTextContext;
 m_pDocumentClass->postWindowKeyEvent = doc_postWindowKeyEvent;
 m_pDocumentClass->postMouseEvent = doc_postMouseEvent;
@@ -4693,6 +4697,20 @@ static void 
doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsig
 SfxLokHelper::postExtTextEventAsync(pWindow, nType, 
OUString::fromUtf8(std::string_view(pText, strlen(pText;
 }
 
+static char* doc_hyperlinkInfoAtPosition(LibreOfficeKitDocument* pThis, int x, 
int y)
+{
+SolarMutexGuard aGuard;
+
+ITiledRenderable* pDoc = getTiledRenderable(pThis);
+if (!pDoc)
+{
+SetLastExceptionMsg("Document doesn't support tiled rendering");
+return nullptr;
+}
+
+return convertOUString(pDoc->hyperlinkInfoAtPosition(x, y));
+}
+
 static void doc_removeTextContext(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nCharBefore, int nCharAfter)
 {
 SolarMutexGuard aGuard;
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 96d6a3d3aca7..ed7f4e7f2d28 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -511,6 +511,9 @@ struct _LibreOfficeKitDocumentClass
 /// @see lok::Document::getA11yCaretPosition.
 int (*getA11yCaretPosition) (LibreOfficeKitDocument* pThis);
 
+/// @see lok::Document::hyperlinkInfoAtPosition().
+char* (*hyperlinkInfoAtPosition) 

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

2023-12-20 Thread Gökay Şatır (via logerrit)
 sw/source/uibase/uno/unotxdoc.cxx |   17 -
 1 file changed, 16 insertions(+), 1 deletion(-)

New commits:
commit 6773c8929690f557d29bc282dd8f5c4381da3484
Author: Gökay Şatır 
AuthorDate: Thu Dec 14 15:53:17 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Wed Dec 20 12:31:44 2023 +0100

Implement hyperlinkInfoAtPosition for Writer.

Signed-off-by: Gökay Şatır 
Change-Id: Ibc71e4ee83625637f726646feb2c0192f3007687
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160773
Tested-by: Jenkins CollaboraOffice 

diff --git a/sw/source/uibase/uno/unotxdoc.cxx 
b/sw/source/uibase/uno/unotxdoc.cxx
index 1c588d2b3298..2d185a0c6504 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3779,7 +3779,22 @@ void SwXTextDocument::setTextSelection(int nType, int 
nX, int nY)
 
 OUString SwXTextDocument::hyperlinkInfoAtPosition(int x, int y)
 {
-return OUString::createFromAscii(std::to_string(x + y));
+SolarMutexGuard aGuard;
+SwWrtShell* pWrtShell = m_pDocShell->GetWrtShell();
+
+if (pWrtShell)
+{
+const Point point(x, y);
+SwContentAtPos aContentAtPos(IsAttrAtPos::InetAttr);
+
+if (pWrtShell->GetContentAtPos(point, aContentAtPos))
+{
+OUString url = static_cast(aContentAtPos.aFnd.pAttr)->GetValue();
+return url;
+}
+}
+
+return OUString();
 }
 
 uno::Reference SwXTextDocument::getSelection()


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

2023-12-19 Thread Gökay Şatır (via logerrit)
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 25c8ea868869b8e5130572647d6f8f24b501
Author: Gökay Şatır 
AuthorDate: Tue Dec 19 16:58:44 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Tue Dec 19 18:33:59 2023 +0100

Add "::InitCurl_easy(curl.get());" call also into Duden Http request 
function.

Signed-off-by: Gökay Şatır 
Change-Id: I4c5fa2b8ec428ceb882d5b0e7e74b2416217ecf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160990
Reviewed-by: Andras Timar 
Tested-by: Jenkins CollaboraOffice 

diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx 
b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
index e568aa6ea35a..3626a83d2264 100644
--- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
+++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
@@ -437,6 +437,8 @@ std::string 
LanguageToolGrammarChecker::makeDudenHttpRequest(std::string_view aU
 if (!curl)
 return {}; // empty string
 
+::InitCurl_easy(curl.get());
+
 std::string sResponseBody;
 struct curl_slist* pList = nullptr;
 SvxLanguageToolOptions& rLanguageOpts = SvxLanguageToolOptions::Get();


core.git: Branch 'distro/collabora/co-23.05' - desktop/qa desktop/source include/LibreOfficeKit include/vcl sc/inc sc/source sd/source sw/inc sw/source

2023-12-19 Thread Gökay Şatır (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |5 -
 desktop/source/lib/init.cxx |   18 ++
 include/LibreOfficeKit/LibreOfficeKit.h |3 +++
 include/LibreOfficeKit/LibreOfficeKit.hxx   |5 +
 include/vcl/ITiledRenderable.hxx|6 ++
 sc/inc/docuno.hxx   |3 +++
 sc/source/ui/unoobj/docuno.cxx  |6 ++
 sd/source/ui/inc/unomodel.hxx   |2 ++
 sd/source/ui/unoidl/unomodel.cxx|6 ++
 sw/inc/unotxdoc.hxx |2 ++
 sw/source/uibase/uno/unotxdoc.cxx   |5 +
 11 files changed, 60 insertions(+), 1 deletion(-)

New commits:
commit a4f3b97e506f38e0c43d6fbf1192cc523750a9fd
Author: Gökay Şatır 
AuthorDate: Tue Nov 28 14:32:59 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Tue Dec 19 15:22:07 2023 +0100

In readonly mode, we restrict many events like click.

In readonly mode, Online users need to be able to click on a hyperlink and 
get the related info.

For this purpose, this PR adds a new function template that sends the 
hyperlink info if there is any at the clicked position.

I will send the implementation with the next commit.

Signed-off-by: Gökay Şatır 
Change-Id: I886ea22a7097aac73ade0da78a88ddfc95ad819c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160022
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 65d6a4231960..ea572c8e8a41 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3734,8 +3734,11 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(71),
  offsetof(struct _LibreOfficeKitDocumentClass, 
getA11yCaretPosition));
 
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(72),
+ offsetof(struct _LibreOfficeKitDocumentClass, 
hyperlinkInfoAtPosition));
+
 // As above
-CPPUNIT_ASSERT_EQUAL(documentClassOffset(72), sizeof(struct 
_LibreOfficeKitDocumentClass));
+CPPUNIT_ASSERT_EQUAL(documentClassOffset(73), sizeof(struct 
_LibreOfficeKitDocumentClass));
 }
 
 CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8855e9a60ed2..3491dd6323f5 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1160,6 +1160,9 @@ static void 
doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis,
 unsigned nWindowId,
 int nType,
 const char* pText);
+
+static char* doc_hyperlinkInfoAtPosition(LibreOfficeKitDocument *pThis, int x, 
int y);
+
 static void doc_removeTextContext(LibreOfficeKitDocument* pThis,
   unsigned nLOKWindowId,
   int nCharBefore,
@@ -1445,6 +1448,7 @@ LibLODocument_Impl::LibLODocument_Impl(uno::Reference 
 xC
 m_pDocumentClass->registerCallback = doc_registerCallback;
 m_pDocumentClass->postKeyEvent = doc_postKeyEvent;
 m_pDocumentClass->postWindowExtTextInputEvent = 
doc_postWindowExtTextInputEvent;
+m_pDocumentClass->hyperlinkInfoAtPosition = 
doc_hyperlinkInfoAtPosition;
 m_pDocumentClass->removeTextContext = doc_removeTextContext;
 m_pDocumentClass->postWindowKeyEvent = doc_postWindowKeyEvent;
 m_pDocumentClass->postMouseEvent = doc_postMouseEvent;
@@ -4732,6 +4736,20 @@ static void 
doc_postWindowExtTextInputEvent(LibreOfficeKitDocument* pThis, unsig
 SfxLokHelper::postExtTextEventAsync(pWindow, nType, 
OUString::fromUtf8(std::string_view(pText, strlen(pText;
 }
 
+static char* doc_hyperlinkInfoAtPosition(LibreOfficeKitDocument* pThis, int x, 
int y)
+{
+SolarMutexGuard aGuard;
+
+ITiledRenderable* pDoc = getTiledRenderable(pThis);
+if (!pDoc)
+{
+SetLastExceptionMsg("Document doesn't support tiled rendering");
+return nullptr;
+}
+
+return convertOUString(pDoc->hyperlinkInfoAtPosition(x, y));
+}
+
 static void doc_removeTextContext(LibreOfficeKitDocument* pThis, unsigned 
nLOKWindowId, int nCharBefore, int nCharAfter)
 {
 SolarMutexGuard aGuard;
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h 
b/include/LibreOfficeKit/LibreOfficeKit.h
index 96d6a3d3aca7..ed7f4e7f2d28 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -511,6 +511,9 @@ struct _LibreOfficeKitDocumentClass
 /// @see lok::Document::getA11yCaretPosition.
 int (*getA11yCaretPosition) (LibreOfficeKitDocument* pThis);
 
+/// @see lok::Document::hyperlinkInfoAtPosition().
+char* (*hyperlinkInfoAtPosition) (LibreOfficeKitDocument* pThis, int x,int 
y);
+
 #endif // defined LOK_USE_UNSTABLE_API 

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

2023-11-28 Thread Gökay Şatır (via logerrit)
 sw/source/core/edit/edlingu.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 7697ef9d8fbbed7afba10c00ff9f5362d0540cdd
Author: Gökay Şatır 
AuthorDate: Thu Nov 2 13:37:46 2023 +0300
Commit: Mike Kaganski 
CommitDate: Tue Nov 28 14:28:42 2023 +0100

Proof reading suggestions:

* When user right clicks an underlined part of the sentence, we are 
checking if there is a suggestion list.
* Then we show the suggestions.

Sometimes spell checker algorithms send 2 lists for the same part of the 
sentence.
And we saw that one of these lists can be empty (no suggestions).
But since we check if there is a list, the empty list is shown to the user.

I updated the checks here and added a new condition:
Now we take the list if the list is not empty.
This way, we can find the not-empty list which may come after an empty list 
(for the same part of the sentence).

Signed-off-by: Gökay Şatır 
Change-Id: Ib3b498b98a8d44f8a7ead99593a71adcefa87a82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158832
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 4c6c60d44b0056cbe08b6e75baacbc0df0cd1742)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159908
Tested-by: Jenkins

diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index e1f6d631139d..5731d2b2be49 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1031,7 +1031,8 @@ bool SwEditShell::GetGrammarCorrection(
 auto pError = std::find_if(std::cbegin(rResult.aErrors), 
std::cend(rResult.aErrors),
 [rErrorPosInText, nLen](const 
linguistic2::SingleProofreadingError ) {
 return rError.nErrorStart <= rErrorPosInText
-&& rErrorPosInText + nLen <= rError.nErrorStart + 
rError.nErrorLength; });
+&& rErrorPosInText + nLen <= rError.nErrorStart + 
rError.nErrorLength
+&& rError.aSuggestions.size() > 0; });
 if (pError != std::cend(rResult.aErrors))
 {
 rSuggestions = pError->aSuggestions;


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/source

2023-11-22 Thread Gökay Şatır (via logerrit)
 sw/source/core/edit/edlingu.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 4c6c60d44b0056cbe08b6e75baacbc0df0cd1742
Author: Gökay Şatır 
AuthorDate: Thu Nov 2 13:37:46 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Thu Nov 23 07:29:38 2023 +0100

Proof reading suggestions:

* When user right clicks an underlined part of the sentence, we are 
checking if there is a suggestion list.
* Then we show the suggestions.

Sometimes spell checker algorithms send 2 lists for the same part of the 
sentence.
And we saw that one of these lists can be empty (no suggestions).
But since we check if there is a list, the empty list is shown to the user.

I updated the checks here and added a new condition:
Now we take the list if the list is not empty.
This way, we can find the not-empty list which may come after an empty list 
(for the same part of the sentence).

Signed-off-by: Gökay Şatır 
Change-Id: Ib3b498b98a8d44f8a7ead99593a71adcefa87a82
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158832
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index ab89fc5b7241..923a70c3cb72 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -1031,7 +1031,8 @@ bool SwEditShell::GetGrammarCorrection(
 auto pError = std::find_if(std::cbegin(rResult.aErrors), 
std::cend(rResult.aErrors),
 [rErrorPosInText, nLen](const 
linguistic2::SingleProofreadingError ) {
 return rError.nErrorStart <= rErrorPosInText
-&& rErrorPosInText + nLen <= rError.nErrorStart + 
rError.nErrorLength; });
+&& rErrorPosInText + nLen <= rError.nErrorStart + 
rError.nErrorLength
+&& rError.aSuggestions.size() > 0; });
 if (pError != std::cend(rResult.aErrors))
 {
 rSuggestions = pError->aSuggestions;


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - linguistic/source sw/source

2023-11-22 Thread Gökay Şatır (via logerrit)
 linguistic/source/gciterator.cxx|   68 ++--
 sw/source/uibase/shells/textsh1.cxx |3 +
 2 files changed, 44 insertions(+), 27 deletions(-)

New commits:
commit c0a619aa945c852652dc353dbe4c42cabbc2b779
Author: Gökay Şatır 
AuthorDate: Wed Nov 22 12:15:31 2023 +0300
Commit: Miklos Vajna 
CommitDate: Wed Nov 22 16:49:20 2023 +0100

tdf#150716 - Partially solves the issue.

This PR fixes the IgnoreAll issue. "Ignore" functionality needs another PR.

Grammar checker and spell checker have different implementations. IgnoreAll 
functionality is implemented for spell checker but not grammar checker.
This PR implements IgnoreAll for grammar checkers.

Note: Ignore All function is valid per editing session. The ignored words 
is reset after the session is closed.

Signed-off-by: Gökay Şatır 
Change-Id: I7c2b77b18e0a26a6a1c5fa9e8e66075a34612884
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159813
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index 301e1319c1d8..0734ba4cb7a2 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -409,39 +410,54 @@ void GrammarCheckingIterator::ProcessResult(
 uno::Sequence< text::TextMarkupDescriptor > aDescriptors( 
nErrors + 1 );
 text::TextMarkupDescriptor * pDescriptors = 
aDescriptors.getArray();
 
+uno::Reference< linguistic2::XDictionary > xIgnoreAll = 
::GetIgnoreAllList();
+sal_Int32 ignoredCount = 0;
+
 // at pos 0 .. nErrors-1 -> all grammar errors
 for (const linguistic2::SingleProofreadingError  : 
rRes.aErrors)
 {
-text::TextMarkupDescriptor  = *pDescriptors++;
-
-rDesc.nType   = rError.nErrorType;
-rDesc.nOffset = rError.nErrorStart;
-rDesc.nLength = rError.nErrorLength;
-
-// the proofreader may return SPELLING but right now our 
core
-// does only handle PROOFREADING if the result is from the 
proofreader...
-// (later on we may wish to color spelling errors found by 
the proofreader
-// differently for example. But no special handling right 
now.
-if (rDesc.nType == text::TextMarkupType::SPELLCHECK)
-rDesc.nType = text::TextMarkupType::PROOFREADING;
-
-uno::Reference< container::XStringKeyMap > xKeyMap(
-new LngXStringKeyMap());
-for( const beans::PropertyValue& rProperty : 
rError.aProperties )
+OUString word = 
OUString(rRes.aText.subView(rError.nErrorStart, rError.nErrorLength));
+bool ignored = xIgnoreAll->getEntry(word).is();
+
+if (!ignored)
 {
-if ( rProperty.Name == "LineColor" )
-{
-xKeyMap->insertValue(rProperty.Name,
- rProperty.Value);
-rDesc.xMarkupInfoContainer = xKeyMap;
-}
-else if ( rProperty.Name == "LineType" )
+text::TextMarkupDescriptor  = *pDescriptors++;
+
+rDesc.nType   = rError.nErrorType;
+rDesc.nOffset = rError.nErrorStart;
+rDesc.nLength = rError.nErrorLength;
+
+// the proofreader may return SPELLING but right now 
our core
+// does only handle PROOFREADING if the result is from 
the proofreader...
+// (later on we may wish to color spelling errors 
found by the proofreader
+// differently for example. But no special handling 
right now.
+if (rDesc.nType == text::TextMarkupType::SPELLCHECK)
+rDesc.nType = text::TextMarkupType::PROOFREADING;
+
+uno::Reference< container::XStringKeyMap > xKeyMap(new 
LngXStringKeyMap());
+for( const beans::PropertyValue& rProperty : 
rError.aProperties )
 {
-xKeyMap->insertValue(rProperty.Name,
- rProperty.Value);
-rDesc.xMarkupInfoContainer = xKeyMap;
+if ( rProperty.Name == "LineColor" )
+{
+xKeyMap->insertValue(rProperty.Name, 
rProperty.Value);
+rDesc.xMarkupInfoContainer = xKeyMap;
+   

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

2023-11-20 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   14 
+-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit 4b81692f8f3236082f9ac989e4e21c8119ff6e64
Author: Gökay Şatır 
AuthorDate: Thu Oct 5 09:20:53 2023 +0300
Commit: Caolán McNamara 
CommitDate: Mon Nov 20 13:06:48 2023 +0100

Writer: Update German language shortcuts

Replacements (if any) are shown with indentation:

* CTRL + SHIFT + C: Copy format.
* CTRL + SPACE: Reset attributes.
   * ALT + SHIFT + F: Focus to find bar.

Signed-off-by: Gökay Şatır 
Change-Id: If1067a3aac7c4f2f246153a7ea6cf251c39cffb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157578
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit eeb685b0f12911c696abbf847a22bd3bcc00fc2c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159688
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 15aa53f3be58..156dde567262 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -6246,6 +6246,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:SubScript
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:FormatPaintbrush
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -6564,6 +6570,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:UpdateInputFields
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+vnd.sun.star.findbar:FocusToFindbar
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -6888,7 +6900,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
-vnd.sun.star.findbar:FocusToFindbar
+.uno:ResetAttributes
   
 
 


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

2023-11-19 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   65 
--
 1 file changed, 58 insertions(+), 7 deletions(-)

New commits:
commit 3bd3c41bc930406ec3d995a45a7f7060d572bbd0
Author: Gökay Şatır 
AuthorDate: Wed Sep 27 13:01:46 2023 +0300
Commit: Caolán McNamara 
CommitDate: Sun Nov 19 22:28:43 2023 +0100

German keybindings:

Changes (2 indentations for the replacements of currents):

* CTRL + 1 / 2 / 5 for paragraph spacing 1, 2 and 1.5.
* CTRL + + for superscript.
   * CTRL + SHIFT + + for CalculateSel.
* CTRL + D for font dialog.
   * CTRL + SHIFT + D for double underline.
* F12 for save-as.
   * ALT + F12 for default numbering.
* F5 for GoToPage.
   * CTRL + F for navigator.
  * CTRL + SPACE for search.
* Removed CTRL + H for superscript.
   * Defaults to find and replace now.
* CTRL + SHIFT + K for italic.
   * CTRL + K for hyperlink dialog.
* CTRL + SHIFT + L for default bullet.
* CTRL + * for control codes.
   * CTRL + ALT + * for execute macro field.
* CTRL + SHIFT + Q for small caps.
* CTRL + T for subscript.

for general compatibility.

Signed-off-by: Gökay Şatır 
Change-Id: I181e2d7828bc3f53092db4f880ee1715ae262d02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157308
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 4137596ca58e927977ffe354f60c296f5771d28b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159687
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index a8555409dddb..15aa53f3be58 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -6083,12 +6083,14 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for 
some emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:StyleApply?Style:string=Heading 
1FamilyName:string=ParagraphStyles
+.uno:SpacePara1
   
 
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:StyleApply?Style:string=Heading 
2FamilyName:string=ParagraphStyles
+.uno:SpacePara2
   
 
 
@@ -6107,6 +6109,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:StyleApply?Style:string=Heading 
5FamilyName:string=ParagraphStyles
+.uno:SpacePara15
   
 
 
@@ -6151,6 +6154,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:CalculateSel
+.uno:SuperScript
+  
+
+
+  
+.uno:CalculateSel
   
 
 
@@ -6302,12 +6311,14 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for 
some emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:UnderlineDouble
+.uno:FontDialog
   
 
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:ParaRightToLeft
+.uno:UnderlineDouble
   
 
 
@@ -6387,6 +6398,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:DefaultNumbering
+.uno:SaveAs
   
 
 
@@ -6401,6 +6413,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:DefaultBullet
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:DefaultNumbering
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -6453,6 +6471,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Navigator
+.uno:GotoPage
   
 
 
@@ -6559,6 +6578,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:RepeatSearch
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:Navigator
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -6592,12 +6617,6 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:StartOfDocumentSel
   
 
-
-  
-I10N SHORTCUTS - NO 
TRANSLATE
-.uno:SuperScript
-  
-
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -6638,12 +6657,14 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under 

[Libreoffice-commits] core.git: 2 commits - sfx2/source

2023-11-12 Thread Gökay Şatır (via logerrit)
 sfx2/source/dialog/dinfdlg.cxx |7 +--
 sfx2/source/view/viewsh.cxx|   35 +--
 2 files changed, 26 insertions(+), 16 deletions(-)

New commits:
commit a355522bc282f1c55be36e6949b97ef0ad93175b
Author: Gökay Şatır 
AuthorDate: Tue Oct 31 16:57:52 2023 +0300
Commit: Caolán McNamara 
CommitDate: Sun Nov 12 13:02:29 2023 +0100

Get the current view with SfxViewFrame::Current().

It was getting a null ptr for some reason.

Signed-off-by: Gökay Şatır 
Change-Id: Ib3e285dc86cd3918b631b6993e9afb221994bfab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158727
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 
(cherry picked from commit 6c7fd1dc50cbc3f8e61c741367223a4b4aefc98b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159337
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 044757c6cdd2..26f34882ec42 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -907,8 +907,11 @@ IMPL_LINK_NOARG(SfxDocumentPage, ChangePassHdl, 
weld::Button&, void)
 tools::JsonWriter payloadJson;
 payloadJson.put("password", 
m_xPasswordDialog->GetPasswordToOpen());
 payloadJson.put("isToModify", false);
-pShell->GetViewShell()->libreOfficeKitViewCallback(
-LOK_CALLBACK_DOCUMENT_PASSWORD_RESET, 
payloadJson.finishAndGetAsOString());
+
+SfxViewShell *pViewShell = SfxViewShell::Current();
+if (pViewShell)
+
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_PASSWORD_RESET, 
payloadJson.finishAndGetAsOString());
+
 pShell->SetModified();
 }
 m_xPasswordDialog->disposeOnce();
commit 807c3aafef4d23cef13aafc2280c399db0864971
Author: Marco Cecchetti 
AuthorDate: Sun Nov 5 21:08:26 2023 +0100
Commit: Caolán McNamara 
CommitDate: Sun Nov 12 13:02:24 2023 +0100

lok: a11y: corelog: removing LOK_INFO in attachRecursive (3)

Change-Id: Ic2967d9fa24674ed61ab7a251bd2a584a74e4cea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158959
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Marco Cecchetti 
(cherry picked from commit 4e6848628cbff418896b7653eadac80c57ceaf25)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159336
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 5e725e18c1c2..03ec646389d7 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -1704,21 +1704,28 @@ void LOKDocumentFocusListener::attachRecursive(
 const uno::Reference< accessibility::XAccessibleContext >& xContext
 )
 {
-LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(2): 
xAccessible: " << xAccessible.get()
-<< ", role: " << xContext->getAccessibleRole()
-<< ", name: " << xContext->getAccessibleName()
-<< ", parent: " << xContext->getAccessibleParent().get()
-<< ", child count: " << xContext->getAccessibleChildCount());
+try
+{
+LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(2): 
xAccessible: "
+ << xAccessible.get() << ", role: " << 
xContext->getAccessibleRole()
+ << ", name: " << xContext->getAccessibleName()
+ << ", parent: " << 
xContext->getAccessibleParent().get()
+ << ", child count: " << 
xContext->getAccessibleChildCount());
 
-sal_Int64 nStateSet = xContext->getAccessibleStateSet();
+sal_Int64 nStateSet = xContext->getAccessibleStateSet();
 
-if (!m_bIsEditingCell)
+if (!m_bIsEditingCell)
+{
+::rtl::OUString sName = xContext->getAccessibleName();
+m_bIsEditingCell = sName.startsWith("Cell");
+}
+
+attachRecursive(xAccessible, xContext, nStateSet);
+}
+catch (const uno::Exception& e)
 {
-::rtl::OUString sName = xContext->getAccessibleName();
-m_bIsEditingCell = sName.startsWith("Cell");
+LOK_WARN("lok.a11y", "LOKDocumentFocusListener::attachRecursive(2): 
raised exception: " << e.Message);
 }
-
-attachRecursive(xAccessible, xContext, nStateSet);
 }
 
 void LOKDocumentFocusListener::attachRecursive(
@@ -1728,7 +1735,7 @@ void LOKDocumentFocusListener::attachRecursive(
 )
 {
 aboutView("LOKDocumentFocusListener::attachRecursive (3)", this, 
m_pViewShell);
-LOK_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #1: 
this: " << this
+SAL_INFO("lok.a11y", "LOKDocumentFocusListener::attachRecursive(3) #1: 
this: " << this
 << ", xAccessible: " << xAccessible.get()
   

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

2023-11-01 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit c0c8cffd3541e3cd616c96791b04e7ebf2b2ed03
Author: Gökay Şatır 
AuthorDate: Thu Oct 5 11:04:46 2023 +0300
Commit: Caolán McNamara 
CommitDate: Wed Nov 1 22:23:21 2023 +0100

Writer: German language shortcuts.

* CTRL + M for incrementing the tab indent.
* CTRL + SHIFT + M for decrementing the tab indent.

Signed-off-by: Gökay Şatır 
Change-Id: I1dcf87808cdf1a0e4c91666557531e7550878236
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157583
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit b90c1c15fbbe01e5343cfc384c2cb427e76908a0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158777
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index a43641b67049..a8555409dddb 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -6693,6 +6693,13 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:ResetAttributes
+.uno:IncrementIndent
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:DecrementIndent
   
 
 


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

2023-11-01 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   12 
++
 1 file changed, 12 insertions(+)

New commits:
commit 4068a5da3dc3e3e6629a5f9f68684cbb50894896
Author: Gökay Şatır 
AuthorDate: Tue Oct 3 17:35:35 2023 +0300
Commit: Caolán McNamara 
CommitDate: Wed Nov 1 22:21:18 2023 +0100

Writer:

Added ALT + SHIFT + UP and ALT + SHIFT + DOWN combinations for:
* Moving paragraphs up and down in the document.

Signed-off-by: Gökay Şatır 
Change-Id: I5aef03456bce1cfd66349f41cae0ef37889ef0bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157520
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 6b68b8c4819139c54072d2f28186b1fb6d937d56)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158776
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index db7cdb6dec11..a43641b67049 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -6274,6 +6274,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:GoToNextPara
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:MoveDown
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -6889,6 +6895,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:GoToStartOfPara
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:MoveUp
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE


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

2023-11-01 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   44 
++
 1 file changed, 44 insertions(+)

New commits:
commit 691604d9037e72a94207d643cba29c64260b1cb9
Author: Gökay Şatır 
AuthorDate: Fri Sep 29 20:32:01 2023 +0300
Commit: Caolán McNamara 
CommitDate: Wed Nov 1 21:14:25 2023 +0100

German shortcut changes for Impress:

* CTRL + D for duplicate objects.
* F12 for save as.
* SHIFT + F3 for rotate lower / upper cases.
* SHIFT + F9 for show / hide grid.
* CTRL + F9 for show / hide ruler.
* CTRL +SHIFT + H for ungrouping objects.
* CTRL + SPACE for removing direct character formats.

Signed-off-by: Gökay Şatır 
Change-Id: Iedfd5f9bbc088b76edbb897141d9e612f8b55057
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157410
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 541bcc2be61c10f85cafe0e62bb3afc60a152c01)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158724
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index b53e5ec1f42d..db7cdb6dec11 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -3061,6 +3061,13 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Forward
+.uno:SubScript
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:SuperScript
   
 
 
@@ -3113,6 +3120,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:Dismantle
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:CopyObjects
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -3162,6 +3175,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:DesignerDialog
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:SaveAs
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -3184,6 +3203,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:CopyObjects
+.uno:ChangeCaseRotateCase
   
 
 
@@ -3252,6 +3272,18 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:TextFitToSize
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:GridVisible
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:ShowRuler
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -3290,6 +3322,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:SuperScript
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:FormatUngroup
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -3441,6 +3479,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:ShowRuler
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:RemoveDirectCharFormats
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE


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

2023-11-01 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   46 
+-
 1 file changed, 44 insertions(+), 2 deletions(-)

New commits:
commit e651d9e657f9b61fb45777d6e7edeb5cb95f8d27
Author: Gökay Şatır 
AuthorDate: Wed Sep 27 09:35:07 2023 +0300
Commit: Caolán McNamara 
CommitDate: Wed Nov 1 18:22:37 2023 +0100

German shortcut improvements for Calc:

* Insert date is assigned to CTRL + POINT.
* Insert time is assigned to CTRL + SHIFT + POINT.
* Save as is assigned to F12
   * Group and Ungroup are assigned to CTRL + F12 and CTRL + SHIFT + F12.
* Insert function dialog is assigned to SHIFT + F3
   * Rotate case function is assigned to CTRL + SHIFT + F3.
* Insert comment is assigned to SHIFT + F2
* Format cells dialog is assigned to ALT + 0
* CTRL + 5 is for Strikeout.
* F5 is assigned to FocusCellAddress.
   * CTRL + F is assigned to navigator.
  * ALT + F is assigned to "focus find bar".

Signed-off-by: Gökay Şatır 
Change-Id: I0213fecb6fe02b2d621d8409225251dbfa6631ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157360
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 
(cherry picked from commit 828c6bd73dcce738edc7d6a46432ddc5288235b7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158723
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 0f8c292fb2ac..b53e5ec1f42d 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -681,6 +681,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:SpacePara15
+.uno:Strikeout
   
 
 
@@ -727,6 +728,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:Zoom100Percent
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:FormatCellDialog
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -885,12 +892,20 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Group
+.uno:SaveAs
   
 
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Ungroup
+.uno:Group
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:Ungroup
   
 
 
@@ -923,6 +938,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:FunctionDialog
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:InsertAnnotation
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -939,6 +960,13 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:ChangeCaseRotateCase
+.uno:FunctionDialog
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:ChangeCaseRotateCase
   
 
 
@@ -951,6 +979,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Navigator
+.uno:FocusCellAddress
   
 
 
@@ -1027,6 +1056,19 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:RepeatSearch
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:SearchDialog
+.uno:Navigator
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+vnd.sun.star.findbar:FocusToFindbar
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -1295,12 +1337,14 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for 
some emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:InsertCurrentDate
+.uno:InsertCurrentDate
   
 
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:InsertCurrentTime
+.uno:InsertCurrentTime
   
 
 
@@ -1308,7 +1352,6 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:InsertCurrentDate
 .uno:InsertCurrentDate
-.uno:InsertCurrentDate
 .uno:InsertCurrentDate
 .uno:InsertCurrentDate
 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sfx2/source

2023-11-01 Thread Gökay Şatır (via logerrit)
 sfx2/source/dialog/dinfdlg.cxx |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 6c7fd1dc50cbc3f8e61c741367223a4b4aefc98b
Author: Gökay Şatır 
AuthorDate: Tue Oct 31 16:57:52 2023 +0300
Commit: Mike Kaganski 
CommitDate: Wed Nov 1 13:22:13 2023 +0100

Get the current view with SfxViewFrame::Current().

It was getting a null ptr for some reason.

Signed-off-by: Gökay Şatır 
Change-Id: Ib3e285dc86cd3918b631b6993e9afb221994bfab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158727
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 52416c1f55d0..ec37a70828e0 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -798,9 +798,11 @@ IMPL_LINK_NOARG(SfxDocumentPage, ChangePassHdl, 
weld::Button&, void)
 tools::JsonWriter payloadJson;
 payloadJson.put("password", 
m_xPasswordDialog->GetPasswordToOpen());
 payloadJson.put("isToModify", false);
-pShell->GetViewShell()->libreOfficeKitViewCallback(
-LOK_CALLBACK_DOCUMENT_PASSWORD_RESET,
-payloadJson.extractAsOString().getStr());
+
+SfxViewShell *vShell = SfxViewShell::Current();
+if (vShell)
+
vShell->libreOfficeKitViewCallback(LOK_CALLBACK_DOCUMENT_PASSWORD_RESET, 
payloadJson.extractAsOString().getStr());
+
 pShell->SetModified();
 }
 m_xPasswordDialog->disposeOnce();


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 2 commits - sc/source

2023-11-01 Thread Gökay Şatır (via logerrit)
 sc/source/core/data/markdata.cxx  |   12 +++--
 sc/source/core/data/markmulti.cxx |   47 --
 sc/source/core/tool/address.cxx   |   42 +++--
 sc/source/ui/docshell/docfunc.cxx |8 +++---
 sc/source/ui/view/viewfunc.cxx|   28 --
 5 files changed, 68 insertions(+), 69 deletions(-)

New commits:
commit 04e4a565c154d170686c2163ffcd64f1ab0d194c
Author: Gökay Şatır 
AuthorDate: Mon Oct 30 12:37:23 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Wed Nov 1 07:08:43 2023 +0100

Fix row deletion bug.

When multiple users are editing a Calc document:
* If one user selects a whole row and another one deletes a range of rows 
including or above the selected row, app crashes.
* This PR fixes the crash.
* Also when multiple rows are deleted, other user's selected row is moved 
only one row. This PR moves the selected row according to the deleted row count.
* The cursor position was also causing a crash, fixed.

Signed-off-by: Gökay Şatır 
Change-Id: Ie4b893fee7192492efacbb167b747434336384e3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158650
Reviewed-by: Marco Cecchetti 
Tested-by: Marco Cecchetti 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx
index afc875983ab1..98a3aebe5c8b 100644
--- a/sc/source/core/data/markdata.cxx
+++ b/sc/source/core/data/markdata.cxx
@@ -670,13 +670,11 @@ void ScMarkData::ShiftCols(const ScDocument& rDoc, SCCOL 
nStartCol, sal_Int32 nC
 void ScMarkData::ShiftRows(const ScDocument& rDoc, SCROW nStartRow, sal_Int32 
nRowOffset)
 {
 if (bMarked)
-{
 aMarkRange.IncRowIfNotLessThan(rDoc, nStartRow, nRowOffset);
-}
-else if (bMultiMarked)
+if (bMultiMarked)
 {
-aMultiSel.ShiftRows(nStartRow, nRowOffset);
 aMultiRange.IncRowIfNotLessThan(rDoc, nStartRow, nRowOffset);
+aMultiSel.ShiftRows(nStartRow, nRowOffset);
 }
 }
 
diff --git a/sc/source/core/tool/address.cxx b/sc/source/core/tool/address.cxx
index 7780e12185c5..09396d0c46b6 100644
--- a/sc/source/core/tool/address.cxx
+++ b/sc/source/core/tool/address.cxx
@@ -2406,17 +2406,30 @@ void ScRange::IncColIfNotLessThan(const ScDocument& 
rDoc, SCCOL nStartCol, SCCOL
 
 void ScRange::IncRowIfNotLessThan(const ScDocument& rDoc, SCROW nStartRow, 
SCROW nOffset)
 {
-if (aStart.Row() >= nStartRow)
+SCROW offset;
+if (aStart.Row() > nStartRow)
 {
-aStart.IncRow(nOffset);
+offset = nOffset;
+if (nStartRow + nOffset > aStart.Row())
+offset = aStart.Row() - nStartRow;
+else if (nStartRow - nOffset > aStart.Row())
+offset = -1 * (aStart.Row() - nStartRow);
+
+aStart.IncRow(offset);
 if (aStart.Row() < 0)
 aStart.SetRow(0);
 else if(aStart.Row() > rDoc.MaxRow())
 aStart.SetRow(rDoc.MaxRow());
 }
-if (aEnd.Row() >= nStartRow)
+if (aEnd.Row() > nStartRow)
 {
-aEnd.IncRow(nOffset);
+offset = nOffset;
+if (nStartRow + nOffset > aEnd.Row())
+offset = aEnd.Row() - nStartRow;
+else if (nStartRow - nOffset > aEnd.Row())
+offset = -1 * (aEnd.Row() - nStartRow);
+
+aEnd.IncRow(offset);
 if (aEnd.Row() < 0)
 aEnd.SetRow(0);
 else if(aEnd.Row() > rDoc.MaxRow())
diff --git a/sc/source/ui/docshell/docfunc.cxx 
b/sc/source/ui/docshell/docfunc.cxx
index 84a5435845b9..be844634ea25 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -2259,7 +2259,7 @@ bool ScDocFunc::InsertCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 
 if (bInsertRows)
 {
-pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row(), 1);
+pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row() - (eCmd == 
INS_INSROWS_BEFORE ? 1: 0), 1);
 }
 }
 
@@ -2839,7 +2839,7 @@ bool ScDocFunc::DeleteCells( const ScRange& rRange, const 
ScMarkData* pTabMark,
 }
 if (eCmd == DelCellCmd::Rows)
 {
-pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row(), -1);
+pViewSh->OnLOKInsertDeleteRow(rRange.aStart.Row(), -1 * 
(rRange.aEnd.Row() - rRange.aStart.Row() + 1));
 }
 }
 
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index a35433fee24a..13eb71acef52 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -1666,11 +1666,17 @@ void ScViewFunc::OnLOKInsertDeleteRow(SCROW nStartRow, 
tools::Long nOffset)
 if (pTabViewShell->getPart() == nCurrentTabIndex)
 {
 SCROW nY = pTabViewShell->GetViewData().GetCurY();
-if (nY > nStartRow || (nY == nStartRow && nOffset > 0))
+if (nY > nStartRow)
 {
+

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

2023-10-31 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit f5ae03b235766070b1c1e5bf46d0cb86a8196b10
Author: Gökay Şatır 
AuthorDate: Thu May 25 10:32:55 2023 +0300
Commit: Caolán McNamara 
CommitDate: Tue Oct 31 21:22:09 2023 +0100

Writer German shortcuts compatibility improvements.

Signed-off-by: Gökay Şatır 
Change-Id: Icfcdf3f629442da339c846f9eaa577ff7b779290
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152261
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit 7b168fbe4e4a5feecdd946fef9c5c3e5107dc050)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158722
Tested-by: Jenkins
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index d510adf0bc2a..0f8c292fb2ac 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -6167,6 +6167,13 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:InsertZWSP
+.uno:DefaultNumbering
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:DefaultBullet
   
 
 


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

2023-10-31 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   31 
+-
 1 file changed, 29 insertions(+), 2 deletions(-)

New commits:
commit 2d37ac2ca3a93cd7f05867ba7256c9e232192983
Author: Gökay Şatır 
AuthorDate: Wed May 24 14:39:12 2023 +0300
Commit: Caolán McNamara 
CommitDate: Tue Oct 31 21:21:16 2023 +0100

Added & modified some shortcuts for general compatibility.

Signed-off-by: Gökay Şatır 
Change-Id: Ibfcfbc3a75aca392acc4626e6169f2f3abcc4970
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152196
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158673
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 5152341a0800..d510adf0bc2a 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -711,14 +711,20 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Shrink
-.uno:Shrink
+.uno:HideColumn
   
 
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Grow
-.uno:Grow
+.uno:HideRow
+  
+
+
+  
+I10 SHORTCUTS - No 
TRANSLATE
+.uno:Zoom100Percent
   
 
 
@@ -887,6 +893,24 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:Ungroup
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:Ungroup
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:Group
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:InsertAnnotation
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -951,6 +975,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:InsertCurrentTime
+.uno:Shrink
   
 
 
@@ -1015,6 +1040,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:RepeatSearch
 .uno:Save
 .uno:Bold
+.uno:FocusCellAddress
   
 
 
@@ -1453,6 +1479,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 I10N SHORTCUTS - NO 
TRANSLATE
 
 .uno:MarkPrecedents
+.uno:Zoom100Percent
   
 
 


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

2023-10-22 Thread Gökay Şatır (via logerrit)
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 768da8bf8fa20848d5da9dfc56b1b8ce42b1404f
Author: Gökay Şatır 
AuthorDate: Mon Oct 16 12:26:10 2023 +0300
Commit: Caolán McNamara 
CommitDate: Sun Oct 22 21:50:28 2023 +0200

Don't encode the text when sending it to Duden corrector.

Signed-off-by: Gökay Şatır 
Change-Id: I9e1a2adede04858e5c43b878786bbcc28922aa5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158023
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 8989cba47fce3763229005b1ed2fec74da7cfb72)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158333
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx 
b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
index d1c87af5fa0a..79d061e42c85 100644
--- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
+++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
@@ -427,14 +427,14 @@ ProofreadingResult SAL_CALL 
LanguageToolGrammarChecker::doProofreading(
 = std::min(xRes.nStartOfNextSentencePosition, aText.getLength());
 
 OString langTag(LanguageTag::convertToBcp47(aLocale, false).toUtf8());
-OString postData = encodeTextForLanguageTool(aText);
+OString postData;
 const bool bDudenProtocol = 
LanguageToolCfg::RestProtocol::get().value_or("") == "duden";
 if (bDudenProtocol)
 {
 std::stringstream aStream;
 boost::property_tree::ptree aTree;
 aTree.put("text-language", langTag.getStr());
-aTree.put("text", postData.getStr());
+aTree.put("text", aText.toUtf8()); // We don't encode the text in 
Duden Corrector tool case.
 aTree.put("hyphenation", false);
 aTree.put("spellchecking-level", 3);
 aTree.put("correction-proposals", true);
@@ -443,7 +443,7 @@ ProofreadingResult SAL_CALL 
LanguageToolGrammarChecker::doProofreading(
 }
 else
 {
-postData = "text=" + postData + "=" + langTag;
+postData = "text=" + encodeTextForLanguageTool(aText) + "=" + 
langTag;
 }
 
 if (auto cachedResult = mCachedResults.find(postData); cachedResult != 
mCachedResults.end())


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - lingucomponent/source

2023-10-17 Thread Gökay Şatır (via logerrit)
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 8989cba47fce3763229005b1ed2fec74da7cfb72
Author: Gökay Şatır 
AuthorDate: Mon Oct 16 12:26:10 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Tue Oct 17 16:13:26 2023 +0200

Don't encode the text when sending it to Duden corrector.

Signed-off-by: Gökay Şatır 
Change-Id: I9e1a2adede04858e5c43b878786bbcc28922aa5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158023
Tested-by: Jenkins CollaboraOffice 

diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx 
b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
index 598fce4713bb..f7963cd65f30 100644
--- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
+++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
@@ -231,13 +231,13 @@ ProofreadingResult SAL_CALL 
LanguageToolGrammarChecker::doProofreading(
 = std::min(xRes.nStartOfNextSentencePosition, aText.getLength());
 
 OString langTag(LanguageTag::convertToBcp47(aLocale, false).toUtf8());
-OString postData = encodeTextForLanguageTool(aText);
+OString postData;
 if (rLanguageOpts.getRestProtocol() == sDuden)
 {
 std::stringstream aStream;
 boost::property_tree::ptree aTree;
 aTree.put("text-language", langTag.getStr());
-aTree.put("text", postData.getStr());
+aTree.put("text", aText.toUtf8()); // We don't encode the text in 
Duden Corrector tool case.
 aTree.put("hyphenation", false);
 aTree.put("spellchecking-level", 3);
 aTree.put("correction-proposals", true);
@@ -246,7 +246,7 @@ ProofreadingResult SAL_CALL 
LanguageToolGrammarChecker::doProofreading(
 }
 else
 {
-postData = "text=" + postData + "=" + langTag;
+postData = "text=" + encodeTextForLanguageTool(aText) + "=" + 
langTag;
 }
 
 if (auto cachedResult = mCachedResults.find(postData); cachedResult != 
mCachedResults.end())


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - lingucomponent/source

2023-10-16 Thread Gökay Şatır (via logerrit)
 lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx |   19 
+++---
 1 file changed, 15 insertions(+), 4 deletions(-)

New commits:
commit 13873b70b947d0ef6a809606424e7b837d8f6625
Author: Gökay Şatır 
AuthorDate: Fri Oct 13 15:19:22 2023 +0300
Commit: Mike Kaganski 
CommitDate: Mon Oct 16 15:06:57 2023 +0200

Language tool response fix.

Don't crash if "matches" key is not present in JSON data.
Use a warning since "matches" key is expected.

Signed-off-by: Gökay Şatır 
Change-Id: I10a04a5b5d45541813c932f59f495409baed1f07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158022
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Mike Kaganski 

diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx 
b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
index 1537e036f035..598fce4713bb 100644
--- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
+++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx
@@ -354,17 +354,28 @@ void 
LanguageToolGrammarChecker::parseProofreadingJSONResponse(ProofreadingResul
 boost::property_tree::ptree root;
 std::stringstream aStream(aJSONBody.data());
 boost::property_tree::read_json(aStream, root);
-boost::property_tree::ptree& matches = root.get_child("matches");
-size_t matchSize = matches.size();
+boost::property_tree::ptree* matches;
+size_t matchSize;
 
-if (matchSize <= 0)
+if (root.find("matches") == root.not_found())
 {
+SAL_WARN("Language Services", "'matches' property doesn't exist in 
JSON object.");
 return;
 }
+else
+{
+matches = _child("matches");
+
+if (matches->size() <= 0)
+return;
+else
+matchSize = matches->size();
+}
+
 Sequence aErrors(matchSize);
 auto pErrors = aErrors.getArray();
 size_t i = 0;
-for (auto it1 = matches.begin(); it1 != matches.end(); it1++, i++)
+for (auto it1 = matches->begin(); it1 != matches->end(); it1++, i++)
 {
 const boost::property_tree::ptree& match = it1->second;
 int offset = match.get("offset");


[Libreoffice-commits] core.git: cui/source framework/source include/vcl offapi/com officecfg/registry vcl/osx vcl/qt5 vcl/unx vcl/win

2023-10-14 Thread Gökay Şatır (via logerrit)
 cui/source/customize/acccfg.cxx|8 
 framework/source/accelerators/keymapping.cxx   |1 +
 include/vcl/keycodes.hxx   |1 +
 offapi/com/sun/star/awt/Key.idl|3 +++
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |6 ++
 vcl/osx/salframe.cxx   |1 +
 vcl/osx/salmenu.cxx|3 +++
 vcl/qt5/QtFrame.cxx|3 +++
 vcl/qt5/QtWidget.cxx   |3 +++
 vcl/unx/generic/app/saldisp.cxx|7 +++
 vcl/unx/gtk3/gtkframe.cxx  |2 ++
 vcl/win/app/salinst.cxx|1 +
 vcl/win/window/salframe.cxx|3 +++
 13 files changed, 42 insertions(+)

New commits:
commit ca74511985981444dbd72ade7244484c131e36a7
Author: Gökay Şatır 
AuthorDate: Wed Oct 4 15:01:38 2023 +0300
Commit: Caolán McNamara 
CommitDate: Sat Oct 14 21:51:43 2023 +0200

Add NUMBERSIGN key handler.

German keyboard layout has number sign key.
Users can print number sign without using modification keys.
So this key can be assigned a shortcut.
Subscript is assigned to CTRL + NUMBERSIGN.

Below PR is used as reference when adding the new key handler:
https://gerrit.libreoffice.org/c/core/+/86713

Signed-off-by: Gökay Şatır 
Change-Id: I340dc47764e9200d2477f8db740a629f62f48004
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157554
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 1db8f6d484b884301a7d3673f4d05478e28cd853)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157959
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index f28eee88afa4..54b7eb73c81a 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -186,6 +186,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD1 | KEY_X,
  KEY_MOD1 | KEY_Y,
  KEY_MOD1 | KEY_Z,
+ KEY_MOD1 | KEY_NUMBERSIGN,
  KEY_MOD1 | KEY_COLON,
  KEY_MOD1 | KEY_SEMICOLON,
  KEY_MOD1 | KEY_QUOTELEFT,
@@ -271,6 +272,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD1 | KEY_X,
  KEY_SHIFT | KEY_MOD1 | KEY_Y,
  KEY_SHIFT | KEY_MOD1 | KEY_Z,
+ KEY_SHIFT | KEY_MOD1 | KEY_NUMBERSIGN,
  KEY_SHIFT | KEY_MOD1 | KEY_COLON,
  KEY_SHIFT | KEY_MOD1 | KEY_SEMICOLON,
  KEY_SHIFT | KEY_MOD1 | KEY_QUOTELEFT,
@@ -352,6 +354,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD2 | KEY_X,
  KEY_MOD2 | KEY_Y,
  KEY_MOD2 | KEY_Z,
+ KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_MOD2 | KEY_COLON,
  KEY_MOD2 | KEY_SEMICOLON,
  KEY_MOD2 | KEY_QUOTELEFT,
@@ -431,6 +434,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD2 | KEY_X,
  KEY_SHIFT | KEY_MOD2 | KEY_Y,
  KEY_SHIFT | KEY_MOD2 | KEY_Z,
+ KEY_SHIFT | KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_SHIFT | KEY_MOD2 | KEY_COLON,
  KEY_SHIFT | KEY_MOD2 | KEY_SEMICOLON,
  KEY_SHIFT | KEY_MOD2 | KEY_QUOTELEFT,
@@ -511,6 +515,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD1 | KEY_MOD2 | KEY_X,
  KEY_MOD1 | KEY_MOD2 | KEY_Y,
  KEY_MOD1 | KEY_MOD2 | KEY_Z,
+ KEY_MOD1 | KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_MOD1 | KEY_MOD2 | KEY_COLON,
  KEY_MOD1 | KEY_MOD2 | KEY_SEMICOLON,
  KEY_MOD1 | KEY_MOD2 | KEY_QUOTELEFT,
@@ -590,6 +595,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_X,

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

2023-10-14 Thread Gökay Şatır (via logerrit)
 filter/source/svg/presentation_engine.js |   69 ++-
 sc/source/ui/view/output2.cxx|   11 +---
 2 files changed, 71 insertions(+), 9 deletions(-)

New commits:
commit d521062dd38a0c7faf26da55574648ae0c475771
Author: Gökay Şatır 
AuthorDate: Tue Oct 3 10:53:31 2023 +0300
Commit: Caolán McNamara 
CommitDate: Sat Oct 14 16:49:51 2023 +0200

Impress presentation engine (svg):

   * Add handlers for w and b chars.
  * These hide the content and set the color of the view to either 
black or white.
   * Add handler for p char:
  * This changes the cursor to pointer and back to default with key 
presses.

Signed-off-by: Gökay Şatır 
Change-Id: I566f485aa676f0707a31f25a0b71f64970de2a26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157511
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 427e8c0a8d9a534c54e07414cfe66648c9a90d26)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157958
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/filter/source/svg/presentation_engine.js 
b/filter/source/svg/presentation_engine.js
index ba585b6f4b3c..839bd1676ffd 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -2756,6 +2756,56 @@ function getElementsByProperty( node, name )
 return elements;
 }
 
+// User can hide / show the presentation content.
+// For that purpose, we change the background color of root node to either 
black or white.
+// To set it back to its original color (for showing the content back), we 
should have the initial background color saved somewhere to read back.
+// There may be no initial color at all, so the initial value of the saved 
initial is undefined.
+var rootNodeInitialBackgroundColor = undefined;
+
+function changeRootNodeBackgroundTo(color) {
+   if (rootNodeInitialBackgroundColor === undefined)
+   rootNodeInitialBackgroundColor = 
ROOT_NODE.style.backgroundColor;
+
+   if (color === 'initial')
+   ROOT_NODE.style.backgroundColor = 
rootNodeInitialBackgroundColor;
+   else
+   ROOT_NODE.style.backgroundColor = color;
+}
+
+var isContentHidden = false;
+var contentInitialVisibilityValues = null;
+
+function getInitialVisibilityValues() {
+   var list = ROOT_NODE.querySelectorAll('g');
+   contentInitialVisibilityValues = [];
+   for (var i = 0; i < list.length; i++) {
+   var temp = {};
+   temp.object = list[i];
+   temp.visibility = list[i].style.visibility;
+   contentInitialVisibilityValues.push(temp);
+   }
+}
+
+function hideShowContent(color) {
+   if (contentInitialVisibilityValues === null)
+   getInitialVisibilityValues();
+
+   if (isContentHidden) {
+   for (var i = 0; i < contentInitialVisibilityValues.length; i++)
+   
contentInitialVisibilityValues[i].object.style.visibility = 
contentInitialVisibilityValues[i].visibility;
+
+   changeRootNodeBackgroundTo('initial');
+   isContentHidden = false;
+   }
+   else {
+   for (var i = 0; i < contentInitialVisibilityValues.length; i++)
+   
contentInitialVisibilityValues[i].object.style.visibility = 'hidden';
+
+   changeRootNodeBackgroundTo(color);
+   isContentHidden = true;
+   }
+}
+
 /** Event handler for key press.
  *
  *  @param aEvt the event
@@ -2765,7 +2815,7 @@ function onKeyDown( aEvt )
 if ( !aEvt )
 aEvt = window.event;
 
-var code = aEvt.keyCode || aEvt.charCode;
+var code = aEvt.keyCode || aEvt.charCode || aEvt.code;
 
 // console.log('===> onKeyDown: ' + code);
 
@@ -2788,6 +2838,20 @@ function onKeyDown( aEvt )
 
 // console.log(' now: ' + code);
 }
+   else if (code === P_KEY) {
+   aEvt.preventDefault();
+   if (ROOT_NODE.style.cursor === 'pointer')
+   ROOT_NODE.style.cursor = 'default';
+   else
+   ROOT_NODE.style.cursor = 'pointer';
+   }
+   else if (code === W_KEY) {
+   hideShowContent('white');
+   }
+   else if (code === B_KEY) {
+   hideShowContent('black');
+   }
+
 
 if( !processingEffect && keyCodeDictionary[currentMode] && 
keyCodeDictionary[currentMode][code] )
 {
@@ -4505,7 +4569,10 @@ var END_KEY = 35;   // end keycode
 var ENTER_KEY = 13;
 var SPACE_KEY = 32;
 var ESCAPE_KEY = 27;
+var B_KEY = 66;
+var P_KEY = 80;
 var Q_KEY = 81;
+var W_KEY = 87;
 
 // Visibility Values
 var HIDDEN = 0;
commit ef4f9dca33bf38de3c2175cc4304e42281d729c2
Author: Caolán McNamara 
AuthorDate: Fri Oct 13 10:31:48 2023 +0100
Commit: Caolán McNamara 
CommitDate: Sat Oct 14 16:49:43 2023 +0200

don't bother checking existing mode before seting new 

[Libreoffice-commits] core.git: sw/inc sw/qa sw/source uitest/uitest

2023-10-05 Thread Gökay Şatır (via logerrit)
 sw/inc/AnnotationWin.hxx  |2 --
 sw/qa/uitest/navigator/tdf137274.py   |7 ++-
 sw/source/uibase/docvw/AnnotationWin.cxx  |   14 --
 sw/source/uibase/docvw/AnnotationWin2.cxx |2 ++
 sw/source/uibase/docvw/PostItMgr.cxx  |6 --
 uitest/uitest/test.py |3 +++
 6 files changed, 15 insertions(+), 19 deletions(-)

New commits:
commit c0187d9f5e6ab5129b6fc4682555f2f8775d6f67
Author: Gökay Şatır 
AuthorDate: Thu Sep 7 16:09:00 2023 +0300
Commit: Miklos Vajna 
CommitDate: Thu Oct 5 16:46:15 2023 +0200

SW comments: Provide parent / child relations without position.

Signed-off-by: Gökay Şatır 
Change-Id: I7acba74ef0717bc07a675be17fc1909680138f00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157019
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 62b20cb352cc..07f3ed8e83f9 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -81,8 +81,6 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public 
InterimItemWindow
 
 sal_uInt32 MoveCaret();
 
-/// Calculate parent postit id of current annotation window
-sal_uInt32 CalcParent();
 void   InitAnswer(OutlinerParaObject const & rText);
 
 bool IsReadOnlyOrProtected() const;
diff --git a/sw/qa/uitest/navigator/tdf137274.py 
b/sw/qa/uitest/navigator/tdf137274.py
index 5192045b8264..5273ddcb2f91 100644
--- a/sw/qa/uitest/navigator/tdf137274.py
+++ b/sw/qa/uitest/navigator/tdf137274.py
@@ -9,6 +9,7 @@
 from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict
+import time
 
 class tdf137274(UITestCase):
 
@@ -59,7 +60,11 @@ class tdf137274(UITestCase):
 self.ui_test.wait_until_child_is_available('Comment2')
 
 # xComments needs reassigned after content tree change
-xComments = self.get_item(xContentTree, 'Comments')
+while True:
+xComments = self.get_item(xContentTree, 'Comments')
+if '1' in xComments.getChildren():
+break
+time.sleep(self.ui_test.get_default_sleep())
 self.assertEqual('Comments', get_state_as_dict(xComments)['Text'])
 
 xComments.executeAction("EXPAND", tuple())
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx 
b/sw/source/uibase/docvw/AnnotationWin.cxx
index e57f90532294..5ed6780b455a 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -374,20 +374,6 @@ sal_uInt32 SwAnnotationWin::MoveCaret()
: 1 + CountFollowing();
 }
 
-// returns a non-zero postit parent id, if exists, otherwise 0 for root 
comments
-sal_uInt32 SwAnnotationWin::CalcParent()
-{
-SwTextField* pTextField = mpFormatField->GetTextField();
-if (SwPosition aPosition(pTextField->GetTextNode(), 
pTextField->GetStart());
-aPosition.GetContentIndex() > 0)
-if (const SwTextAttr* pTextAttr = 
pTextField->GetTextNode().GetTextAttrForCharAt(
-aPosition.GetContentIndex() - 1, RES_TXTATR_ANNOTATION))
-if (const SwField* pField = pTextAttr->GetFormatField().GetField())
-if (pField->Which() == SwFieldIds::Postit)
-return static_cast(pField)->GetPostItId();
-return 0;
-}
-
 // counts how many SwPostItField we have right after the current one
 sal_uInt32 SwAnnotationWin::CountFollowing()
 {
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index 5e8f7a86886e..6a97433272b6 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -1065,6 +1065,8 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
 // Get newly created SwPostItField and set its paraIdParent
 auto pPostItField = mrMgr.GetLatestPostItField();
 pPostItField->SetParentId(GetTopReplyNote()->GetParaId());
+
pPostItField->SetParentPostItId(GetTopReplyNote()->GetPostItField()->GetPostItId());
+
pPostItField->SetParentName(GetTopReplyNote()->GetPostItField()->GetName());
 }
 break;
 }
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 64579d75124b..64f5ff4f47d5 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -734,7 +734,7 @@ void SwPostItMgr::LayoutPostIts()
 pItem->mpPostIt = pPostIt;
 if (mpAnswer)
 {
-if (static_cast(pPostIt->CalcParent())) 
//do we really have another note in front of this one
+if 
(pPostIt->GetPostItField()->GetParentPostItId() != 0) //do 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - officecfg/registry

2023-10-05 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   14 
+-
 1 file changed, 13 insertions(+), 1 deletion(-)

New commits:
commit eeb685b0f12911c696abbf847a22bd3bcc00fc2c
Author: Gökay Şatır 
AuthorDate: Thu Oct 5 09:20:53 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Thu Oct 5 12:39:03 2023 +0200

Writer: Update German language shortcuts

Replacements (if any) are shown with indentation:

* CTRL + SHIFT + C: Copy format.
* CTRL + SPACE: Reset attributes.
   * ALT + SHIFT + F: Focus to find bar.

Signed-off-by: Gökay Şatır 
Change-Id: If1067a3aac7c4f2f246153a7ea6cf251c39cffb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157578
Tested-by: Jenkins CollaboraOffice 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 13d7e70dbbe4..d26d1cb2e60b 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -6288,6 +6288,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:SubScript
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:FormatPaintbrush
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -6606,6 +6612,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:UpdateInputFields
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+vnd.sun.star.findbar:FocusToFindbar
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -6936,7 +6948,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
-vnd.sun.star.findbar:FocusToFindbar
+.uno:ResetAttributes
   
 
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - officecfg/registry

2023-10-05 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit b90c1c15fbbe01e5343cfc384c2cb427e76908a0
Author: Gökay Şatır 
AuthorDate: Thu Oct 5 11:04:46 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Thu Oct 5 12:22:19 2023 +0200

Writer: German language shortcuts.

* CTRL + M for incrementing the tab indent.
* CTRL + SHIFT + M for decrementing the tab indent.

Signed-off-by: Gökay Şatır 
Change-Id: I1dcf87808cdf1a0e4c91666557531e7550878236
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157583
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 1fda7c139061..13d7e70dbbe4 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -6768,6 +6768,13 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:ResetAttributes
+.uno:IncrementIndent
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:DecrementIndent
   
 
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - cui/source framework/source include/vcl offapi/com officecfg/registry vcl/osx vcl/qt5 vcl/unx vcl/win

2023-10-05 Thread Gökay Şatır (via logerrit)
 cui/source/customize/acccfg.cxx|8 
 framework/source/accelerators/keymapping.cxx   |1 +
 include/vcl/keycodes.hxx   |1 +
 offapi/com/sun/star/awt/Key.idl|3 +++
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |6 ++
 vcl/osx/salframe.cxx   |1 +
 vcl/osx/salmenu.cxx|3 +++
 vcl/qt5/QtFrame.cxx|3 +++
 vcl/qt5/QtWidget.cxx   |3 +++
 vcl/unx/generic/app/saldisp.cxx|7 +++
 vcl/unx/gtk3/gtkframe.cxx  |2 ++
 vcl/win/app/salinst.cxx|1 +
 vcl/win/window/salframe.cxx|3 +++
 13 files changed, 42 insertions(+)

New commits:
commit 1db8f6d484b884301a7d3673f4d05478e28cd853
Author: Gökay Şatır 
AuthorDate: Wed Oct 4 15:01:38 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Thu Oct 5 10:07:29 2023 +0200

Add NUMBERSIGN key handler.

German keyboard layout has number sign key.
Users can print number sign without using modification keys.
So this key can be assigned a shortcut.
Subscript is assigned to CTRL + NUMBERSIGN.

Below PR is used as reference when adding the new key handler:
https://gerrit.libreoffice.org/c/core/+/86713

Signed-off-by: Gökay Şatır 
Change-Id: I340dc47764e9200d2477f8db740a629f62f48004
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157554
Tested-by: Jenkins CollaboraOffice 

diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 760dc7a11d66..77eb3279301d 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -184,6 +184,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD1 | KEY_X,
  KEY_MOD1 | KEY_Y,
  KEY_MOD1 | KEY_Z,
+ KEY_MOD1 | KEY_NUMBERSIGN,
  KEY_MOD1 | KEY_COLON,
  KEY_MOD1 | KEY_SEMICOLON,
  KEY_MOD1 | KEY_QUOTELEFT,
@@ -269,6 +270,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD1 | KEY_X,
  KEY_SHIFT | KEY_MOD1 | KEY_Y,
  KEY_SHIFT | KEY_MOD1 | KEY_Z,
+ KEY_SHIFT | KEY_MOD1 | KEY_NUMBERSIGN,
  KEY_SHIFT | KEY_MOD1 | KEY_COLON,
  KEY_SHIFT | KEY_MOD1 | KEY_SEMICOLON,
  KEY_SHIFT | KEY_MOD1 | KEY_QUOTELEFT,
@@ -350,6 +352,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD2 | KEY_X,
  KEY_MOD2 | KEY_Y,
  KEY_MOD2 | KEY_Z,
+ KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_MOD2 | KEY_COLON,
  KEY_MOD2 | KEY_SEMICOLON,
  KEY_MOD2 | KEY_QUOTELEFT,
@@ -429,6 +432,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD2 | KEY_X,
  KEY_SHIFT | KEY_MOD2 | KEY_Y,
  KEY_SHIFT | KEY_MOD2 | KEY_Z,
+ KEY_SHIFT | KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_SHIFT | KEY_MOD2 | KEY_COLON,
  KEY_SHIFT | KEY_MOD2 | KEY_SEMICOLON,
  KEY_SHIFT | KEY_MOD2 | KEY_QUOTELEFT,
@@ -509,6 +513,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_MOD1 | KEY_MOD2 | KEY_X,
  KEY_MOD1 | KEY_MOD2 | KEY_Y,
  KEY_MOD1 | KEY_MOD2 | KEY_Z,
+ KEY_MOD1 | KEY_MOD2 | KEY_NUMBERSIGN,
  KEY_MOD1 | KEY_MOD2 | KEY_COLON,
  KEY_MOD1 | KEY_MOD2 | KEY_SEMICOLON,
  KEY_MOD1 | KEY_MOD2 | KEY_QUOTELEFT,
@@ -588,6 +593,7 @@ const sal_uInt16 KEYCODE_ARRAY[] = { KEY_F1,
  KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_X,
  KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_Y,
  KEY_SHIFT | KEY_MOD1 | KEY_MOD2 | KEY_Z,
+ KEY_SHIFT | 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - officecfg/registry

2023-10-03 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   12 
++
 1 file changed, 12 insertions(+)

New commits:
commit 6b68b8c4819139c54072d2f28186b1fb6d937d56
Author: Gökay Şatır 
AuthorDate: Tue Oct 3 17:35:35 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Tue Oct 3 18:20:35 2023 +0200

Writer:

Added ALT + SHIFT + UP and ALT + SHIFT + DOWN combinations for:
* Moving paragraphs up and down in the document.

Signed-off-by: Gökay Şatır 
Change-Id: I5aef03456bce1cfd66349f41cae0ef37889ef0bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157520
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index df2a2cd6e2de..e4c21e196946 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -6319,6 +6319,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:GoToNextPara
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:MoveDown
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -6976,6 +6982,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:GoToStartOfPara
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:MoveUp
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - filter/source

2023-10-03 Thread Gökay Şatır (via logerrit)
 filter/source/svg/presentation_engine.js |   69 ++-
 1 file changed, 68 insertions(+), 1 deletion(-)

New commits:
commit 427e8c0a8d9a534c54e07414cfe66648c9a90d26
Author: Gökay Şatır 
AuthorDate: Tue Oct 3 10:53:31 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Tue Oct 3 12:16:14 2023 +0200

Impress presentation engine (svg):

   * Add handlers for w and b chars.
  * These hide the content and set the color of the view to either 
black or white.
   * Add handler for p char:
  * This changes the cursor to pointer and back to default with key 
presses.

Signed-off-by: Gökay Şatır 
Change-Id: I566f485aa676f0707a31f25a0b71f64970de2a26
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157511
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/filter/source/svg/presentation_engine.js 
b/filter/source/svg/presentation_engine.js
index 08fdb283d60b..2f653ea486f0 100644
--- a/filter/source/svg/presentation_engine.js
+++ b/filter/source/svg/presentation_engine.js
@@ -2756,6 +2756,56 @@ function getElementsByProperty( node, name )
 return elements;
 }
 
+// User can hide / show the presentation content.
+// For that purpose, we change the background color of root node to either 
black or white.
+// To set it back to its original color (for showing the content back), we 
should have the initial background color saved somewhere to read back.
+// There may be no initial color at all, so the initial value of the saved 
initial is undefined.
+var rootNodeInitialBackgroundColor = undefined;
+
+function changeRootNodeBackgroundTo(color) {
+   if (rootNodeInitialBackgroundColor === undefined)
+   rootNodeInitialBackgroundColor = 
ROOT_NODE.style.backgroundColor;
+
+   if (color === 'initial')
+   ROOT_NODE.style.backgroundColor = 
rootNodeInitialBackgroundColor;
+   else
+   ROOT_NODE.style.backgroundColor = color;
+}
+
+var isContentHidden = false;
+var contentInitialVisibilityValues = null;
+
+function getInitialVisibilityValues() {
+   var list = ROOT_NODE.querySelectorAll('g');
+   contentInitialVisibilityValues = [];
+   for (var i = 0; i < list.length; i++) {
+   var temp = {};
+   temp.object = list[i];
+   temp.visibility = list[i].style.visibility;
+   contentInitialVisibilityValues.push(temp);
+   }
+}
+
+function hideShowContent(color) {
+   if (contentInitialVisibilityValues === null)
+   getInitialVisibilityValues();
+
+   if (isContentHidden) {
+   for (var i = 0; i < contentInitialVisibilityValues.length; i++)
+   
contentInitialVisibilityValues[i].object.style.visibility = 
contentInitialVisibilityValues[i].visibility;
+
+   changeRootNodeBackgroundTo('initial');
+   isContentHidden = false;
+   }
+   else {
+   for (var i = 0; i < contentInitialVisibilityValues.length; i++)
+   
contentInitialVisibilityValues[i].object.style.visibility = 'hidden';
+
+   changeRootNodeBackgroundTo(color);
+   isContentHidden = true;
+   }
+}
+
 /** Event handler for key press.
  *
  *  @param aEvt the event
@@ -2765,7 +2815,7 @@ function onKeyDown( aEvt )
 if ( !aEvt )
 aEvt = window.event;
 
-var code = aEvt.keyCode || aEvt.charCode;
+var code = aEvt.keyCode || aEvt.charCode || aEvt.code;
 
 // console.log('===> onKeyDown: ' + code);
 
@@ -2788,6 +2838,20 @@ function onKeyDown( aEvt )
 
 // console.log(' now: ' + code);
 }
+   else if (code === P_KEY) {
+   aEvt.preventDefault();
+   if (ROOT_NODE.style.cursor === 'pointer')
+   ROOT_NODE.style.cursor = 'default';
+   else
+   ROOT_NODE.style.cursor = 'pointer';
+   }
+   else if (code === W_KEY) {
+   hideShowContent('white');
+   }
+   else if (code === B_KEY) {
+   hideShowContent('black');
+   }
+
 
 if( !processingEffect && keyCodeDictionary[currentMode] && 
keyCodeDictionary[currentMode][code] )
 {
@@ -4505,7 +4569,10 @@ var END_KEY = 35;   // end keycode
 var ENTER_KEY = 13;
 var SPACE_KEY = 32;
 var ESCAPE_KEY = 27;
+var B_KEY = 66;
+var P_KEY = 80;
 var Q_KEY = 81;
+var W_KEY = 87;
 
 // Visibility Values
 var HIDDEN = 0;


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - officecfg/registry

2023-10-02 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   44 
++
 1 file changed, 44 insertions(+)

New commits:
commit 541bcc2be61c10f85cafe0e62bb3afc60a152c01
Author: Gökay Şatır 
AuthorDate: Fri Sep 29 20:32:01 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Mon Oct 2 11:28:51 2023 +0200

German shortcut changes for Impress:

* CTRL + D for duplicate objects.
* F12 for save as.
* SHIFT + F3 for rotate lower / upper cases.
* SHIFT + F9 for show / hide grid.
* CTRL + F9 for show / hide ruler.
* CTRL +SHIFT + H for ungrouping objects.
* CTRL + SPACE for removing direct character formats.

Signed-off-by: Gökay Şatır 
Change-Id: Iedfd5f9bbc088b76edbb897141d9e612f8b55057
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157410
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index f98c6793b73b..df2a2cd6e2de 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -3067,6 +3067,13 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Forward
+.uno:SubScript
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:SuperScript
   
 
 
@@ -3119,6 +3126,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:Dismantle
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:CopyObjects
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -3168,6 +3181,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:DesignerDialog
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:SaveAs
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -3190,6 +3209,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:CopyObjects
+.uno:ChangeCaseRotateCase
   
 
 
@@ -3258,6 +3278,18 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:TextFitToSize
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:GridVisible
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:ShowRuler
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -3296,6 +3328,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:SuperScript
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:FormatUngroup
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -3447,6 +3485,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:ShowRuler
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:RemoveDirectCharFormats
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - officecfg/registry

2023-09-29 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   46 
+-
 1 file changed, 44 insertions(+), 2 deletions(-)

New commits:
commit 828c6bd73dcce738edc7d6a46432ddc5288235b7
Author: Gökay Şatır 
AuthorDate: Wed Sep 27 09:35:07 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Fri Sep 29 10:22:11 2023 +0200

German shortcut improvements for Calc:

* Insert date is assigned to CTRL + POINT.
* Insert time is assigned to CTRL + SHIFT + POINT.
* Save as is assigned to F12
   * Group and Ungroup are assigned to CTRL + F12 and CTRL + SHIFT + F12.
* Insert function dialog is assigned to SHIFT + F3
   * Rotate case function is assigned to CTRL + SHIFT + F3.
* Insert comment is assigned to SHIFT + F2
* Format cells dialog is assigned to ALT + 0
* CTRL + 5 is for Strikeout.
* F5 is assigned to FocusCellAddress.
   * CTRL + F is assigned to navigator.
  * ALT + F is assigned to "focus find bar".

Signed-off-by: Gökay Şatır 
Change-Id: I0213fecb6fe02b2d621d8409225251dbfa6631ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157360
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index d7d45de3b70a..f98c6793b73b 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -675,6 +675,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:SpacePara15
+.uno:Strikeout
   
 
 
@@ -721,6 +722,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:Zoom100Percent
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:FormatCellDialog
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -879,12 +886,20 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Group
+.uno:SaveAs
   
 
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Ungroup
+.uno:Group
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:Ungroup
   
 
 
@@ -917,6 +932,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:FunctionDialog
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:InsertAnnotation
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -933,6 +954,13 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:ChangeCaseRotateCase
+.uno:FunctionDialog
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:ChangeCaseRotateCase
   
 
 
@@ -945,6 +973,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Navigator
+.uno:FocusCellAddress
   
 
 
@@ -1021,6 +1050,19 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:RepeatSearch
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:SearchDialog
+.uno:Navigator
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+vnd.sun.star.findbar:FocusToFindbar
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -1295,12 +1337,14 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for 
some emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:InsertCurrentDate
+.uno:InsertCurrentDate
   
 
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:InsertCurrentTime
+.uno:InsertCurrentTime
   
 
 
@@ -1308,7 +1352,6 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:InsertCurrentDate
 .uno:InsertCurrentDate
-.uno:InsertCurrentDate
 .uno:InsertCurrentDate
 .uno:InsertCurrentDate
 .uno:InsertCurrentDate
@@ -1334,7 +1377,6 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:InsertCurrentTime
 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - officecfg/registry

2023-09-29 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   95 
+-
 1 file changed, 88 insertions(+), 7 deletions(-)

New commits:
commit 4137596ca58e927977ffe354f60c296f5771d28b
Author: Gökay Şatır 
AuthorDate: Wed Sep 27 13:01:46 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Fri Sep 29 10:21:41 2023 +0200

German keybindings:

Changes (2 indentations for the replacements of currents):

* CTRL + 1 / 2 / 5 for paragraph spacing 1, 2 and 1.5.
* ALT + 1 / 2 / 3 / 4 / 5 for headings.
* CTRL + + for superscript.
   * CTRL + SHIFT + + for CalculateSel.
* CTRL + D for font dialog.
   * CTRL + SHIFT + D for double underline.
* F12 for save-as.
   * ALT + F12 for default numbering.
* F5 for GoToPage.
   * CTRL + F for navigator.
  * CTRL + SPACE for search.
* Removed CTRL + H for superscript.
   * Defaults to find and replace now.
* CTRL + SHIFT + K for italic.
   * CTRL + K for hyperlink dialog.
* CTRL + SHIFT + L for default bullet.
* CTRL + * for control codes.
   * CTRL + ALT + * for execute macro field.
* CTRL + SHIFT + Q for small caps.
* CTRL + T for subscript.

for general compatibility.

Signed-off-by: Gökay Şatır 
Change-Id: I181e2d7828bc3f53092db4f880ee1715ae262d02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157308
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 61d3c2cc1182..d7d45de3b70a 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -6021,12 +6021,14 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for 
some emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:StyleApply?Style:string=Heading 
1FamilyName:string=ParagraphStyles
+.uno:SpacePara1
   
 
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:StyleApply?Style:string=Heading 
2FamilyName:string=ParagraphStyles
+.uno:SpacePara2
   
 
 
@@ -6045,6 +6047,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:StyleApply?Style:string=Heading 
5FamilyName:string=ParagraphStyles
+.uno:SpacePara15
   
 
 
@@ -6073,10 +6076,46 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for 
some emoji thing
 .uno:SidebarDeck.InspectorDeck
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:StyleApply?Style:string=Heading 
1FamilyName:string=ParagraphStyles
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:StyleApply?Style:string=Heading 
2FamilyName:string=ParagraphStyles
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:StyleApply?Style:string=Heading 
3FamilyName:string=ParagraphStyles
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:StyleApply?Style:string=Heading 
4FamilyName:string=ParagraphStyles
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:StyleApply?Style:string=Heading 
5FamilyName:string=ParagraphStyles
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:CalculateSel
+.uno:SuperScript
+  
+
+
+  
+.uno:CalculateSel
   
 
 
@@ -6216,12 +6255,14 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for 
some emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:UnderlineDouble
+.uno:FontDialog
   
 
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:ParaRightToLeft
+.uno:UnderlineDouble
   
 
 
@@ -6301,6 +6342,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:DefaultNumbering
+.uno:SaveAs
   
 
 
@@ -6315,6 +6357,12 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:DefaultBullet
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:DefaultNumbering
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -6367,6 +6415,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Navigator
+ 

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

2023-09-18 Thread Gökay Şatır (via logerrit)
 sw/source/uibase/docvw/AnnotationMenuButton.cxx |   29 +++-
 1 file changed, 4 insertions(+), 25 deletions(-)

New commits:
commit dea852d00bed5cfe2c223b8bf30dff19a60a50a6
Author: Gökay Şatır 
AuthorDate: Thu Sep 7 11:22:25 2023 +0300
Commit: Miklos Vajna 
CommitDate: Mon Sep 18 15:06:55 2023 +0200

We can allow one to answer their own comment.

Other office implementations allow this.

I think we can enable reply button for the owner of the comment, unless 
there is a good reason to not to.

Signed-off-by: Gökay Şatır 
Change-Id: I6969122efe24d2804b4092e0afe0709a2fd1ef98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156688
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157018
Tested-by: Jenkins

diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx 
b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
index 975e9a02895b..5e42d15c879e 100644
--- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
@@ -69,6 +69,8 @@ IMPL_LINK_NOARG(SwAnnotationWin, ToggleHdl, 
weld::Toggleable&, void)
 bool bReadOnly = IsReadOnly();
 if (bReadOnly)
 {
+mxMenuButton->set_item_visible("reply", false);
+mxMenuButton->set_item_visible("sep1", false); // Separator after 
reply button.
 mxMenuButton->set_item_visible("resolve", false);
 mxMenuButton->set_item_visible("unresolve", false);
 mxMenuButton->set_item_visible("resolvethread", false);
@@ -77,6 +79,8 @@ IMPL_LINK_NOARG(SwAnnotationWin, ToggleHdl, 
weld::Toggleable&, void)
 }
 else
 {
+mxMenuButton->set_item_visible("reply", !IsReadOnlyOrProtected());
+mxMenuButton->set_item_visible("sep1", !IsReadOnlyOrProtected());
 mxMenuButton->set_item_visible("resolve", !IsResolved());
 mxMenuButton->set_item_visible("unresolve", IsResolved());
 mxMenuButton->set_item_visible("resolvethread", !IsThreadResolved());
@@ -88,31 +92,6 @@ IMPL_LINK_NOARG(SwAnnotationWin, ToggleHdl, 
weld::Toggleable&, void)
 mxMenuButton->set_item_visible("deleteby", !bReadOnly);
 mxMenuButton->set_item_visible("deleteall", !bReadOnly);
 mxMenuButton->set_item_visible("formatall", !bReadOnly);
-
-bool bReplyVis = true;
-
-// No answer possible if this note is in a protected section.
-if (IsReadOnlyOrProtected())
-{
-mxMenuButton->set_item_visible("reply", false);
-bReplyVis = false;
-}
-else
-{
-SvtUserOptions aUserOpt;
-OUString sAuthor;
-if ((sAuthor = aUserOpt.GetFullName()).isEmpty())
-{
-if ((sAuthor = aUserOpt.GetID()).isEmpty())
-{
-sAuthor = SwResId(STR_REDLINE_UNKNOWN_AUTHOR);
-}
-}
-// do not allow to reply to ourself
-bReplyVis = sAuthor != GetAuthor();
-}
-mxMenuButton->set_item_visible("reply", bReplyVis);
-mxMenuButton->set_item_visible("sep1", bReplyVis);
 }
 
 IMPL_LINK(SwAnnotationWin, KeyInputHdl, const KeyEvent&, rKeyEvt, bool)


[Libreoffice-commits] core.git: desktop/qa include/xmloff schema/libreoffice sw/inc sw/source xmloff/inc xmloff/qa xmloff/source

2023-09-12 Thread Gökay Şatır (via logerrit)
 desktop/qa/data/comments.odt|binary
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   14 +++---
 include/xmloff/xmltoken.hxx |1 
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |5 ++
 sw/inc/AnnotationWin.hxx|3 +
 sw/inc/docufld.hxx  |   10 
 sw/inc/unoprnms.hxx |1 
 sw/source/core/fields/docufld.cxx   |   23 +-
 sw/source/core/inc/bookmark.hxx |2 
 sw/source/core/inc/unofldmid.h  |1 
 sw/source/core/unocore/unofield.cxx |   11 
 sw/source/core/unocore/unomap.cxx   |1 
 sw/source/uibase/docvw/AnnotationWin.cxx|   14 ++
 sw/source/uibase/docvw/PostItMgr.cxx|   27 +++-
 sw/source/uibase/shells/textfld.cxx |8 +++
 sw/source/uibase/uno/unotxdoc.cxx   |3 -
 xmloff/inc/txtfldi.hxx  |1 
 xmloff/qa/unit/text.cxx |8 +++
 xmloff/source/core/xmltoken.cxx |1 
 xmloff/source/text/txtflde.cxx  |9 
 xmloff/source/text/txtfldi.cxx  |6 ++
 xmloff/source/token/tokens.txt  |1 
 22 files changed, 133 insertions(+), 17 deletions(-)

New commits:
commit 62cc2217217650d23c72e4646ccd793f76722d94
Author: Gökay Şatır 
AuthorDate: Fri Sep 1 09:49:53 2023 +0300
Commit: Miklos Vajna 
CommitDate: Tue Sep 12 17:09:18 2023 +0200

Added parent / child relationship to comments.

Adding parent name of a comment into odf file when there is a parent.

Also includes:

Added test case to comment property test.

Change-Id: I033f6574b4875fcb76b16c8b5b9d9f7d55b52cbe

Also includes:

Add parent / child relations to replied comments.

Change-Id: Ia7d95c4e6020b501798a89cbdcae64dc5691437c

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

diff --git a/desktop/qa/data/comments.odt b/desktop/qa/data/comments.odt
index ee7f15f8b755..1bcdcc0385ea 100644
Binary files a/desktop/qa/data/comments.odt and b/desktop/qa/data/comments.odt 
differ
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 8a55ae18172d..8f90f3198b27 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2452,7 +2452,7 @@ void DesktopLOKTest::testCommentsWriter()
 // This is a reply comment
 else if (rComment.second.get("text") == "Reply to Comment 
2")
 {
-CPPUNIT_ASSERT_EQUAL(nComment2Id, 
rComment.second.get("parent"));
+CPPUNIT_ASSERT_EQUAL(nComment2Id, 
rComment.second.get("parentId"));
 }
 }
 
@@ -2594,8 +2594,8 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
 // We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action 
and linked to its parent comment
 CPPUNIT_ASSERT_EQUAL(std::string("Add"), 
aView1.m_aCommentCallbackResult.get("action"));
 CPPUNIT_ASSERT_EQUAL(std::string("Add"), 
aView2.m_aCommentCallbackResult.get("action"));
-CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView1.m_aCommentCallbackResult.get("parent"));
-CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView2.m_aCommentCallbackResult.get("parent"));
+CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView1.m_aCommentCallbackResult.get("parentId"));
+CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView2.m_aCommentCallbackResult.get("parentId"));
 CPPUNIT_ASSERT_EQUAL(std::string("Reply comment"), 
aView1.m_aCommentCallbackResult.get("text"));
 CPPUNIT_ASSERT_EQUAL(std::string("Reply comment"), 
aView2.m_aCommentCallbackResult.get("text"));
 int nCommentId2 = aView1.m_aCommentCallbackResult.get("id");
@@ -2609,8 +2609,8 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
 CPPUNIT_ASSERT_EQUAL(std::string("Modify"), 
aView1.m_aCommentCallbackResult.get("action"));
 CPPUNIT_ASSERT_EQUAL(std::string("Modify"), 
aView2.m_aCommentCallbackResult.get("action"));
 // parent is unchanged still
-CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView1.m_aCommentCallbackResult.get("parent"));
-CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView2.m_aCommentCallbackResult.get("parent"));
+CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView1.m_aCommentCallbackResult.get("parentId"));
+CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView2.m_aCommentCallbackResult.get("parentId"));
 CPPUNIT_ASSERT_EQUAL(std::string("Edited comment"), 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/inc sw/qa sw/source uitest/uitest

2023-09-11 Thread Gökay Şatır (via logerrit)
 sw/inc/AnnotationWin.hxx  |2 --
 sw/qa/uitest/navigator/tdf137274.py   |7 ++-
 sw/source/uibase/docvw/AnnotationWin.cxx  |   19 ---
 sw/source/uibase/docvw/AnnotationWin2.cxx |2 ++
 sw/source/uibase/docvw/PostItMgr.cxx  |6 --
 uitest/uitest/test.py |3 +++
 6 files changed, 15 insertions(+), 24 deletions(-)

New commits:
commit 4a68adb1a63af4d477d827e579c73b9add1d0559
Author: Gökay Şatır 
AuthorDate: Thu Sep 7 16:09:00 2023 +0300
Commit: Andras Timar 
CommitDate: Mon Sep 11 19:36:37 2023 +0200

SW comments: Provide parent / child relations without position.

Signed-off-by: Gökay Şatır 
Change-Id: I7acba74ef0717bc07a675be17fc1909680138f00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156689
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 19aa67dbfc5d..700293b61a84 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -81,8 +81,6 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public 
InterimItemWindow
 
 sal_uInt32 MoveCaret();
 
-/// Calculate parent postit id of current annotation window
-sal_uInt32 CalcParent();
 void   InitAnswer(OutlinerParaObject const & rText);
 
 bool IsProtected() const;
diff --git a/sw/qa/uitest/navigator/tdf137274.py 
b/sw/qa/uitest/navigator/tdf137274.py
index 5192045b8264..5273ddcb2f91 100644
--- a/sw/qa/uitest/navigator/tdf137274.py
+++ b/sw/qa/uitest/navigator/tdf137274.py
@@ -9,6 +9,7 @@
 from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 from uitest.uihelper.common import get_state_as_dict
+import time
 
 class tdf137274(UITestCase):
 
@@ -59,7 +60,11 @@ class tdf137274(UITestCase):
 self.ui_test.wait_until_child_is_available('Comment2')
 
 # xComments needs reassigned after content tree change
-xComments = self.get_item(xContentTree, 'Comments')
+while True:
+xComments = self.get_item(xContentTree, 'Comments')
+if '1' in xComments.getChildren():
+break
+time.sleep(self.ui_test.get_default_sleep())
 self.assertEqual('Comments', get_state_as_dict(xComments)['Text'])
 
 xComments.executeAction("EXPAND", tuple())
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx 
b/sw/source/uibase/docvw/AnnotationWin.cxx
index 7ebdbead067b..16acc0cbf589 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -387,25 +387,6 @@ sal_uInt32 SwAnnotationWin::MoveCaret()
: 1 + CountFollowing();
 }
 
-// returns a non-zero postit parent id, if exists, otherwise 0 for root 
comments
-sal_uInt32 SwAnnotationWin::CalcParent()
-{
-SwTextField* pTextField = mpFormatField->GetTextField();
-SwPosition aPosition( pTextField->GetTextNode(), pTextField->GetStart() );
-SwTextAttr * const pTextAttr =
-pTextField->GetTextNode().GetTextAttrForCharAt(
-aPosition.GetContentIndex() - 1,
-RES_TXTATR_ANNOTATION );
-const SwField* pField = pTextAttr ? pTextAttr->GetFormatField().GetField() 
: nullptr;
-sal_uInt32 nParentId = 0;
-if (pField && pField->Which() == SwFieldIds::Postit)
-{
-const SwPostItField* pPostItField = static_cast(pField);
-nParentId = pPostItField->GetPostItId();
-}
-return nParentId;
-}
-
 // counts how many SwPostItField we have right after the current one
 sal_uInt32 SwAnnotationWin::CountFollowing()
 {
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index e8852a87f6e0..c5ca676895c0 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -1118,6 +1118,8 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
 // Get newly created SwPostItField and set its paraIdParent
 auto pPostItField = mrMgr.GetLatestPostItField();
 pPostItField->SetParentId(GetTopReplyNote()->GetParaId());
+
pPostItField->SetParentPostItId(GetTopReplyNote()->GetPostItField()->GetPostItId());
+
pPostItField->SetParentName(GetTopReplyNote()->GetPostItField()->GetName());
 }
 break;
 }
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 07bf10be55c0..a0fda9fd7caa 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -746,7 +746,7 @@ void SwPostItMgr::LayoutPostIts()
 pItem->mpPostIt = pPostIt;
 if (mpAnswer)
 {
-if (static_cast(pPostIt->CalcParent())) 
//do we really have another note in front of this one
+  

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - sw/source

2023-09-08 Thread Gökay Şatır (via logerrit)
 sw/source/uibase/docvw/AnnotationMenuButton.cxx |   28 ++--
 1 file changed, 3 insertions(+), 25 deletions(-)

New commits:
commit e653ddd24ab4b75db212431461035ecbd9d625fa
Author: Gökay Şatır 
AuthorDate: Thu Sep 7 11:22:25 2023 +0300
Commit: Miklos Vajna 
CommitDate: Fri Sep 8 10:41:50 2023 +0200

We can allow one to answer their own comment.

Other office implementations allow this.

I think we can enable reply button for the owner of the comment, unless 
there is a good reason to not to.

Signed-off-by: Gökay Şatır 
Change-Id: I6969122efe24d2804b4092e0afe0709a2fd1ef98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156688
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx 
b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
index 1696f7e6d338..11d755cbd7e2 100644
--- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
@@ -66,13 +66,11 @@ IMPL_LINK_NOARG(SwAnnotationWin, ToggleHdl, 
weld::Toggleable&, void)
 if (!mxMenuButton->get_active())
 return;
 
-bool bReplyVis = true;
-
 bool bReadOnly = IsReadOnly();
 if (bReadOnly)
 {
 mxMenuButton->set_item_visible("reply", false);
-bReplyVis = false;
+mxMenuButton->set_item_visible("sep1", false); // Separator after 
reply button.
 mxMenuButton->set_item_visible("resolve", false);
 mxMenuButton->set_item_visible("unresolve", false);
 mxMenuButton->set_item_visible("resolvethread", false);
@@ -81,6 +79,8 @@ IMPL_LINK_NOARG(SwAnnotationWin, ToggleHdl, 
weld::Toggleable&, void)
 }
 else
 {
+mxMenuButton->set_item_visible("reply", !IsProtected());
+mxMenuButton->set_item_visible("sep1", !IsProtected());
 mxMenuButton->set_item_visible("resolve", !IsResolved());
 mxMenuButton->set_item_visible("unresolve", IsResolved());
 mxMenuButton->set_item_visible("resolvethread", !IsThreadResolved());
@@ -92,28 +92,6 @@ IMPL_LINK_NOARG(SwAnnotationWin, ToggleHdl, 
weld::Toggleable&, void)
 mxMenuButton->set_item_visible("deleteby", !bReadOnly);
 mxMenuButton->set_item_visible("deleteall", !bReadOnly);
 mxMenuButton->set_item_visible("formatall", !bReadOnly);
-
-if (IsProtected())
-{
-mxMenuButton->set_item_visible("reply", false);
-bReplyVis = false;
-}
-else
-{
-SvtUserOptions aUserOpt;
-OUString sAuthor;
-if ((sAuthor = aUserOpt.GetFullName()).isEmpty())
-{
-if ((sAuthor = aUserOpt.GetID()).isEmpty())
-{
-sAuthor = SwResId(STR_REDLINE_UNKNOWN_AUTHOR);
-}
-}
-// do not allow to reply to ourself and no answer possible if this 
note is in a protected section
-bReplyVis = sAuthor != GetAuthor();
-mxMenuButton->set_item_visible("reply", bReplyVis);
-}
-mxMenuButton->set_item_visible("sep1", bReplyVis);
 }
 
 IMPL_LINK(SwAnnotationWin, KeyInputHdl, const KeyEvent&, rKeyEvt, bool)


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/qa sw/inc sw/source

2023-09-05 Thread Gökay Şatır (via logerrit)
 desktop/qa/data/comments.odt  |binary
 sw/inc/AnnotationWin.hxx  |2 ++
 sw/source/core/inc/bookmark.hxx   |2 +-
 sw/source/uibase/docvw/AnnotationWin.cxx  |8 
 sw/source/uibase/docvw/AnnotationWin2.cxx |1 -
 sw/source/uibase/shells/textfld.cxx   |8 
 6 files changed, 19 insertions(+), 2 deletions(-)

New commits:
commit d782e808719cf38b0f6e6f92d1d870f6a6e1
Author: Gökay Şatır 
AuthorDate: Mon Sep 4 19:35:00 2023 +0300
Commit: Miklos Vajna 
CommitDate: Tue Sep 5 14:22:23 2023 +0200

Add parent / child relations to replied comments.

Signed-off-by: Gökay Şatır 
Change-Id: Ia7d95c4e6020b501798a89cbdcae64dc5691437c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156523
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/desktop/qa/data/comments.odt b/desktop/qa/data/comments.odt
index ee7f15f8b755..1bcdcc0385ea 100644
Binary files a/desktop/qa/data/comments.odt and b/desktop/qa/data/comments.odt 
differ
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 4daa795886d1..19aa67dbfc5d 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -30,6 +30,7 @@
 #include "swrect.hxx"
 #include "SidebarWindowsTypes.hxx"
 #include 
+#include 
 
 class EditView;
 class PopupMenu;
@@ -76,6 +77,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public 
InterimItemWindow
 OUString GetAuthor() const;
 Date GetDate() const;
 tools::Time GetTime() const;
+void GeneratePostItName();
 
 sal_uInt32 MoveCaret();
 
diff --git a/sw/source/core/inc/bookmark.hxx b/sw/source/core/inc/bookmark.hxx
index 6ba9484b3bd8..8a3fc98f260c 100644
--- a/sw/source/core/inc/bookmark.hxx
+++ b/sw/source/core/inc/bookmark.hxx
@@ -106,6 +106,7 @@ namespace sw::mark {
 { return m_wXBookmark; }
 void SetXBookmark(rtl::Reference const& xBkmk);
 
+static OUString GenerateNewName(std::u16string_view rPrefix);
 protected:
 // SwClient
 void SwClientNotify(const SwModify&, const SfxHint&) override;
@@ -114,7 +115,6 @@ namespace sw::mark {
 std::optional m_oPos1;
 std::optional m_oPos2;
 OUString m_aName;
-static OUString GenerateNewName(std::u16string_view rPrefix);
 
 unotools::WeakReference m_wXBookmark;
 };
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx 
b/sw/source/uibase/docvw/AnnotationWin.cxx
index 711d612ef173..7ebdbead067b 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -204,6 +204,14 @@ void SwAnnotationWin::SetPostItText()
 Invalidate();
 }
 
+void SwAnnotationWin::GeneratePostItName()
+{
+if (mpField && mpField->GetName().isEmpty())
+{
+
mpField->SetName(sw::mark::MarkBase::GenerateNewName(u"__Annotation__"));
+}
+}
+
 void SwAnnotationWin::SetResolved(bool resolved)
 {
 bool oldState = IsResolved();
diff --git a/sw/source/uibase/docvw/AnnotationWin2.cxx 
b/sw/source/uibase/docvw/AnnotationWin2.cxx
index d4faa06482ba..e8852a87f6e0 100644
--- a/sw/source/uibase/docvw/AnnotationWin2.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin2.cxx
@@ -1118,7 +1118,6 @@ void SwAnnotationWin::ExecuteCommand(sal_uInt16 nSlot)
 // Get newly created SwPostItField and set its paraIdParent
 auto pPostItField = mrMgr.GetLatestPostItField();
 pPostItField->SetParentId(GetTopReplyNote()->GetParaId());
-
pPostItField->SetParentPostItId(GetTopReplyNote()->GetPostItId());
 }
 break;
 }
diff --git a/sw/source/uibase/shells/textfld.cxx 
b/sw/source/uibase/shells/textfld.cxx
index 9198cec0337a..b0603d4eed96 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -451,6 +451,14 @@ void SwTextShell::ExecField(SfxRequest )
 sText = pTextItem->GetValue();
 pMgr->RegisterAnswerText(sText);
 pWin->ExecuteCommand(nSlot);
+
+// Set the parent postit id of the reply.
+
GetView().GetPostItMgr()->GetLatestPostItField()->SetParentPostItId(pIdItem->GetValue().toUInt32());
+
+// If name of the replied comment is empty, we need to 
set a name in order to connect them in the xml file.
+pWin->GeneratePostItName(); // Generates a name if the 
current name is empty.
+
+
GetView().GetPostItMgr()->GetLatestPostItField()->SetParentName(pWin->GetPostItField()->GetName());
 }
 }
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/qa schema/libreoffice xmloff/qa

2023-09-05 Thread Gökay Şatır (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   14 ++--
 schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng |5 
 xmloff/qa/unit/text.cxx |6 -
 3 files changed, 17 insertions(+), 8 deletions(-)

New commits:
commit 18187c3aaf7280c01b7768d51e4588156412f554
Author: Gökay Şatır 
AuthorDate: Fri Sep 1 14:14:37 2023 +0300
Commit: Miklos Vajna 
CommitDate: Tue Sep 5 14:21:41 2023 +0200

Added test case to comment property test.

Signed-off-by: Gökay Şatır 
Change-Id: I033f6574b4875fcb76b16c8b5b9d9f7d55b52cbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156406
Tested-by: Miklos Vajna 
Reviewed-by: Miklos Vajna 

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 68c86d0c254a..943889faee70 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2451,7 +2451,7 @@ void DesktopLOKTest::testCommentsWriter()
 // This is a reply comment
 else if (rComment.second.get("text") == "Reply to Comment 
2")
 {
-CPPUNIT_ASSERT_EQUAL(nComment2Id, 
rComment.second.get("parent"));
+CPPUNIT_ASSERT_EQUAL(nComment2Id, 
rComment.second.get("parentId"));
 }
 }
 
@@ -2593,8 +2593,8 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
 // We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action 
and linked to its parent comment
 CPPUNIT_ASSERT_EQUAL(std::string("Add"), 
aView1.m_aCommentCallbackResult.get("action"));
 CPPUNIT_ASSERT_EQUAL(std::string("Add"), 
aView2.m_aCommentCallbackResult.get("action"));
-CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView1.m_aCommentCallbackResult.get("parent"));
-CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView2.m_aCommentCallbackResult.get("parent"));
+CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView1.m_aCommentCallbackResult.get("parentId"));
+CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView2.m_aCommentCallbackResult.get("parentId"));
 CPPUNIT_ASSERT_EQUAL(std::string("Reply comment"), 
aView1.m_aCommentCallbackResult.get("text"));
 CPPUNIT_ASSERT_EQUAL(std::string("Reply comment"), 
aView2.m_aCommentCallbackResult.get("text"));
 int nCommentId2 = aView1.m_aCommentCallbackResult.get("id");
@@ -2608,8 +2608,8 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
 CPPUNIT_ASSERT_EQUAL(std::string("Modify"), 
aView1.m_aCommentCallbackResult.get("action"));
 CPPUNIT_ASSERT_EQUAL(std::string("Modify"), 
aView2.m_aCommentCallbackResult.get("action"));
 // parent is unchanged still
-CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView1.m_aCommentCallbackResult.get("parent"));
-CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView2.m_aCommentCallbackResult.get("parent"));
+CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView1.m_aCommentCallbackResult.get("parentId"));
+CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView2.m_aCommentCallbackResult.get("parentId"));
 CPPUNIT_ASSERT_EQUAL(std::string("Edited comment"), 
aView1.m_aCommentCallbackResult.get("text"));
 CPPUNIT_ASSERT_EQUAL(std::string("Edited comment"), 
aView2.m_aCommentCallbackResult.get("text"));
 
@@ -2632,8 +2632,8 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
 // We received a LOK_CALLBACK_COMMENT callback with comment 'Add' action 
and linked to its parent comment
 CPPUNIT_ASSERT_EQUAL(std::string("Add"), 
aView1.m_aCommentCallbackResult.get("action"));
 CPPUNIT_ASSERT_EQUAL(std::string("Add"), 
aView2.m_aCommentCallbackResult.get("action"));
-CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView1.m_aCommentCallbackResult.get("parent"));
-CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView2.m_aCommentCallbackResult.get("parent"));
+CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView1.m_aCommentCallbackResult.get("parentId"));
+CPPUNIT_ASSERT_EQUAL(nCommentId1, 
aView2.m_aCommentCallbackResult.get("parentId"));
 CPPUNIT_ASSERT_EQUAL(std::string("Reply comment again"), 
aView1.m_aCommentCallbackResult.get("text"));
 CPPUNIT_ASSERT_EQUAL(std::string("Reply comment again"), 
aView2.m_aCommentCallbackResult.get("text"));
 
diff --git a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng 
b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
index fb59ee1c2a94..c940b6c231ad 100644
--- a/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
+++ b/schema/libreoffice/OpenDocument-v1.3+libreoffice-schema.rng
@@ -977,6 +977,11 @@ 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.
 
   
 
+
+  
+
+  
+
   
 
 
diff --git a/xmloff/qa/unit/text.cxx b/xmloff/qa/unit/text.cxx
index ab8a28448701..202a69819bdf 100644
--- a/xmloff/qa/unit/text.cxx
+++ b/xmloff/qa/unit/text.cxx
@@ -55,7 +55,7 @@ CPPUNIT_TEST_FIXTURE(XmloffStyleTest, testMailMergeInEditeng)
 loadFromURL(u"mail-merge-editeng.odt");
 }
 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - include/xmloff sw/inc sw/source xmloff/inc xmloff/source

2023-09-05 Thread Gökay Şatır (via logerrit)
 include/xmloff/xmltoken.hxx   |1 +
 sw/inc/AnnotationWin.hxx  |1 +
 sw/inc/docufld.hxx|   10 +-
 sw/inc/unoprnms.hxx   |1 +
 sw/source/core/fields/docufld.cxx |   23 +--
 sw/source/core/inc/unofldmid.h|1 +
 sw/source/core/unocore/unofield.cxx   |   11 ++-
 sw/source/core/unocore/unomap.cxx |1 +
 sw/source/uibase/docvw/AnnotationWin.cxx  |6 ++
 sw/source/uibase/docvw/AnnotationWin2.cxx |1 +
 sw/source/uibase/docvw/PostItMgr.cxx  |   27 +--
 sw/source/uibase/uno/unotxdoc.cxx |3 +--
 xmloff/inc/txtfldi.hxx|1 +
 xmloff/source/core/xmltoken.cxx   |1 +
 xmloff/source/text/txtflde.cxx|9 +
 xmloff/source/text/txtfldi.cxx|6 ++
 xmloff/source/token/tokens.txt|1 +
 17 files changed, 96 insertions(+), 8 deletions(-)

New commits:
commit d849504f6d4b9f4b169b2848588cc890a29ac8f9
Author: Gökay Şatır 
AuthorDate: Fri Sep 1 09:49:53 2023 +0300
Commit: Miklos Vajna 
CommitDate: Tue Sep 5 14:21:08 2023 +0200

Added parent / child relationship to comments.

Adding parent name of a comment into odf file when there is a parent.

Signed-off-by: Gökay Şatır 
Change-Id: I08b5ab6eb11adcafcbf3559896d79d41b449b26a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156391
Reviewed-by: Miklos Vajna 
Tested-by: Miklos Vajna 

diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index b24f4ec0ce4d..da28c0f81c03 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -1504,6 +1504,7 @@ namespace xmloff::token {
 XML_PARAGRAPH_START_MARGIN,
 XML_PARALLEL,
 XML_PARAM,
+XML_PARENT_NAME,
 XML_PARENT_STYLE_NAME,
 XML_PARSE_SQL_STATEMENT,
 XML_PARSED,
diff --git a/sw/inc/AnnotationWin.hxx b/sw/inc/AnnotationWin.hxx
index 08b8597a014f..4daa795886d1 100644
--- a/sw/inc/AnnotationWin.hxx
+++ b/sw/inc/AnnotationWin.hxx
@@ -194,6 +194,7 @@ class SAL_DLLPUBLIC_RTTI SwAnnotationWin final : public 
InterimItemWindow
 
 // Get annotation paraId or generate one if it doesn't exist
 sal_uInt32 GetParaId();
+sal_uInt32 GetPostItId();
 // Used to generate a unique paraId
 static sal_uInt32 CreateUniqueParaId();
 
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 89a5341222db..2f4cb3208ddf 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -458,6 +458,8 @@ class SW_DLLPUBLIC SwPostItField final : public SwField
 sal_uInt32 m_nPostItId;
 sal_uInt32 m_nParentId;
 sal_uInt32 m_nParaId;
+sal_uInt32 m_nParentPostItId;
+OUString m_sParentName; /// Parent comment's name.
 
 public:
 static sal_uInt32 s_nLastPostItId;
@@ -471,7 +473,9 @@ public:
const bool bResolved = false,
const sal_uInt32 nPostItId = 0,
const sal_uInt32 nParentId = 0,
-   const sal_uInt32 nParaId = 0);
+   const sal_uInt32 nParaId = 0,
+   const sal_uInt32 nParentPostItId = 0,
+   const OUString aParentName = OUString());
 
 SwPostItField(const SwPostItField&) = delete;
 SwPostItField* operator=(const SwPostItField&) = delete;
@@ -486,7 +490,9 @@ public:
 tools::Time GetTime() const { return 
tools::Time(m_aDateTime.GetTime()); }
 sal_uInt32 GetPostItId() const { return m_nPostItId; }
 void SetPostItId(const sal_uInt32 nPostItId = 0);
+void SetParentPostItId(const sal_uInt32 nParentPostItId = 0);
 sal_uInt32 GetParentId() const { return m_nParentId; }
+sal_uInt32 GetParentPostItId() const   { return m_nParentPostItId; }
 void SetParentId(const sal_uInt32 nParentId);
 sal_uInt32 GetParaId() const   { return m_nParaId; }
 void SetParaId(const sal_uInt32 nParaId);
@@ -502,6 +508,8 @@ public:
 const OUString& GetInitials() const { return m_sInitials;}
 voidSetName(const OUString& rStr);
 const OUString& GetName() const { return m_sName;}
+const OUString& GetParentName() const { return m_sParentName; }
+voidSetParentName(const OUString& rStr);
 
 const OutlinerParaObject* GetTextObject() const { return mpText ? &*mpText 
: nullptr;}
 void SetTextObject( std::optional pText );
diff --git a/sw/inc/unoprnms.hxx b/sw/inc/unoprnms.hxx
index 8b5328462d7d..d72883efdb9f 100644
--- a/sw/inc/unoprnms.hxx
+++ b/sw/inc/unoprnms.hxx
@@ -88,6 +88,7 @@ inline constexpr OUStringLiteral UNO_NAME_TEXT_RANGE = 
u"TextRange";
 inline constexpr OUStringLiteral UNO_NAME_TEXT_BOX = u"TextBox";
 inline constexpr OUStringLiteral UNO_NAME_TEXT_BOX_CONTENT = u"TextBoxContent";
 inline constexpr 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - officecfg/registry

2023-06-07 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |7 +++
 1 file changed, 7 insertions(+)

New commits:
commit 7b168fbe4e4a5feecdd946fef9c5c3e5107dc050
Author: Gökay Şatır 
AuthorDate: Thu May 25 10:32:55 2023 +0300
Commit: Andras Timar 
CommitDate: Wed Jun 7 14:37:57 2023 +0200

Writer German shortcuts compatibility improvements.

Signed-off-by: Gökay Şatır 
Change-Id: Icfcdf3f629442da339c846f9eaa577ff7b779290
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152261
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index 741580f22255..61d3c2cc1182 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -6173,6 +6173,13 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:InsertZWSP
+.uno:DefaultNumbering
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:DefaultBullet
   
 
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source framework/IwyuFilter_framework.yaml framework/source offapi/com offapi/UnoApi_offapi.mk sfx2/source svtools/source

2023-06-05 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx   |2 
 framework/IwyuFilter_framework.yaml   |2 
 framework/source/uiconfiguration/moduleuicfgsupplier.cxx  |6 -
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |4 
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |4 
 offapi/UnoApi_offapi.mk   |2 
 offapi/com/sun/star/ui/ModuleUIConfigurationManager.idl   |2 
 offapi/com/sun/star/ui/UIConfigurationManager.idl |2 
 offapi/com/sun/star/ui/XModuleUIConfigurationManager3.idl |   41 
++
 offapi/com/sun/star/ui/XUIConfigurationManager.idl|7 -
 offapi/com/sun/star/ui/XUIConfigurationManager3.idl   |   39 
+
 sfx2/source/inc/appdata.hxx   |2 
 svtools/source/misc/acceleratorexecute.cxx|6 +
 13 files changed, 99 insertions(+), 20 deletions(-)

New commits:
commit d5eec804048ccac4d3dce73c9d1695ca268e878f
Author: Gökay Şatır 
AuthorDate: Thu Feb 16 16:47:22 2023 +0300
Commit: Miklos Vajna 
CommitDate: Mon Jun 5 11:29:25 2023 +0200

[API CHANGE] Add createShortCutManager function to uiconfigurationmanager.

We need to have different accelerator classes for differnt languages.
This PR creates a new accelerator class for different languages.

Since current code uses single instance for accelerators, i needed to add a 
create function.

Also we now have an unordered map for different languages and modules.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147157
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148680
Tested-by: Miklos Vajna 
Change-Id: Ia646f20b3206f430ece614fc127e8b748044e4c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151798
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152381

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9572a0c7779b..38283c2deef8 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7209,7 +7209,7 @@ static void lo_status_indicator_callback(void *data, 
comphelper::LibreOfficeKit:
 }
 
 /// Used by preloadData (LibreOfficeKit) for providing different shortcuts for 
different languages.
-void preLoadShortCutAccelerators()
+static void preLoadShortCutAccelerators()
 {
 std::unordered_map>& 
acceleratorConfs = SfxLokHelper::getAcceleratorConfs();
 css::uno::Sequence 
installedLocales(officecfg::Setup::Office::InstalledLocales::get()->getElementNames());
diff --git a/framework/IwyuFilter_framework.yaml 
b/framework/IwyuFilter_framework.yaml
index 88b8dfae4ae3..3d69d4315137 100644
--- a/framework/IwyuFilter_framework.yaml
+++ b/framework/IwyuFilter_framework.yaml
@@ -40,7 +40,7 @@ excludelist:
 - com/sun/star/beans/PropertyValue.hpp
 framework/source/fwe/helper/configimporter.cxx:
 # Actually used
-- com/sun/star/ui/XUIConfigurationManager2.hpp
+- com/sun/star/ui/XUIConfigurationManager3.hpp
 framework/source/fwe/helper/undomanagerhelper.cxx:
 # Actually used
 - com/sun/star/document/XUndoManager.hpp
diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx 
b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
index cdbd647c3108..f127c81d7fb9 100644
--- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
+++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx
@@ -28,7 +28,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 
@@ -80,7 +80,7 @@ public:
 private:
 virtual void disposing(std::unique_lock&) final override;
 
-typedef std::unordered_map< OUString, css::uno::Reference< 
css::ui::XModuleUIConfigurationManager2 > > ModuleToModuleCfgMgr;
+typedef std::unordered_map< OUString, css::uno::Reference< 
css::ui::XModuleUIConfigurationManager3 > > ModuleToModuleCfgMgr;
 
 //TODO_ASvoid impl_initStorages();
 
@@ -99,7 +99,7 @@ 
ModuleUIConfigurationManagerSupplier::ModuleUIConfigurationManagerSupplier( cons
 Reference< XNameAccess > xNameAccess( m_xModuleMgr, UNO_QUERY_THROW );
 const Sequence< OUString > aNameSeq   = 
xNameAccess->getElementNames();
 for ( const OUString& rName : aNameSeq )
-m_aModuleToModuleUICfgMgrMap.emplace( rName, Reference< 
XModuleUIConfigurationManager2 >() );
+m_aModuleToModuleUICfgMgrMap.emplace( rName, Reference< 
XModuleUIConfigurationManager3 >() );
 }
 catch(...)
 {
diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index d50b5c037cf2..d5c6a0b5b532 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source

2023-06-02 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx |   29 ++---
 1 file changed, 10 insertions(+), 19 deletions(-)

New commits:
commit 1cd46ba9140b7f5f077d8e9da405b180857f008d
Author: Gökay Şatır 
AuthorDate: Wed May 31 11:58:09 2023 +0300
Commit: Andras Timar 
CommitDate: Fri Jun 2 13:43:13 2023 +0200

Remove the allowed language check from UI languages.

Allowed langauges list is for spell checking algorithms. No need to use it 
for UI shortcuts.

Signed-off-by: Gökay Şatır 
Change-Id: I996861b79247269e9b788b008fe6fc26e5ef44c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152416
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 560d6bf990b1..58f9331cb992 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7219,27 +7219,18 @@ void preLoadShortCutAccelerators()
 {
 OUString language = 
LanguageTag(installedLocales[i]).getLocale().Language;
 
-if (!comphelper::LibreOfficeKit::isAllowlistedLanguage(language))
-{
-// Language is listed by COOL and also installed in core. We can 
create the short cut accelerator.
-
-// Set the UI language to current one, before creating the 
accelerator.
-std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
-officecfg::Setup::L10N::ooLocale::set(installedLocales[i], batch);
-batch->commit();
+// Set the UI language to current one, before creating the accelerator.
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+officecfg::Setup::L10N::ooLocale::set(installedLocales[i], batch);
+batch->commit();
 
-// Supported module names: Writer, Calc, Draw, Impress
-std::vector supportedModuleNames = { 
"com.sun.star.text.TextDocument", "com.sun.star.sheet.SpreadsheetDocument", 
"com.sun.star.drawing.DrawingDocument", 
"com.sun.star.presentation.PresentationDocument" };
-// Create the accelerators.
-for (std::size_t j = 0; j < supportedModuleNames.size(); j++)
-{
-OUString key = supportedModuleNames[j] + installedLocales[i];
-acceleratorConfs[key] = 
svt::AcceleratorExecute::lok_createNewAcceleratorConfiguration(::comphelper::getProcessComponentContext(),
 supportedModuleNames[j]);
-}
-}
-else
+// Supported module names: Writer, Calc, Draw, Impress
+std::vector supportedModuleNames = { 
"com.sun.star.text.TextDocument", "com.sun.star.sheet.SpreadsheetDocument", 
"com.sun.star.drawing.DrawingDocument", 
"com.sun.star.presentation.PresentationDocument" };
+// Create the accelerators.
+for (std::size_t j = 0; j < supportedModuleNames.size(); j++)
 {
-std::cerr << "Language is installed in core but not in the list of 
COOL languages: " << language << "\n";
+OUString key = supportedModuleNames[j] + installedLocales[i];
+acceleratorConfs[key] = 
svt::AcceleratorExecute::lok_createNewAcceleratorConfiguration(::comphelper::getProcessComponentContext(),
 supportedModuleNames[j]);
 }
 }
 


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - officecfg/registry

2023-05-25 Thread Gökay Şatır (via logerrit)
 officecfg/registry/data/org/openoffice/Office/Accelerators.xcu |   31 
+-
 1 file changed, 29 insertions(+), 2 deletions(-)

New commits:
commit 71bed39a48f8b979c522b158a2e44724dda5b503
Author: Gökay Şatır 
AuthorDate: Wed May 24 14:39:12 2023 +0300
Commit: Andras Timar 
CommitDate: Thu May 25 09:08:27 2023 +0200

Added & modified some shortcuts for general compatibility.

Signed-off-by: Gökay Şatır 
Change-Id: Ibfcfbc3a75aca392acc4626e6169f2f3abcc4970
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152196
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu 
b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
index e62a0e97a374..741580f22255 100644
--- a/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Accelerators.xcu
@@ -705,14 +705,20 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Shrink
-.uno:Shrink
+.uno:HideColumn
   
 
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:Grow
-.uno:Grow
+.uno:HideRow
+  
+
+
+  
+I10 SHORTCUTS - No 
TRANSLATE
+.uno:Zoom100Percent
   
 
 
@@ -881,6 +887,24 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:Ungroup
   
 
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:Ungroup
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:Group
+  
+
+
+  
+I10N SHORTCUTS - NO 
TRANSLATE
+.uno:InsertAnnotation
+  
+
 
   
 I10N SHORTCUTS - NO 
TRANSLATE
@@ -945,6 +969,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
   
 I10N SHORTCUTS - NO 
TRANSLATE
 .uno:InsertCurrentTime
+.uno:Shrink
   
 
 
@@ -1009,6 +1034,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 .uno:RepeatSearch
 .uno:Save
 .uno:Bold
+.uno:FocusCellAddress
   
 
 
@@ -1453,6 +1479,7 @@ Ctrl+Shift+e aka E_SHIFT_MOD1 under GTK/IBUS is for some 
emoji thing
 I10N SHORTCUTS - NO 
TRANSLATE
 
 .uno:MarkPrecedents
+.uno:Zoom100Percent
   
 
 


[Libreoffice-commits] core.git: desktop/source framework/IwyuFilter_framework.yaml framework/source include/sfx2 include/svtools offapi/com offapi/UnoApi_offapi.mk sfx2/source svtools/source

2023-05-23 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx   |   48 
++
 framework/IwyuFilter_framework.yaml   |2 
 framework/source/uiconfiguration/moduleuicfgsupplier.cxx  |6 -
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |   10 +-
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |   10 +-
 include/sfx2/app.hxx  |4 
 include/sfx2/lokhelper.hxx|3 
 include/svtools/acceleratorexecute.hxx|2 
 offapi/UnoApi_offapi.mk   |2 
 offapi/com/sun/star/ui/ModuleUIConfigurationManager.idl   |2 
 offapi/com/sun/star/ui/UIConfigurationManager.idl |2 
 offapi/com/sun/star/ui/XModuleUIConfigurationManager3.idl |   41 

 offapi/com/sun/star/ui/XUIConfigurationManager3.idl   |   39 

 sfx2/source/appl/app.cxx  |5 +
 sfx2/source/inc/appdata.hxx   |2 
 sfx2/source/view/lokhelper.cxx|   12 +-
 sfx2/source/view/viewsh.cxx   |   41 

 svtools/source/misc/acceleratorexecute.cxx|   27 +
 18 files changed, 244 insertions(+), 14 deletions(-)

New commits:
commit d4bc98c5bf8d099ab1df32cc8ac30169ac537e62
Author: Gökay Şatır 
AuthorDate: Thu Feb 16 16:47:22 2023 +0300
Commit: Miklos Vajna 
CommitDate: Tue May 23 15:40:57 2023 +0200

[API CHANGE] Add createShortCutManager function to uiconfigurationmanager.

We need to have different accelerator classes for differnt languages.
This PR creates a new accelerator class for different languages.

Since current code uses single instance for accelerators, i needed to add a 
create function.

Also we now have an unordered map for different languages and modules.

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147157
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148680
Tested-by: Miklos Vajna 
Change-Id: Ia646f20b3206f430ece614fc127e8b748044e4c7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151798
Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7cd3304a2185..8561760febce 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -217,6 +217,10 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
 using namespace css;
 using namespace vcl;
 using namespace desktop;
@@ -7147,6 +7151,47 @@ static void lo_status_indicator_callback(void *data, 
comphelper::LibreOfficeKit:
 }
 }
 
+/// Used by preloadData (LibreOfficeKit) for providing different shortcuts for 
different languages.
+static void preLoadShortCutAccelerators()
+{
+std::unordered_map>& 
acceleratorConfs = SfxLokHelper::getAcceleratorConfs();
+css::uno::Sequence 
installedLocales(officecfg::Setup::Office::InstalledLocales::get()->getElementNames());
+OUString actualLang = officecfg::Setup::L10N::ooLocale::get();
+
+for (sal_Int32 i = 0; i < installedLocales.getLength(); i++)
+{
+OUString language = 
LanguageTag(installedLocales[i]).getLocale().Language;
+
+if (!comphelper::LibreOfficeKit::isAllowlistedLanguage(language))
+{
+// Language is listed by COOL and also installed in core. We can 
create the short cut accelerator.
+
+// Set the UI language to current one, before creating the 
accelerator.
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+officecfg::Setup::L10N::ooLocale::set(installedLocales[i], batch);
+batch->commit();
+
+// Supported module names: Writer, Calc, Draw, Impress
+std::vector supportedModuleNames = { 
"com.sun.star.text.TextDocument", "com.sun.star.sheet.SpreadsheetDocument", 
"com.sun.star.drawing.DrawingDocument", 
"com.sun.star.presentation.PresentationDocument" };
+// Create the accelerators.
+for (std::size_t j = 0; j < supportedModuleNames.size(); j++)
+{
+OUString key = supportedModuleNames[j] + installedLocales[i];
+acceleratorConfs[key] = 
svt::AcceleratorExecute::lok_createNewAcceleratorConfiguration(::comphelper::getProcessComponentContext(),
 supportedModuleNames[j]);
+}
+}
+else
+{
+std::cerr << "Language is installed in core but not in the list of 
COOL languages: " << language << "\n";
+}
+}
+
+// Set the UI language back to default one.
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+officecfg::Setup::L10N::ooLocale::set(actualLang, batch);
+

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - framework/source include/sfx2 include/svtools offapi/com sfx2/source svtools/source

2023-04-11 Thread Gökay Şatır (via logerrit)
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |6 -
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |6 -
 include/sfx2/app.hxx  |4 
 include/svtools/acceleratorexecute.hxx|2 
 offapi/com/sun/star/ui/XUIConfigurationManager.idl|7 -
 sfx2/source/appl/app.cxx  |5 -
 sfx2/source/inc/appdata.hxx   |2 
 sfx2/source/view/lokhelper.cxx|6 -
 sfx2/source/view/viewsh.cxx   |   41 
--
 svtools/source/misc/acceleratorexecute.cxx|   23 -
 10 files changed, 3 insertions(+), 99 deletions(-)

New commits:
commit 83829de5ad87240d2c54925da23a84c1e8964c54
Author: Gökay Şatır 
AuthorDate: Mon Mar 20 11:17:37 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Tue Apr 11 10:10:06 2023 +0200

Revert "[API CHANGE] Add createShortCutManager function to..."

This reverts commit 67fcd647341118747a4e7cd404d907d29613778c.

Signed-off-by: Gökay Şatır 
Change-Id: I9d0652df63ab7ce9b220aff37008b18d8d511a03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149138
Tested-by: Jenkins CollaboraOffice 

diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index d20c4764dc57..b2346455d228 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -122,7 +122,6 @@ public:
 virtual void SAL_CALL insertSettings( const OUString& NewResourceURL, 
const css::uno::Reference< css::container::XIndexAccess >& aNewData ) override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getImageManager() override;
 virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
getShortCutManager() override;
-virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
createShortCutManager() override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getEventsManager() override;
 
 // XModuleUIConfigurationManager
@@ -1409,11 +1408,6 @@ Reference< XInterface > SAL_CALL 
ModuleUIConfigurationManager::getImageManager()
 return Reference< XInterface >( 
static_cast(m_xModuleImageManager.get()), UNO_QUERY );
 }
 
-Reference< ui::XAcceleratorConfiguration > SAL_CALL 
ModuleUIConfigurationManager::createShortCutManager()
-{
-return 
ui::ModuleAcceleratorConfiguration::createWithModuleIdentifier(m_xContext, 
m_aModuleIdentifier);
-}
-
 Reference< ui::XAcceleratorConfiguration > SAL_CALL 
ModuleUIConfigurationManager::getShortCutManager()
 {
 SolarMutexGuard g;
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 2203090fbeef..495bbb573896 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -111,7 +111,6 @@ public:
 virtual void SAL_CALL insertSettings( const OUString& NewResourceURL, 
const css::uno::Reference< css::container::XIndexAccess >& aNewData ) override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getImageManager() override;
 virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
getShortCutManager() override;
-virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
createShortCutManager() override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getEventsManager() override;
 
 // XUIConfigurationPersistence
@@ -1126,11 +1125,6 @@ Reference< XInterface > SAL_CALL 
UIConfigurationManager::getImageManager()
 return Reference< XInterface >( 
static_cast(m_xImageManager.get()), UNO_QUERY );
 }
 
-Reference< XAcceleratorConfiguration > SAL_CALL 
UIConfigurationManager::createShortCutManager()
-{
-return 
DocumentAcceleratorConfiguration::createWithDocumentRoot(m_xContext, 
m_xDocConfigStorage);
-}
-
 Reference< XAcceleratorConfiguration > SAL_CALL 
UIConfigurationManager::getShortCutManager()
 {
 // SAFE ->
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 6687dc1f1653..fd8e556c7af1 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -27,8 +27,6 @@
 #include 
 #include 
 #include 
-#include 
-#include 
 
 #include 
 
@@ -175,8 +173,6 @@ public:
 SAL_DLLPRIVATE SfxChildWinFactory* GetChildWinFactoryById(sal_uInt16 nId) 
const;
 SAL_DLLPRIVATE std::vector& GetViewFrames_Impl() const;
 SAL_DLLPRIVATE std::vector& GetViewShells_Impl() const;
-/* unordered_map */
-SAL_DLLPRIVATE std::unordered_map>& 
GetAcceleratorConfs_Impl() const;
 SAL_DLLPRIVATE std::vector& GetObjectShells_Impl() const;

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - desktop/source include/sfx2 sfx2/source

2023-03-16 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx|   48 +
 include/sfx2/lokhelper.hxx |3 ++
 sfx2/source/view/lokhelper.cxx |6 -
 3 files changed, 56 insertions(+), 1 deletion(-)

New commits:
commit 3cdfcd4e2f350273ab1861abf6d6b7177fd0f215
Author: Gökay Şatır 
AuthorDate: Mon Feb 20 11:17:55 2023 +0300
Commit: Miklos Vajna 
CommitDate: Thu Mar 16 07:15:49 2023 +

Preload the accelerator configurations when libreofficekit is active.

Signed-off-by: Gökay Şatır 
Change-Id: I6fbc2e87b1e338b84c69b96768df0339f1a0abd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147311
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148679
Tested-by: Miklos Vajna 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 07bb6be18fa0..480fc9952e6a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -213,6 +213,10 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
 using namespace css;
 using namespace vcl;
 using namespace desktop;
@@ -7180,6 +7184,47 @@ static void lo_status_indicator_callback(void *data, 
comphelper::LibreOfficeKit:
 }
 }
 
+/// Used by preloadData (LibreOfficeKit) for providing different shortcuts for 
different languages.
+void preLoadShortCutAccelerators()
+{
+std::unordered_map>& 
acceleratorConfs = SfxLokHelper::getAcceleratorConfs();
+css::uno::Sequence 
installedLocales(officecfg::Setup::Office::InstalledLocales::get()->getElementNames());
+OUString actualLang = officecfg::Setup::L10N::ooLocale::get();
+
+for (sal_Int32 i = 0; i < installedLocales.getLength(); i++)
+{
+OUString language = 
LanguageTag(installedLocales[i]).getLocale().Language;
+
+if (!comphelper::LibreOfficeKit::isAllowlistedLanguage(language))
+{
+// Language is listed by COOL and also installed in core. We can 
create the short cut accelerator.
+
+// Set the UI language to current one, before creating the 
accelerator.
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+officecfg::Setup::L10N::ooLocale::set(installedLocales[i], batch);
+batch->commit();
+
+// Supported module names: Writer, Calc, Draw, Impress
+std::vector supportedModuleNames = { 
"com.sun.star.text.TextDocument", "com.sun.star.sheet.SpreadsheetDocument", 
"com.sun.star.drawing.DrawingDocument", 
"com.sun.star.presentation.PresentationDocument" };
+// Create the accelerators.
+for (std::size_t j = 0; j < supportedModuleNames.size(); j++)
+{
+OUString key = supportedModuleNames[j] + installedLocales[i];
+acceleratorConfs[key] = 
svt::AcceleratorExecute::lok_createNewAcceleratorConfiguration(::comphelper::getProcessComponentContext(),
 supportedModuleNames[j]);
+}
+}
+else
+{
+std::cerr << "Language is installed in core but not in the list of 
COOL languages: " << language << "\n";
+}
+}
+
+// Set the UI language back to default one.
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+officecfg::Setup::L10N::ooLocale::set(actualLang, batch);
+batch->commit();
+}
+
 /// Used only by LibreOfficeKit when used by Online to pre-initialize
 static void preloadData()
 {
@@ -7243,6 +7288,9 @@ static void preloadData()
 ImageTree  = ImageTree::get();
 images.getImageUrl("forcefed.png", "style", "FO_oo");
 
+std::cerr << "Preload short cut accelerators\n";
+preLoadShortCutAccelerators();
+
 std::cerr << "Preload languages\n";
 
 // force load language singleton
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index d07e80071bd7..184f899880f7 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 struct SFX2_DLLPUBLIC LokMouseEventData
 {
@@ -51,6 +52,8 @@ namespace com::sun::star::ui { struct 
ContextChangeEventObject; };
 class SFX2_DLLPUBLIC SfxLokHelper
 {
 public:
+/// Gets the short cut accelerators.
+static std::unordered_map>& 
getAcceleratorConfs();
 /// Create a new view shell from the current view frame.
 /// This assumes a single document is ever loaded.
 static int createView();
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 2954f6006b69..bc33ad942382 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -24,7 +24,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -110,6 +109,11 @@ int SfxLokHelper::createView()
 return createView(pViewShell->GetViewFrame(), pViewShell->GetDocId());
 }
 
+std::unordered_map>& 
SfxLokHelper::getAcceleratorConfs()
+{
+return 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - framework/source include/sfx2 include/svtools offapi/com sfx2/source svtools/source

2023-03-14 Thread Gökay Şatır (via logerrit)
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |6 +
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |6 +
 include/sfx2/app.hxx  |4 
 include/svtools/acceleratorexecute.hxx|2 
 offapi/com/sun/star/ui/XUIConfigurationManager.idl|7 +
 sfx2/source/appl/app.cxx  |5 +
 sfx2/source/inc/appdata.hxx   |2 
 sfx2/source/view/lokhelper.cxx|6 -
 sfx2/source/view/viewsh.cxx   |   41 
++
 svtools/source/misc/acceleratorexecute.cxx|   21 +
 10 files changed, 97 insertions(+), 3 deletions(-)

New commits:
commit f6bafeff0b208585944cfc4b36ba87e4700887a0
Author: Gökay Şatır 
AuthorDate: Thu Feb 16 16:47:22 2023 +0300
Commit: Miklos Vajna 
CommitDate: Tue Mar 14 16:02:47 2023 +

[API CHANGE] Add createShortCutManager function to uiconfigurationmanager.

We need to have different accelerator classes for differnt languages.
This PR creates a new accelerator class for different languages.

Since current code uses single instance for accelerators, i needed to add a 
create function.

Also we now have an unordered map for different languages and modules.

Change-Id: I15319408ff6325254d4e815ebbd568cc3ebc2295
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147157
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148680
Tested-by: Miklos Vajna 

diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index 235190ac9d0d..d50b5c037cf2 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -125,6 +125,7 @@ public:
 virtual void SAL_CALL insertSettings( const OUString& NewResourceURL, 
const css::uno::Reference< css::container::XIndexAccess >& aNewData ) override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getImageManager() override;
 virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
getShortCutManager() override;
+virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
createShortCutManager() override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getEventsManager() override;
 
 // XModuleUIConfigurationManager
@@ -1422,6 +1423,11 @@ Reference< XInterface > SAL_CALL 
ModuleUIConfigurationManager::getImageManager()
 return Reference< XInterface >( 
static_cast(m_xModuleImageManager.get()), UNO_QUERY );
 }
 
+Reference< ui::XAcceleratorConfiguration > SAL_CALL 
ModuleUIConfigurationManager::createShortCutManager()
+{
+return 
ui::ModuleAcceleratorConfiguration::createWithModuleIdentifier(m_xContext, 
m_aModuleIdentifier);
+}
+
 Reference< ui::XAcceleratorConfiguration > SAL_CALL 
ModuleUIConfigurationManager::getShortCutManager()
 {
 SolarMutexGuard g;
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 4950cbfc4cf3..874a627be805 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -113,6 +113,7 @@ public:
 virtual void SAL_CALL insertSettings( const OUString& NewResourceURL, 
const css::uno::Reference< css::container::XIndexAccess >& aNewData ) override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getImageManager() override;
 virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
getShortCutManager() override;
+virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
createShortCutManager() override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getEventsManager() override;
 
 // XUIConfigurationPersistence
@@ -1137,6 +1138,11 @@ Reference< XInterface > SAL_CALL 
UIConfigurationManager::getImageManager()
 return Reference< XInterface >( 
static_cast(m_xImageManager.get()), UNO_QUERY );
 }
 
+Reference< XAcceleratorConfiguration > SAL_CALL 
UIConfigurationManager::createShortCutManager()
+{
+return 
DocumentAcceleratorConfiguration::createWithDocumentRoot(m_xContext, 
m_xDocConfigStorage);
+}
+
 Reference< XAcceleratorConfiguration > SAL_CALL 
UIConfigurationManager::getShortCutManager()
 {
 // SAFE ->
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 73198c056aec..5ed6fbc0dc57 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -27,6 +27,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -176,6 +178,8 @@ public:
 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/source include/sfx2 sfx2/source

2023-02-23 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx|   48 +
 include/sfx2/lokhelper.hxx |3 ++
 sfx2/source/view/lokhelper.cxx |6 -
 3 files changed, 56 insertions(+), 1 deletion(-)

New commits:
commit 8b1e20c164e11689894ca605735541fad9aea3b1
Author: Gökay Şatır 
AuthorDate: Mon Feb 20 11:17:55 2023 +0300
Commit: Miklos Vajna 
CommitDate: Thu Feb 23 11:52:48 2023 +

Preload the accelerator configurations when libreofficekit is active.

Signed-off-by: Gökay Şatır 
Change-Id: I6fbc2e87b1e338b84c69b96768df0339f1a0abd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147311
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ab8bc71d4780..b00497df127e 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -210,6 +210,10 @@
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
 using namespace css;
 using namespace vcl;
 using namespace desktop;
@@ -6886,6 +6890,47 @@ static void lo_status_indicator_callback(void *data, 
comphelper::LibreOfficeKit:
 
 void setLanguageToolConfig();
 
+/// Used by preloadData (LibreOfficeKit) for providing different shortcuts for 
different languages.
+void preLoadShortCutAccelerators()
+{
+std::unordered_map>& 
acceleratorConfs = SfxLokHelper::getAcceleratorConfs();
+css::uno::Sequence 
installedLocales(officecfg::Setup::Office::InstalledLocales::get()->getElementNames());
+OUString actualLang = officecfg::Setup::L10N::ooLocale::get();
+
+for (sal_Int32 i = 0; i < installedLocales.getLength(); i++)
+{
+OUString language = 
LanguageTag(installedLocales[i]).getLocale().Language;
+
+if (!comphelper::LibreOfficeKit::isAllowlistedLanguage(language))
+{
+// Language is listed by COOL and also installed in core. We can 
create the short cut accelerator.
+
+// Set the UI language to current one, before creating the 
accelerator.
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+officecfg::Setup::L10N::ooLocale::set(installedLocales[i], batch);
+batch->commit();
+
+// Supported module names: Writer, Calc, Draw, Impress
+std::vector supportedModuleNames = { 
"com.sun.star.text.TextDocument", "com.sun.star.sheet.SpreadsheetDocument", 
"com.sun.star.drawing.DrawingDocument", 
"com.sun.star.presentation.PresentationDocument" };
+// Create the accelerators.
+for (std::size_t j = 0; j < supportedModuleNames.size(); j++)
+{
+OUString key = supportedModuleNames[j] + installedLocales[i];
+acceleratorConfs[key] = 
svt::AcceleratorExecute::lok_createNewAcceleratorConfiguration(::comphelper::getProcessComponentContext(),
 supportedModuleNames[j]);
+}
+}
+else
+{
+std::cerr << "Language is installed in core but not in the list of 
COOL languages: " << language << "\n";
+}
+}
+
+// Set the UI language back to default one.
+std::shared_ptr 
batch(comphelper::ConfigurationChanges::create());
+officecfg::Setup::L10N::ooLocale::set(actualLang, batch);
+batch->commit();
+}
+
 /// Used only by LibreOfficeKit when used by Online to pre-initialize
 static void preloadData()
 {
@@ -6952,6 +6997,9 @@ static void preloadData()
 ImageTree  = ImageTree::get();
 images.getImageUrl("forcefed.png", "style", "FO_oo");
 
+std::cerr << "Preload short cut accelerators\n";
+preLoadShortCutAccelerators();
+
 std::cerr << "Preload languages\n";
 
 // force load language singleton
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index 95eb0a9f9f6f..5b3debd9f7e6 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -23,6 +23,7 @@
 #include 
 #include 
 #include 
+#include 
 
 struct SFX2_DLLPUBLIC LokMouseEventData
 {
@@ -49,6 +50,8 @@ struct SFX2_DLLPUBLIC LokMouseEventData
 class SFX2_DLLPUBLIC SfxLokHelper
 {
 public:
+/// Gets the short cut accelerators.
+static std::unordered_map>& 
getAcceleratorConfs();
 /// Create a new view shell from the current view frame.
 /// This assumes a single document is ever loaded.
 static int createView();
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 8bf9d36d0beb..7f0ba8abf930 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -23,7 +23,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -110,6 +109,11 @@ int SfxLokHelper::createView()
 return createView(pViewShell->GetViewFrame(), pViewShell->GetDocId());
 }
 
+std::unordered_map>& 
SfxLokHelper::getAcceleratorConfs()
+{
+return SfxApplication::GetOrCreate()->GetAcceleratorConfs_Impl();
+}
+
 int SfxLokHelper::createView(int nDocId)
 {
 const SfxApplication* 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - framework/source include/sfx2 include/svtools offapi/com sfx2/source svtools/source

2023-02-22 Thread Gökay Şatır (via logerrit)
 framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx |6 +
 framework/source/uiconfiguration/uiconfigurationmanager.cxx   |6 +
 include/sfx2/app.hxx  |4 
 include/svtools/acceleratorexecute.hxx|2 
 offapi/com/sun/star/ui/XUIConfigurationManager.idl|7 +
 sfx2/source/appl/app.cxx  |5 +
 sfx2/source/inc/appdata.hxx   |2 
 sfx2/source/view/lokhelper.cxx|6 -
 sfx2/source/view/viewsh.cxx   |   41 
++
 svtools/source/misc/acceleratorexecute.cxx|   21 +
 10 files changed, 97 insertions(+), 3 deletions(-)

New commits:
commit 67fcd647341118747a4e7cd404d907d29613778c
Author: Gökay Şatır 
AuthorDate: Thu Feb 16 16:47:22 2023 +0300
Commit: Miklos Vajna 
CommitDate: Wed Feb 22 14:12:39 2023 +

[API CHANGE] Add createShortCutManager function to uiconfigurationmanager.

We need to have different accelerator classes for differnt languages.
This PR creates a new accelerator class for different languages.

Since current code uses single instance for accelerators, i needed to add a 
create function.

Also we now have an unordered map for different languages and modules.

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

diff --git a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
index b2346455d228..d20c4764dc57 100644
--- a/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/moduleuiconfigurationmanager.cxx
@@ -122,6 +122,7 @@ public:
 virtual void SAL_CALL insertSettings( const OUString& NewResourceURL, 
const css::uno::Reference< css::container::XIndexAccess >& aNewData ) override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getImageManager() override;
 virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
getShortCutManager() override;
+virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
createShortCutManager() override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getEventsManager() override;
 
 // XModuleUIConfigurationManager
@@ -1408,6 +1409,11 @@ Reference< XInterface > SAL_CALL 
ModuleUIConfigurationManager::getImageManager()
 return Reference< XInterface >( 
static_cast(m_xModuleImageManager.get()), UNO_QUERY );
 }
 
+Reference< ui::XAcceleratorConfiguration > SAL_CALL 
ModuleUIConfigurationManager::createShortCutManager()
+{
+return 
ui::ModuleAcceleratorConfiguration::createWithModuleIdentifier(m_xContext, 
m_aModuleIdentifier);
+}
+
 Reference< ui::XAcceleratorConfiguration > SAL_CALL 
ModuleUIConfigurationManager::getShortCutManager()
 {
 SolarMutexGuard g;
diff --git a/framework/source/uiconfiguration/uiconfigurationmanager.cxx 
b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
index 495bbb573896..2203090fbeef 100644
--- a/framework/source/uiconfiguration/uiconfigurationmanager.cxx
+++ b/framework/source/uiconfiguration/uiconfigurationmanager.cxx
@@ -111,6 +111,7 @@ public:
 virtual void SAL_CALL insertSettings( const OUString& NewResourceURL, 
const css::uno::Reference< css::container::XIndexAccess >& aNewData ) override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getImageManager() override;
 virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
getShortCutManager() override;
+virtual css::uno::Reference< css::ui::XAcceleratorConfiguration > SAL_CALL 
createShortCutManager() override;
 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL 
getEventsManager() override;
 
 // XUIConfigurationPersistence
@@ -1125,6 +1126,11 @@ Reference< XInterface > SAL_CALL 
UIConfigurationManager::getImageManager()
 return Reference< XInterface >( 
static_cast(m_xImageManager.get()), UNO_QUERY );
 }
 
+Reference< XAcceleratorConfiguration > SAL_CALL 
UIConfigurationManager::createShortCutManager()
+{
+return 
DocumentAcceleratorConfiguration::createWithDocumentRoot(m_xContext, 
m_xDocConfigStorage);
+}
+
 Reference< XAcceleratorConfiguration > SAL_CALL 
UIConfigurationManager::getShortCutManager()
 {
 // SAFE ->
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index fd8e556c7af1..6687dc1f1653 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -27,6 +27,8 @@
 #include 
 #include 
 #include 
+#include 
+#include 
 
 #include 
 
@@ -173,6 +175,8 @@ public:
 SAL_DLLPRIVATE SfxChildWinFactory* GetChildWinFactoryById(sal_uInt16 nId) 
const;
 

[Libreoffice-commits] core.git: vcl/jsdialog

2023-01-29 Thread Gökay Şatır (via logerrit)
 vcl/jsdialog/enabled.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 5f489f84935b4f92415998bb7ba2d9ccd550b82d
Author: Gökay Şatır 
AuthorDate: Fri Jan 20 12:06:47 2023 +0300
Commit: Andras Timar 
CommitDate: Sun Jan 29 08:58:02 2023 +

Add dropdownfielddialog.ui to JSON dialogues.

Signed-off-by: Gökay Şatır 
Change-Id: I4cfc792f0b1269936723285cc5ff1324bc22c161
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145871
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 23e6f05a8ee80c33dd624dd6582f26b3dcf8f490)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146212
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 2dff20b7263d..e0791954d5f8 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -78,6 +78,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/splittable.ui"
 || rUIFile == u"modules/swriter/ui/translationdialog.ui"
 || rUIFile == u"modules/swriter/ui/pagenumberdlg.ui"
+|| rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui"
 // sfx
 || rUIFile == u"sfx/ui/cmisinfopage.ui"
 || rUIFile == u"sfx/ui/custominfopage.ui"


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 8 commits - comphelper/source cui/uiconfig desktop/qa desktop/source icon-themes/colibre include/comphelper include/LibreOfficeKit

2023-01-28 Thread Gökay Şatır (via logerrit)
 comphelper/source/misc/lok.cxx  |   19 +++
 cui/uiconfig/ui/toolbarmodedialog.ui|2 
 desktop/qa/desktop_lib/test_desktop_lib.cxx |4 
 desktop/source/lib/init.cxx |   49 
++
 icon-themes/colibre/sw/res/page-shadow-mask.png |binary
 include/LibreOfficeKit/LibreOfficeKit.h |3 
 include/LibreOfficeKit/LibreOfficeKit.hxx   |   11 ++
 include/comphelper/lok.hxx  |3 
 include/sfx2/lokhelper.hxx  |   11 ++
 include/sfx2/viewsh.hxx |   17 +++
 instsetoo_native/inc_common/windows/msi_templates/Binary/Banner.bmp |binary
 instsetoo_native/inc_common/windows/msi_templates/Binary/Image.bmp  |binary
 sc/source/ui/view/viewfun6.cxx  |   19 +++
 setup_native/source/packinfo/osxdndinstall.png  |binary
 sfx2/source/view/lokhelper.cxx  |   42 

 sfx2/source/view/viewsh.cxx |4 
 sw/inc/doc.hxx  |2 
 sw/source/core/doc/doc.cxx  |   24 
 sw/source/core/inc/rolbck.hxx   |2 
 sw/source/core/undo/unattr.cxx  |   26 
+
 sw/source/uibase/utlui/content.cxx  |   32 
++
 sw/uiconfig/swriter/ui/navigatorcontextmenu.ui  |   10 +-
 vcl/jsdialog/enabled.cxx|1 
 23 files changed, 276 insertions(+), 5 deletions(-)

New commits:
commit 28e71a755f6562ab0c720932cadc50c9afa1de41
Author: Gökay Şatır 
AuthorDate: Fri Jan 20 12:06:47 2023 +0300
Commit: Andras Timar 
CommitDate: Sat Jan 28 20:14:46 2023 +0100

Add dropdownfielddialog.ui to JSON dialogues.

Signed-off-by: Gökay Şatır 
Change-Id: I4cfc792f0b1269936723285cc5ff1324bc22c161
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145871
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 2dff20b7263d..e0791954d5f8 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -78,6 +78,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/splittable.ui"
 || rUIFile == u"modules/swriter/ui/translationdialog.ui"
 || rUIFile == u"modules/swriter/ui/pagenumberdlg.ui"
+|| rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui"
 // sfx
 || rUIFile == u"sfx/ui/cmisinfopage.ui"
 || rUIFile == u"sfx/ui/custominfopage.ui"
commit 8cd0f07f30cc3a61e954add02868636f492bf6eb
Author: Ashod Nakashian 
AuthorDate: Fri Dec 23 13:02:57 2022 -0500
Commit: Andras Timar 
CommitDate: Sat Jan 28 20:11:55 2023 +0100

lok: support per-user timezone

This adds support for user-specific timezone.

When none is provided during loading, the
system default is used.

Signed-off-by: Ashod Nakashian 
Change-Id: Ie863450687eb82bc475268a09c9112e9fd50020f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144816
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
(cherry picked from commit abaf8c0af1c6c7fe01276fdf2ae62419c7b0f654)

diff --git a/comphelper/source/misc/lok.cxx b/comphelper/source/misc/lok.cxx
index b11bf4e83582..1f07cd2614eb 100644
--- a/comphelper/source/misc/lok.cxx
+++ b/comphelper/source/misc/lok.cxx
@@ -8,6 +8,7 @@
  */
 
 #include 
+#include 
 #include 
 #include 
 
@@ -255,6 +256,24 @@ bool isAllowlistedLanguage(const OUString& lang)
 #endif
 }
 
+void setTimezone(bool isSet, const OUString& rTimezone)
+{
+if (isSet)
+{
+// Set the given timezone, even if empty.
+osl_setEnvironment(OUString("TZ").pData, rTimezone.pData);
+}
+else
+{
+// Unset and empty aren't the same.
+// When unset, it means default to the system configured timezone.
+osl_clearEnvironment(OUString("TZ").pData);
+}
+
+// Update the timezone data.
+::tzset();
+}
+
 static void (*pStatusIndicatorCallback)(void *data, 
statusIndicatorCallbackType type, int percent, const char* pText)(nullptr);
 static void *pStatusIndicatorCallbackData(nullptr);
 
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index c8fe6e733008..3908829f1918 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -3629,10 +3629,12 @@ void DesktopLOKTest::testABI()
 CPPUNIT_ASSERT_EQUAL(documentClassOffset(65), 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog

2023-01-20 Thread Gökay Şatır (via logerrit)
 vcl/jsdialog/enabled.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 23e6f05a8ee80c33dd624dd6582f26b3dcf8f490
Author: Gökay Şatır 
AuthorDate: Fri Jan 20 12:06:47 2023 +0300
Commit: Gökay ŞATIR 
CommitDate: Fri Jan 20 17:48:55 2023 +

Add dropdownfielddialog.ui to JSON dialogues.

Signed-off-by: Gökay Şatır 
Change-Id: I4cfc792f0b1269936723285cc5ff1324bc22c161
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145871
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index bc0a6f65f59b..bc53c8c3a45c 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -78,6 +78,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/splittable.ui"
 || rUIFile == u"modules/swriter/ui/translationdialog.ui"
 || rUIFile == u"modules/swriter/ui/pagenumberdlg.ui"
+|| rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui"
 // sfx
 || rUIFile == u"sfx/ui/cmisinfopage.ui"
 || rUIFile == u"sfx/ui/custominfopage.ui"


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/source

2022-11-10 Thread Gökay Şatır (via logerrit)
 vcl/source/window/dialog.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit e96352fca453d6a2f52f57c94cdd443ad3e4c0a0
Author: Gökay Şatır 
AuthorDate: Wed Nov 9 15:37:43 2022 +0300
Commit: Gökay ŞATIR 
CommitDate: Thu Nov 10 14:39:58 2022 +0100

Send unique window id along with other data to COOL.

Signed-off-by: Gökay Şatır 
Change-Id: I9021c8218890906c0239f32503057262d7326fd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142485
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142550
Tested-by: Jenkins CollaboraOffice 

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 8b9e11cc35d0..0579b61a76ad 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -765,6 +765,7 @@ void Dialog::StateChanged( StateChangedType nType )
 std::vector aItems;
 aItems.emplace_back("type", "dialog");
 aItems.emplace_back("size", GetSizePixel().toString());
+aItems.emplace_back("unique_id", this->get_id().toUtf8());
 if (!GetText().isEmpty())
 aItems.emplace_back("title", GetText().toUtf8());
 
@@ -1025,6 +1026,7 @@ bool Dialog::ImplStartExecute()
 // otherwise, this should make sure that the window has the 
correct size.
 std::vector aItems;
 aItems.emplace_back("size", GetSizePixel().toString());
+aItems.emplace_back("unique_id", this->get_id().toUtf8());
 pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
 }
 }
@@ -1392,6 +1394,7 @@ void Dialog::Resize()
 {
 std::vector aItems;
 aItems.emplace_back("size", GetSizePixel().toString());
+aItems.emplace_back("unique_id", this->get_id().toUtf8());
 pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
 }
 }


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

2022-11-10 Thread Gökay Şatır (via logerrit)
 vcl/source/window/dialog.cxx |3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 05a779e667b08b1b1d2622a56cb76702153d2454
Author: Gökay Şatır 
AuthorDate: Wed Nov 9 15:37:43 2022 +0300
Commit: Gökay ŞATIR 
CommitDate: Thu Nov 10 12:09:11 2022 +0100

Send unique window id along with other data to COOL.

Signed-off-by: Gökay Şatır 
Change-Id: I9021c8218890906c0239f32503057262d7326fd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142485
Tested-by: Jenkins

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 60629222fd3c..b8d81a4b8130 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -766,6 +766,7 @@ void Dialog::StateChanged( StateChangedType nType )
 std::vector aItems;
 aItems.emplace_back("type", "dialog");
 aItems.emplace_back("size", GetSizePixel().toString());
+aItems.emplace_back("unique_id", this->get_id().toUtf8());
 if (!GetText().isEmpty())
 aItems.emplace_back("title", GetText().toUtf8());
 
@@ -1032,6 +1033,7 @@ bool Dialog::ImplStartExecute()
 // otherwise, this should make sure that the window has the 
correct size.
 std::vector aItems;
 aItems.emplace_back("size", GetSizePixel().toString());
+aItems.emplace_back("unique_id", this->get_id().toUtf8());
 pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
 }
 }
@@ -1400,6 +1402,7 @@ void Dialog::Resize()
 {
 std::vector aItems;
 aItems.emplace_back("size", GetSizePixel().toString());
+aItems.emplace_back("unique_id", this->get_id().toUtf8());
 pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems);
 }
 }


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - svx/uiconfig

2022-09-23 Thread Gökay Şatır (via logerrit)
 svx/uiconfig/ui/sidebarshadow.ui |   83 +++
 1 file changed, 42 insertions(+), 41 deletions(-)

New commits:
commit 6717b08b8cc878e57d7283fabd9c75b3465228b3
Author: Gökay Şatır 
AuthorDate: Fri Sep 23 11:33:48 2022 +0300
Commit: Gökay ŞATIR 
CommitDate: Fri Sep 23 12:19:29 2022 +0200

Put transparency label and slider into one grid.

Three items related to transparency were in different places.
Now they are in one single container for future improvements.

Signed-off-by: Gökay Şatır 
Change-Id: I936a9292d6a9816ebffdcaa6ae4545bab100fb98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140475
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/uiconfig/ui/sidebarshadow.ui b/svx/uiconfig/ui/sidebarshadow.ui
index 2d24cc54154a..3f6bd4f1e82f 100644
--- a/svx/uiconfig/ui/sidebarshadow.ui
+++ b/svx/uiconfig/ui/sidebarshadow.ui
@@ -149,18 +149,6 @@
 3
   
 
-
-  
-True
-False
-Transparency:
-0
-  
-  
-0
-4
-  
-
 
   
 True
@@ -172,26 +160,26 @@
   
 
 
-  
-
-  
-  
-False
-True
-0
-  
-
-
-  
-True
-False
-vertical
-
-  
-  
+  
+  
 True
 False
+6
 6
+
+  
+True
+True
+True
+1
+False
+  
+  
+0
+1
+5
+  
+
 
   
 True
@@ -201,36 +189,49 @@
 adjustment2
   
   
-2
-0
+5
+1
   
 
 
-  
+  
 True
-True
-True
-1
-False
+False
+Transparency:
+0
   
   
 0
 0
-2
   
 
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
   
   
-False
-True
-1
+0
+4
+2
   
 
   
   
 False
 True
-1
+0
   
 
   


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

2021-04-13 Thread Gökay Şatır (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |4 ++--
 sc/source/ui/view/cliputil.cxx   |   16 +---
 2 files changed, 15 insertions(+), 5 deletions(-)

New commits:
commit b5b12537b784b3af9f2e2ad76536a55e281d6cfb
Author: Gökay Şatır 
AuthorDate: Mon Apr 12 14:36:46 2021 +0300
Commit: Gökay ŞATIR 
CommitDate: Tue Apr 13 14:48:58 2021 +0200

Calc: Send sheet invalidation for full row/col ops

Change-Id: I4da476804d2dfaf11c1cfd6cbe11cc4a651e0f09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113251
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114038
Tested-by: Jenkins
Reviewed-by: Gökay ŞATIR 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 1d883f0e4a95..9a9a5119c4a0 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2336,8 +2336,8 @@ void ScTiledRenderingTest::testPasteIntoWrapTextCell()
 pView->GetViewFrame()->GetBindings().Execute(SID_PASTE);
 Scheduler::ProcessEventsToIdle();
 
-// SG invalidations for rows
-CPPUNIT_ASSERT_EQUAL(OString("rows"), aView.m_sInvalidateSheetGeometry);
+// SG invalidations for all
+CPPUNIT_ASSERT_EQUAL(OString("all"), aView.m_sInvalidateSheetGeometry);
 
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx
index d2db10b0a062..494c1b27c366 100644
--- a/sc/source/ui/view/cliputil.cxx
+++ b/sc/source/ui/view/cliputil.cxx
@@ -98,11 +98,21 @@ void ScClipUtil::PasteFromClipboard( ScViewData& rViewData, 
ScTabViewShell* pTab
 }
 if (comphelper::LibreOfficeKit::isActive())
 {
-const ScLineBreakCell* pItem = rThisDoc.GetAttr(nThisCol, nThisRow, 
nThisTab, ATTR_LINEBREAK);
-if (pItem && pItem->GetValue())
+bool entireColumnOrRowSelected = false;
+if (pOwnClip)
+{
+ScClipParam clipParam = pOwnClip->GetDocument()->GetClipParam();
+if (clipParam.maRanges.size() > 0)
+{
+if (clipParam.maRanges[0].aEnd.Col() == MAXCOLCOUNT -1 || 
clipParam.maRanges[0].aEnd.Row() == MAXROWCOUNT - 1)
+entireColumnOrRowSelected = true;
+}
+}
+const SfxBoolItem* pItem = rThisDoc.GetAttr(nThisCol, nThisRow, 
nThisTab, ATTR_LINEBREAK);
+if (pItem->GetValue() || entireColumnOrRowSelected)
 {
 ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
-pTabViewShell, false /* bColumns */, true /* bRows */, true /* 
bSizes*/,
+pTabViewShell, true /* bColumns */, true /* bRows */, true /* 
bSizes*/,
 true /* bHidden */, true /* bFiltered */, true /* bGroups */, 
nThisTab);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - sc/qa sc/source

2021-04-12 Thread Gökay Şatır (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |4 ++--
 sc/source/ui/view/cliputil.cxx   |   14 --
 2 files changed, 14 insertions(+), 4 deletions(-)

New commits:
commit 4b6da738fdd934bfac1bb9779682398bea771867
Author: Gökay Şatır 
AuthorDate: Sun Mar 28 13:18:56 2021 +0300
Commit: Jan Holesovsky 
CommitDate: Mon Apr 12 10:02:49 2021 +0200

Calc: Send sheet invalidation for full row/col ops

Change-Id: I4da476804d2dfaf11c1cfd6cbe11cc4a651e0f09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113251
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Jan Holesovsky 

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index cfcefe7ccd71..0cd4543c0a73 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2363,8 +2363,8 @@ void ScTiledRenderingTest::testPasteIntoWrapTextCell()
 pView->GetViewFrame()->GetBindings().Execute(SID_PASTE);
 Scheduler::ProcessEventsToIdle();
 
-// SG invalidations for rows
-CPPUNIT_ASSERT_EQUAL(OString("rows"), aView.m_sInvalidateSheetGeometry);
+// SG invalidations for all
+CPPUNIT_ASSERT_EQUAL(OString("all"), aView.m_sInvalidateSheetGeometry);
 
 SfxViewShell::Current()->registerLibreOfficeKitViewCallback(nullptr, 
nullptr);
 }
diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx
index 31bbf37d80e5..9a589d8e30f5 100644
--- a/sc/source/ui/view/cliputil.cxx
+++ b/sc/source/ui/view/cliputil.cxx
@@ -96,11 +96,21 @@ void ScClipUtil::PasteFromClipboard( ScViewData* pViewData, 
ScTabViewShell* pTab
 }
 if (comphelper::LibreOfficeKit::isActive())
 {
+bool entireColumnOrRowSelected = false;
+if (pOwnClip)
+{
+ScClipParam clipParam = pOwnClip->GetDocument()->GetClipParam();
+if (clipParam.maRanges.size() > 0)
+{
+if (clipParam.maRanges[0].aEnd.Col() == MAXCOLCOUNT -1 || 
clipParam.maRanges[0].aEnd.Row() == MAXROWCOUNT - 1)
+entireColumnOrRowSelected = true;
+}
+}
 const SfxBoolItem* pItem = static_cast(pThisDoc->GetAttr(nThisCol, nThisRow, nThisTab, ATTR_LINEBREAK));
-if (pItem->GetValue())
+if (pItem->GetValue() || entireColumnOrRowSelected)
 {
 ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
-pTabViewShell, false /* bColumns */, true /* bRows */, true /* 
bSizes*/,
+pTabViewShell, true /* bColumns */, true /* bRows */, true /* 
bSizes*/,
 true /* bHidden */, true /* bFiltered */, true /* bGroups */, 
nThisTab);
 }
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 2 commits - desktop/source include/LibreOfficeKit include/vcl sc/source sd/source sw/source vcl/source

2021-04-07 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx  |1 +
 include/LibreOfficeKit/LibreOfficeKitEnums.h |2 +-
 include/vcl/unohelp2.hxx |3 ++-
 sc/source/ui/view/editsh.cxx |8 +---
 sc/source/ui/view/gridwin.cxx|1 +
 sd/source/ui/view/drviews2.cxx   |   12 +---
 sw/source/uibase/shells/textsh1.cxx  |8 +---
 vcl/source/app/unohelp2.cxx  |6 +++---
 8 files changed, 11 insertions(+), 30 deletions(-)

New commits:
commit 4f8c5f241d21348b1cd0e427fb7acd67c095630f
Author: Gökay Şatır 
AuthorDate: Sun Mar 14 12:36:30 2021 +0300
Commit: Andras Timar 
CommitDate: Wed Apr 7 22:42:51 2021 +0200

Calc: Update selected cell range before calculating the selection area.

Change-Id: I7a814be03acb246e1eb9d68425418ee1357510fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112472
Tested-by: Jenkins
Reviewed-by: Dennis Francis 
Reviewed-by: Gökay ŞATIR 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index b0365e89ed50..55d5f00ae874 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1441,6 +1441,7 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 case LOK_CALLBACK_CELL_VIEW_CURSOR:
 case LOK_CALLBACK_CELL_FORMULA:
 case LOK_CALLBACK_CELL_ADDRESS:
+case LOK_CALLBACK_CELL_SELECTION_AREA:
 case LOK_CALLBACK_CURSOR_VISIBLE:
 case LOK_CALLBACK_VIEW_CURSOR_VISIBLE:
 case LOK_CALLBACK_SET_PART:
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index f075ab8c78cf..dc9cc1c68946 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5920,6 +5920,7 @@ void ScGridWindow::UpdateKitSelection(const 
std::vector& rRect
 }
 
 ScTabViewShell* pViewShell = mrViewData.GetViewShell();
+pViewShell->UpdateInputHandler();
 OString sBoundingBoxString = "EMPTY";
 if (!aBoundingBox.IsEmpty())
 sBoundingBoxString = aBoundingBox.toString();
commit a9da7089befaf3b2cf1a3af60ccbdb0298a495cc
Author: gokaysatir 
AuthorDate: Wed Oct 7 12:57:13 2020 +0300
Commit: Andras Timar 
CommitDate: Wed Apr 7 22:41:55 2021 +0200

Online: "Copy hyperlink location" feature improvement.

Lambda functions are replaced with class pointers.

Change-Id: I48628d3105533aad2463bd8ade1f65cf5b154b0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104058
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky 

diff --git a/include/LibreOfficeKit/LibreOfficeKitEnums.h 
b/include/LibreOfficeKit/LibreOfficeKitEnums.h
index 9a0eb01ca840..ae8eacd9151f 100644
--- a/include/LibreOfficeKit/LibreOfficeKitEnums.h
+++ b/include/LibreOfficeKit/LibreOfficeKitEnums.h
@@ -646,7 +646,7 @@ typedef enum
  *
  * Payload is optional. When payload is empty, Online gets string from 
selected text.
  * Payload format is JSON.
- * Example: { "mimeType": "string", "content": "some content" }
+ * Example: { "mimeType": "text/plain", "content": "some content" }
  */
 LOK_CALLBACK_CLIPBOARD_CHANGED = 38,
 
diff --git a/include/vcl/unohelp2.hxx b/include/vcl/unohelp2.hxx
index 91c4ce6ce0e2..a0e03a04e2a1 100644
--- a/include/vcl/unohelp2.hxx
+++ b/include/vcl/unohelp2.hxx
@@ -28,6 +28,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star::datatransfer::clipboard {
 class XClipboard;
@@ -60,7 +61,7 @@ namespace vcl::unohelper {
 static  voidCopyStringTo(
 const OUString& rContent,
 const css::uno::Reference< 
css::datatransfer::clipboard::XClipboard >& rxClipboard,
-std::function *callback = nullptr
+const vcl::ILibreOfficeKitNotifier* pNotifier = nullptr
 );
 };
 
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index e12c5460c09d..619001a27d8c 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -642,13 +642,7 @@ void ScEditShell::Execute( SfxRequest& rReq )
 {
 uno::Reference 
xClipboard = GetSystemClipboard();
 
-if (comphelper::LibreOfficeKit::isActive())
-{
-std::function callback = [&] 
(int callbackType, const char* text) { 
rViewData.GetViewShell()->libreOfficeKitViewCallback(callbackType, text); } ;
-
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
);
-}
-else
-
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
nullptr);
+
vcl::unohelper::TextDataObject::CopyStringTo(pURLField->GetURL(), xClipboard, 
SfxViewShell::Current());
 }
 }
 break;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 

[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - desktop/source sc/source

2021-03-15 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx   |1 +
 sc/source/ui/view/gridwin.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit d7dcecb76b15e1df9a1f3afaf56164a8bf597b71
Author: Gökay Şatır 
AuthorDate: Sun Mar 14 12:36:30 2021 +0300
Commit: Gökay ŞATIR 
CommitDate: Mon Mar 15 11:51:57 2021 +0100

Calc: Update selected cell range before calculating the selection area.

Change-Id: I7a814be03acb246e1eb9d68425418ee1357510fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112472
Tested-by: Jenkins
Reviewed-by: Dennis Francis 
Reviewed-by: Gökay ŞATIR 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112487
Tested-by: Jenkins CollaboraOffice 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a3ea934e9ebf..3e25780e00cb 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1455,6 +1455,7 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 case LOK_CALLBACK_CELL_VIEW_CURSOR:
 case LOK_CALLBACK_CELL_FORMULA:
 case LOK_CALLBACK_CELL_ADDRESS:
+case LOK_CALLBACK_CELL_SELECTION_AREA:
 case LOK_CALLBACK_CURSOR_VISIBLE:
 case LOK_CALLBACK_VIEW_CURSOR_VISIBLE:
 case LOK_CALLBACK_SET_PART:
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 35bce5d35625..a7ae6626325a 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5883,6 +5883,7 @@ void ScGridWindow::UpdateKitSelection(const 
std::vector& rRect
 }
 
 ScTabViewShell* pViewShell = pViewData->GetViewShell();
+pViewShell->UpdateInputHandler();
 OString sBoundingBoxString = "EMPTY";
 if (!aBoundingBox.IsEmpty())
 sBoundingBoxString = aBoundingBox.toString();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-03-15 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx   |1 +
 sc/source/ui/view/gridwin.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit 10f8764ff9c3945e3e51c7d483dc7a07bdea29f9
Author: Gökay Şatır 
AuthorDate: Sun Mar 14 12:36:30 2021 +0300
Commit: Gökay ŞATIR 
CommitDate: Mon Mar 15 10:29:07 2021 +0100

Calc: Update selected cell range before calculating the selection area.

Change-Id: I7a814be03acb246e1eb9d68425418ee1357510fd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112472
Tested-by: Jenkins
Reviewed-by: Dennis Francis 
Reviewed-by: Gökay ŞATIR 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5701f5965ce2..6275bf691946 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1442,6 +1442,7 @@ void CallbackFlushHandler::queue(const int type, const 
char* data)
 case LOK_CALLBACK_CELL_VIEW_CURSOR:
 case LOK_CALLBACK_CELL_FORMULA:
 case LOK_CALLBACK_CELL_ADDRESS:
+case LOK_CALLBACK_CELL_SELECTION_AREA:
 case LOK_CALLBACK_CURSOR_VISIBLE:
 case LOK_CALLBACK_VIEW_CURSOR_VISIBLE:
 case LOK_CALLBACK_SET_PART:
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 790ab75713b0..1497988b7f16 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5863,6 +5863,7 @@ void ScGridWindow::UpdateKitSelection(const 
std::vector& rRect
 }
 
 ScTabViewShell* pViewShell = mrViewData.GetViewShell();
+pViewShell->UpdateInputHandler();
 OString sBoundingBoxString = "EMPTY";
 if (!aBoundingBox.IsEmpty())
 sBoundingBoxString = aBoundingBox.toString();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - include/svx officecfg/registry sc/sdi sc/source sc/uiconfig sd/inc sd/sdi sd/source sd/uiconfig svx/sdi

2020-10-30 Thread Gökay Şatır (via logerrit)
 include/svx/svxids.hrc   |
4 -
 officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu |
5 -
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |   
13 +++
 sc/sdi/drtxtob.sdi   |
4 -
 sc/sdi/editsh.sdi|
4 -
 sc/source/ui/drawfunc/drtxtob.cxx|   
22 +-
 sc/source/ui/view/editsh.cxx |   
20 +
 sc/uiconfig/scalc/popupmenu/celledit.xml |
2 
 sc/uiconfig/scalc/popupmenu/drawtext.xml |
2 
 sd/inc/app.hrc   |
2 
 sd/sdi/_drvwsh.sdi   |
5 +
 sd/source/ui/view/drviews2.cxx   |   
18 +
 sd/source/ui/view/drviewsf.cxx   |
8 ++
 sd/uiconfig/sdraw/popupmenu/drawtext.xml |
2 
 sd/uiconfig/simpress/popupmenu/drawtext.xml  |
2 
 svx/sdi/svx.sdi  |   
36 ++
 16 files changed, 139 insertions(+), 10 deletions(-)

New commits:
commit c7952cb2646f7c385b68f8e7acce5cf2713c567c
Author: Gökay Şatır 
AuthorDate: Tue Oct 27 13:41:32 2020 +0300
Commit: Szymon Kłos 
CommitDate: Fri Oct 30 14:56:30 2020 +0100

Calc & Impress & Draw: Hyperlink features are added into context menu.

Change-Id: I9e7532d68469144ae104fabcff986a023544d076
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104866
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index ba043ae4752c..53d662859fab 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -998,13 +998,15 @@ class SfxStringItem;
 
 #define SID_TOGGLE_RESOLVED_NOTES   ( SID_SVX_START + 1189 
)
 
+#define SID_EDIT_HYPERLINK  ( SID_SVX_START + 1192 
)
 #define SID_COPY_HYPERLINK_LOCATION ( SID_SVX_START + 1193 
)
+#define SID_REMOVE_HYPERLINK( SID_SVX_START + 1194 
)
 
 // #define SID_SHOW_SIDEBAR( SID_SVX_START + 
1190 ) -> sfxsids.hrc
 // #define SID_HIDE_SIDEBAR( SID_SVX_START + 
1191 ) -> sfxsids.hrc
 
 // IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE   ( SID_HIDE_SIDEBAR + 1 
)
+#define SID_SVX_FIRSTFREE   ( SID_REMOVE_HYPERLINK 
+ 1 )
 
 // Overflow check for slot IDs
 #if SID_SVX_FIRSTFREE > SID_SVX_END
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
index 6390f895c2d9..28553f672a30 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/DrawImpressCommands.xcu
@@ -680,11 +680,6 @@
   To C~ontour
 
   
-  
-
-  ~Hyperlink...
-
-  
   
 
   ~Hide Last Level
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 8f5af73972cf..0c46bd02366c 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -3250,11 +3250,24 @@
   1
 
   
+  
+
+  ~Hyperlink
+
+
+  Edit Hyperlink...
+
+  
   
 
   Copy Hyperlink Location
 
   
+  
+
+  Remove Hyperlink
+
+  
   
 
   Smart Tags
diff --git a/sc/sdi/drtxtob.sdi b/sc/sdi/drtxtob.sdi
index 3f42f7d05550..fc0fefff65c0 100644
--- a/sc/sdi/drtxtob.sdi
+++ b/sc/sdi/drtxtob.sdi
@@ -129,8 +129,10 @@ interface TableDrawText
 
 SID_HYPERLINK_SETLINK   [ ExecMethod = Execute; Export = FALSE; ]
 SID_HYPERLINK_GETLINK   [ StateMethod = GetState; Export = FALSE; ]
-SID_OPEN_HYPERLINK  [ ExecMethod = Execute; StateMethod = 
GetState; Export = FALSE; ]
+SID_OPEN_HYPERLINK  [ ExecMethod = Execute; StateMethod = 
GetState; Export = FALSE; ]
 SID_COPY_HYPERLINK_LOCATION [ ExecMethod = Execute; StateMethod = 
GetState; Export = FALSE; ]
+SID_EDIT_HYPERLINK  [ ExecMethod = Execute; StateMethod = 
GetState; Export = FALSE; ]
+SID_REMOVE_HYPERLINK[ ExecMethod = Execute; StateMethod = 
GetState; Export = FALSE; ]