summaryrefslogtreecommitdiff
path: root/xmloff/source/text/XMLIndexTOCContext.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-10-21 12:31:03 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-10-21 14:58:51 +0200
commit29489b33b435683021b72cb2bce27aba8cb7a430 (patch)
tree8e4e1c59d56d5ed0d0ca4d088419067041e4553a /xmloff/source/text/XMLIndexTOCContext.cxx
parenta4244c0f05b95ded277a3a7ed217bf0451daa996 (diff)
loplugin:flatten
Change-Id: I3b4226a9d089ec9aedab95d96e50a068f57a76c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123991 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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(