From eabf8c9d7cd4f1fe7422c140ed6c9ae21f9737a3 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 18 May 2018 18:45:04 +0200 Subject: sw_redlinehide: trivial conversions in doc.cxx,doctxm.cxx Change-Id: Ic8737c8d06ca7d43241b39f4ad60d78eedcb42bb --- sw/source/core/doc/doc.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw/source/core/doc/doc.cxx') diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx index 68a33ab447bf..19ca7d3a3244 100644 --- a/sw/source/core/doc/doc.cxx +++ b/sw/source/core/doc/doc.cxx @@ -518,10 +518,11 @@ sal_uInt16 PostItField_::GetPageNo( //Probably only once. For the page number we don't select a random one, //but the PostIt's first occurrence in the selected area. rVirtPgNo = 0; - const sal_Int32 nPos = GetContent(); SwIterator aIter( GetTextField()->GetTextNode() ); for( SwTextFrame* pFrame = aIter.First(); pFrame; pFrame = aIter.Next() ) { + TextFrameIndex const nPos = pFrame->MapModelToView( + &GetTextField()->GetTextNode(), GetContent()); if( pFrame->GetOfst() > nPos || (pFrame->HasFollow() && pFrame->GetFollow()->GetOfst() <= nPos) ) continue; -- cgit v1.2.3