diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2014-01-20 10:57:12 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-03-22 15:47:48 +0100 |
commit | 835b0bec8d6b20382dd665ea8806de474602f0d0 (patch) | |
tree | a5641b01348e439b93806c2479bc2cb2207b6fd2 | |
parent | e7baa6fe82c9d4f8bc6841f82f04088e664dda08 (diff) |
fdo#76235 #i124039# assure correct line break for multi-lined Input Fields
(cherry picked from commit 14e0270c3ebad9a1fb817fcfced2aa8ee2f3e3f0)
(cherry picked from commit 6789e6de929c7685cf1573170534891aeffe5fa1)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: If5664a5260e683cd5a80885b3f39b04f85de8db9
-rw-r--r-- | sw/source/core/text/inftxt.hxx | 1 | ||||
-rw-r--r-- | sw/source/core/text/portxt.cxx | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index d4f19dd363d1..2127221d8a84 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -597,7 +597,6 @@ public: inline void Right( const SwTwips nNew ) { nRight = nNew; } inline SwTwips First() const { return nFirst; } inline void First( const SwTwips nNew ) { nFirst = nNew; } - inline SwTwips CurrLeft() const { return (nLineStart ? nLeft : nFirst); } inline KSHORT RealWidth() const { return nRealWidth; } inline void RealWidth( const KSHORT nNew ) { nRealWidth = nNew; } inline KSHORT ForcedLeftMargin() const { return nForcedLeftMargin; } diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 6d6c94a960ba..68a290bd4e17 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -733,6 +733,12 @@ sal_Bool SwTxtInputFldPortion::Format( SwTxtFormatInfo &rInf ) } else { + const sal_Int32 nFormerLineStart = rInf.GetLineStart(); + if ( !mbContainsInputFieldStart ) + { + rInf.SetLineStart( 0 ); + } + bRet = SwTxtPortion::Format( rInf ); if ( mbContainsInputFieldEnd ) @@ -749,6 +755,10 @@ sal_Bool SwTxtInputFldPortion::Format( SwTxtFormatInfo &rInf ) // adjust portion length accordingly SetLen( GetLen() + 1 ); } + else + { + rInf.SetLineStart( nFormerLineStart ); + } } } |