openoffice-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From o..@apache.org
Subject svn commit: r1559666 - in /openoffice/trunk/main/sw/source/core/text: inftxt.hxx portxt.cxx
Date Mon, 20 Jan 2014 10:57:13 GMT
Author: orw
Date: Mon Jan 20 10:57:12 2014
New Revision: 1559666

URL: http://svn.apache.org/r1559666
Log:
124039: <SwTxtInputFldPortion::Format(..)> - assure correct line break for multi-lined
Input Fields


Modified:
    openoffice/trunk/main/sw/source/core/text/inftxt.hxx
    openoffice/trunk/main/sw/source/core/text/portxt.cxx

Modified: openoffice/trunk/main/sw/source/core/text/inftxt.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/text/inftxt.hxx?rev=1559666&r1=1559665&r2=1559666&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/text/inftxt.hxx (original)
+++ openoffice/trunk/main/sw/source/core/text/inftxt.hxx Mon Jan 20 10:57:12 2014
@@ -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; }

Modified: openoffice/trunk/main/sw/source/core/text/portxt.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/sw/source/core/text/portxt.cxx?rev=1559666&r1=1559665&r2=1559666&view=diff
==============================================================================
--- openoffice/trunk/main/sw/source/core/text/portxt.cxx (original)
+++ openoffice/trunk/main/sw/source/core/text/portxt.cxx Mon Jan 20 10:57:12 2014
@@ -747,6 +747,12 @@ sal_Bool SwTxtInputFldPortion::Format( S
         }
         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( S
                 // adjust portion length accordingly
                 SetLen( GetLen() + 1 );
             }
+            else
+            {
+                rInf.SetLineStart( nFormerLineStart );
+            }
         }
     }
 



Mime
View raw message