summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx2
-rw-r--r--sw/source/core/txtnode/txtedt.cxx9
2 files changed, 9 insertions, 2 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 14f87719a334..514efdfc1c84 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -105,7 +105,7 @@ typedef std::vector<SwTextAttr*> SwpHts;
pNd->GetpSwpHints()->Check(true); }
#define CHECK_SWPHINTS_IF_FRM(pNd) { if( pNd->GetpSwpHints() && \
!pNd->GetDoc()->IsInReading() ) \
- pNd->GetpSwpHints()->Check(getLayoutFrame(nullptr, nullptr, nullptr, false) != nullptr); }
+ pNd->GetpSwpHints()->Check(getLayoutFrame(nullptr, nullptr, nullptr) != nullptr); }
#else
#define CHECK_SWPHINTS(pNd)
#define CHECK_SWPHINTS_IF_FRM(pNd)
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index bbd4ccc268fd..d6847e65bf1d 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1658,9 +1658,16 @@ bool SwTextNode::Hyphenate( SwInterHyphInfo &rHyphInf )
SwTextFrame *pFrame = ::sw::SwHyphIterCacheLastTextFrame(this,
[&rHyphInf, this]() {
+ std::pair<Point, bool> tmp;
+ Point const*const pPoint = rHyphInf.GetCursorPos();
+ if (pPoint)
+ {
+ tmp.first = *pPoint;
+ tmp.second = true;
+ }
return static_cast<SwTextFrame*>(this->getLayoutFrame(
this->GetDoc()->getIDocumentLayoutAccess().GetCurrentLayout(),
- rHyphInf.GetCursorPos()));
+ nullptr, pPoint ? &tmp : nullptr));
});
if (!pFrame)
{