1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
31 /** Context handler that imports the a:solidFill element. */
32 class SolidFillContext
: public ColorContext
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
47 explicit GradientFillContext(
48 ::oox::core::ContextHandler2Helper
& rParent
,
49 const ::oox::AttributeList
& rAttribs
,
50 GradientFillProperties
& rGradientProps
);
52 virtual ::oox::core::ContextHandlerRef
55 const ::oox::AttributeList
& rAttribs
) SAL_OVERRIDE
;
58 GradientFillProperties
& mrGradientProps
;
61 /** Context handler that imports the a:pattFill element. */
62 class PatternFillContext
: public ::oox::core::ContextHandler2
65 explicit PatternFillContext(
66 ::oox::core::ContextHandler2Helper
& rParent
,
67 const ::oox::AttributeList
& rAttribs
,
68 PatternFillProperties
& rPatternProps
);
70 virtual ::oox::core::ContextHandlerRef
73 const ::oox::AttributeList
& rAttribs
) SAL_OVERRIDE
;
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
86 explicit ArtisticEffectContext(
87 ::oox::core::ContextHandler2Helper
& rParent
,
88 ArtisticEffectProperties
& rEffect
);
89 virtual ~ArtisticEffectContext();
91 virtual ::oox::core::ContextHandlerRef
94 const ::oox::AttributeList
& rAttribs
) SAL_OVERRIDE
;
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
107 explicit BlipExtensionContext(
108 ::oox::core::ContextHandler2Helper
& rParent
,
109 BlipFillProperties
& rBlipProps
);
110 virtual ~BlipExtensionContext();
112 virtual ::oox::core::ContextHandlerRef
115 const ::oox::AttributeList
& rAttribs
) SAL_OVERRIDE
;
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
128 explicit DuotoneContext(
129 ::oox::core::ContextHandler2Helper
& rParent
,
130 const ::oox::AttributeList
& rAttribs
,
131 BlipFillProperties
& rBlipProps
);
132 virtual ~DuotoneContext();
134 virtual ::oox::core::ContextHandlerRef
137 const ::oox::AttributeList
& rAttribs
) SAL_OVERRIDE
;
140 BlipFillProperties
& mrBlipProps
;
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
151 explicit ColorChangeContext(
152 ::oox::core::ContextHandler2Helper
& rParent
,
153 const ::oox::AttributeList
& rAttribs
,
154 BlipFillProperties
& rBlipProps
);
155 virtual ~ColorChangeContext();
157 virtual ::oox::core::ContextHandlerRef
160 const ::oox::AttributeList
& rAttribs
) SAL_OVERRIDE
;
163 BlipFillProperties
& mrBlipProps
;
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
172 explicit BlipContext(
173 ::oox::core::ContextHandler2Helper
& rParent
,
174 const ::oox::AttributeList
& rAttribs
,
175 BlipFillProperties
& rBlipProps
);
177 virtual ::oox::core::ContextHandlerRef
180 const ::oox::AttributeList
& rAttribs
) SAL_OVERRIDE
;
183 BlipFillProperties
& mrBlipProps
;
186 /** Context handler that imports the a:blipFill element. */
187 class BlipFillContext
: public ::oox::core::ContextHandler2
190 explicit BlipFillContext(
191 ::oox::core::ContextHandler2Helper
& rParent
,
192 const ::oox::AttributeList
& rAttribs
,
193 BlipFillProperties
& rBlipProps
);
195 virtual ::oox::core::ContextHandlerRef
198 const ::oox::AttributeList
& rAttribs
) SAL_OVERRIDE
;
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
209 explicit FillPropertiesContext(
210 ::oox::core::ContextHandler2Helper
& rParent
,
211 FillProperties
& rFillProps
);
213 virtual ::oox::core::ContextHandlerRef
216 const ::oox::AttributeList
& rAttribs
) SAL_OVERRIDE
;
218 static ::oox::core::ContextHandlerRef
220 ::oox::core::ContextHandler2Helper
& rParent
,
222 const ::oox::AttributeList
& rAttribs
,
223 FillProperties
& rFillProps
);
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
239 explicit SimpleFillPropertiesContext(
240 ::oox::core::ContextHandler2Helper
& rParent
,
242 virtual ~SimpleFillPropertiesContext();
248 } // namespace drawingml
253 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */