[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 17 commits - cui/source desktop/source include/svx include/vcl sc/source sd/sdi sd/source sfx2/source svtools/source svx/sdi svx/source vcl/source
Henry Castro (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 9 20:55:01 UTC 2021
cui/source/dialogs/scriptdlg.cxx | 14 ++++-
desktop/source/lib/init.cxx | 7 ++
desktop/source/lib/lokinteractionhandler.cxx | 16 ++++++
include/svx/svdview.hxx | 2
include/svx/svxids.hrc | 5 +-
include/vcl/svapp.hxx | 14 +++++
include/vcl/toolkit/treelist.hxx | 6 ++
include/vcl/toolkit/treelistbox.hxx | 1
sc/source/ui/docshell/dbdocfun.cxx | 20 ++++++++
sc/source/ui/view/gridwin2.cxx | 2
sd/sdi/_drvwsh.sdi | 5 +-
sd/source/ui/func/fuconstr.cxx | 6 +-
sd/source/ui/func/fusel.cxx | 1
sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx | 1
sd/source/ui/view/drviews2.cxx | 17 +++++++
sfx2/source/appl/sfxhelp.cxx | 7 ++
svtools/source/java/javacontext.cxx | 2
svx/sdi/svx.sdi | 17 +++++++
svx/source/svdraw/svdview.cxx | 38 ++++++++++++++++
vcl/source/app/svapp.cxx | 19 ++++++++
vcl/source/control/button.cxx | 8 +++
vcl/source/treelist/svtabbx.cxx | 15 ++++++
vcl/source/treelist/treelist.cxx | 8 +++
vcl/source/treelist/treelistbox.cxx | 1
24 files changed, 221 insertions(+), 11 deletions(-)
New commits:
commit cb9482cfe5a308dbb8369f0a0c92188b6053b943
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Fri Dec 25 13:09:00 2020 -0400
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 21:51:50 2021 +0100
lok: add missing global notifier
Occurs when server shows the "Macro Security Warning" before
load the document if enable/disable macros, but there are no
instances for document/view/controller yet.
So it is required to use the global notifier so it can be sent
messages to the client side using the JSDialog framework.
Change-Id: I67f15b21cbaf21906b88145f3c5835cf0e1ff79d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108288
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d59bbd80d3bf..c3214a771657 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2465,11 +2465,14 @@ static void lo_registerCallback (LibreOfficeKit* pThis,
{
SolarMutexGuard aGuard;
+ Application* pApp = GetpApp();
+ assert(pApp);
+
LibLibreOffice_Impl* pLib = static_cast<LibLibreOffice_Impl*>(pThis);
pLib->maLastExceptionMsg.clear();
- pLib->mpCallback = pCallback;
- pLib->mpCallbackData = pData;
+ pApp->m_pCallback = pLib->mpCallback = pCallback;
+ pApp->m_pCallbackData = pLib->mpCallbackData = pData;
}
static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const char* pFormat, const char* pFilterOptions)
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index b1d7759765c3..bfa92cf88321 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -27,12 +27,14 @@
#include <vector>
#include <comphelper/solarmutex.hxx>
+#include <LibreOfficeKit/LibreOfficeKitTypes.h>
#include <osl/mutex.hxx>
#include <rtl/ustring.hxx>
#include <osl/thread.h>
#include <tools/gen.hxx>
#include <tools/link.hxx>
#include <vcl/dllapi.h>
+#include <vcl/IDialogRenderable.hxx>
#include <vcl/inputtypes.hxx>
#include <vcl/exceptiontypes.hxx>
#include <vcl/vclevent.hxx>
@@ -227,7 +229,7 @@ enum class DialogCancelMode {
@see Desktop, ImplSVData
*/
-class VCL_DLLPUBLIC Application
+class VCL_DLLPUBLIC Application : public vcl::ILibreOfficeKitNotifier
{
public:
/** @name Initialization
@@ -1319,6 +1321,16 @@ public:
bool bMobile = false);
static weld::Window* GetFrameWeld(const css::uno::Reference<css::awt::XWindow>& rWindow);
+
+ // ILibreOfficeKitNotifier
+ void* m_pCallbackData;
+ LibreOfficeKitCallback m_pCallback;
+
+ virtual void notifyWindow(vcl::LOKWindowId nLOKWindowId,
+ const OUString& rAction,
+ const std::vector<vcl::LOKPayloadItem>& rPayload = std::vector<vcl::LOKPayloadItem>()) const override;
+ virtual void libreOfficeKitViewCallback(int nType, const char* pPayload) const override;
+
private:
DECL_STATIC_LINK( Application, PostEventHandler, void*, void );
};
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index 676fa26e1038..332075cccd93 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -164,6 +164,8 @@ Application::Application()
osl_setEnvironment(aVar.pData, aValue.pData);
ImplGetSVData()->mpApp = this;
+ m_pCallbackData = nullptr;
+ m_pCallback = nullptr;
}
Application::~Application()
@@ -313,6 +315,23 @@ void Application::EndAllPopups()
Application::PostUserEvent( LINK( nullptr, ImplSVAppData, ImplEndAllPopupsMsg ) );
}
+void Application::notifyWindow(vcl::LOKWindowId /*nLOKWindowId*/,
+ const OUString& /*rAction*/,
+ const std::vector<vcl::LOKPayloadItem>& /*rPayload = std::vector<LOKPayloadItem>()*/) const
+{
+}
+
+void Application::libreOfficeKitViewCallback(int nType, const char* pPayload) const
+{
+ if (!comphelper::LibreOfficeKit::isActive())
+ return;
+
+ if (m_pCallback)
+ {
+ m_pCallback(nType, pPayload, m_pCallbackData);
+ }
+}
+
namespace
{
commit 91ce0453fab671df3cdf1e202a9baed281b2b9e9
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Tue Mar 2 19:58:08 2021 -0400
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:45:27 2021 +0100
lok: async exception dialog messages for VBA macros
Change-Id: Ia713343541f8102de85f7ac57202780afba3da00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111855
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113686
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 78bb8be5d8f8..d00350de7657 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -45,6 +45,7 @@
#include <com/sun/star/script/XInvocation.hpp>
#include <com/sun/star/document/XEmbeddedScripts.hpp>
+#include <comphelper/lok.hxx>
#include <comphelper/SetFlagContextHelper.hxx>
#include <comphelper/documentinfo.hxx>
#include <comphelper/processfactory.hxx>
@@ -1318,10 +1319,17 @@ IMPL_STATIC_LINK( SvxScriptErrorDialog, ShowDialog, void*, p, void )
if ( message.isEmpty() )
message = CuiResId( RID_SVXSTR_ERROR_TITLE );
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(xData->pParent,
- VclMessageType::Warning, VclButtonsType::Ok, message));
+ std::shared_ptr<weld::MessageDialog> xBox;
+ xBox.reset(Application::CreateMessageDialog(
+ xData->pParent,
+ VclMessageType::Warning,
+ VclButtonsType::Ok,
+ message,
+ comphelper::LibreOfficeKit::isActive()));
+
xBox->set_title(CuiResId(RID_SVXSTR_ERROR_TITLE));
- xBox->run();
+
+ xBox->runAsync(xBox, [](sal_Int32 /*nResult*/) {});
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 8d764aab444d45515eb98514cde2e05669549dcf
Author: mert <mert.tumer at collabora.com>
AuthorDate: Wed Mar 3 06:13:21 2021 +0300
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:44:31 2021 +0100
Draw: Fix crash on multiple page selection on slidesorter
Change-Id: Id7461b811d3445df895cf751153bd0dd81f09efc
Signed-off-by: mert <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111864
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
(cherry picked from commit 505965dd5d05e4711bf5b433b8af06e88e030962)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111917
Tested-by: Jenkins
diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
index a02b445c547d..4dbc666e0780 100644
--- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
+++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx
@@ -216,6 +216,7 @@ SlideSorterViewShell* SlideSorterViewShell::GetSlideSorter (ViewShellBase& rBase
FrameworkHelper::msCenterPaneURL,
FrameworkHelper::msFullScreenPaneURL,
FrameworkHelper::msLeftImpressPaneURL,
+ FrameworkHelper::msLeftDrawPaneURL,
OUString()};
try
commit 66f62a5fd562447815cf08c476222c525af779ed
Author: mert <mert.tumer at collabora.com>
AuthorDate: Mon Mar 1 06:00:11 2021 +0300
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:43:55 2021 +0100
Fix crash while moving handle when shape text is active
Change-Id: Ie21398917bc204245837215f1eade78e11c61890
Signed-off-by: mert <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111726
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111740
Tested-by: Jenkins
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 8015980c61eb..6b03a716b4af 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1410,6 +1410,9 @@ bool SdrView::BegMark(const Point& rPnt, bool bAddMark, bool bUnmark)
bool SdrView::MoveShapeHandle(const sal_uInt32 handleNum, const Point& aEndPoint)
{
+ if (GetHdlList().IsMoveOutside())
+ return false;
+
if (!GetMarkedObjectList().GetMarkCount())
return false;
commit 0304a3c2b7d1c8686dad117b919a956e6cb76595
Author: mert <mert.tumer at collabora.com>
AuthorDate: Tue Feb 23 10:45:51 2021 +0300
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:43:36 2021 +0100
Implemented MoveShapeHandle method
This method will be shared among 3 modules
via uno:MoveShapeHandle uno command
Change-Id: I921a1f7f004e2004e142954b40b4b93282eb8fed
Signed-off-by: mert <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111373
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111507
Tested-by: Jenkins
diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx
index f37cf109811d..149b17f9ece9 100644
--- a/include/svx/svdview.hxx
+++ b/include/svx/svdview.hxx
@@ -241,6 +241,8 @@ public:
virtual sdr::contact::ObjectContact* createViewSpecificObjectContact(
SdrPageWindow& rPageWindow,
const char* pDebugName) const;
+
+ bool MoveShapeHandle(const sal_uInt32 handleNum, const Point& aEndPoint);
};
// First of all the app creates a SdrModel.
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index f266478927b8..8015980c61eb 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1408,6 +1408,41 @@ bool SdrView::BegMark(const Point& rPnt, bool bAddMark, bool bUnmark)
}
}
+bool SdrView::MoveShapeHandle(const sal_uInt32 handleNum, const Point& aEndPoint)
+{
+ if (!GetMarkedObjectList().GetMarkCount())
+ return false;
+
+ SdrHdl * pHdl = GetHdlList().GetHdl(handleNum);
+ if (pHdl == nullptr)
+ return false;
+
+ const SdrDragStat& rDragStat = GetDragStat();
+ // start dragging
+ BegDragObj(pHdl->GetPos(), nullptr, pHdl, 0);
+ if (!IsDragObj())
+ return false;
+
+ bool bWasNoSnap = rDragStat.IsNoSnap();
+ bool bWasSnapEnabled = IsSnapEnabled();
+
+ // switch snapping off
+ if(!bWasNoSnap)
+ const_cast<SdrDragStat&>(rDragStat).SetNoSnap();
+ if(bWasSnapEnabled)
+ SetSnapEnabled(false);
+
+ MovAction(aEndPoint);
+ EndDragObj();
+
+ if (!bWasNoSnap)
+ const_cast<SdrDragStat&>(rDragStat).SetNoSnap(bWasNoSnap);
+ if (bWasSnapEnabled)
+ SetSnapEnabled(bWasSnapEnabled);
+
+ return true;
+}
+
void SdrView::ConfigurationChanged( ::utl::ConfigurationBroadcaster*p, ConfigurationHints nHint)
{
onAccessibilityOptionsChanged();
commit 5874a2fbad9dc873ccaa671333b461f793c586ca
Author: mert <mert.tumer at collabora.com>
AuthorDate: Thu Feb 4 10:37:03 2021 +0300
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:42:28 2021 +0100
LOK: disable rotation mode on selection of shape
Change-Id: Iff0ed673ae1c61ff0d753cf3a1f871213f8b3a7d
Signed-off-by: mert <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110399
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111509
Tested-by: Jenkins
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 7bf915055b4b..ca248d808840 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -39,6 +39,7 @@
#include <sdpage.hxx>
#include <sdresid.hxx>
#include <glob.hxx>
+#include <comphelper/lok.hxx>
using namespace com::sun::star;
@@ -187,9 +188,10 @@ bool FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
pSingleObj = mpView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
}
- if (mpView->GetDragMode() == SdrDragMode::Move && mpView->IsRotateAllowed() &&
+ const bool bTiledRendering = comphelper::LibreOfficeKit::isActive();
+ if (!bTiledRendering && (mpView->GetDragMode() == SdrDragMode::Move && mpView->IsRotateAllowed() &&
(mpViewShell->GetFrameView()->IsClickChangeRotation() ||
- (pSingleObj && pSingleObj->GetObjInventor()==SdrInventor::E3d)))
+ (pSingleObj && pSingleObj->GetObjInventor()==SdrInventor::E3d))))
{
mpView->SetDragMode(SdrDragMode::Rotate);
}
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 904696bb063a..30ef0e9bf9a4 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -707,6 +707,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
}
if (nSlotId == SID_OBJECT_SELECT
+ && !comphelper::LibreOfficeKit::isActive()
&& mpView->IsRotateAllowed()
&& (rMEvt.GetClicks() != 2)
commit 078736fff53d9bac951a4046b4ecebdaf98e694f
Author: mert <mert.tumer at collabora.com>
AuthorDate: Thu Jan 28 07:19:07 2021 +0300
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:42:10 2021 +0100
Added .uno:MoveShapeHandle uno command
This is now only available for Draw/Presentation
It will allow interactive dragging/resizing operations
via the command. Later it will be implemented for other
modules too.
Change-Id: Iaed7d25cf4035591083e779c13a6f0227a3b564f
Signed-off-by: mert <mert.tumer at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110041
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111508
Tested-by: Jenkins
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index fbb961c9c4cd..52a5476ed120 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -1029,8 +1029,11 @@ class SvxSetItem;
#define SID_ULINE_VAL_DOUBLE (SID_SVX_START + 1197) /* double underline */
#define SID_ULINE_VAL_DOTTED (SID_SVX_START + 1198) /* dotted underline */
+#define SID_MOVE_SHAPE_HANDLE ( SID_SVX_START + 1199 )
+
// IMPORTANT NOTE: adjust SID_SVX_FIRSTFREE, when adding new slot id
-#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1198 + 1 )
+#define SID_SVX_FIRSTFREE ( SID_SVX_START + 1199 + 1 )
+
// Overflow check for slot IDs
#if SID_SVX_FIRSTFREE > SID_SVX_END
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 683e52888635..90e37f7f52fe 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -2918,5 +2918,8 @@ interface DrawView
ExecMethod = FuTemporary;
StateMethod = GetAttrState;
]
-
+ SID_MOVE_SHAPE_HANDLE
+ [
+ ExecMethod = FuTemporary ;
+ ]
}
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index cc7b1eec8011..0c7f0cd1278a 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -93,6 +93,7 @@
#include <svx/xflgrit.hxx>
#include <tools/diagnose_ex.h>
+#include <tools/UnitConversion.hxx>
#include <unotools/useroptions.hxx>
@@ -1494,7 +1495,23 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
}
}
break;
+ case SID_MOVE_SHAPE_HANDLE:
+ {
+ const SfxItemSet *pArgs = rReq.GetArgs ();
+ if (pArgs && pArgs->Count () == 3)
+ {
+ const SfxUInt32Item* handleNumItem = rReq.GetArg<SfxUInt32Item>(FN_PARAM_1);
+ const SfxUInt32Item* newPosXTwips = rReq.GetArg<SfxUInt32Item>(FN_PARAM_2);
+ const SfxUInt32Item* newPosYTwips = rReq.GetArg<SfxUInt32Item>(FN_PARAM_3);
+ const sal_uLong handleNum = handleNumItem->GetValue();
+ const sal_uLong newPosX = convertTwipToMm100(newPosXTwips->GetValue());
+ const sal_uLong newPosY = convertTwipToMm100(newPosYTwips->GetValue());
+ mpDrawView->MoveShapeHandle(handleNum, Point(newPosX, newPosY));
+ Cancel();
+ }
+ break;
+ }
case SID_CHAR_DLG_EFFECT:
case SID_CHAR_DLG: // BASIC
{
diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi
index 9d31cea9643b..5ab763d7a2db 100644
--- a/svx/sdi/svx.sdi
+++ b/svx/sdi/svx.sdi
@@ -12497,3 +12497,20 @@ SdrMetricItem SoftEdgeRadius SID_ATTR_SOFTEDGE_RADIUS
ToolBoxConfig = FALSE,
GroupId = SfxGroupId::Document;
]
+
+SfxVoidItem MoveShapeHandle SID_MOVE_SHAPE_HANDLE
+(SfxUInt32Item HandleNum FN_PARAM_1 SfxUInt32Item NewPosX FN_PARAM_2 SfxUInt32Item NewPosY FN_PARAM_3)
+[
+ AutoUpdate = FALSE,
+ FastCall = TRUE,
+ ReadOnlyDoc = FALSE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+
+ AccelConfig = FALSE,
+ MenuConfig = FALSE,
+ ToolBoxConfig = FALSE,
+ GroupId = SfxGroupId::Format;
+]
commit c1cc292c4e66daf6eaac86912b1db6f40ba04945
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Feb 8 19:01:00 2021 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:41:14 2021 +0100
lok: send help even when document not ready
Change-Id: I44855ef00a6c54a774965b3c951a4476ed5c8b01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110593
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Henry Castro <hcastro at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112159
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 6c8fe3d8211e..25774180d4af 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -723,6 +723,13 @@ static bool impl_showOnlineHelp( const OUString& rURL )
aHelpLink.toUtf8().getStr());
return true;
}
+ else if (GetpApp())
+ {
+ GetpApp()->libreOfficeKitViewCallback(LOK_CALLBACK_HYPERLINK_CLICKED,
+ aHelpLink.toUtf8().getStr());
+ return true;
+ }
+
return false;
}
commit 90887d67be5d585b1c50d3386dd59f97147786a1
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Feb 9 17:14:13 2021 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:40:56 2021 +0100
autofilter: handle click for scaled dropdown button
Missing thing for commit:
68892230ddcde135e9951047a3621438eb7987d0
autofilter: scale dropdown button according to zoom level
rendering was scaled but click position was handled
using non scaled button size
Change-Id: I599b7e6aef39e8b5225b53423125f2b271597a46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110646
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112160
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index d71741cda2bc..839c0fc6b6d9 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -351,7 +351,7 @@ bool ScGridWindow::DPTestFieldPopupArrow(
Size aScrSize(nSizeX-1, nSizeY-1);
// Check if the mouse cursor is clicking on the popup arrow box.
- ScDPFieldButton aBtn(this, &GetSettings().GetStyleSettings());
+ ScDPFieldButton aBtn(this, &GetSettings().GetStyleSettings(), &GetMapMode().GetScaleY());
aBtn.setBoundingBox(aScrPos, aScrSize, bLayoutRTL);
aBtn.setPopupLeft(false); // DataPilot popup is always right-aligned for now
Point aPopupPos;
commit 96291f84de2a13187571f28aea4e7e777fe05e0c
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Feb 9 09:38:58 2021 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:40:35 2021 +0100
jsdialog: single activation property for treeview
Change-Id: Iaaeab7f14f1a05c38f41c4beb774a0980844fdb3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110621
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111959
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/include/vcl/toolkit/treelistbox.hxx b/include/vcl/toolkit/treelistbox.hxx
index 7f3bf814bd19..df7581e7382b 100644
--- a/include/vcl/toolkit/treelistbox.hxx
+++ b/include/vcl/toolkit/treelistbox.hxx
@@ -676,6 +676,7 @@ public:
// Make single click "activate" a row like a double-click normally does
void SetActivateOnSingleClick(bool bEnable) { mbActivateOnSingleClick = bEnable; }
+ bool GetActivateOnSingleClick() { return mbActivateOnSingleClick; }
// Make mouse over a row "select" a row like a single-click normally does
void SetHoverSelection(bool bEnable) { mbHoverSelection = bEnable; }
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index 613d1831bf2b..ab1736f32120 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -115,6 +115,8 @@ void SvTabListBox::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
{
SvTreeListBox::DumpAsPropertyTree(rJsonWriter);
+ rJsonWriter.put("singleclickactivate", GetActivateOnSingleClick());
+
bool bCheckButtons = static_cast<int>(nTreeFlags & SvTreeFlags::CHKBTN);
auto entriesNode = rJsonWriter.startArray("entries");
commit efbcbade9fe7b978e839fd485d10690f5a0f8741
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Dec 10 13:42:25 2020 -0400
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:40:12 2021 +0100
lok: add "ondemand" property to dump the TreeView property
The "SalInstanceTreeView" instance does not use the flag
"CHILDREN_ON_DEMAND", but instead it creates a "<dummy>" child.
However the client side requires "on demand" information to
request and trigger the "On Expanding" event.
Change-Id: I4d8667fc83dae2c5f1d477fefa9c9917a5e6c90d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107576
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index 816acb66a46c..613d1831bf2b 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -73,6 +73,19 @@ static void lcl_DumpEntryAndSiblings(tools::JsonWriter& rJsonWriter,
}
}
+ // SalInstanceTreeView does not use the flag CHILDREN_ON_DEMAND
+ // and it creates a dummy child
+ const SvTreeListEntries& rChildren = pEntry->GetChildEntries();
+ if (rChildren.size() == 1)
+ {
+ auto& rChild = rChildren[0];
+ if (const SvLBoxItem* pChild = rChild->GetFirstItem(SvLBoxItemType::String))
+ {
+ if (static_cast<const SvLBoxString*>(pChild)->GetText() == "<dummy>")
+ rJsonWriter.put("ondemand", "true");
+ }
+ }
+
if (bCheckButtons)
{
SvButtonState eCheckState = pTabListBox->GetCheckButtonState(pEntry);
commit ad68a58140be9ff657e1e8ff091cf61002f5797e
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Tue Jan 19 09:16:06 2021 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:39:31 2021 +0100
jsdialog: dump radio groups
Change-Id: I64bb8c7c87a2d4f054c3f2c8e5ac28812230cf70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109613
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index b2a7dc7cfdc2..9493454d00b9 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2858,6 +2858,14 @@ void RadioButton::DumpAsPropertyTree(tools::JsonWriter& rJsonWriter)
{
Button::DumpAsPropertyTree(rJsonWriter);
rJsonWriter.put("checked", IsChecked());
+
+ OUString sGroupId;
+ std::vector<VclPtr<RadioButton>> aGroup = GetRadioButtonGroup();
+ for(auto& pButton : aGroup)
+ sGroupId += pButton->get_id();
+
+ if (!sGroupId.isEmpty())
+ rJsonWriter.put("group", sGroupId);
}
FactoryFunction RadioButton::GetUITestFactory() const
commit 8fb1d1159c8b67032d3dc5d6c92fcb4c2b84b2b5
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Thu Dec 17 10:33:19 2020 -0400
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:39:09 2021 +0100
lok: check if the tree list box model has changed
It is necessary to know when the tree list model
has changed to notify client side changes.
Change-Id: I188a97223e06520d0b34cd9272eff6449a14d60e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107892
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/include/vcl/toolkit/treelist.hxx b/include/vcl/toolkit/treelist.hxx
index 09ed5da01df2..dbab485fde61 100644
--- a/include/vcl/toolkit/treelist.hxx
+++ b/include/vcl/toolkit/treelist.hxx
@@ -209,6 +209,7 @@ class VCL_DLLPUBLIC SvListView
std::unique_ptr<Impl> m_pImpl;
protected:
+ bool m_bDirtyModel;
std::unique_ptr<SvTreeList> pModel;
void ExpandListEntry( SvTreeListEntry* pParent );
@@ -227,6 +228,11 @@ public:
sal_uLong nPos
);
+ bool IsDirtyModel() const
+ { return m_bDirtyModel; }
+ void SetDirtyModel(bool bValue)
+ { m_bDirtyModel = bValue; }
+
sal_uLong GetVisibleCount() const
{ return pModel->GetVisibleCount( const_cast<SvListView*>(this) ); }
diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx
index e314329c10b8..1e4759ee6c85 100644
--- a/vcl/source/treelist/treelist.cxx
+++ b/vcl/source/treelist/treelist.cxx
@@ -1032,6 +1032,7 @@ SvListView::SvListView()
{
pModel.reset(new SvTreeList(*this));
m_pImpl->InitTable();
+ m_bDirtyModel = false;
}
void SvListView::dispose()
@@ -1248,15 +1249,18 @@ void SvListView::Impl::ActionClear()
void SvListView::ModelNotification( SvListAction nActionId, SvTreeListEntry* pEntry1,
SvTreeListEntry* /*pEntry2*/, sal_uLong /*nPos*/ )
{
+
switch( nActionId )
{
case SvListAction::INSERTED:
m_pImpl->ActionInserted( pEntry1 );
ModelHasInserted( pEntry1 );
+ m_bDirtyModel = true;
break;
case SvListAction::INSERTED_TREE:
m_pImpl->ActionInsertedTree( pEntry1 );
ModelHasInsertedTree( pEntry1 );
+ m_bDirtyModel = true;
break;
case SvListAction::REMOVING:
ModelIsRemoving( pEntry1 );
@@ -1264,6 +1268,7 @@ void SvListView::ModelNotification( SvListAction nActionId, SvTreeListEntry* pEn
break;
case SvListAction::REMOVED:
ModelHasRemoved( pEntry1 );
+ m_bDirtyModel = true;
break;
case SvListAction::MOVING:
ModelIsMoving( pEntry1 );
@@ -1272,12 +1277,14 @@ void SvListView::ModelNotification( SvListAction nActionId, SvTreeListEntry* pEn
case SvListAction::MOVED:
m_pImpl->ActionMoved();
ModelHasMoved( pEntry1 );
+ m_bDirtyModel = true;
break;
case SvListAction::CLEARING:
m_pImpl->ActionClear();
ModelHasCleared(); // sic! for compatibility reasons!
break;
case SvListAction::CLEARED:
+ m_bDirtyModel = true;
break;
case SvListAction::INVALIDATE_ENTRY:
// no action for the base class
@@ -1285,6 +1292,7 @@ void SvListView::ModelNotification( SvListAction nActionId, SvTreeListEntry* pEn
break;
case SvListAction::RESORTED:
m_pImpl->m_bVisPositionsValid = false;
+ m_bDirtyModel = true;
break;
case SvListAction::RESORTING:
break;
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index ba24d0e6cc73..08e8e68313ba 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -417,6 +417,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) :
pImpl->SetModel( pModel.get() );
SetSublistOpenWithLeftRight();
+ m_bDirtyModel = false;
}
void SvTreeListBox::Clear()
commit 84d25ae764177f5e70e4a008395f65899e4b024f
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Tue Jan 12 11:20:34 2021 +0530
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:38:33 2021 +0100
lok: sort: invalidate the row-height cache too
Change-Id: I13e59dc045b23a6ea60cd4cf34dda3166dbf5aad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109208
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
(cherry picked from commit 7ef5fcc08f6678ad6a61c46b187e1920fca74d23)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109275
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index 977255d7d017..9a3c9fddda5e 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -595,6 +595,17 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
if (comphelper::LibreOfficeKit::isActive())
{
SfxViewShell* pSomeViewForThisDoc = rDocShell.GetBestViewShell(false);
+ SfxViewShell* pViewShell = SfxViewShell::GetFirst();
+ while (pViewShell)
+ {
+ ScTabViewShell* pTabViewShell = dynamic_cast<ScTabViewShell*>(pViewShell);
+ if (pTabViewShell && pTabViewShell->GetDocId() == pSomeViewForThisDoc->GetDocId())
+ {
+ pTabViewShell->GetViewData().GetLOKHeightHelper(nTab)->invalidateByIndex(nStartRow);
+ }
+ pViewShell = SfxViewShell::GetNext(*pViewShell);
+ }
+
ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
pSomeViewForThisDoc, false /* bColumns */, true /* bRows */, true /* bSizes*/,
true /* bHidden */, true /* bFiltered */, true /* bGroups */, nTab);
commit 04f0bfb8b8e0ee7d71a210514f7cd0fdffa18ddf
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Tue Jan 12 11:05:56 2021 +0530
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:38:09 2021 +0100
lok: send sheetGeometry invalidation after sort
...just for the rows to let the client know the row sizes/spans have
changed.
Change-Id: I26f985ab0ba4eb5b21db5783a8ac3957c64c2f22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109207
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
(cherry picked from commit cca01519c7e778d3cf9208e642073d939d9fdac0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109272
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx
index f18973541fc5..977255d7d017 100644
--- a/sc/source/ui/docshell/dbdocfun.cxx
+++ b/sc/source/ui/docshell/dbdocfun.cxx
@@ -25,6 +25,7 @@
#include <svx/svdoole2.hxx>
#include <com/sun/star/sdb/CommandType.hpp>
#include <unotools/charclass.hxx>
+#include <comphelper/lok.hxx>
#include <dbdocfun.hxx>
#include <dbdata.hxx>
@@ -591,6 +592,14 @@ bool ScDBDocFunc::Sort( SCTAB nTab, const ScSortParam& rSortParam,
if (pDBData == rDoc.GetAnonymousDBData( nTab) || rDoc.GetDBCollection()->getAnonDBs().has( pDBData))
pDBData->UpdateFromSortParam( rSortParam);
+ if (comphelper::LibreOfficeKit::isActive())
+ {
+ SfxViewShell* pSomeViewForThisDoc = rDocShell.GetBestViewShell(false);
+ ScTabViewShell::notifyAllViewsSheetGeomInvalidation(
+ pSomeViewForThisDoc, false /* bColumns */, true /* bRows */, true /* bSizes*/,
+ true /* bHidden */, true /* bFiltered */, true /* bGroups */, nTab);
+ }
+
if (nStartRow <= aLocalParam.nRow2)
{
ScRange aDirtyRange(
commit 82692cdd099e3bace22f1dc2e38ea99c1b94d1ae
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Mon Dec 28 14:08:41 2020 -0400
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:31:34 2021 +0100
lok: disable java interaction handler
Unfortunately, when the client side shows
the "Macro Selector" dialog, it tries to show
a java interaction message box to locate the
files of the JVM, even if the code explicitly
option to not enable "DontEnableJava"
Change-Id: I2ef4373f58c3ba23a5b86c5dc984caf6c10821ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108421
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/svtools/source/java/javacontext.cxx b/svtools/source/java/javacontext.cxx
index f961453f6e7e..c804e5f0b99e 100644
--- a/svtools/source/java/javacontext.cxx
+++ b/svtools/source/java/javacontext.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <comphelper/lok.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/Type.hxx>
#include <svtools/javacontext.hxx>
@@ -63,6 +64,7 @@ Any SAL_CALL JavaContext::getValueByName( const OUString& Name)
if ( Name == JAVA_INTERACTION_HANDLER_NAME )
{
+ if ( !comphelper::LibreOfficeKit::isActive() )
{
osl::MutexGuard aGuard(osl::Mutex::getGlobalMutex());
if (!m_xHandler.is())
commit 402e2ab0bbb6ee1b154bc5087044639201832b00
Author: Henry Castro <hcastro at collabora.com>
AuthorDate: Fri Dec 25 13:40:33 2020 -0400
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 17:31:18 2021 +0100
lok: add interaction handler "macro security" confirmation
When a client side request to load document with macros
embedded, it will show the "Macro Security Warning" message dialog.
Change-Id: Id848980a4fd3a5138bc98c43e57044f7d5ce3189
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108292
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro at collabora.com>
diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx
index 0933e4c230a7..7561bb968dd4 100644
--- a/desktop/source/lib/lokinteractionhandler.cxx
+++ b/desktop/source/lib/lokinteractionhandler.cxx
@@ -21,11 +21,14 @@
#include <boost/property_tree/json_parser.hpp>
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <com/sun/star/task/XInteractionAbort.hpp>
#include <com/sun/star/task/XInteractionApprove.hpp>
#include <com/sun/star/task/XInteractionPassword2.hpp>
+#include <com/sun/star/task/DocumentMacroConfirmationRequest.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/ucb/InteractiveNetworkConnectException.hpp>
#include <com/sun/star/ucb/InteractiveNetworkOffLineException.hpp>
@@ -345,6 +348,19 @@ sal_Bool SAL_CALL LOKInteractionHandler::handleInteractionRequest(
if (handlePasswordRequest(rContinuations, request))
return true;
+ task::DocumentMacroConfirmationRequest aConfirmRequest;
+ if (request >>= aConfirmRequest)
+ {
+ uno::Reference< task::XInteractionHandler2 > xInteraction(
+ task::InteractionHandler::createWithParent(
+ ::comphelper::getProcessComponentContext(), nullptr));
+
+ if (xInteraction.is())
+ xInteraction->handleInteractionRequest(xRequest);
+
+ return true;
+ }
+
// TODO: perform more interactions 'for real' like the above
selectApproved(rContinuations);
More information about the Libreoffice-commits
mailing list