summaryrefslogtreecommitdiffstats
path: root/xmloff/source/text/txtparai.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text/txtparai.cxx')
-rw-r--r--xmloff/source/text/txtparai.cxx15
1 files changed, 10 insertions, 5 deletions
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 33a6a7b4db4f..a13f36a3f01d 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -1540,9 +1540,14 @@ XMLImpSpanContext_Impl::XMLImpSpanContext_Impl(
XMLImpSpanContext_Impl::~XMLImpSpanContext_Impl()
{
- if( pHint )
- pHint->SetEnd( GetImport().GetTextImport()
- ->GetCursorAsRange()->getStart() );
+ if (!pHint)
+ return;
+
+ Reference<XTextRange> xCrsrRange(GetImport().GetTextImport()->GetCursorAsRange());
+ if (!xCrsrRange.is())
+ return; // Robust (defective file)
+
+ pHint->SetEnd(xCrsrRange->getStart());
}
SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext(
@@ -1937,7 +1942,7 @@ XMLParaContext::~XMLParaContext()
GetImport().GetTextImport());
Reference < XTextRange > xCrsrRange( xTxtImport->GetCursorAsRange() );
if( !xCrsrRange.is() )
- return; // Robust (defect file)
+ return; // Robust (defective file)
Reference < XTextRange > xEnd(xCrsrRange->getStart());
// if we have an id set for this paragraph, get a cursor for this
@@ -1963,7 +1968,7 @@ XMLParaContext::~XMLParaContext()
try {
xAttrCursor = xTxtImport->GetText()->createTextCursorByRange( xStart );
if( !xAttrCursor.is() )
- return; // Robust (defect file)
+ return; // Robust (defective file)
} catch (const uno::Exception &) {
// createTextCursorByRange() likes to throw runtime exception, even
// though it just means 'we were unable to create the cursor'