LibreOffice Module writerperfect (master) 1
txtparai.hxx
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#pragma once
11
12#include <map>
13
14#include <librevenge/librevenge.h>
15
16#include "xmlictxt.hxx"
17
18namespace writerperfect::exp
19{
22{
23public:
24 XMLParaContext(XMLImport& rImport, bool bTopLevel = false);
25
27 const OUString& rName,
28 const css::uno::Reference<css::xml::sax::XAttributeList>& /*xAttribs*/) override;
29
30 void SAL_CALL
31 startElement(const OUString& rName,
32 const css::uno::Reference<css::xml::sax::XAttributeList>& xAttribs) override;
33 void SAL_CALL endElement(const OUString& rName) override;
34 void SAL_CALL characters(const OUString& rChars) override;
35
36private:
37 OUString m_aStyleName;
39 librevenge::RVNGPropertyList m_aTextPropertyList;
43};
44
47CreateParagraphOrSpanChildContext(XMLImport& rImport, const OUString& rName,
48 const librevenge::RVNGPropertyList& rTextPropertyList);
49
52void FillStyles(const OUString& rName,
53 std::map<OUString, librevenge::RVNGPropertyList>& rAutomaticStyles,
54 std::map<OUString, librevenge::RVNGPropertyList>& rNamedStyles,
55 librevenge::RVNGPropertyList& rPropertyList);
56
57} // namespace writerperfect::exp
58
59/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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
Handler for <text:p>/<text:h>.
Definition: txtparai.hxx:22
void SAL_CALL startElement(const OUString &rName, const css::uno::Reference< css::xml::sax::XAttributeList > &xAttribs) override
Definition: txtparai.cxx:553
void SAL_CALL characters(const OUString &rChars) override
Definition: txtparai.cxx:587
XMLParaContext(XMLImport &rImport, bool bTopLevel=false)
Definition: txtparai.cxx:535
void SAL_CALL endElement(const OUString &rName) override
Definition: txtparai.cxx:582
bool m_bTopLevel
If the context is a direct child of XMLBodyContentContext.
Definition: txtparai.hxx:42
rtl::Reference< XMLImportContext > CreateChildContext(const OUString &rName, const css::uno::Reference< css::xml::sax::XAttributeList > &) override
Definition: txtparai.cxx:541
librevenge::RVNGPropertyList m_aTextPropertyList
List of properties spans should inherit from this paragraph.
Definition: txtparai.hxx:39
rtl::Reference< XMLImportContext > CreateParagraphOrSpanChildContext(XMLImport &rImport, const OUString &rName, const librevenge::RVNGPropertyList &rTextPropertyList)
Shared child context factory for paragraph and span contexts.
Definition: txtparai.cxx:602
void FillStyles(const OUString &rName, std::map< OUString, librevenge::RVNGPropertyList > &rAutomaticStyles, std::map< OUString, librevenge::RVNGPropertyList > &rNamedStyles, librevenge::RVNGPropertyList &rPropertyList)
Looks for rName in rAutomaticStyles (and failing that, in rNamedStyles) and fills rPropertyList based...
Definition: txtparai.cxx:623