1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: SvXMLAutoCorrectImport.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _SV_XMLAUTOCORRECTIMPORT_HXX
31 #define _SV_XMLAUTOCORRECTIMPORT_HXX
34 #include <sot/storage.hxx>
36 #include <xmloff/xmlictxt.hxx>
37 #include <xmloff/xmlimp.hxx>
38 #include <xmloff/nmspmap.hxx>
39 #include <xmloff/xmlnmspe.hxx>
40 #include <svx/svxacorr.hxx>
42 class SvXMLAutoCorrectImport
: public SvXMLImport
46 // This method is called after the namespace map has been updated, but
47 // before a context for the current element has been pushed.
48 virtual SvXMLImportContext
*CreateContext( sal_uInt16 nPrefix
,
49 const ::rtl::OUString
& rLocalName
,
50 const ::com::sun::star::uno::Reference
<
51 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
53 SvxAutocorrWordList
*pAutocorr_List
;
54 SvxAutoCorrect
&rAutoCorrect
;
55 com::sun::star::uno::Reference
< com::sun::star::embed::XStorage
> xStorage
;
56 //SvStorageRef &rStorage;
59 SvXMLAutoCorrectImport(
60 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
> xServiceFactory
,
61 SvxAutocorrWordList
*pNewAutocorr_List
,
62 SvxAutoCorrect
&rNewAutoCorrect
,
63 const com::sun::star::uno::Reference
< com::sun::star::embed::XStorage
>& rNewStorage
);
65 ~SvXMLAutoCorrectImport ( void ) throw ();
68 class SvXMLWordListContext
: public SvXMLImportContext
71 SvXMLAutoCorrectImport
& rLocalRef
;
73 SvXMLWordListContext ( SvXMLAutoCorrectImport
& rImport
,
75 const rtl::OUString
& rLocalName
,
76 const ::com::sun::star::uno::Reference
<
77 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
78 virtual SvXMLImportContext
*CreateChildContext( sal_uInt16 nPrefix
,
79 const rtl::OUString
& rLocalName
,
80 const ::com::sun::star::uno::Reference
<
81 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
82 ~SvXMLWordListContext ( void );
85 class SvXMLWordContext
: public SvXMLImportContext
88 SvXMLAutoCorrectImport
& rLocalRef
;
90 SvXMLWordContext ( SvXMLAutoCorrectImport
& rImport
,
92 const rtl::OUString
& rLocalName
,
93 const ::com::sun::star::uno::Reference
<
94 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
95 ~SvXMLWordContext ( void );
99 class SvXMLExceptionListImport
: public SvXMLImport
103 // This method is called after the namespace map has been updated, but
104 // before a context for the current element has been pushed.
105 virtual SvXMLImportContext
*CreateContext( sal_uInt16 nPrefix
,
106 const ::rtl::OUString
& rLocalName
,
107 const ::com::sun::star::uno::Reference
<
108 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
110 SvStringsISortDtor
&rList
;
113 SvXMLExceptionListImport(
114 const ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
> xServiceFactory
,
115 SvStringsISortDtor
& rNewList
);
117 ~SvXMLExceptionListImport ( void ) throw ();
120 class SvXMLExceptionListContext
: public SvXMLImportContext
123 SvXMLExceptionListImport
& rLocalRef
;
125 SvXMLExceptionListContext ( SvXMLExceptionListImport
& rImport
,
127 const rtl::OUString
& rLocalName
,
128 const ::com::sun::star::uno::Reference
<
129 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
130 virtual SvXMLImportContext
*CreateChildContext( sal_uInt16 nPrefix
,
131 const rtl::OUString
& rLocalName
,
132 const ::com::sun::star::uno::Reference
<
133 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
134 ~SvXMLExceptionListContext ( void );
137 class SvXMLExceptionContext
: public SvXMLImportContext
140 SvXMLExceptionListImport
& rLocalRef
;
142 SvXMLExceptionContext ( SvXMLExceptionListImport
& rImport
,
144 const rtl::OUString
& rLocalName
,
145 const ::com::sun::star::uno::Reference
<
146 ::com::sun::star::xml::sax::XAttributeList
> & xAttrList
);
147 ~SvXMLExceptionContext ( void );