diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-05-09 13:20:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-05-09 13:20:43 +0100 |
commit | f4f526e08cfe9f938aa3422da80dc60f2e1ec3da (patch) | |
tree | 769e0b77bf41d09bca0baac227d69fb995d94690 /sw | |
parent | 01d3f16e2a4c540b65368a1a94248e324f1d0f73 (diff) |
Resolves: fdo#38071 improve multi-line form field text ranges
Change-Id: I40d32a34499661de562ae2160193ccf5e41d9465
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/crsr/bookmrk.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8nds.cxx | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index bd5c50fc89a2..b177ee145871 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -118,9 +118,11 @@ namespace sw { namespace mark } } + //We consider the CH_TXT_ATR_FIELDSTART and CH_TXT_ATR_FIELDEND + //themselves to be part of the covered range bool MarkBase::IsCoveringPosition(const SwPosition& rPos) const { - return GetMarkStart() <= rPos && rPos < GetMarkEnd(); + return rPos >= GetMarkStart() && rPos <= GetMarkEnd(); } void MarkBase::SetMarkPos(const SwPosition& rNewPos) diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index 1ce02452e5db..13384b788b13 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -1880,8 +1880,9 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode ) } else if ( ch == CH_TXT_ATR_FIELDEND ) { - SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos - 1 ) ); + SwPosition aPosition( rNode, SwIndex( const_cast< SwTxtNode* >( &rNode ), nAktPos ) ); ::sw::mark::IFieldmark const * const pFieldmark = pMarkAccess->getFieldmarkFor( aPosition ); + OSL_ENSURE( pFieldmark, "Looks like this doc is broken...; where is the Fieldmark for the FIELDEND??" ); ww::eField eFieldId = lcl_getFieldId( pFieldmark ); |