[Libreoffice-commits] core.git: sw/source
Caolán McNamara
caolanm at redhat.com
Fri Mar 20 07:49:51 PDT 2015
sw/source/core/text/txtfrm.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit a5a625a6e69d27f93c0d1fe4123869629930d2b8
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Mar 20 14:47:58 2015 +0000
fix assert on loading ooo74082-1.doc
Change-Id: I9ae582e0937c02483d317da4dce201889eb24273
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 43947ed..11eb66c 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -520,9 +520,9 @@ bool sw_HideObj( const SwTxtFrm& _rFrm,
pIDSA->get(DocumentSettingId::CONSIDER_WRAP_ON_OBJECT_POSITION) &&
_rFrm.IsInDocBody() && !_rFrm.FindNextCnt() )
{
- const sal_Unicode cAnchorChar =
- _rFrm.GetTxtNode()->GetTxt()[_nObjAnchorPos];
- if ( cAnchorChar == CH_TXTATR_BREAKWORD )
+ const OUString &rStr = _rFrm.GetTxtNode()->GetTxt();
+ const sal_Unicode cAnchorChar = _nObjAnchorPos < rStr.getLength() ? rStr[_nObjAnchorPos] : 0;
+ if (cAnchorChar == CH_TXTATR_BREAKWORD)
{
const SwTxtAttr* const pHint(
_rFrm.GetTxtNode()->GetTxtAttrForCharAt(_nObjAnchorPos,
More information about the Libreoffice-commits
mailing list