diff options
author | Daniel Vogelheim <dvo@openoffice.org> | 2001-07-19 12:16:33 +0000 |
---|---|---|
committer | Daniel Vogelheim <dvo@openoffice.org> | 2001-07-19 12:16:33 +0000 |
commit | 9bfb253d0564a006c81abd1aace07b4c34901e6e (patch) | |
tree | fe2bd0d4dbc6bee3026a73259fb33caf2bd176fd /xmloff | |
parent | e1080c0e130476d602d01105f575e3596ca15873 (diff) |
#89891# fixed problem with footnotes which are anchored in lists
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/XMLFootnoteImportContext.cxx | 24 | ||||
-rw-r--r-- | xmloff/source/text/XMLFootnoteImportContext.hxx | 9 |
2 files changed, 28 insertions, 5 deletions
diff --git a/xmloff/source/text/XMLFootnoteImportContext.cxx b/xmloff/source/text/XMLFootnoteImportContext.cxx index 4fd26314360e..a94407aade21 100644 --- a/xmloff/source/text/XMLFootnoteImportContext.cxx +++ b/xmloff/source/text/XMLFootnoteImportContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLFootnoteImportContext.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: dvo $ $Date: 2001-06-29 21:07:21 $ + * last change: $Author: dvo $ $Date: 2001-07-19 13:16:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,6 +95,14 @@ #include "XMLFootnoteBodyImportContext.hxx" #endif +#ifndef _XMLOFF_XMLTEXTLISTBLOCKCONTEXT_HXX +#include "XMLTextListBlockContext.hxx" +#endif + +#ifndef _XMLOFF_XMLTEXTLISTITEMCONTEXT_HXX +#include "XMLTextListItemContext.hxx" +#endif + #ifndef _COM_SUN_STAR_XML_SAX_XATTRIBUTELIST_HPP_ #include <com/sun/star/xml/sax/XAttributeList.hpp> #endif @@ -116,6 +124,7 @@ #endif + using namespace ::rtl; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; @@ -209,6 +218,13 @@ void XMLFootnoteImportContext::StartElement( Reference<XText> xText(xTextContent, UNO_QUERY); rHelper.SetCursor(xText->createTextCursor()); + // remember old list item and block (#89891#) and reset them + // for the footnote + xListBlock = rHelper.GetListBlock(); + xListItem = rHelper.GetListItem(); + rHelper.SetListBlock( NULL ); + rHelper.SetListItem( NULL ); + // remember footnote (for CreateChildContext) Reference<XFootnote> xNote(xTextContent, UNO_QUERY); xFootnote = xNote; @@ -230,6 +246,10 @@ void XMLFootnoteImportContext::EndElement() // reinstall old cursor rHelper.SetCursor(xOldCursor); + + // reinstall old list item + rHelper.SetListBlock( (XMLTextListBlockContext*)&xListBlock ); + rHelper.SetListItem( (XMLTextListItemContext*)&xListItem ); } diff --git a/xmloff/source/text/XMLFootnoteImportContext.hxx b/xmloff/source/text/XMLFootnoteImportContext.hxx index 06cd4538b275..a8d1f621a274 100644 --- a/xmloff/source/text/XMLFootnoteImportContext.hxx +++ b/xmloff/source/text/XMLFootnoteImportContext.hxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLFootnoteImportContext.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:07:06 $ + * last change: $Author: dvo $ $Date: 2001-07-19 13:16:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -85,7 +85,6 @@ namespace rtl { } class XMLTextImportHelper; - /// import footnote elements (<text:footnote>) class XMLFootnoteImportContext : public SvXMLImportContext { @@ -95,6 +94,10 @@ class XMLFootnoteImportContext : public SvXMLImportContext ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextCursor> xOldCursor; + /// old list item and block (#89891#) + SvXMLImportContextRef xListBlock; + SvXMLImportContextRef xListItem; + /// text import helper; holds current XTextCursor (and XText) XMLTextImportHelper& rHelper; |