summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-05-25 14:04:33 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2018-06-14 16:19:00 +0200
commitbf5fadd6659a25d93b5ac45b78c371c9224f234d (patch)
treeda32d7ba734b9710ea41b986383ae0b1577d1976 /sw/inc
parentc72751b1633f7523f12cdb3aa35153e1d60ebb45 (diff)
sw_redlinehide: hyphenation
There's a loop over nodes, calling SwTextNode::Hyphenate() each time. Introduce a new class SwInterHyphInfoTextFrame that is used in the SwTextFrame functions, and SwTextNode::Hyphenate() converts between the 2 types. Not sure if this will hyphenate a word that is split across nodes in the model, but perhaps this is good enough in practice. Change-Id: I78dec370e15c372284c934d9658b2dd5b3b97ae0
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/splargs.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/inc/splargs.hxx b/sw/inc/splargs.hxx
index 11b39a10fa3a..efd4c33e6352 100644
--- a/sw/inc/splargs.hxx
+++ b/sw/inc/splargs.hxx
@@ -109,11 +109,15 @@ struct SwSpellArgs : SwArgsBase
class SwInterHyphInfo
{
- css::uno::Reference< css::linguistic2::XHyphenatedWord > xHyphWord;
+ /// output: hyphenated word
+ css::uno::Reference<css::linguistic2::XHyphenatedWord> xHyphWord;
+ /// input: cursor point to locate the frame
const Point aCursorPos;
public:
+ /// input: requested range to hyphenate
sal_Int32 nStart;
sal_Int32 nEnd;
+ /// output: found word
sal_Int32 nWordStart;
sal_Int32 nWordLen;
@@ -124,10 +128,6 @@ public:
, nWordStart(0), nWordLen(0)
{
}
- sal_Int32 GetEnd() const
- {
- return nEnd;
- }
const Point *GetCursorPos() const
{
return aCursorPos.X() || aCursorPos.Y() ? &aCursorPos : nullptr;