summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-01 06:05:34 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-01 07:00:09 +0100
commit5271d78920dd4159025db6786a6f0568b7131a76 (patch)
tree1b0ad59c06b5f37f7ca064a0da9dbc371bafd637 /sc
parentece1af8c7f9f176b24ba976480518050af087e9e (diff)
coverity#736015: use of invalid iterator
Change-Id: Id72e6a2f9c11e72507a8c5c48f9627a1b529dd6f
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 6dd8f6a8f8de..be40bd82f2be 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -242,14 +242,14 @@ uno::Reference<XAccessible> ScNotesChildren::GetChild(sal_Int32 nIndex) const
if (aItr != aEndItr)
{
OSL_ENSURE((aItr->maNoteCell == maMarks[nIndex].maNoteCell) && (aItr->mbMarkNote == maMarks[nIndex].mbMarkNote), "wrong note found");
+ if (!aItr->mpTextHelper)
+ aItr->mpTextHelper = CreateTextHelper(maMarks[nIndex].maNoteText, maMarks[nIndex].maRect, maMarks[nIndex].maNoteCell, maMarks[nIndex].mbMarkNote, nIndex + mnOffset); // the marks are the first and every mark has only one paragraph
+ xAccessible = aItr->mpTextHelper->GetChild(aParaFound.mnIndex + aItr->mpTextHelper->GetStartIndex());
}
else
{
OSL_FAIL("wrong note found");
}
- if (!aItr->mpTextHelper)
- aItr->mpTextHelper = CreateTextHelper(maMarks[nIndex].maNoteText, maMarks[nIndex].maRect, maMarks[nIndex].maNoteCell, maMarks[nIndex].mbMarkNote, nIndex + mnOffset); // the marks are the first and every mark has only one paragraph
- xAccessible = aItr->mpTextHelper->GetChild(aParaFound.mnIndex + aItr->mpTextHelper->GetStartIndex());
}
else
{