diff options
author | Oliver-Rainer Wittmann <orw@apache.org> | 2014-01-20 10:57:12 +0000 |
---|---|---|
committer | Oliver-Rainer Wittmann <orw@apache.org> | 2014-01-20 10:57:12 +0000 |
commit | 14e0270c3ebad9a1fb817fcfced2aa8ee2f3e3f0 (patch) | |
tree | e59cdbf01e86dc0449f1cc501c98749e20b610b2 /sw | |
parent | 6e2c0fef5906a0b48384b21fda6f63e7485ce00d (diff) |
124039: <SwTxtInputFldPortion::Format(..)> - assure correct line break for multi-lined Input Fields
Notes
Notes:
merged as: 6789e6de929c7685cf1573170534891aeffe5fa1
Diffstat (limited to 'sw')
-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 3594f3d84f65..11f3a2198364 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -608,7 +608,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 487ebf307157..f881fe368dc5 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -747,6 +747,12 @@ sal_Bool SwTxtInputFldPortion::Format( SwTxtFormatInfo &rInf ) } else { + const xub_StrLen nFormerLineStart = rInf.GetLineStart(); + if ( !mbContainsInputFieldStart ) + { + rInf.SetLineStart( 0 ); + } + bRet = SwTxtPortion::Format( rInf ); if ( mbContainsInputFieldEnd ) @@ -763,6 +769,10 @@ sal_Bool SwTxtInputFldPortion::Format( SwTxtFormatInfo &rInf ) // adjust portion length accordingly SetLen( GetLen() + 1 ); } + else + { + rInf.SetLineStart( nFormerLineStart ); + } } } |