Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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/.
8 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : :
20 : : #ifndef XMLTABLEIMPORT_HXX_
21 : : #define XMLTABLEIMPORT_HXX_
22 : :
23 : : #include <com/sun/star/table/XColumnRowRange.hpp>
24 : :
25 : : #include "xmloff/dllapi.h"
26 : : #include "xmloff/xmlictxt.hxx"
27 : : #include "xmloff/uniref.hxx"
28 : : #include "xmloff/xmlimppr.hxx"
29 : : #include "xmloff/prhdlfac.hxx"
30 : :
31 : : #include <rtl/ref.hxx>
32 : :
33 : : #include <boost/shared_ptr.hpp>
34 : : #include <map>
35 : :
36 : : class SvXMLStyleContext;
37 : :
38 : : typedef std::map< ::rtl::OUString, ::rtl::OUString > XMLTableTemplate;
39 : : typedef std::map < ::rtl::OUString, boost::shared_ptr< XMLTableTemplate > > XMLTableTemplateMap;
40 : :
41 : : class XMLTableImport : public UniRefBase
42 : : {
43 : : friend class XMLTableImportContext;
44 : :
45 : : public:
46 : : XMLTableImport( SvXMLImport& rImport, const rtl::Reference< XMLPropertySetMapper >& xCellPropertySetMapper, const rtl::Reference< XMLPropertyHandlerFactory >& xFactoryRef );
47 : : virtual ~XMLTableImport();
48 : :
49 : : SvXMLImportContext* CreateTableContext( sal_uInt16 nPrfx, const ::rtl::OUString& rLName,
50 : : ::com::sun::star::uno::Reference< ::com::sun::star::table::XColumnRowRange >& xColumnRowRange );
51 : :
52 : : SvXMLStyleContext* CreateTableTemplateContext( sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
53 : :
54 : 108 : rtl::Reference< SvXMLImportPropertyMapper > GetCellImportPropertySetMapper() const { return mxCellImportPropertySetMapper; }
55 : 42 : rtl::Reference< SvXMLImportPropertyMapper > GetRowImportPropertySetMapper() const { return mxRowImportPropertySetMapper; }
56 : 42 : rtl::Reference< SvXMLImportPropertyMapper > GetColumnImportPropertySetMapper() const { return mxColumnImportPropertySetMapper; }
57 : :
58 : : void addTableTemplate( const rtl::OUString& rsStyleName, XMLTableTemplate& xTableTemplate );
59 : : void finishStyles();
60 : :
61 : : private:
62 : : SvXMLImport& mrImport;
63 : : rtl::Reference< SvXMLImportPropertyMapper > mxCellImportPropertySetMapper;
64 : : rtl::Reference< SvXMLImportPropertyMapper > mxRowImportPropertySetMapper;
65 : : rtl::Reference< SvXMLImportPropertyMapper > mxColumnImportPropertySetMapper;
66 : :
67 : : XMLTableTemplateMap maTableTemplates;
68 : : };
69 : :
70 : : #endif /*XMLTABLEIMPORT_HXX_*/
71 : :
72 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|