Bump for 3.6-28
[LibreOffice.git] / xmloff / source / text / XMLTextMarkImportContext.hxx
blob5742fae877a607bac324d6f1034574aa31a9f48f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
30 #ifndef _XMLOFF_XMLTEXTMARKIMPORTCONTEXT_HXX
31 #define _XMLOFF_XMLTEXTMARKIMPORTCONTEXT_HXX
33 #include <xmloff/xmlictxt.hxx>
34 #include <com/sun/star/uno/Reference.h>
37 namespace com { namespace sun { namespace star {
38 namespace text {
39 class XTextRange;
40 class XTextContent;
42 namespace xml { namespace sax {
43 class XAttributeList;
44 } }
45 } } }
46 namespace rtl {
47 class OUString;
49 class XMLTextImportHelper;
51 class XMLFieldParamImportContext : public SvXMLImportContext
53 XMLTextImportHelper& rHelper;
54 public:
55 XMLFieldParamImportContext(
56 SvXMLImport& rImport,
57 XMLTextImportHelper& rHlp,
58 sal_uInt16 nPrfx,
59 const ::rtl::OUString& rLocalName );
61 virtual void StartElement(
62 const ::com::sun::star::uno::Reference<
63 ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
67 /**
68 * import bookmarks and reference marks
69 * ( <bookmark>, <bookmark-start>, <bookmark-end>,
70 * <reference>, <reference-start>, <reference-end> )
72 * All elements are handled by the same class due to their similarities.
74 class XMLTextMarkImportContext : public SvXMLImportContext
77 XMLTextImportHelper & m_rHelper;
78 ::rtl::OUString m_sBookmarkName;
79 ::rtl::OUString m_sFieldName;
80 ::rtl::OUString m_sXmlId;
81 // RDFa
82 bool m_bHaveAbout;
83 ::rtl::OUString m_sAbout;
84 ::rtl::OUString m_sProperty;
85 ::rtl::OUString m_sContent;
86 ::rtl::OUString m_sDatatype;
88 public:
90 TYPEINFO();
92 XMLTextMarkImportContext(
93 SvXMLImport& rImport,
94 XMLTextImportHelper& rHlp,
95 sal_uInt16 nPrfx,
96 const ::rtl::OUString& rLocalName );
98 protected:
100 virtual void StartElement(
101 const ::com::sun::star::uno::Reference<
102 ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
103 virtual void EndElement();
105 virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
106 const ::rtl::OUString& rLocalName,
107 const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
109 public:
110 static ::com::sun::star::uno::Reference<
111 ::com::sun::star::text::XTextContent > CreateAndInsertMark(
112 SvXMLImport& rImport,
113 const ::rtl::OUString& sServiceName,
114 const ::rtl::OUString& sMarkName,
115 const ::com::sun::star::uno::Reference<
116 ::com::sun::star::text::XTextRange> & rRange,
117 const ::rtl::OUString& i_rXmlId = ::rtl::OUString());
119 sal_Bool FindName(
120 SvXMLImport& rImport,
121 const ::com::sun::star::uno::Reference<
122 ::com::sun::star::xml::sax::XAttributeList> & xAttrList);
125 #endif
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */