[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 3 commits - sc/source vcl/source
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Tue May 26 19:39:46 UTC 2020
sc/source/ui/view/gridwin.cxx | 26 +++++++++++++++++++-------
vcl/source/window/cursor.cxx | 5 +++--
vcl/source/window/floatwin.cxx | 2 ++
3 files changed, 24 insertions(+), 9 deletions(-)
New commits:
commit 07db4e55e931e57ba1cc09ad1e3721e5cec3fbd0
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Dec 18 07:30:14 2019 -0500
Commit: Dennis Francis <dennisfrancis.in at gmail.com>
CommitDate: Wed May 27 01:03:41 2020 +0530
vcl: don't use null window in FloatingWindow HitTest
Change-Id: I551f31cf30c7a58642becebe0256684055d0703a
Reviewed-on: https://gerrit.libreoffice.org/85383
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
(cherry picked from commit 65685bac09a4320602f4dda5151d247c5a83a75c)
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 223ed459e80c..5078616a8aa3 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -523,6 +523,8 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const
// use the border window to have the exact position
vcl::Window *pBorderWin = pWin->GetWindow( GetWindowType::Border );
+ if (!pBorderWin)
+ break;
// the top-left corner in output coordinates ie (0,0)
tools::Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( tools::Rectangle( Point(), pBorderWin->GetSizePixel()) ) ) ;
commit d0f2f28c5a7f117f4589bcefaea959e838b6a7db
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Sun Feb 2 14:37:38 2020 -0500
Commit: Dennis Francis <dennisfrancis.in at gmail.com>
CommitDate: Wed May 27 00:19:56 2020 +0530
vcl: avoid accessing null member on unloading views
Change-Id: If4e416c7257c861b9e13352b3329d9719b159e61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87830
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Aron Budea <aron.budea at collabora.com>
(cherry picked from commit 9ec3d637c1c99c729da67eafc375efce1cc7f026)
diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx
index c67bc186026a..ff0e5886a695 100644
--- a/vcl/source/window/cursor.cxx
+++ b/vcl/source/window/cursor.cxx
@@ -193,8 +193,9 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore )
// show the cursor, if there is an active window and the cursor
// has been selected in this window
pWindow = Application::GetFocusWindow();
- if ( !pWindow || (pWindow->mpWindowImpl->mpCursor != this) || pWindow->mpWindowImpl->mbInPaint
- || !pWindow->mpWindowImpl->mpFrameData->mbHasFocus )
+ if (!pWindow || !pWindow->mpWindowImpl || (pWindow->mpWindowImpl->mpCursor != this)
+ || pWindow->mpWindowImpl->mbInPaint
+ || !pWindow->mpWindowImpl->mpFrameData->mbHasFocus)
pWindow = nullptr;
}
commit 255c208ffcad02b5719e4226c20d453e2d217cc6
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Wed Dec 18 22:32:07 2019 +0100
Commit: Dennis Francis <dennisfrancis.in at gmail.com>
CommitDate: Wed May 27 00:02:27 2020 +0530
lok: send "EMPTY" if the rect is empty for cell selection or fill
It can happen that the selection or auto-fill rectangles are
empty and if that's the case then we need to send "EMPTY" string
and not the content of an empty rectangle (0, 0, -32768, -32768).
This can happen for CELL_SELECTION_AREA or CELL_AUTO_FILL_AREA in
calc.
Change-Id: I9a60e3907a2ab8b0e0fd1a2ff81137fba6c8e9a3
Reviewed-on: https://gerrit.libreoffice.org/85437
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
(cherry picked from commit df6871286d7b769bc47554955213a2d727c47875)
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index b637c373d0d5..8360419b0bff 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5959,7 +5959,10 @@ void ScGridWindow::UpdateKitSelection(const std::vector<tools::Rectangle>& rRect
}
ScTabViewShell* pViewShell = pViewData->GetViewShell();
- pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_SELECTION_AREA, aBoundingBox.toString().getStr());
+ OString sBoundingBoxString = "EMPTY";
+ if (!aBoundingBox.IsEmpty())
+ sBoundingBoxString = aBoundingBox.toString();
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_SELECTION_AREA, sBoundingBoxString.getStr());
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, rectanglesToString(aLogicRects).getStr());
for (SfxViewShell* it = SfxViewShell::GetFirst(); it;
@@ -6012,7 +6015,11 @@ void ScGridWindow::updateOtherKitSelections() const
OString aRectsString = rectanglesToString(aOtherLogicRects);
if (it == pViewShell)
{
- pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_SELECTION_AREA, aBoundingBox.toString().getStr());
+ OString sBoundingBoxString = "EMPTY";
+ if (!aBoundingBox.IsEmpty())
+ sBoundingBoxString = aBoundingBox.toString();
+
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_SELECTION_AREA, sBoundingBoxString.getStr());
pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_TEXT_SELECTION, aRectsString.getStr());
}
else
@@ -6032,13 +6039,18 @@ void updateLibreOfficeKitAutoFill(const ScViewData* pViewData, tools::Rectangle
double nPPTX = pViewData->GetPPTX();
double nPPTY = pViewData->GetPPTY();
- // selection start handle
- tools::Rectangle aLogicRectangle(
- rRectangle.Left() / nPPTX, rRectangle.Top() / nPPTY,
- rRectangle.Right() / nPPTX, rRectangle.Bottom() / nPPTY);
+ OString sRectangleString = "EMPTY";
+ if (!rRectangle.IsEmpty())
+ {
+ // selection start handle
+ tools::Rectangle aLogicRectangle(
+ rRectangle.Left() / nPPTX, rRectangle.Top() / nPPTY,
+ rRectangle.Right() / nPPTX, rRectangle.Bottom() / nPPTY);
+ sRectangleString = aLogicRectangle.toString();
+ }
ScTabViewShell* pViewShell = pViewData->GetViewShell();
- pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_AUTO_FILL_AREA, aLogicRectangle.toString().getStr());
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CELL_AUTO_FILL_AREA, sRectangleString.getStr());
}
} //end anonymous namespace
More information about the Libreoffice-commits
mailing list