1*4c5491eaSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*4c5491eaSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*4c5491eaSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*4c5491eaSAndrew Rist * distributed with this work for additional information 6*4c5491eaSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*4c5491eaSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*4c5491eaSAndrew Rist * "License"); you may not use this file except in compliance 9*4c5491eaSAndrew Rist * with the License. You may obtain a copy of the License at 10*4c5491eaSAndrew Rist * 11*4c5491eaSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*4c5491eaSAndrew Rist * 13*4c5491eaSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*4c5491eaSAndrew Rist * software distributed under the License is distributed on an 15*4c5491eaSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*4c5491eaSAndrew Rist * KIND, either express or implied. See the License for the 17*4c5491eaSAndrew Rist * specific language governing permissions and limitations 18*4c5491eaSAndrew Rist * under the License. 19*4c5491eaSAndrew Rist * 20*4c5491eaSAndrew Rist *************************************************************/ 21*4c5491eaSAndrew Rist 22*4c5491eaSAndrew Rist 23cdf0e10cSrcweir #ifndef _SV_XMLAUTOCORRECTIMPORT_HXX 24cdf0e10cSrcweir #define _SV_XMLAUTOCORRECTIMPORT_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #ifndef _SVSTOR_HXX 27cdf0e10cSrcweir #include <sot/storage.hxx> 28cdf0e10cSrcweir #endif 29cdf0e10cSrcweir #include <xmloff/xmlictxt.hxx> 30cdf0e10cSrcweir #include <xmloff/xmlimp.hxx> 31cdf0e10cSrcweir #include <xmloff/nmspmap.hxx> 32cdf0e10cSrcweir #include <xmloff/xmlnmspe.hxx> 33cdf0e10cSrcweir #include <editeng/svxacorr.hxx> 34cdf0e10cSrcweir 35cdf0e10cSrcweir class SvXMLAutoCorrectImport : public SvXMLImport 36cdf0e10cSrcweir { 37cdf0e10cSrcweir protected: 38cdf0e10cSrcweir 39cdf0e10cSrcweir // This method is called after the namespace map has been updated, but 40cdf0e10cSrcweir // before a context for the current element has been pushed. 41cdf0e10cSrcweir virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix, 42cdf0e10cSrcweir const ::rtl::OUString& rLocalName, 43cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 44cdf0e10cSrcweir ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); 45cdf0e10cSrcweir public: 46cdf0e10cSrcweir SvxAutocorrWordList *pAutocorr_List; 47cdf0e10cSrcweir SvxAutoCorrect &rAutoCorrect; 48cdf0e10cSrcweir com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStorage; 49cdf0e10cSrcweir //SvStorageRef &rStorage; 50cdf0e10cSrcweir 51cdf0e10cSrcweir // #110680# 52cdf0e10cSrcweir SvXMLAutoCorrectImport( 53cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, 54cdf0e10cSrcweir SvxAutocorrWordList *pNewAutocorr_List, 55cdf0e10cSrcweir SvxAutoCorrect &rNewAutoCorrect, 56cdf0e10cSrcweir const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rNewStorage); 57cdf0e10cSrcweir 58cdf0e10cSrcweir ~SvXMLAutoCorrectImport ( void ) throw (); 59cdf0e10cSrcweir }; 60cdf0e10cSrcweir 61cdf0e10cSrcweir class SvXMLWordListContext : public SvXMLImportContext 62cdf0e10cSrcweir { 63cdf0e10cSrcweir private: 64cdf0e10cSrcweir SvXMLAutoCorrectImport & rLocalRef; 65cdf0e10cSrcweir public: 66cdf0e10cSrcweir SvXMLWordListContext ( SvXMLAutoCorrectImport& rImport, 67cdf0e10cSrcweir sal_uInt16 nPrefix, 68cdf0e10cSrcweir const rtl::OUString& rLocalName, 69cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 70cdf0e10cSrcweir ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); 71cdf0e10cSrcweir virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, 72cdf0e10cSrcweir const rtl::OUString& rLocalName, 73cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 74cdf0e10cSrcweir ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); 75cdf0e10cSrcweir ~SvXMLWordListContext ( void ); 76cdf0e10cSrcweir }; 77cdf0e10cSrcweir 78cdf0e10cSrcweir class SvXMLWordContext : public SvXMLImportContext 79cdf0e10cSrcweir { 80cdf0e10cSrcweir private: 81cdf0e10cSrcweir SvXMLAutoCorrectImport & rLocalRef; 82cdf0e10cSrcweir public: 83cdf0e10cSrcweir SvXMLWordContext ( SvXMLAutoCorrectImport& rImport, 84cdf0e10cSrcweir sal_uInt16 nPrefix, 85cdf0e10cSrcweir const rtl::OUString& rLocalName, 86cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 87cdf0e10cSrcweir ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); 88cdf0e10cSrcweir ~SvXMLWordContext ( void ); 89cdf0e10cSrcweir }; 90cdf0e10cSrcweir 91cdf0e10cSrcweir 92cdf0e10cSrcweir class SvXMLExceptionListImport : public SvXMLImport 93cdf0e10cSrcweir { 94cdf0e10cSrcweir protected: 95cdf0e10cSrcweir 96cdf0e10cSrcweir // This method is called after the namespace map has been updated, but 97cdf0e10cSrcweir // before a context for the current element has been pushed. 98cdf0e10cSrcweir virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix, 99cdf0e10cSrcweir const ::rtl::OUString& rLocalName, 100cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 101cdf0e10cSrcweir ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); 102cdf0e10cSrcweir public: 103cdf0e10cSrcweir SvStringsISortDtor &rList; 104cdf0e10cSrcweir 105cdf0e10cSrcweir // #110680# 106cdf0e10cSrcweir SvXMLExceptionListImport( 107cdf0e10cSrcweir const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory, 108cdf0e10cSrcweir SvStringsISortDtor & rNewList ); 109cdf0e10cSrcweir 110cdf0e10cSrcweir ~SvXMLExceptionListImport ( void ) throw (); 111cdf0e10cSrcweir }; 112cdf0e10cSrcweir 113cdf0e10cSrcweir class SvXMLExceptionListContext : public SvXMLImportContext 114cdf0e10cSrcweir { 115cdf0e10cSrcweir private: 116cdf0e10cSrcweir SvXMLExceptionListImport & rLocalRef; 117cdf0e10cSrcweir public: 118cdf0e10cSrcweir SvXMLExceptionListContext ( SvXMLExceptionListImport& rImport, 119cdf0e10cSrcweir sal_uInt16 nPrefix, 120cdf0e10cSrcweir const rtl::OUString& rLocalName, 121cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 122cdf0e10cSrcweir ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); 123cdf0e10cSrcweir virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, 124cdf0e10cSrcweir const rtl::OUString& rLocalName, 125cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 126cdf0e10cSrcweir ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); 127cdf0e10cSrcweir ~SvXMLExceptionListContext ( void ); 128cdf0e10cSrcweir }; 129cdf0e10cSrcweir 130cdf0e10cSrcweir class SvXMLExceptionContext : public SvXMLImportContext 131cdf0e10cSrcweir { 132cdf0e10cSrcweir private: 133cdf0e10cSrcweir SvXMLExceptionListImport & rLocalRef; 134cdf0e10cSrcweir public: 135cdf0e10cSrcweir SvXMLExceptionContext ( SvXMLExceptionListImport& rImport, 136cdf0e10cSrcweir sal_uInt16 nPrefix, 137cdf0e10cSrcweir const rtl::OUString& rLocalName, 138cdf0e10cSrcweir const ::com::sun::star::uno::Reference< 139cdf0e10cSrcweir ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); 140cdf0e10cSrcweir ~SvXMLExceptionContext ( void ); 141cdf0e10cSrcweir }; 142cdf0e10cSrcweir 143cdf0e10cSrcweir 144cdf0e10cSrcweir #endif 145