[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 6 commits - sd/source sfx2/source
Pranam Lashkari (via logerrit)
logerrit at kemper.freedesktop.org
Fri Apr 9 10:23:03 UTC 2021
sd/source/ui/view/drviews4.cxx | 33 +++++++++++++++++++++++++++--
sfx2/source/notebookbar/SfxNotebookBar.cxx | 3 --
sfx2/source/view/ipclient.cxx | 22 ++++++++++++-------
3 files changed, 46 insertions(+), 12 deletions(-)
New commits:
commit f84c63d9727f620d31a2a1cc65df3b60b3c2cad0
Author: Pranam Lashkari <lpranam at collabora.com>
AuthorDate: Tue Mar 23 15:41:49 2021 +0530
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 11:22:28 2021 +0100
Notebookbar: skip early init in all apps
for more details 42cc32c95db2484961a65c906af1a899c1a6aa2b
Change-Id: I64f1ce22f7e1cbdbab3aea17841030a6313c1c0f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112953
Tested-by: Jenkins
Reviewed-by: Pranam Lashkari <lpranam at collabora.com>
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index cff228473371..f901b3788fc9 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -360,8 +360,7 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
// * in LOK: Paste Special feature was incorrectly initialized
// Skip first request so Notebookbar will be initialized after document was loaded
static std::map<const void*, bool> bSkippedFirstInit;
- if (comphelper::LibreOfficeKit::isActive() && eApp == vcl::EnumContext::Application::Writer
- && bSkippedFirstInit.find(pViewShell) == bSkippedFirstInit.end())
+ if (comphelper::LibreOfficeKit::isActive() && bSkippedFirstInit.find(pViewShell) == bSkippedFirstInit.end())
{
bSkippedFirstInit[pViewShell] = true;
return false;
commit c35d5947240de72360d654e72ee52559c59da217
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Mar 24 11:45:51 2021 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 11:22:28 2021 +0100
SfxInPlaceClient: avoid crash when chart deleted by other view
Be sure m_pClient still is valid. In case when one view
was in the chart editing mode and other view deleted the
slide, m_pClient was cleared in the meantime what caused
a crash
Change-Id: Ie433946799abef4c75af7b96f3e5cf9ba0e7ec47
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113032
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113786
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index 751c41456031..fc594ff2e658 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -308,7 +308,8 @@ void SAL_CALL SfxInPlaceClient_Impl::visibilityChanged( sal_Bool bVisible )
throw uno::RuntimeException();
m_pClient->GetViewShell()->OutplaceActivated( bVisible );
- m_pClient->Invalidate();
+ if (m_pClient) // it can change in the above code
+ m_pClient->Invalidate();
}
commit 7625be8507b59eb51f98e1d28505fb24c17e6deb
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Mar 22 16:11:03 2021 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 11:22:28 2021 +0100
impress: avoid crash when user edits text and other deletes slide
We need to end text edit when page is deleted by other user.
Change-Id: I89824c91f5652421a443feb9412acbae65db8800
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112917
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113784
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index f86bb4b06f3b..f333dba5f71e 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -58,6 +58,7 @@
#include <drawview.hxx>
#include <svx/bmpmask.hxx>
#include <LayerTabBar.hxx>
+#include <ViewShellBase.hxx>
#include <SlideSorterViewShell.hxx>
#include <svx/svditer.hxx>
@@ -65,6 +66,26 @@
#include <navigatr.hxx>
#include <memory>
+namespace {
+ void EndTextEditOnPage(sal_uInt16 nPageId)
+ {
+ SfxViewShell* pShell = SfxViewShell::GetFirst();
+ while (pShell)
+ {
+ ::sd::ViewShellBase* pBase = dynamic_cast<::sd::ViewShellBase*>(pShell);
+ if (pBase)
+ {
+ ::sd::ViewShell* pViewSh = pBase->GetMainViewShell().get();
+ ::sd::DrawViewShell* pDrawSh = dynamic_cast<::sd::DrawViewShell*>(pViewSh);
+ if (pDrawSh && pDrawSh->GetDrawView() && pDrawSh->getCurrentPage()->getPageId() == nPageId)
+ pDrawSh->GetDrawView()->SdrEndTextEdit();
+ }
+
+ pShell = SfxViewShell::GetNext(*pShell);
+ }
+ }
+}
+
namespace sd {
#define PIPETTE_RANGE 0
@@ -97,6 +118,7 @@ void DrawViewShell::DeleteActualPage()
if((bUseSlideSorter && IsSelected(nPageIndex)) || (!bUseSlideSorter && pPage->IsSelected()))
{
+ EndTextEditOnPage(pPage->getPageId());
Reference< XDrawPage > xPage( xPages->getByIndex( nPageIndex ), UNO_QUERY_THROW );
pagesToDelete.push_back(xPage);
}
commit cc933eb6831f07ff7f3f8723c41be25b3650e303
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Mar 22 12:28:36 2021 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 11:22:28 2021 +0100
impress: delete correct page when has multiple users
When multiple users are editing the presentation
few pages could be selected. Then the first selected
page was removed instead of currently selected by user
who executed the delete action. SlideSorterViewShell
has better knowledge about selected slides by current view.
Change-Id: Icb3157c8426027a7edc225249f8dd99270e9b2da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112883
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113728
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index a7a086359983..f86bb4b06f3b 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -59,6 +59,7 @@
#include <svx/bmpmask.hxx>
#include <LayerTabBar.hxx>
+#include <SlideSorterViewShell.hxx>
#include <svx/svditer.hxx>
#include <navigatr.hxx>
@@ -88,9 +89,15 @@ void DrawViewShell::DeleteActualPage()
for (sal_uInt16 i = 0; i < nPageCount; i++)
{
pPage = GetDoc()->GetSdPage(i, mePageKind);
- if(pPage->IsSelected())
+ sal_uInt16 nPageIndex = maTabControl->GetPagePos(pPage->getPageId());
+
+ slidesorter::SlideSorterViewShell* pVShell
+ = slidesorter::SlideSorterViewShell::GetSlideSorter(GetViewShellBase());
+ bool bUseSlideSorter = pVShell != nullptr;
+
+ if((bUseSlideSorter && IsSelected(nPageIndex)) || (!bUseSlideSorter && pPage->IsSelected()))
{
- Reference< XDrawPage > xPage( xPages->getByIndex( maTabControl->GetPagePos(pPage->getPageId()) ), UNO_QUERY_THROW );
+ Reference< XDrawPage > xPage( xPages->getByIndex( nPageIndex ), UNO_QUERY_THROW );
pagesToDelete.push_back(xPage);
}
}
commit cb45c0920b5c15b0c1cbf42e546628f37370324b
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Mar 19 14:18:12 2021 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 11:22:27 2021 +0100
online: send selection coordinates with inplace mode
Change-Id: I38964fc522924b61313bc38ecf03e007fc6f3b8d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112742
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Gökay ŞATIR <gokaysatir at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113727
Tested-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index c6b397744efa..751c41456031 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -335,7 +335,18 @@ void SAL_CALL SfxInPlaceClient_Impl::activatingInplace()
if ( comphelper::LibreOfficeKit::isActive() )
{
if ( SfxViewShell* pViewShell = m_pClient->GetViewShell() )
- pViewShell->libreOfficeKitViewCallback( LOK_CALLBACK_GRAPHIC_SELECTION, "INPLACE" );
+ {
+ tools::Rectangle aRect(m_pClient->GetObjArea());
+
+ if (m_pClient->GetEditWin())
+ {
+ if (m_pClient->GetEditWin()->GetMapMode().GetMapUnit() == MapUnit::Map100thMM)
+ aRect = OutputDevice::LogicToLogic(aRect, MapMode(MapUnit::Map100thMM), MapMode(MapUnit::MapTwip));
+ }
+
+ OString str = aRect.toString() + ", \"INPLACE\"";
+ pViewShell->libreOfficeKitViewCallback( LOK_CALLBACK_GRAPHIC_SELECTION, str.getStr() );
+ }
}
}
commit 01a4a96a6f05a6b221d19b4b36270349d577fe97
Author: Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Fri Mar 19 11:59:12 2021 +0100
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Apr 9 11:22:27 2021 +0100
online: Don't send chart selection to all views
Steps to reproduce fixed bug:
1. open spreadsheet with chart in two sessions
2. session A: doubleclick on chart (grey overlay appears), then click somewhere else to exit chart editing mode (grey overlay disappears)
3. session B: doubleclick on chart
result - grey overlay present in both views
Change-Id: I43b390fcf9bb1a3f3cbbbce4cea1052c54255dc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112736
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113726
Tested-by: Jenkins
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index fbba1febc5c1..c6b397744efa 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -188,12 +188,6 @@ void SAL_CALL SfxInPlaceClient_Impl::notifyEvent( const document::EventObject& a
if ( m_pClient && aEvent.EventName == "OnVisAreaChanged" && m_nAspect != embed::Aspects::MSOLE_ICON )
{
- if ( comphelper::LibreOfficeKit::isActive() )
- {
- if ( SfxViewShell* pViewShell = m_pClient->GetViewShell() )
- pViewShell->libreOfficeKitViewCallback( LOK_CALLBACK_GRAPHIC_SELECTION, "INPLACE" );
- }
-
m_pClient->FormatChanged(); // for Writer when format of the object is changed with the area
m_pClient->ViewChanged();
m_pClient->Invalidate();
More information about the Libreoffice-commits
mailing list