From e26b6a3a2e09bf3680b3b8d042435bddc34e0394 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 25 May 2018 14:04:33 +0200 Subject: 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 --- sw/inc/splargs.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sw/inc/splargs.hxx') 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 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; -- cgit