summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLIndexTOCContext.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'xmloff/source/text/XMLIndexTOCContext.cxx')
-rw-r--r--xmloff/source/text/XMLIndexTOCContext.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index 8dd1dac881c7..e7235f093efa 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -248,28 +248,28 @@ void XMLIndexTOCContext::endFastElement(sal_Int32 )
{
// complete import of index by removing the markers (if the index
// was actually inserted, that is)
- if( bValid )
- {
- // preliminaries
- rtl::Reference<XMLTextImportHelper> rHelper= GetImport().GetTextImport();
+ if( !bValid )
+ return;
- // get rid of last paragraph (unless it's the only paragraph)
- rHelper->GetCursor()->goRight(1, false);
- if( xBodyContextRef.is() && xBodyContextRef->HasContent() )
- {
- rHelper->GetCursor()->goLeft(1, true);
- rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
- "", true);
- }
+ // preliminaries
+ rtl::Reference<XMLTextImportHelper> rHelper= GetImport().GetTextImport();
- // and delete second marker
- rHelper->GetCursor()->goRight(1, true);
+ // get rid of last paragraph (unless it's the only paragraph)
+ rHelper->GetCursor()->goRight(1, false);
+ if( xBodyContextRef.is() && xBodyContextRef->HasContent() )
+ {
+ rHelper->GetCursor()->goLeft(1, true);
rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
"", true);
-
- // check for Redlines on our end node
- GetImport().GetTextImport()->RedlineAdjustStartNodeCursor();
}
+
+ // and delete second marker
+ rHelper->GetCursor()->goRight(1, true);
+ rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
+ "", true);
+
+ // check for Redlines on our end node
+ GetImport().GetTextImport()->RedlineAdjustStartNodeCursor();
}
css::uno::Reference< css::xml::sax::XFastContextHandler > XMLIndexTOCContext::createFastChildContext(