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 SW_XMLBRSHI_HXX
21 : #define SW_XMLBRSHI_HXX
22 :
23 : #include <com/sun/star/io/XOutputStream.hpp>
24 :
25 : #include <xmloff/xmlictxt.hxx>
26 :
27 : class SvXMLImport;
28 : class SvXMLUnitConverter;
29 : class SvxBrushItem;
30 :
31 : namespace rtl { class OUString; }
32 : namespace com { namespace sun { namespace star {
33 : namespace io { class XOutputStream; }
34 : } } }
35 :
36 : class SwXMLBrushItemImportContext : public SvXMLImportContext
37 : {
38 : private:
39 : ::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > xBase64Stream;
40 : SvxBrushItem *pItem;
41 :
42 : void ProcessAttrs(
43 : const ::com::sun::star::uno::Reference<
44 : ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
45 : const SvXMLUnitConverter& rUnitConv );
46 :
47 : public:
48 : TYPEINFO();
49 :
50 : SwXMLBrushItemImportContext(
51 : SvXMLImport& rImport,
52 : sal_uInt16 nPrfx,
53 : const ::rtl::OUString& rLName,
54 : const ::com::sun::star::uno::Reference<
55 : ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
56 : const SvXMLUnitConverter& rUnitConv,
57 : const SvxBrushItem& rItem );
58 :
59 : SwXMLBrushItemImportContext(
60 : SvXMLImport& rImport,
61 : sal_uInt16 nPrfx,
62 : const ::rtl::OUString& rLName,
63 : const ::com::sun::star::uno::Reference<
64 : ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
65 : const SvXMLUnitConverter& rUnitConv,
66 : sal_uInt16 nWhich );
67 :
68 : virtual ~SwXMLBrushItemImportContext();
69 :
70 : virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
71 : const ::rtl::OUString& rLocalName,
72 : const ::com::sun::star::uno::Reference<
73 : ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
74 :
75 : virtual void EndElement();
76 :
77 0 : const SvxBrushItem& GetItem() const { return *pItem; }
78 : };
79 :
80 :
81 : #endif // _XMLBRSHI_HXX
82 :
83 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|