summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-08-04 08:50:57 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-08-04 14:35:47 +0000
commit5703c3bdf1f4b60067207993f9f42430d9901e1c (patch)
treef2c7fc3060c78d0c39ee88bbabcb2d77f0a0c33d
parent4fcb04ba5a127cd960ec65fc7788a51b13d3e036 (diff)
Resolves: tdf#101269 cannot click/edit text inside a frame
regression from... commit b0c0a074a2318a231f3f635784da494f1b713c53 Date: Mon Apr 18 11:03:43 2016 +0200 clang-tidy clang-analyzer-deadcode.DeadStores suspect that some of these may reveal latent bugs.... and restore method then removed by commit 47f62540bd2c2f107313bb0c6f141cd4460b6379 Date: Thu May 19 10:31:47 2016 +0200 loplugin:unusedmethods in sw Change-Id: I14826eecadbc1a74e408f8907eea8746debe4db4 (cherry picked from commit 24c009de4d6d27233027e9bcd86ea181d230be8f) pPos can never be null Change-Id: Ib7b57d628fbd80a1d2214917cd439e09d4803d91 (cherry picked from commit 2702796806cae2b28ae78e78d29c3559bf97607e) SwLinePortion::GetCursorOfst is const and its ret is ignored here so nOfst is unnecessary Change-Id: I27f73057b55ebdf30eb69a19ee1b0647ba25583e (cherry picked from commit 35f4248206e844cabd83757ec57ddde1c2ef66b4) only called if !bDraw Change-Id: I7310b5f8cbbc4176e76d92ce2bcd49168470843c (cherry picked from commit cc7a55450658696009fe01e94632e80bb3785d5b) the sole caller is ok with rPoint being modified, so change to non-const arg Change-Id: I40a24502e2e8ad312e13e0c47ee1fde3118d2251 (cherry picked from commit 2b3112b30a8dea8a009c11ddb209e12697f72e32) Reviewed-on: https://gerrit.libreoffice.org/27865 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/source/core/text/itrcrsr.cxx1
-rw-r--r--sw/source/core/text/porfly.cxx5
-rw-r--r--sw/source/core/text/porfly.hxx1
3 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx
index 3f8acaa4fb91..b6f9928b5fe0 100644
--- a/sw/source/core/text/itrcrsr.cxx
+++ b/sw/source/core/text/itrcrsr.cxx
@@ -1713,6 +1713,7 @@ sal_Int32 SwTextCursor::GetCursorOfst( SwPosition *pPos, const Point &rPoint,
if( bChgNodeInner && pTmp->Frame().IsInside( aTmpPoint ) &&
!( pTmp->IsProtected() ) )
{
+ static_cast<SwFlyCntPortion*>(pPor)->GetFlyCursorOfst(aTmpPoint, *pPos, pCMS);
// After a change of the frame, our font must be still
// available for/in the OutputDevice.
// For comparison: Paint and new SwFlyCntPortion !
diff --git a/sw/source/core/text/porfly.cxx b/sw/source/core/text/porfly.cxx
index 0eca9ca5ace0..e38e99ddbd87 100644
--- a/sw/source/core/text/porfly.cxx
+++ b/sw/source/core/text/porfly.cxx
@@ -414,6 +414,11 @@ void SwFlyCntPortion::SetBase( const SwTextFrame& rFrame, const Point &rBase,
}
}
+void SwFlyCntPortion::GetFlyCursorOfst(Point &rPoint, SwPosition &rPos, SwCursorMoveState* pCMS) const
+{
+ GetFlyFrame()->GetCursorOfst(&rPos, rPoint, pCMS);
+}
+
sal_Int32 SwFlyCntPortion::GetCursorOfst( const sal_uInt16 nOfst ) const
{
// OSL_FAIL("SwFlyCntPortion::GetCursorOfst: use GetFlyCursorOfst()");
diff --git a/sw/source/core/text/porfly.hxx b/sw/source/core/text/porfly.hxx
index 417c347fd68d..129bf39e8b2f 100644
--- a/sw/source/core/text/porfly.hxx
+++ b/sw/source/core/text/porfly.hxx
@@ -79,6 +79,7 @@ public:
long nLnAscent, long nLnDescent,
long nFlyAscent, long nFlyDescent,
AsCharFlags nFlags );
+ void GetFlyCursorOfst(Point &rPoint, SwPosition& rPos, SwCursorMoveState* pCMS) const;
virtual bool Format( SwTextFormatInfo &rInf ) override;
virtual void Paint( const SwTextPaintInfo &rInf ) const override;
OUTPUT_OPERATOR_OVERRIDE