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

2023-09-25 Thread Szymon Kłos (via logerrit)
 desktop/source/lib/lokinteractionhandler.cxx |   21 +
 desktop/source/lib/lokinteractionhandler.hxx |2 ++
 sfx2/source/doc/sfxbasemodel.cxx |4 +++-
 uui/source/iahndl.cxx|2 +-
 4 files changed, 27 insertions(+), 2 deletions(-)

New commits:
commit 0121412b57b0be847474547f00686aa335dcd2a5
Author: Szymon Kłos 
AuthorDate: Fri Sep 22 11:11:06 2023 +0200
Commit: Szymon Kłos 
CommitDate: Mon Sep 25 15:34:40 2023 +0200

lok: add broken package interaction handler

in case of repair don't use template flag to not make
file readonly so we can overwrite it and upload to storage
updated version

Change-Id: Ia460009fc3b77582dde06dd6f94a85aef3aee11b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157168
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Ashod Nakashian 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157240

diff --git a/desktop/source/lib/lokinteractionhandler.cxx 
b/desktop/source/lib/lokinteractionhandler.cxx
index 1e794c0ff651..deebb5d2a30a 100644
--- a/desktop/source/lib/lokinteractionhandler.cxx
+++ b/desktop/source/lib/lokinteractionhandler.cxx
@@ -24,6 +24,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -351,6 +352,23 @@ bool 
LOKInteractionHandler::handleMacroConfirmationRequest(const uno::Reference<
 return false;
 }
 
