summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-09-04 09:21:00 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-09-04 09:21:00 +0000
commit1c4ddcc4fa6a45eaafed008a0590c01f0c2e0148 (patch)
tree73465449fca07a64534eb5d42e574b839a062283
parent699765b8482d4add3533306bcfd753943f511580 (diff)
INTEGRATION: CWS swenhancedfields2 (1.104.22); FILE MERGED
2008/08/04 14:17:14 b_michaelsen 1.104.22.2: RESYNC: (1.104-1.106); FILE MERGED 2008/04/23 14:29:18 ama 1.104.22.1: #i33737#: Enhanced fields
-rw-r--r--sw/source/core/text/itrform2.cxx29
1 files changed, 20 insertions, 9 deletions
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 0547fda703..40e5c075e9 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: itrform2.cxx,v $
- * $Revision: 1.106 $
+ * $Revision: 1.107 $
*
* This file is part of OpenOffice.org.
*
@@ -836,15 +836,26 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
{
// Erst zum Schluss !
// Wenn pCurr keine Breite hat, kann sie trotzdem schon Inhalt haben,
- // z.B. bei nicht darstellbaren Zeichen.
- if( !rInf.X() && !pCurr->GetPortion() && !pCurr->GetLen() &&
- !GetFnt()->IsURL() )
- pPor = pCurr;
- else
+ // z.B. bei nicht darstellbaren Zeichen.
+ if( rInf.GetLen() > 0 )
+ {
+ if( rInf.GetTxt().GetChar(rInf.GetIdx())==CH_TXT_ATR_FIELDSTART )
+ pPor = new SwFieldMarkPortion();
+ else if( rInf.GetTxt().GetChar(rInf.GetIdx())==CH_TXT_ATR_FIELDEND )
+ pPor = new SwFieldMarkPortion();
+ else if( rInf.GetTxt().GetChar(rInf.GetIdx())==CH_TXT_ATR_FORMELEMENT )
+ pPor = new SwFieldFormPortion();
+ }
+ if( !pPor )
{
- pPor = new SwTxtPortion;
- if( GetFnt()->IsURL() )
- pPor->SetWhichPor( POR_URL );
+ if( !rInf.X() && !pCurr->GetPortion() && !pCurr->GetLen() && !GetFnt()->IsURL() )
+ pPor = pCurr;
+ else
+ {
+ pPor = new SwTxtPortion;
+ if( GetFnt()->IsURL() )
+ pPor->SetWhichPor( POR_URL );
+ }
}
}
}