diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-27 13:51:16 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-27 13:51:16 +0100 |
commit | 80cde3fce610d599e28a33d8ec6f06cf268be4d1 (patch) | |
tree | b43b0965faaba2eff91164c9003aa7261c318e3e /sw | |
parent | 6adbd7aec7e0a5dc76ee62ba91ba4660c3896290 (diff) | |
parent | b4f7e86a37f4a542e2f5e16a09d10fb53e2b8b5b (diff) |
CWS-TOOLING: integrate CWS dba33d
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/table/swtable.cxx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index df3fdf29f9..2b67b2c1f0 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -50,6 +50,8 @@ #include <fmtfsize.hxx> #include <fmtornt.hxx> #include <fmtpdsc.hxx> +#include <fldbas.hxx> +#include <fmtfld.hxx> #include <frmatr.hxx> #include <doc.hxx> #include <docary.hxx> // fuer RedlineTbl() @@ -101,6 +103,8 @@ SV_IMPL_REF( SwServerObject ) #define COLFUZZY 20 +void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol, + BOOL bChgAlign,ULONG nNdPos ); //---------------------------------- class SwTableBox_Impl @@ -2087,11 +2091,16 @@ void SwTable::SetHTMLTableLayout( SwHTMLTableLayout *p ) pHTMLLayout = p; } - void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol, BOOL bChgAlign ) { ULONG nNdPos = rBox.IsValidNumTxtNd( TRUE ); + ChgTextToNum( rBox,rTxt,pCol,bChgAlign,nNdPos); +} +void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol, + BOOL bChgAlign,ULONG nNdPos ) +{ + if( ULONG_MAX != nNdPos ) { SwDoc* pDoc = rBox.GetFrmFmt()->GetDoc(); @@ -2159,6 +2168,8 @@ void ChgTextToNum( SwTableBox& rBox, const String& rTxt, const Color* pCol, for( n = 0; n < rOrig.Len() && '\x9' == rOrig.GetChar( n ); ++n ) ; + for( ; n < rOrig.Len() && '\x01' == rOrig.GetChar( n ); ++n ) + ; SwIndex aIdx( pTNd, n ); for( n = rOrig.Len(); n && '\x9' == rOrig.GetChar( --n ); ) ; @@ -2637,6 +2648,14 @@ ULONG SwTableBox::IsValidNumTxtNd( BOOL bCheckAttr ) const *pAttr->GetStart() || *pAttr->GetAnyEnd() < rTxt.Len() ) { + if ( pAttr->Which() == RES_TXTATR_FIELD ) + { + const SwField* pField = pAttr->GetFld().GetFld(); + if ( pField && pField->GetTypeId() == TYP_SETFLD ) + { + continue; + } + } nPos = ULONG_MAX; break; } @@ -2691,7 +2710,7 @@ void SwTableBox::ActualiseValueBox() const String& rTxt = pSttNd->GetNodes()[ nNdPos ]->GetTxtNode()->GetTxt(); if( rTxt != sNewTxt ) - ChgTextToNum( *this, sNewTxt, pCol, FALSE ); + ChgTextToNum( *this, sNewTxt, pCol, FALSE ,nNdPos); } } } |