fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / oox / inc / drawingml / fillpropertiesgroupcontext.hxx
blob5387b340dcc34607a2918c6125286203a32e5d62
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_OOX_DRAWINGML_FILLPROPERTIESGROUPCONTEXT_HXX
21 #define INCLUDED_OOX_DRAWINGML_FILLPROPERTIESGROUPCONTEXT_HXX
23 #include <drawingml/colorchoicecontext.hxx>
24 #include <oox/drawingml/fillproperties.hxx>
26 namespace oox {
27 namespace drawingml {
31 /** Context handler that imports the a:solidFill element. */
32 class SolidFillContext : public ColorContext
34 public:
35 explicit SolidFillContext(
36 ::oox::core::ContextHandler2Helper& rParent,
37 const ::oox::AttributeList& rAttribs,
38 FillProperties& rFillProps );
43 /** Context handler that imports the a:gradFill element. */
44 class GradientFillContext : public ::oox::core::ContextHandler2
46 public:
47 explicit GradientFillContext(
48 ::oox::core::ContextHandler2Helper& rParent,
49 const ::oox::AttributeList& rAttribs,
50 GradientFillProperties& rGradientProps );
52 virtual ::oox::core::ContextHandlerRef
53 onCreateContext(
54 sal_Int32 nElement,
55 const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
57 private:
58 GradientFillProperties& mrGradientProps;
61 /** Context handler that imports the a:pattFill element. */
62 class PatternFillContext : public ::oox::core::ContextHandler2
64 public:
65 explicit PatternFillContext(
66 ::oox::core::ContextHandler2Helper& rParent,
67 const ::oox::AttributeList& rAttribs,
68 PatternFillProperties& rPatternProps );
70 virtual ::oox::core::ContextHandlerRef
71 onCreateContext(
72 sal_Int32 nElement,
73 const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
75 private:
76 PatternFillProperties& mrPatternProps;
81 /** Context handler that imports a14:imgProps, a14:imgLayer, a14:imgEffect containers
82 and the a14:artistic* effect tags defined in the MS-ODRAWXML extension. */
83 class ArtisticEffectContext : public ::oox::core::ContextHandler2
85 public:
86 explicit ArtisticEffectContext(
87 ::oox::core::ContextHandler2Helper& rParent,
88 ArtisticEffectProperties& rEffect );
89 virtual ~ArtisticEffectContext();
91 virtual ::oox::core::ContextHandlerRef
92 onCreateContext(
93 sal_Int32 nElement,
94 const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
96 private:
97 ArtisticEffectProperties& maEffect;
102 /** Context handler that imports the a:extLst element inside a:blip and its
103 children a:ext, which can contain transformations to the bitmap. */
104 class BlipExtensionContext : public ::oox::core::ContextHandler2
106 public:
107 explicit BlipExtensionContext(
108 ::oox::core::ContextHandler2Helper& rParent,
109 BlipFillProperties& rBlipProps );
110 virtual ~BlipExtensionContext();
112 virtual ::oox::core::ContextHandlerRef
113 onCreateContext(
114 sal_Int32 nElement,
115 const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
117 private:
118 BlipFillProperties& mrBlipProps;
123 /** Context handler that imports the a:duotone element containing the colors
124 of a bitmap duotone transformation. */
125 class DuotoneContext : public ::oox::core::ContextHandler2
127 public:
128 explicit DuotoneContext(
129 ::oox::core::ContextHandler2Helper& rParent,
130 const ::oox::AttributeList& rAttribs,
131 BlipFillProperties& rBlipProps );
132 virtual ~DuotoneContext();
134 virtual ::oox::core::ContextHandlerRef
135 onCreateContext(
136 sal_Int32 nElement,
137 const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
139 private:
140 BlipFillProperties& mrBlipProps;
141 int mnColorIndex;
146 /** Context handler that imports the a:clrChange element containing the colors
147 of a bitmap color change transformation. */
148 class ColorChangeContext : public ::oox::core::ContextHandler2
150 public:
151 explicit ColorChangeContext(
152 ::oox::core::ContextHandler2Helper& rParent,
153 const ::oox::AttributeList& rAttribs,
154 BlipFillProperties& rBlipProps );
155 virtual ~ColorChangeContext();
157 virtual ::oox::core::ContextHandlerRef
158 onCreateContext(
159 sal_Int32 nElement,
160 const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
162 private:
163 BlipFillProperties& mrBlipProps;
164 bool mbUseAlpha;
167 /** Context handler that imports the a:blip element containing the fill bitmap
168 and bitmap color transformation settings. */
169 class BlipContext : public ::oox::core::ContextHandler2
171 public:
172 explicit BlipContext(
173 ::oox::core::ContextHandler2Helper& rParent,
174 const ::oox::AttributeList& rAttribs,
175 BlipFillProperties& rBlipProps );
177 virtual ::oox::core::ContextHandlerRef
178 onCreateContext(
179 sal_Int32 nElement,
180 const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
182 private:
183 BlipFillProperties& mrBlipProps;
186 /** Context handler that imports the a:blipFill element. */
187 class BlipFillContext : public ::oox::core::ContextHandler2
189 public:
190 explicit BlipFillContext(
191 ::oox::core::ContextHandler2Helper& rParent,
192 const ::oox::AttributeList& rAttribs,
193 BlipFillProperties& rBlipProps );
195 virtual ::oox::core::ContextHandlerRef
196 onCreateContext(
197 sal_Int32 nElement,
198 const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
200 private:
201 BlipFillProperties& mrBlipProps;
204 /** Context handler for elements that contain a fill property element
205 (a:noFill, a:solidFill, a:gradFill, a:pattFill, a:blipFill, a:grpFill). */
206 class FillPropertiesContext : public ::oox::core::ContextHandler2
208 public:
209 explicit FillPropertiesContext(
210 ::oox::core::ContextHandler2Helper& rParent,
211 FillProperties& rFillProps );
213 virtual ::oox::core::ContextHandlerRef
214 onCreateContext(
215 sal_Int32 nElement,
216 const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
218 static ::oox::core::ContextHandlerRef
219 createFillContext(
220 ::oox::core::ContextHandler2Helper& rParent,
221 sal_Int32 nElement,
222 const ::oox::AttributeList& rAttribs,
223 FillProperties& rFillProps );
225 protected:
226 FillProperties& mrFillProps;
229 /** Context handler for elements that contain a fill property element
230 (a:noFill, a:solidFill, a:gradFill, a:pattFill, a:blipFill, a:grpFill).
232 This context handler takes a simple color instead of a fill properties
233 struct. The imported fill properties are converted automatically to the
234 best fitting solid color.
236 class SimpleFillPropertiesContext : private FillProperties, public FillPropertiesContext
238 public:
239 explicit SimpleFillPropertiesContext(
240 ::oox::core::ContextHandler2Helper& rParent,
241 Color& rColor );
242 virtual ~SimpleFillPropertiesContext();
244 protected:
245 Color& mrColor;
248 } // namespace drawingml
249 } // namespace oox
251 #endif
253 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */