diff options
author | Michael Brauer <mib@openoffice.org> | 2001-03-09 06:23:23 +0000 |
---|---|---|
committer | Michael Brauer <mib@openoffice.org> | 2001-03-09 06:23:23 +0000 |
commit | f8910a64102bc9f784dcb8e9772fc8479e5ec8a0 (patch) | |
tree | 8e6bd8e80f451182b9d3fbc37e9356bf78fc5f41 /xmloff/source/text/XMLTextHeaderFooterContext.cxx | |
parent | f1d265645f2252debe9bddc715520ad6e75ddbe1 (diff) |
remove section's last paragraph safely
Diffstat (limited to 'xmloff/source/text/XMLTextHeaderFooterContext.cxx')
-rw-r--r-- | xmloff/source/text/XMLTextHeaderFooterContext.cxx | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/xmloff/source/text/XMLTextHeaderFooterContext.cxx b/xmloff/source/text/XMLTextHeaderFooterContext.cxx index 4e869d9d82e9..3032fd2d45ec 100644 --- a/xmloff/source/text/XMLTextHeaderFooterContext.cxx +++ b/xmloff/source/text/XMLTextHeaderFooterContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLTextHeaderFooterContext.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: mib $ $Date: 2000-11-01 12:15:32 $ + * last change: $Author: mib $ $Date: 2001-03-09 07:23:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -216,13 +216,6 @@ SvXMLImportContext *XMLTextHeaderFooterContext::CreateChildContext( GetImport().GetTextImport()->CreateTextChildContext( GetImport(), nPrefix, rLocalName, xAttrList, XML_TEXT_TYPE_HEADER_FOOTER ); - if( pContext && pContext->ISA( XMLTextTableContext ) ) - { - xTextContent = PTR_CAST( XMLTextTableContext, pContext ) - ->GetXTextContent(); - } - else - xTextContent = 0; } if( !pContext ) pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName ); @@ -234,24 +227,7 @@ void XMLTextHeaderFooterContext::EndElement() { if( xOldTextCursor.is() ) { - if( xTextContent.is() ) - { - Reference< XRelativeTextContentRemove > xRemove( - GetImport().GetTextImport()->GetText(), UNO_QUERY ); - if( xRemove.is() ) - { - GetImport().GetTextImport()->ResetCursor(); - xRemove->removeTextContentAfter( xTextContent ); - } - } - else if( GetImport().GetTextImport()->GetCursor()->goLeft( 1, sal_True ) ) - { - OUString sEmpty; - GetImport().GetTextImport()->GetText()->insertString( - GetImport().GetTextImport()->GetCursorAsRange(), sEmpty, - sal_True ); - } - + GetImport().GetTextImport()->DeleteParagraph(); GetImport().GetTextImport()->SetCursor( xOldTextCursor ); } else if( !bLeft ) |