[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source
Oliver-Rainer Wittmann
orw at apache.org
Sat Mar 22 07:35:23 PDT 2014
sw/source/core/text/inftxt.hxx | 1 -
sw/source/core/text/portxt.cxx | 10 ++++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
New commits:
commit 835b0bec8d6b20382dd665ea8806de474602f0d0
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date: Mon Jan 20 10:57:12 2014 +0000
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 at collabora.com>
Change-Id: If5664a5260e683cd5a80885b3f39b04f85de8db9
diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
index d4f19dd..2127221 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 6d6c94a..68a290bd 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 );
+ }
}
}
More information about the Libreoffice-commits
mailing list