diff options
author | Oliver-Rainer Wittmann <od@openoffice.org> | 2010-03-16 09:54:03 +0100 |
---|---|---|
committer | Oliver-Rainer Wittmann <od@openoffice.org> | 2010-03-16 09:54:03 +0100 |
commit | c4e6396b898fcfc25349d6bc1a07a0084b87350a (patch) | |
tree | 60df8ef83cf1ff0cf3c9925166a75b1ab161c5d1 | |
parent | 1a2be44bde6fb06eae9ffb4afb8d303e965efe32 (diff) |
sw321bf01: #b6921213# - No keep of footnote portion with previous portion, if text line only contains footnote portions
-rw-r--r-- | sw/source/core/text/inftxt.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/inftxt.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/text/itrform2.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/text/portxt.cxx | 8 |
4 files changed, 16 insertions, 3 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index b27a551ff7..5fb9991d5f 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -279,6 +279,7 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew ) bURLNotify( rNew.URLNotify() ), bStopUnderFlow( rNew.StopUnderFlow() ), bFtnInside( rNew.IsFtnInside() ), + bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ), bMulti( rNew.IsMulti() ), bFirstMulti( rNew.IsFirstMulti() ), bRuby( rNew.IsRuby() ), @@ -376,7 +377,7 @@ void SwTxtSizeInfo::CtorInitTxtSizeInfo( SwTxtFrm *pFrame, SwFont *pNewFnt, nIdx = nNewIdx; nLen = nNewLen; bNotEOL = sal_False; - bStopUnderFlow = bFtnInside = sal_False; + bStopUnderFlow = bFtnInside = bOtherThanFtnInside = sal_False; bMulti = bFirstMulti = bRuby = bHanging = bScriptSpace = bForbiddenChars = sal_False; @@ -403,6 +404,7 @@ SwTxtSizeInfo::SwTxtSizeInfo( const SwTxtSizeInfo &rNew, const XubString &rTxt, bURLNotify( rNew.URLNotify() ), bStopUnderFlow( rNew.StopUnderFlow() ), bFtnInside( rNew.IsFtnInside() ), + bOtherThanFtnInside( rNew.IsOtherThanFtnInside() ), bMulti( rNew.IsMulti() ), bFirstMulti( rNew.IsFirstMulti() ), bRuby( rNew.IsRuby() ), diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index 450bb16947..412af3e3d5 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -211,6 +211,8 @@ protected: sal_Bool bURLNotify : 1; sal_Bool bStopUnderFlow : 1;// Underflow gestoppt z.B. von einer FlyPortion sal_Bool bFtnInside : 1; // the current line contains a footnote + sal_Bool bOtherThanFtnInside : 1; // the current line contains another portion than a footnote portion. + // needed for checking keep together of footnote portion with previous portion sal_Bool bMulti : 1; // inside a multiportion sal_Bool bFirstMulti : 1; // this flag is used for two purposes: // - the multiportion is the first lineportion @@ -254,6 +256,8 @@ public: inline void SetStopUnderFlow( const sal_Bool bNew ) { bStopUnderFlow = bNew; } inline sal_Bool IsFtnInside() const { return bFtnInside; } inline void SetFtnInside( const sal_Bool bNew ) { bFtnInside = bNew; } + inline sal_Bool IsOtherThanFtnInside() const { return bOtherThanFtnInside; } + inline void SetOtherThanFtnInside( const sal_Bool bNew ) { bOtherThanFtnInside = bNew; } inline sal_Bool IsMulti() const { return bMulti; } inline void SetMulti( const sal_Bool bNew ) { bMulti = bNew; } inline sal_Bool IsFirstMulti() const { return bFirstMulti; } diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx index 57dacd703a..f14b78a8fb 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -351,6 +351,8 @@ void SwTxtFormatter::InsertPortion( SwTxtFormatInfo &rInf, } pLast->Insert( pPor ); + rInf.SetOtherThanFtnInside( rInf.IsOtherThanFtnInside() || !pPor->IsFtnPortion() ); + // Maxima anpassen: if( pCurr->Height() < pPor->Height() ) pCurr->Height( pPor->Height() ); @@ -1535,6 +1537,7 @@ xub_StrLen SwTxtFormatter::FormatLine( const xub_StrLen nStartPos ) while( bBuild ) { GetInfo().SetFtnInside( sal_False ); + GetInfo().SetOtherThanFtnInside( sal_False ); // These values must not be reset by FormatReset(); sal_Bool bOldNumDone = GetInfo().IsNumDone(); diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 6eeb5492e2..5447cc6a42 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -395,12 +395,16 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf ) } // case C1 // - Footnote portions with fake line start (i.e., not at beginning of line) - // should keep together with the text portion. + // should keep together with the text portion. (Note: no keep together + // with only footnote portions. // - TabPortions not at beginning of line should keep together with the // text portion, if they are not followed by a blank // (work around different definition of tab stop character - breaking or // non breaking character - in compatibility mode) - else if ( ( IsFtnPortion() && rInf.IsFakeLineStart() ) || + else if ( ( IsFtnPortion() && rInf.IsFakeLineStart() && + // --> OD 2010-01-29 #b6921213# + rInf.IsOtherThanFtnInside() ) || + // <-- ( rInf.GetLast() && rInf.GetTxtFrm()->GetTxtNode()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::TAB_COMPAT) && rInf.GetLast()->InTabGrp() && |