1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef _SV_XMLAUTOCORRECTIMPORT_HXX
20 #define _SV_XMLAUTOCORRECTIMPORT_HXX
22 #include <sot/storage.hxx>
23 #include <xmloff/xmlictxt.hxx>
24 #include <xmloff/xmlimp.hxx>
25 #include <xmloff/nmspmap.hxx>
26 #include <xmloff/xmlnmspe.hxx>
27 #include <editeng/svxacorr.hxx>
29 class SvXMLAutoCorrectImport
: public SvXMLImport
33 // This method is called after the namespace map has been updated, but
34 // before a context for the current element has been pushed.
35 virtual SvXMLImportContext
*CreateContext( sal_uInt16 nPrefix
,
36 const OUString
& rLocalName
,
37 const ::com::sun::star::uno::Reference
<
38 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
40 SvxAutocorrWordList
*pAutocorr_List
;
41 SvxAutoCorrect
&rAutoCorrect
;
42 com::sun::star::uno::Reference
< com::sun::star::embed::XStorage
> xStorage
;
44 SvXMLAutoCorrectImport(
45 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> xContext
,
46 SvxAutocorrWordList
*pNewAutocorr_List
,
47 SvxAutoCorrect
&rNewAutoCorrect
,
48 const com::sun::star::uno::Reference
< com::sun::star::embed::XStorage
>& rNewStorage
);
50 ~SvXMLAutoCorrectImport ( void ) throw ();
53 class SvXMLWordListContext
: public SvXMLImportContext
56 SvXMLAutoCorrectImport
& rLocalRef
;
58 SvXMLWordListContext ( SvXMLAutoCorrectImport
& rImport
,
60 const OUString
& rLocalName
,
61 const ::com::sun::star::uno::Reference
<
62 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
63 virtual SvXMLImportContext
*CreateChildContext( sal_uInt16 nPrefix
,
64 const OUString
& rLocalName
,
65 const ::com::sun::star::uno::Reference
<
66 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
67 ~SvXMLWordListContext ( void );
70 class SvXMLWordContext
: public SvXMLImportContext
73 SvXMLAutoCorrectImport
& rLocalRef
;
75 SvXMLWordContext ( SvXMLAutoCorrectImport
& rImport
,
77 const OUString
& rLocalName
,
78 const ::com::sun::star::uno::Reference
<
79 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
80 ~SvXMLWordContext ( void );
84 class SvXMLExceptionListImport
: public SvXMLImport
88 // This method is called after the namespace map has been updated, but
89 // before a context for the current element has been pushed.
90 virtual SvXMLImportContext
*CreateContext( sal_uInt16 nPrefix
,
91 const OUString
& rLocalName
,
92 const ::com::sun::star::uno::Reference
<
93 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
95 SvStringsISortDtor
&rList
;
97 SvXMLExceptionListImport(
98 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> xContext
,
99 SvStringsISortDtor
& rNewList
);
101 ~SvXMLExceptionListImport ( void ) throw ();
104 class SvXMLExceptionListContext
: public SvXMLImportContext
107 SvXMLExceptionListImport
& rLocalRef
;
109 SvXMLExceptionListContext ( SvXMLExceptionListImport
& rImport
,
111 const OUString
& rLocalName
,
112 const ::com::sun::star::uno::Reference
<
113 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
114 virtual SvXMLImportContext
*CreateChildContext( sal_uInt16 nPrefix
,
115 const OUString
& rLocalName
,
116 const ::com::sun::star::uno::Reference
<
117 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
118 ~SvXMLExceptionListContext ( void );
121 class SvXMLExceptionContext
: public SvXMLImportContext
124 SvXMLExceptionListImport
& rLocalRef
;
126 SvXMLExceptionContext ( SvXMLExceptionListImport
& rImport
,
128 const OUString
& rLocalName
,
129 const ::com::sun::star::uno::Reference
<
130 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
131 ~SvXMLExceptionContext ( void );
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */