xref: /AOO41X/main/dbaccess/source/filter/xml/xmlHierarchyCollection.hxx (revision 2e2212a7c22e96cf6f6fab0dd042c34a45a64bd6)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef DBA_XMLHIERARCHYCOLLECTION_HXX
24 #define DBA_XMLHIERARCHYCOLLECTION_HXX
25 
26 #include <xmloff/xmlictxt.hxx>
27 #include "xmlEnums.hxx"
28 #include <com/sun/star/container/XNameAccess.hpp>
29 #include <com/sun/star/beans/XPropertySet.hpp>
30 
31 
32 namespace dbaxml
33 {
34     class ODBFilter;
35     class OXMLHierarchyCollection : public SvXMLImportContext
36     {
37         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xParentContainer;
38         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xContainer;
39         ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >    m_xTable;
40         ::rtl::OUString     m_sName;
41         ::rtl::OUString     m_sCollectionServiceName;
42         ::rtl::OUString     m_sComponentServiceName;
43 
44         ODBFilter& GetOwnImport();
45     public:
46 
47         OXMLHierarchyCollection( ODBFilter& rImport
48                     ,sal_uInt16 nPrfx
49                     ,const ::rtl::OUString& rLName
50                     ,const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList
51                     ,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xParentContainer
52                     ,const ::rtl::OUString& _sCollectionServiceName
53                     ,const ::rtl::OUString& _sComponentServiceName
54                     );
55         OXMLHierarchyCollection( ODBFilter& rImport
56                     ,sal_uInt16 nPrfx
57                     ,const ::rtl::OUString& rLName
58                     ,const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >& _xContainer
59                     ,const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >&    _xTable
60                     );
61         virtual ~OXMLHierarchyCollection();
62 
63         virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
64                     const ::rtl::OUString& rLocalName,
65                     const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
66     };
67 // -----------------------------------------------------------------------------
68 } // namespace dbaxml
69 // -----------------------------------------------------------------------------
70 
71 #endif // DBA_XMLHIERARCHYCOLLECTION_HXX
72