android: Update app-specific/MIME type icons
[LibreOffice.git] / writerperfect / source / writer / exp / xmltext.cxx
blob933cf43e18803dac1bf0b8030b7549bca7238971
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
10 #include "xmltext.hxx"
12 #include "txtparai.hxx"
13 #include "xmltbli.hxx"
14 #include "XMLSectionContext.hxx"
15 #include "XMLTextListContext.hxx"
16 #include "xmlimp.hxx"
18 using namespace com::sun::star;
20 namespace writerperfect::exp
22 XMLBodyContentContext::XMLBodyContentContext(XMLImport& rImport)
23 : XMLImportContext(rImport)
27 void XMLBodyContentContext::endElement(const OUString& /*rName*/)
29 if (GetImport().GetIsInPageSpan())
30 GetImport().GetGenerator().closePageSpan();
33 rtl::Reference<XMLImportContext> XMLBodyContentContext::CreateChildContext(
34 const OUString& rName, const css::uno::Reference<css::xml::sax::XAttributeList>& /*xAttribs*/)
36 return CreateTextChildContext(GetImport(), rName, true);
39 rtl::Reference<XMLImportContext> CreateTextChildContext(XMLImport& rImport,
40 std::u16string_view rName, bool bTopLevel)
42 if (rName == u"text:p" || rName == u"text:h")
43 return new XMLParaContext(rImport, bTopLevel);
44 if (rName == u"text:section")
45 return new XMLSectionContext(rImport);
46 if (rName == u"table:table")
47 return new XMLTableContext(rImport, bTopLevel);
48 if (rName == u"text:list")
49 return new XMLTextListContext(rImport);
50 return nullptr;
53 } // namespace writerperfect::exp
55 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */