diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2014-01-20 10:57:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-20 13:32:15 +0000 |
commit | 6789e6de929c7685cf1573170534891aeffe5fa1 (patch) | |
tree | ec19c9b816a467a005bfe7a2a626b790adfa4b7e | |
parent | 062e6f76ba26d2c0a54a476a1168202bae2322a7 (diff) |
Resolves: #i124039# assure correct line break for multi-lined Input Fields
(cherry picked from commit 14e0270c3ebad9a1fb817fcfced2aa8ee2f3e3f0)
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 b6e40b75ed4d..3ce3972a1d0e 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -594,7 +594,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 50767f1418f6..bab1eb838b2a 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 ); + } } } |