diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-02-14 23:34:16 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-02-15 22:43:11 +0100 |
commit | 447bb5b5006051672ec526b75bec7db02d2db82e (patch) | |
tree | fda6ea5dcd79ecc2f918da939ba0b55b4f6f6a6e /sw | |
parent | 5a80c24b145c8efe0dd384ef88e7d31173522fb8 (diff) |
SwDoc::Overwrite: probably a bad idea to overwrite fieldmarks
Change-Id: Iba94df67c21514cf4f5361bab28629c6d5d9d3e8
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docedt.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 4ec41acde507..8859efb0373c 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -131,8 +131,18 @@ typedef boost::ptr_vector< _SaveRedline > _SaveRedlines; static bool lcl_MayOverwrite( const SwTxtNode *pNode, const xub_StrLen nPos ) { sal_Unicode cChr = pNode->GetTxt().GetChar( nPos ); - return !( ( CH_TXTATR_BREAKWORD == cChr || CH_TXTATR_INWORD == cChr ) && - (0 != pNode->GetTxtAttrForCharAt( nPos ) ) ); + switch (cChr) + { + case CH_TXTATR_BREAKWORD: + case CH_TXTATR_INWORD: + return !pNode->GetTxtAttrForCharAt(nPos);// how could there be none? + case CH_TXT_ATR_FIELDSTART: + case CH_TXT_ATR_FIELDEND: + case CH_TXT_ATR_FORMELEMENT: + return false; + default: + return true; + } } static void lcl_SkipAttr( const SwTxtNode *pNode, SwIndex &rIdx, xub_StrLen &rStart ) |