LibreOffice Module xmloff (master) 1
FillStyleContext.hxx
Go to the documentation of this file.
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#pragma once
21
22#include <com/sun/star/awt/ColorStop.hpp>
23#include <com/sun/star/io/XOutputStream.hpp>
24#include <xmloff/xmlstyle.hxx>
25#include <rtl/ustring.hxx>
26#include <sal/types.h>
27
28#include <vector>
29
30// draw:gradient context
31
33{
34private:
35 css::uno::Any maAny;
36 OUString maStrName;
37 std::vector<css::awt::ColorStop> maColorStopVec;
38
39public:
40
41 XMLGradientStyleContext( SvXMLImport& rImport, sal_Int32 nElement,
42 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList );
43 virtual ~XMLGradientStyleContext() override;
44
45 virtual css::uno::Reference<css::xml::sax::XFastContextHandler> SAL_CALL createFastChildContext(
46 sal_Int32 nElement,
47 const css::uno::Reference<css::xml::sax::XFastAttributeList>& AttrList) override;
48
49 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
50
51 virtual bool IsTransient() const override;
52};
53
54// draw:hatch context
55
57{
58private:
59 css::uno::Any maAny;
60 OUString maStrName;
61
62public:
63
64 XMLHatchStyleContext( SvXMLImport& rImport, sal_Int32 nElement,
65 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList );
66 virtual ~XMLHatchStyleContext() override;
67
68 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
69
70 virtual bool IsTransient() const override;
71};
72
73// draw:fill-image context
74
76{
77private:
78 css::uno::Any maAny;
79 OUString maStrName;
80 css::uno::Reference < css::io::XOutputStream > mxBase64Stream;
81
82public:
83
84 XMLBitmapStyleContext( SvXMLImport& rImport, sal_Int32 nElement,
85 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList );
86 virtual ~XMLBitmapStyleContext() override;
87
88 virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
89 sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& AttrList ) override;
90
91 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
92
93 virtual bool IsTransient() const override;
94};
95
96// draw:transparency context
97
99{
100private:
101 css::uno::Any maAny;
102 OUString maStrName;
103 std::vector<css::awt::ColorStop> maColorStopVec; // Transparency is handled as color gray.
104
105public:
106
107 XMLTransGradientStyleContext( SvXMLImport& rImport, sal_Int32 nElement,
108 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList );
109 virtual ~XMLTransGradientStyleContext() override;
110
111 virtual css::uno::Reference<css::xml::sax::XFastContextHandler> SAL_CALL createFastChildContext(
112 sal_Int32 nElement,
113 const css::uno::Reference<css::xml::sax::XFastAttributeList>& AttrList) override;
114
115 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
116
117 virtual bool IsTransient() const override;
118};
119
121{
122private:
123
124public:
125
126 XMLTransparencyStopContext(SvXMLImport& rImport, sal_Int32 nElement,
127 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
128 std::vector<css::awt::ColorStop>& rColorStopVec);
129 virtual ~XMLTransparencyStopContext() override;
130};
131
132// draw:marker context
133
135{
136private:
137 css::uno::Any maAny;
138 OUString maStrName;
139
140public:
141
142 XMLMarkerStyleContext( SvXMLImport& rImport, sal_Int32 nElement,
143 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList );
144 virtual ~XMLMarkerStyleContext() override;
145
146 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
147
148 virtual bool IsTransient() const override;
149};
150
151// draw:marker context
152
154{
155private:
156 css::uno::Any maAny;
157 OUString maStrName;
158
159public:
160
161 XMLDashStyleContext( SvXMLImport& rImport, sal_Int32 nElement,
162 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList );
163 virtual ~XMLDashStyleContext() override;
164
165 virtual void SAL_CALL endFastElement(sal_Int32 nElement) override;
166
167 virtual bool IsTransient() const override;
168};
169
170/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
friend class SvXMLImport
Definition: xmlictxt.hxx:49
virtual ~XMLBitmapStyleContext() override
XMLBitmapStyleContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
css::uno::Reference< css::io::XOutputStream > mxBase64Stream
virtual bool IsTransient() const override
if this method returns true, its parent styles context should not add it to its container.
virtual bool IsTransient() const override
if this method returns true, its parent styles context should not add it to its container.
XMLDashStyleContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
virtual ~XMLDashStyleContext() override
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
virtual ~XMLGradientStyleContext() override
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
XMLGradientStyleContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
std::vector< css::awt::ColorStop > maColorStopVec
virtual bool IsTransient() const override
if this method returns true, its parent styles context should not add it to its container.
virtual bool IsTransient() const override
if this method returns true, its parent styles context should not add it to its container.
virtual ~XMLHatchStyleContext() override
XMLHatchStyleContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
virtual ~XMLMarkerStyleContext() override
XMLMarkerStyleContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
virtual bool IsTransient() const override
if this method returns true, its parent styles context should not add it to its container.
virtual bool IsTransient() const override
if this method returns true, its parent styles context should not add it to its container.
virtual ~XMLTransGradientStyleContext() override
std::vector< css::awt::ColorStop > maColorStopVec
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
XMLTransGradientStyleContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
XMLTransparencyStopContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, std::vector< css::awt::ColorStop > &rColorStopVec)
virtual ~XMLTransparencyStopContext() override