diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-09-04 09:22:32 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-09-04 09:22:32 +0000 |
commit | 4126104867709da30b1a8391b4345688084eace7 (patch) | |
tree | 94f92e01ba6facefe4262cd8cb508e6b8a51235b | |
parent | e5d875dbad4e42f0dba375c4f865787902a5d9a9 (diff) |
INTEGRATION: CWS swenhancedfields2 (1.57.232); FILE MERGED
2008/08/07 11:51:12 b_michaelsen 1.57.232.3: fixed formatting in trvlfrm.cxx portxt.cxx portxt.hxx swfont.cxx unobkm.cxx unocoll.cxx amd unoportenum.cxx
2008/08/04 14:17:02 b_michaelsen 1.57.232.2: RESYNC: (1.57-1.58); FILE MERGED
2008/04/23 14:29:19 ama 1.57.232.1: #i33737#: Enhanced fields
-rw-r--r-- | sw/source/core/txtnode/swfont.cxx | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx index d922b03f8790..8efc0795a6b9 100644 --- a/sw/source/core/txtnode/swfont.cxx +++ b/sw/source/core/txtnode/swfont.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: swfont.cxx,v $ - * $Revision: 1.58 $ + * $Revision: 1.59 $ * * This file is part of OpenOffice.org. * @@ -795,6 +795,31 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf ) } } + if (1==rInf.GetLen() && CH_TXT_ATR_FIELDSTART==rInf.GetText().GetChar(rInf.GetIdx())) + { + xub_StrLen nOldIdx(rInf.GetIdx()); + xub_StrLen nOldLen(rInf.GetLen()); + String aNewText=String::CreateFromAscii(CH_TXT_ATR_SUBST_FIELDSTART); + rInf.SetText( aNewText ); + rInf.SetIdx( 0 ); + rInf.SetLen( aNewText.Len() ); + aTxtSize = pLastFont->GetTextSize( rInf ); + rInf.SetIdx( nOldIdx ); + rInf.SetLen( nOldLen ); + } + else if (1==rInf.GetLen() && CH_TXT_ATR_FIELDEND==rInf.GetText().GetChar(rInf.GetIdx())) + { + xub_StrLen nOldIdx(rInf.GetIdx()); + xub_StrLen nOldLen(rInf.GetLen()); + String aNewText=String::CreateFromAscii(CH_TXT_ATR_SUBST_FIELDEND); + rInf.SetText( aNewText ); + rInf.SetIdx( 0 ); + rInf.SetLen( aNewText.Len() ); + aTxtSize = pLastFont->GetTextSize( rInf ); + rInf.SetIdx( nOldIdx ); + rInf.SetLen( nOldLen ); + } + return aTxtSize; } |