sw/source/core/crsr/bookmrk.cxx | 4 +++- sw/source/filter/ww8/wrtw8nds.cxx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)
New commits: commit f4f526e08cfe9f938aa3422da80dc60f2e1ec3da Author: Caolán McNamara <caol...@redhat.com> Date: Wed May 9 13:20:01 2012 +0100 Resolves: fdo#38071 improve multi-line form field text ranges Change-Id: I40d32a34499661de562ae2160193ccf5e41d9465 diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index bd5c50f..b177ee1 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 1ce0245..13384b7 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 );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits