[Libreoffice-commits] core.git: sc/source
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Sun Jul 5 07:40:52 UTC 2020
sc/source/ui/app/inputhdl.cxx | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
New commits:
commit ca8c1cec8708fad90b4ed88862930336bd3a0abb
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Sun May 24 20:31:52 2020 +0530
Commit: Dennis Francis <dennis.francis at collabora.com>
CommitDate: Sun Jul 5 09:40:14 2020 +0200
lokit: scPrintTwipsMsgs: LOK_CALLBACK_REFERENCE_MARKS
Allow print twips coordinates in LOK_CALLBACK_REFERENCE_MARKS
Change-Id: I1bf84c5aebe84ee034ac27932fa8a01d0a3ae831
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97964
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
(cherry picked from commit b461894caf90201fe4305e90dbd91bcdda01c7f5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97975
Tested-by: Jenkins
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 693aaceda87e..2211057458e0 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -434,6 +434,25 @@ ReferenceMark ScInputHandler::GetReferenceMark( ScViewData& rViewData, ScDocShel
{
ScSplitPos eWhich = rViewData.GetActivePart();
+ // This method is LOK specific.
+ if (comphelper::LibreOfficeKit::isCompatFlagSet(
+ comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
+ {
+ SCCOL nCol1 = nX1, nCol2 = nX2;
+ SCROW nRow1 = nY1, nRow2 = nY2;
+ PutInOrder(nCol1, nCol2);
+ PutInOrder(nRow1, nRow2);
+ if (nCol1 == nCol2 && nRow1 == nRow2)
+ pDocSh->GetDocument().ExtendMerge(nCol1, nRow1, nCol2, nRow2, nTab);
+
+ Point aTopLeft = rViewData.GetPrintTwipsPos(nCol1, nRow1);
+ Point aBottomRight = rViewData.GetPrintTwipsPos(nCol2 + 1, nRow2 + 1);
+ long nSizeX = aBottomRight.X() - aTopLeft.X() - 1;
+ long nSizeY = aBottomRight.Y() - aTopLeft.Y() - 1;
+
+ return ReferenceMark(aTopLeft.X(), aTopLeft.Y(), nSizeX, nSizeY, nTab, rColor);
+ }
+
Point aScrPos = rViewData.GetScrPos( nX1, nY1, eWhich );
long nScrX = aScrPos.X();
long nScrY = aScrPos.Y();
More information about the Libreoffice-commits
mailing list