+bool LOKInteractionHandler::handlePackageReparationRequest(const 
uno::Reference& xRequest)
+{
+uno::Any const request(xRequest->getRequest());
+
+document::BrokenPackageRequest aBrokenPackageRequest;
+if (request >>= aBrokenPackageRequest)
+{
+auto 
xInteraction(task::InteractionHandler::createWithParent(comphelper::getProcessComponentContext(),
 nullptr));
+
+if (xInteraction.is())
+xInteraction->handleInteractionRequest(xRequest);
+
+return true;
+}
+return false;
+}
+
 bool LOKInteractionHandler::handleFilterOptionsRequest(const 
uno::Reference& xRequest)
 {
 document::FilterOptionsRequest aFilterOptionsRequest;
@@ -390,6 +408,9 @@ sal_Bool SAL_CALL 
LOKInteractionHandler::handleInteractionRequest(
 if (handleMacroConfirmationRequest(xRequest))
 return true;
 
+if (handlePackageReparationRequest(xRequest))
+return true;
+
 // TODO: perform more interactions 'for real' like the above
 selectApproved(rContinuations);
 
diff --git a/desktop/source/lib/lokinteractionhandler.hxx 
b/desktop/source/lib/lokinteractionhandler.hxx
index 108343ec22e3..fdbea01c64f6 100644
--- a/desktop/source/lib/lokinteractionhandler.hxx
+++ b/desktop/source/lib/lokinteractionhandler.hxx
@@ -78,6 +78,8 @@ private:
 
 static bool handleFilterOptionsRequest(const 
::com::sun::star::uno::Reference<::com::sun::star::task::XInteractionRequest>& 
Request);
 
+static bool handlePackageReparationRequest(const 
css::uno::Reference& xRequest);
+
 public:
 void SetPassword(char const* pPassword);
 
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index 6554ed1f317e..c5768afc7493 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1941,9 +1941,11 @@ void SAL_CALL SfxBaseModel::load(   const Sequence< 
beans::PropertyValue >& seqA
 xHandler->handle( aRequest.GetRequest() );
 if( aRequest.isApproved() )
 {
+// lok: we want to overwrite file in jail, so don't use 
template flag
+bool bIsLOK = comphelper::LibreOfficeKit::isActive();
 // broken package: try second loading and allow repair
 pMedium->GetItemSet()->Put( SfxBoolItem( 
SID_REPAIRPACKAGE, true ) );
-pMedium->GetItemSet()->Put( SfxBoolItem( SID_TEMPLATE, 
true ) );
+pMedium->GetItemSet()->Put( SfxBoolItem( SID_TEMPLATE, 
!bIsLOK ) );
 pMedium->GetItemSet()->Put( SfxStringItem( 
SID_DOCINFO_TITLE, aDocName ) );
 
 // the error must be reset and the storage must be 
reopened in new mode
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 251a642e509f..a01e090c5d4c 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -948,7 +948,7 @@ executeMessageBox(
 SolarMutexGuard aGuard;
 
 std::unique_ptr 
xBox(Application::CreateMessageDialog(pParent, eMessageType,
-eMessageType == VclMessageType::Question ? VclButtonsType::YesNo : 
VclButtonsType::Ok, rMessage));
+eMessageType == VclMessageType::Question ? VclButtonsType::YesNo : 
VclButtonsType::Ok, rMessage, GetpApp()));
 xBox->set_title(rTitle);
 
 short nMessResult = xBox->run();


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

2022-07-25 Thread Aron Budea (via logerrit)
 desktop/source/lib/init.cxx  |8 +++-
 sfx2/source/control/unoctitm.cxx |8 +++-
 2 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 3de8fcd83ade8a7a82ee8da393ed49fd5de58254
Author: Aron Budea 
AuthorDate: Fri Jul 22 23:22:49 2022 +0200
Commit: Aron Budea 
CommitDate: Mon Jul 25 14:58:54 2022 +0200

Send state changes of content control UNO commands to LOK

Change-Id: Id6b3f9a35c129078b564f7906e03f6aa9306a5f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137373
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5e9d48b75925..4ab030388e7f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3179,7 +3179,13 @@ static void doc_iniUnoCommands ()
 OUString(".uno:UngroupSparklines"),
 OUString(".uno:FormatSparklineMenu"),
 OUString(".uno:Protect"),
-OUString(".uno:UnsetCellsReadOnly")
+OUString(".uno:UnsetCellsReadOnly"),
+OUString(".uno:ContentControlProperties"),
+OUString(".uno:InsertCheckboxContentControl"),
+OUString(".uno:InsertContentControl"),
+OUString(".uno:InsertDateContentControl"),
+OUString(".uno:InsertDropdownContentControl"),
+OUString(".uno:InsertPictureContentControl")
 };
 
 util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 358bab6c2220..868d7749f32b 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1120,7 +1120,13 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 
nSID, SfxViewFrame* pViewFra
  aEvent.FeatureURL.Path == "NumberFormatDecDecimals" ||
  aEvent.FeatureURL.Path == "NumberFormatIncDecimals" ||
  aEvent.FeatureURL.Path == "Protect" ||
- aEvent.FeatureURL.Path == "UnsetCellsReadOnly")
+ aEvent.FeatureURL.Path == "UnsetCellsReadOnly" ||
+ aEvent.FeatureURL.Path == "ContentControlProperties" ||
+ aEvent.FeatureURL.Path == "InsertCheckboxContentControl" ||
+ aEvent.FeatureURL.Path == "InsertContentControl" ||
+ aEvent.FeatureURL.Path == "InsertDateContentControl" ||
+ aEvent.FeatureURL.Path == "InsertDropdownContentControl" ||
+ aEvent.FeatureURL.Path == "InsertPictureContentControl")
 {
 aBuffer.append(aEvent.IsEnabled ? std::u16string_view(u"enabled") : 
std::u16string_view(u"disabled"));
 }


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

2022-06-08 Thread Pranam Lashkari (via logerrit)
 desktop/source/lib/init.cxx  |2 ++
 sfx2/source/control/unoctitm.cxx |4 +++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit b8626e85a799fd0807749cab9e712652240f13cd
Author: Pranam Lashkari 
AuthorDate: Mon Jun 6 19:30:35 2022 +0530
Commit: Gökay ŞATIR 
CommitDate: Wed Jun 8 11:08:29 2022 +0200

LOK: send state of Protect, UnsetCellsReadOnly

Signed-off-by: Pranam Lashkari 
Change-Id: I92675ed0033088233fb442138b39a3c8d663c614
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135454
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Gökay ŞATIR 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 3a72be64a139..63ad2bbad39c 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3174,6 +3174,8 @@ static void doc_iniUnoCommands ()
 OUString(".uno:GroupSparklines"),
 OUString(".uno:UngroupSparklines"),
 OUString(".uno:FormatSparklineMenu"),
+OUString(".uno:Protect"),
+OUString(".uno:UnsetCellsReadOnly")
 };
 
 util::URL aCommandURL;
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 0681abcc61c3..358bab6c2220 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1118,7 +1118,9 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
  aEvent.FeatureURL.Path == "UngroupSparklines" ||
  aEvent.FeatureURL.Path == "FormatSparklineMenu" ||
  aEvent.FeatureURL.Path == "NumberFormatDecDecimals" ||
