summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-02-06 12:12:02 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-02-09 08:12:12 +0100
commit1b15f4863e6d4b0a280ccd61713cbb1209ffe33e (patch)
tree6bf9d6bda69b9d8593fa0d4639f8110a0191b38c /sw
parent17be6dab4a349944448e06a2b71df312899b3351 (diff)
LOK: add LOK_CALLBACK_TEXT_SELECTION and implement it in sw
Change-Id: I31662cb06add0d1a1c517b5f5416703aeaae1e77
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/crsr/viscrs.cxx14
-rw-r--r--sw/source/core/layout/trvlfrm.cxx6
2 files changed, 19 insertions, 1 deletions
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index bb8f6d6571e4..6d7a96143cf8 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -314,6 +314,20 @@ void SwSelPaintRects::Show()
}
}
+ if (GetShell()->isTiledRendering())
+ {
+ std::stringstream ss;
+ for (size_type i = 0; i < size(); ++i)
+ {
+ const SwRect& rRect = (*this)[i];
+ if (i)
+ ss << "; ";
+ ss << rRect.Width() << ", " << rRect.Height() << ", " << rRect.Left() << ", " << rRect.Top();
+ }
+ OString sRect = ss.str().c_str();
+ GetShell()->libreOfficeKitCallback(LOK_CALLBACK_TEXT_SELECTION, sRect.getStr());
+ }
+
HighlightInputFld();
#else
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index d2f9418ff374..1bb917681767 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -2007,8 +2007,12 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr)
SwViewShell *pSh = GetCurrShell();
+ bool bIgnoreVisArea = false;
+ if (pSh)
+ bIgnoreVisArea = pSh->GetViewOptions()->IsPDFExport() || pSh->isTiledRendering();
+
// #i12836# enhanced pdf
- SwRegionRects aRegion( pSh && !pSh->GetViewOptions()->IsPDFExport() ?
+ SwRegionRects aRegion( !bIgnoreVisArea ?
pSh->VisArea() :
Frm() );
if( !pStartPos->nNode.GetNode().IsCntntNode() ||