xref: /AOO41X/main/xmloff/inc/XMLBackgroundImageContext.hxx (revision ecfe53c5d1886e1e0d215b0d140d05282ab1c477)
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 
24 #ifndef _XMLBACKGROUNDIMAGECONTEXT_HXX
25 #define _XMLBACKGROUNDIMAGECONTEXT_HXX
26 
27 #include <com/sun/star/style/GraphicLocation.hpp>
28 #include "XMLElementPropertyContext.hxx"
29 
30 namespace com { namespace sun { namespace star {
31     namespace io { class XOutputStream; }
32 } } }
33 
34 class XMLBackgroundImageContext : public XMLElementPropertyContext
35 {
36     XMLPropertyState aPosProp;
37     XMLPropertyState aFilterProp;
38     XMLPropertyState aTransparencyProp;
39 
40     ::com::sun::star::style::GraphicLocation ePos;
41     ::rtl::OUString sURL;
42     ::rtl::OUString sFilter;
43     sal_Int8 nTransparency;
44 
45     ::com::sun::star::uno::Reference < ::com::sun::star::io::XOutputStream > xBase64Stream;
46 
47 private:
48     void ProcessAttrs(
49             const ::com::sun::star::uno::Reference<
50                     ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
51 
52 public:
53     TYPEINFO();
54 
55     XMLBackgroundImageContext(
56         SvXMLImport& rImport,
57         sal_uInt16 nPrfx,
58         const ::rtl::OUString& rLName,
59         const ::com::sun::star::uno::Reference<
60                     ::com::sun::star::xml::sax::XAttributeList > & xAttrList,
61         const XMLPropertyState& rProp,
62         sal_Int32 nPosIdx,
63         sal_Int32 nFilterIdx,
64         sal_Int32 nTransparencyIdx,
65         ::std::vector< XMLPropertyState > &rProps );
66 
67     virtual ~XMLBackgroundImageContext();
68 
69     SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
70                 const ::rtl::OUString& rLocalName,
71                 const ::com::sun::star::uno::Reference<
72                     ::com::sun::star::xml::sax::XAttributeList > & xAttrList );
73 
74     virtual void EndElement();
75 };
76 
77 
78 #endif
79 
80