- aEvent.FeatureURL.Path == "NumberFormatIncDecimals")
+ aEvent.FeatureURL.Path == "NumberFormatIncDecimals" ||
+ aEvent.FeatureURL.Path == "Protect" ||
+ aEvent.FeatureURL.Path == "UnsetCellsReadOnly")
 {
 aBuffer.append(aEvent.IsEnabled ? std::u16string_view(u"enabled") : 
std::u16string_view(u"disabled"));
 }


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

2022-04-15 Thread Szymon Kłos (via logerrit)
 desktop/source/lib/init.cxx  |1 +
 sfx2/source/control/unoctitm.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit de60fbd120cf56696bb07f72fef2b86feccddde1
Author: Szymon Kłos 
AuthorDate: Tue Apr 5 19:07:26 2022 +0200
Commit: Szymon Kłos 
CommitDate: Fri Apr 15 11:27:31 2022 +0200

lok: send status update for .uno:SplitCell

Change-Id: Ic972d3ff3334f4c3a507868a95ac955c9ffbc614
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132585
Reviewed-by: Mert Tumer 
Tested-by: Jenkins CollaboraOffice 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132909
Reviewed-by: Szymon Kłos 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 82bb8715960b..c6fb6d1460b8 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3115,6 +3115,7 @@ static void doc_iniUnoCommands ()
 OUString(".uno:InsertCaptionDialog"),
 OUString(".uno:FormatGroup"),
 OUString(".uno:SplitTable"),
+OUString(".uno:SplitCell"),
 OUString(".uno:MergeCells"),
 OUString(".uno:DeleteNote"),
 OUString(".uno:AcceptChanges"),
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index f7b6ecefba0d..00985b1fe4ee 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1058,6 +1058,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
  aEvent.FeatureURL.Path == "InsertCaptionDialog" ||
  aEvent.FeatureURL.Path == "MergeCells" ||
  aEvent.FeatureURL.Path == "SplitTable" ||
+ aEvent.FeatureURL.Path == "SplitCell" ||
  aEvent.FeatureURL.Path == "DeleteNote" ||
  aEvent.FeatureURL.Path == "AcceptChanges" ||
  aEvent.FeatureURL.Path == "SetDefault" ||


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

2022-03-14 Thread Aron Budea (via logerrit)
 desktop/source/lib/init.cxx  |1 +
 sfx2/source/control/unoctitm.cxx |1 +
 2 files changed, 2 insertions(+)

New commits:
commit 08bc6c1101b30b064119cdabf0a6d60e39cb321a
Author: Aron Budea 
AuthorDate: Thu Mar 10 06:30:23 2022 +0100
Commit: Aron Budea 
CommitDate: Mon Mar 14 19:51:08 2022 +0100

Send Calc Insert Headers and Footers state change to LOK

Change-Id: Id51b4cf1eb962f22ee1e381873f4670789675525
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131293
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 
(cherry picked from commit 0090e414341f7ca9c70a2191a53d5b8fc855f4c8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131476
Tested-by: Aron Budea 
Reviewed-by: Aron Budea 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 183578df411a..18259e045415 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3057,6 +3057,7 @@ static void doc_iniUnoCommands ()
 OUString(".uno:NumberFormatPercent"),
 OUString(".uno:NumberFormatDecimal"),
 OUString(".uno:NumberFormatDate"),
+OUString(".uno:EditHeaderAndFooter"),
 OUString(".uno:FrameLineColor"),
 OUString(".uno:SortAscending"),
 OUString(".uno:SortDescending"),
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 44350d96ab9a..f7b6ecefba0d 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1107,6 +1107,7 @@ static void InterceptLOKStateChangeEvent(sal_uInt16 nSID, 
SfxViewFrame* pViewFra
  aEvent.FeatureURL.Path == "ResetAttributes" ||
  aEvent.FeatureURL.Path == "IncrementIndent" ||
  aEvent.FeatureURL.Path == "DecrementIndent" ||
+ aEvent.FeatureURL.Path == "EditHeaderAndFooter" ||
  aEvent.FeatureURL.Path == "NumberFormatDecDecimals" ||
  aEvent.FeatureURL.Path == "NumberFormatIncDecimals")
 {