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 INCLUDED_EDITENG_SOURCE_MISC_SVXMLAUTOCORRECTIMPORT_HXX
20 #define INCLUDED_EDITENG_SOURCE_MISC_SVXMLAUTOCORRECTIMPORT_HXX
22 #include <sot/storage.hxx>
23 #include <xmloff/xmlictxt.hxx>
24 #include <xmloff/xmlimp.hxx>
25 #include <editeng/svxacorr.hxx>
27 class SvXMLAutoCorrectImport
: public SvXMLImport
31 // This method is called after the namespace map has been updated, but
32 // before a context for the current element has been pushed.
33 virtual SvXMLImportContext
*CreateFastContext( sal_Int32 Element
,
34 const ::css::uno::Reference
< ::css::xml::sax::XFastAttributeList
> & xAttrList
) SAL_OVERRIDE
;
37 SvxAutocorrWordList
*pAutocorr_List
;
38 SvxAutoCorrect
&rAutoCorrect
;
39 com::sun::star::uno::Reference
< com::sun::star::embed::XStorage
> xStorage
;
41 SvXMLAutoCorrectImport(
42 const ::css::uno::Reference
< ::css::uno::XComponentContext
> xContext
,
43 SvxAutocorrWordList
*pNewAutocorr_List
,
44 SvxAutoCorrect
&rNewAutoCorrect
,
45 const ::css::uno::Reference
< com::sun::star::embed::XStorage
>& rNewStorage
);
47 virtual ~SvXMLAutoCorrectImport() throw ();
50 class SvXMLWordListContext
: public SvXMLImportContext
53 SvXMLAutoCorrectImport
& rLocalRef
;
55 SvXMLWordListContext ( SvXMLAutoCorrectImport
& rImport
, sal_Int32 Element
,
56 const ::css::uno::Reference
< ::css::xml::sax::XFastAttributeList
> & xAttrList
);
58 virtual com::sun::star::uno::Reference
<XFastContextHandler
> SAL_CALL
createFastChildContext( sal_Int32 Element
,
59 const ::css::uno::Reference
< ::css::xml::sax::XFastAttributeList
> & xAttrList
)
60 throw (css::uno::RuntimeException
, css::xml::sax::SAXException
, std::exception
) SAL_OVERRIDE
;
62 virtual ~SvXMLWordListContext();
65 class SvXMLWordContext
: public SvXMLImportContext
68 SvXMLAutoCorrectImport
& rLocalRef
;
70 SvXMLWordContext ( SvXMLAutoCorrectImport
& rImport
, sal_Int32 Element
,
71 const ::css::uno::Reference
< ::css::xml::sax::XFastAttributeList
> & xAttrList
);
73 virtual ~SvXMLWordContext();
77 class SvXMLExceptionListImport
: public SvXMLImport
81 // This method is called after the namespace map has been updated, but
82 // before a context for the current element has been pushed.
83 virtual SvXMLImportContext
*CreateFastContext( sal_Int32 Element
, const ::css::uno::Reference
<
84 ::css::xml::sax::XFastAttributeList
> & xAttrList
) SAL_OVERRIDE
;
86 SvStringsISortDtor
&rList
;
88 SvXMLExceptionListImport(
89 const ::css::uno::Reference
< ::css::uno::XComponentContext
> xContext
,
90 SvStringsISortDtor
& rNewList
);
92 virtual ~SvXMLExceptionListImport() throw ();
95 class SvXMLExceptionListContext
: public SvXMLImportContext
98 SvXMLExceptionListImport
& rLocalRef
;
100 SvXMLExceptionListContext ( SvXMLExceptionListImport
& rImport
, sal_Int32 Element
,
101 const ::css::uno::Reference
< ::css::xml::sax::XFastAttributeList
> & xAttrList
);
103 virtual com::sun::star::uno::Reference
<XFastContextHandler
> SAL_CALL
createFastChildContext( sal_Int32 Element
,
104 const ::css::uno::Reference
< ::css::xml::sax::XFastAttributeList
> & xAttrList
)
105 throw (css::uno::RuntimeException
, css::xml::sax::SAXException
, std::exception
) SAL_OVERRIDE
;
107 virtual ~SvXMLExceptionListContext();
110 class SvXMLExceptionContext
: public SvXMLImportContext
113 SvXMLExceptionListImport
& rLocalRef
;
115 SvXMLExceptionContext ( SvXMLExceptionListImport
& rImport
, sal_Int32 Element
,
116 const ::css::uno::Reference
< ::css::xml::sax::XFastAttributeList
> & xAttrList
);
118 virtual ~SvXMLExceptionContext();
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */