LibreOffice Module writerperfect (master) 1
xmltext.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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 */
9
10#include "xmltext.hxx"
11
12#include "txtparai.hxx"
13#include "xmltbli.hxx"
14#include "XMLSectionContext.hxx"
16#include "xmlimp.hxx"
17
18using namespace com::sun::star;
19
20namespace writerperfect::exp
21{
23 : XMLImportContext(rImport)
24{
25}
26
27void XMLBodyContentContext::endElement(const OUString& /*rName*/)
28{
29 if (GetImport().GetIsInPageSpan())
30 GetImport().GetGenerator().closePageSpan();
31}
32
34 const OUString& rName, const css::uno::Reference<css::xml::sax::XAttributeList>& /*xAttribs*/)
35{
36 return CreateTextChildContext(GetImport(), rName, true);
37}
38
40 std::u16string_view rName, bool bTopLevel)
41{
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;
51}
52
53} // namespace writerperfect::exp
54
55/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
XMLBodyContentContext(XMLImport &rImport)
Definition: xmltext.cxx:22
void SAL_CALL endElement(const OUString &rName) override
Definition: xmltext.cxx:27
rtl::Reference< XMLImportContext > CreateChildContext(const OUString &rName, const css::uno::Reference< css::xml::sax::XAttributeList > &) override
Definition: xmltext.cxx:33
Base class for a handler of a single XML element during ODF -> librevenge conversion.
Definition: xmlictxt.hxx:23
ODT export feeds this class to make librevenge calls.
Definition: xmlimp.hxx:69
librevenge::RVNGTextInterface & GetGenerator() const
Definition: xmlimp.cxx:462
Handler for <text:p>/<text:h>.
Definition: txtparai.hxx:22
Handler for <table:table>.
Definition: xmltbli.hxx:20
float u
rtl::Reference< XMLImportContext > CreateTextChildContext(XMLImport &rImport, std::u16string_view rName, bool bTopLevel)
Context factory for body text, section, table cell, etc.
Definition: xmltext.cxx:39