diff options
author | Kurt Zenker <kz@openoffice.org> | 2010-04-09 12:25:34 +0200 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2010-04-09 12:25:34 +0200 |
commit | 1ec9190b448dc0c2021c7a1ed76d2c8259cb1b48 (patch) | |
tree | 04213d271d2db7b12d2455f3f29a7a369b4a67eb | |
parent | 18b027774603bb06f367ff3886b4f03751521059 (diff) | |
parent | b894cce26ef21644c7570b89174b21f2cd1913b5 (diff) |
CWS-TOOLING: integrate CWS sw321bf01ooo/OOO320_m15
-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 | ||||
-rw-r--r-- | sw/source/filter/rtf/wrtrtf.cxx | 11 |
5 files changed, 26 insertions, 4 deletions
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index f80b0a3780..41ab9a4c81 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -276,6 +276,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() ), @@ -373,7 +374,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; @@ -400,6 +401,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 c3c36a2b3e..a9f48b928b 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -208,6 +208,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 @@ -251,6 +253,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 e093585c3a..600ba83119 100644 --- a/sw/source/core/text/itrform2.cxx +++ b/sw/source/core/text/itrform2.cxx @@ -348,6 +348,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() ); @@ -1532,6 +1534,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 654598dc6f..551ca43cc2 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -392,12 +392,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() && diff --git a/sw/source/filter/rtf/wrtrtf.cxx b/sw/source/filter/rtf/wrtrtf.cxx index c0462fa6a6..a6723db599 100644 --- a/sw/source/filter/rtf/wrtrtf.cxx +++ b/sw/source/filter/rtf/wrtrtf.cxx @@ -88,6 +88,7 @@ const sal_Char SwRTFWriter::sNewLine = '\012'; const sal_Char __FAR_DATA SwRTFWriter::sNewLine[] = "\015\012"; #endif +static ::rtl::OUString aEmpty; SV_DECL_VARARR( RTFColorTbl, Color, 5, 8 ) @@ -1302,8 +1303,16 @@ void SwRTFWriter::OutBookmarks( xub_StrLen nCntntPos) Strm() << '}'; } OutComment( *this, OOO_STRING_SVTOOLS_RTF_BKMKEND ) << ' '; - RTFOutFuncs::Out_String( Strm(), pAsBookmark->GetName(), + + { + ::rtl::OUString & rBookmarkName = aEmpty; + + if (pAsBookmark) + rBookmarkName = pAsBookmark->GetName(); + + RTFOutFuncs::Out_String( Strm(), rBookmarkName, eDefaultEncoding, bWriteHelpFmt ) << '}'; + } if(++nBkmkTabPos >= pMarkAccess->getMarksCount()) nBkmkTabPos = -1; |